|
|
var yG=Object.defineProperty;var xG=(e,t,n)=>t in e?yG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bn=(e,t,n)=>(xG(e,typeof t!="symbol"?t+"":t,n),n);function zL(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 o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ru=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function LE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w={exports:{}},fr={};/**
|
|
|
* @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 Rv=Symbol.for("react.element"),bG=Symbol.for("react.portal"),_G=Symbol.for("react.fragment"),wG=Symbol.for("react.strict_mode"),CG=Symbol.for("react.profiler"),SG=Symbol.for("react.provider"),EG=Symbol.for("react.context"),PG=Symbol.for("react.forward_ref"),IG=Symbol.for("react.suspense"),TG=Symbol.for("react.memo"),kG=Symbol.for("react.lazy"),KM=Symbol.iterator;function MG(e){return e===null||typeof e!="object"?null:(e=KM&&e[KM]||e["@@iterator"],typeof e=="function"?e:null)}var $L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BL=Object.assign,VL={};function hp(e,t,n){this.props=e,this.context=t,this.refs=VL,this.updater=n||$L}hp.prototype.isReactComponent={};hp.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")};hp.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function UL(){}UL.prototype=hp.prototype;function FE(e,t,n){this.props=e,this.context=t,this.refs=VL,this.updater=n||$L}var zE=FE.prototype=new UL;zE.constructor=FE;BL(zE,hp.prototype);zE.isPureReactComponent=!0;var WM=Array.isArray,jL=Object.prototype.hasOwnProperty,$E={current:null},HL={key:!0,ref:!0,__self:!0,__source:!0};function KL(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)jL.call(t,r)&&!HL.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var u=Array(a),d=0;d<a;d++)u[d]=arguments[d+2];i.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Rv,type:e,key:o,ref:s,props:i,_owner:$E.current}}function RG(e,t){return{$$typeof:Rv,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function BE(e){return typeof e=="object"&&e!==null&&e.$$typeof===Rv}function AG(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var GM=/\/+/g;function M4(e,t){return typeof e=="object"&&e!==null&&e.key!=null?AG(""+e.key):t.toString(36)}function Ox(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Rv:case bG:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+M4(s,0):r,WM(i)?(n="",e!=null&&(n=e.replace(GM,"$&/")+"/"),Ox(i,t,n,"",function(d){return d})):i!=null&&(BE(i)&&(i=RG(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(GM,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",WM(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+M4(o,a);s+=Ox(o,t,n,u,i)}else if(u=MG(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+M4(o,a++),s+=Ox(o,t,n,u,i);else if(o==="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 Sy(e,t,n){if(e==null)return e;var r=[],i=0;return Ox(e,r,"","",function(o){return t.call(n,o,i++)}),r}function DG(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 Go={current:null},Nx={transition:null},OG={ReactCurrentDispatcher:Go,ReactCurrentBatchConfig:Nx,ReactCurrentOwner:$E};fr.Children={map:Sy,forEach:function(e,t,n){Sy(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Sy(e,function(){t++}),t},toArray:function(e){return Sy(e,function(t){return t})||[]},only:function(e){if(!BE(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};fr.Component=hp;fr.Fragment=_G;fr.Profiler=CG;fr.PureComponent=FE;fr.StrictMode=wG;fr.Suspense=IG;fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OG;fr.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=BL({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=$E.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)jL.call(t,u)&&!HL.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var d=0;d<u;d++)a[d]=arguments[d+2];r.children=a}return{$$typeof:Rv,type:e.type,key:i,ref:o,props:r,_owner:s}};fr.createContext=function(e){return e={$$typeof:EG,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:SG,_context:e},e.Consumer=e};fr.createElement=KL;fr.createFactory=function(e){var t=KL.bind(null,e);return t.type=e,t};fr.createRef=function(){return{current:null}};fr.forwardRef=function(e){return{$$typeof:PG,render:e}};fr.isValidElement=BE;fr.lazy=function(e){return{$$typeof:kG,_payload:{_status:-1,_result:e},_init:DG}};fr.memo=function(e,t){return{$$typeof:TG,type:e,compare:t===void 0?null:t}};fr.startTransition=function(e){var t=Nx.transition;Nx.transition={};try{e()}finally{Nx.transition=t}};fr.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};fr.useCallback=function(e,t){return Go.current.useCallback(e,t)};fr.useContext=function(e){return Go.current.useContext(e)};fr.useDebugValue=function(){};fr.useDeferredValue=function(e){return Go.current.useDeferredValue(e)};fr.useEffect=function(e,t){return Go.current.useEffect(e,t)};fr.useId=function(){return Go.current.useId()};fr.useImperativeHandle=function(e,t,n){return Go.current.useImperativeHandle(e,t,n)};fr.useInsertionEffect=function(e,t){return Go.current.useInsertionEffect(e,t)};fr.useLayoutEffect=function(e,t){return Go.current.useLayoutEffect(e,t)};fr.useMemo=function(e,t){return Go.current.useMemo(e,t)};fr.useReducer=function(e,t,n){return Go.current.useReducer(e,t,n)};fr.useRef=function(e){return Go.current.useRef(e)};fr.useState=function(e){return Go.current.useState(e)};fr.useSyncExternalStore=function(e,t,n){return Go.current.useSyncExternalStore(e,t,n)};fr.useTransition=function(){return Go.current.useTransition()};fr.version="18.2.0";(function(e){e.exports=fr})(w);const Un=LE(w.exports),v1=zL({__proto__:null,default:Un},[w.exports]);var B2={},Cl={exports:{}},Ba={},WL={exports:{}},GL={};/**
|
|
|
* @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,he){var _e=oe.length;oe.push(he);e:for(;0<_e;){var be=_e-1>>>1,xe=oe[be];if(0<i(xe,he))oe[be]=he,oe[_e]=xe,_e=be;else break e}}function n(oe){return oe.length===0?null:oe[0]}function r(oe){if(oe.length===0)return null;var he=oe[0],_e=oe.pop();if(_e!==he){oe[0]=_e;e:for(var be=0,xe=oe.length,Te=xe>>>1;be<Te;){var Ee=2*(be+1)-1,Ce=oe[Ee],ke=Ee+1,De=oe[ke];if(0>i(Ce,_e))ke<xe&&0>i(De,Ce)?(oe[be]=De,oe[ke]=_e,be=ke):(oe[be]=Ce,oe[Ee]=_e,be=Ee);else if(ke<xe&&0>i(De,_e))oe[be]=De,oe[ke]=_e,be=ke;else break e}}return he}function i(oe,he){var _e=oe.sortIndex-he.sortIndex;return _e!==0?_e:oe.id-he.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],d=[],p=1,m=null,v=3,x=!1,_=!1,P=!1,k=typeof setTimeout=="function"?setTimeout:null,T=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 he=n(d);he!==null;){if(he.callback===null)r(d);else if(he.startTime<=oe)r(d),he.sortIndex=he.expirationTime,t(u,he);else break;he=n(d)}}function N(oe){if(P=!1,O(oe),!_)if(n(u)!==null)_=!0,ne(L);else{var he=n(d);he!==null&&se(N,he.startTime-oe)}}function L(oe,he){_=!1,P&&(P=!1,T(B),B=-1),x=!0;var _e=v;try{for(O(he),m=n(u);m!==null&&(!(m.expirationTime>he)||oe&&!ee());){var be=m.callback;if(typeof be=="function"){m.callback=null,v=m.priorityLevel;var xe=be(m.expirationTime<=he);he=e.unstable_now(),typeof xe=="function"?m.callback=xe:m===n(u)&&r(u),O(he)}else r(u);m=n(u)}if(m!==null)var Te=!0;else{var Ee=n(d);Ee!==null&&se(N,Ee.startTime-he),Te=!1}return Te}finally{m=null,v=_e,x=!1}}var F=!1,V=null,B=-1,H=5,G=-1;function ee(){return!(e.unstable_now()-G<H)}function X(){if(V!==null){var oe=e.unstable_now();G=oe;var he=!0;try{he=V(!0,oe)}finally{he?Z():(F=!1,V=null)}}else F=!1}var Z;if(typeof M=="function")Z=function(){M(X)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,le=Q.port2;Q.port1.onmessage=X,Z=function(){le.postMessage(null)}}else Z=function(){k(X,0)};function ne(oe){V=oe,F||(F=!0,Z())}function se(oe,he){B=k(function(){oe(e.unstable_now())},he)}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(){_||x||(_=!0,ne(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"):H=0<oe?Math.floor(1e3/oe):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(oe){switch(v){case 1:case 2:case 3:var he=3;break;default:he=v}var _e=v;v=he;try{return oe()}finally{v=_e}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(oe,he){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var _e=v;v=oe;try{return he()}finally{v=_e}},e.unstable_scheduleCallback=function(oe,he,_e){var be=e.unstable_now();switch(typeof _e=="object"&&_e!==null?(_e=_e.delay,_e=typeof _e=="number"&&0<_e?be+_e:be):_e=be,oe){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=_e+xe,oe={id:p++,callback:he,priorityLevel:oe,startTime:_e,expirationTime:xe,sortIndex:-1},_e>be?(oe.sortIndex=_e,t(d,oe),n(u)===null&&oe===n(d)&&(P?(T(B),B=-1):P=!0,se(N,_e-be))):(oe.sortIndex=xe,t(u,oe),_||x||(_=!0,ne(L))),oe},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(oe){var he=v;return function(){var _e=v;v=he;try{return oe.apply(this,arguments)}finally{v=_e}}}})(GL);(function(e){e.exports=GL})(WL);/**
|
|
|
* @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 qL=w.exports,Fa=WL.exports;function Jt(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 ZL=new Set,zg={};function cf(e,t){Bh(e,t),Bh(e+"Capture",t)}function Bh(e,t){for(zg[e]=t,e=0;e<t.length;e++)ZL.add(t[e])}var du=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),V2=Object.prototype.hasOwnProperty,NG=/^[: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]*$/,qM={},ZM={};function LG(e){return V2.call(ZM,e)?!0:V2.call(qM,e)?!1:NG.test(e)?ZM[e]=!0:(qM[e]=!0,!1)}function FG(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 zG(e,t,n,r){if(t===null||typeof t>"u"||FG(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 qo(e,t,n,r,i,o,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=o,this.removeEmptyString=s}var vo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){vo[e]=new qo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];vo[t]=new qo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){vo[e]=new qo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vo[e]=new qo(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){vo[e]=new qo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){vo[e]=new qo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){vo[e]=new qo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){vo[e]=new qo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){vo[e]=new qo(e,5,!1,e.toLowerCase(),null,!1,!1)});var VE=/[\-:]([a-z])/g;function UE(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(VE,UE);vo[t]=new qo(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(VE,UE);vo[t]=new qo(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(VE,UE);vo[t]=new qo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){vo[e]=new qo(e,1,!1,e.toLowerCase(),null,!1,!1)});vo.xlinkHref=new qo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){vo[e]=new qo(e,1,!1,e.toLowerCase(),null,!0,!0)});function jE(e,t,n,r){var i=vo.hasOwnProperty(t)?vo[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(zG(t,n,i,r)&&(n=null),r||i===null?LG(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 yu=qL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ey=Symbol.for("react.element"),ch=Symbol.for("react.portal"),dh=Symbol.for("react.fragment"),HE=Symbol.for("react.strict_mode"),U2=Symbol.for("react.profiler"),XL=Symbol.for("react.provider"),YL=Symbol.for("react.context"),KE=Symbol.for("react.forward_ref"),j2=Symbol.for("react.suspense"),H2=Symbol.for("react.suspense_list"),WE=Symbol.for("react.memo"),qu=Symbol.for("react.lazy"),QL=Symbol.for("react.offscreen"),XM=Symbol.iterator;function Im(e){return e===null||typeof e!="object"?null:(e=XM&&e[XM]||e["@@iterator"],typeof e=="function"?e:null)}var mi=Object.assign,R4;function eg(e){if(R4===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);R4=t&&t[1]||""}return`
|
|
|
`+R4+e}var A4=!1;function D4(e,t){if(!e||A4)return"";A4=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
|
|
|
`),o=r.stack.split(`
|
|
|
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var u=`
|
|
|
`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{A4=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eg(e):""}function $G(e){switch(e.tag){case 5:return eg(e.type);case 16:return eg("Lazy");case 13:return eg("Suspense");case 19:return eg("SuspenseList");case 0:case 2:case 15:return e=D4(e.type,!1),e;case 11:return e=D4(e.type.render,!1),e;case 1:return e=D4(e.type,!0),e;default:return""}}function K2(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 dh:return"Fragment";case ch:return"Portal";case U2:return"Profiler";case HE:return"StrictMode";case j2:return"Suspense";case H2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case YL:return(e.displayName||"Context")+".Consumer";case XL:return(e._context.displayName||"Context")+".Provider";case KE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case WE:return t=e.displayName||null,t!==null?t:K2(e.type)||"Memo";case qu:t=e._payload,e=e._init;try{return K2(e(t))}catch{}}return null}function BG(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 K2(t);case 8:return t===HE?"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 Pc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function JL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function VG(e){var t=JL(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,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.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 Py(e){e._valueTracker||(e._valueTracker=VG(e))}function e8(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=JL(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function y1(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 W2(e,t){var n=t.checked;return mi({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function YM(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pc(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 t8(e,t){t=t.checked,t!=null&&jE(e,"checked",t,!1)}function G2(e,t){t8(e,t);var n=Pc(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")?q2(e,t.type,n):t.hasOwnProperty("defaultValue")&&q2(e,t.type,Pc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function QM(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 q2(e,t,n){(t!=="number"||y1(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tg=Array.isArray;function Ph(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=""+Pc(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 Z2(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Jt(91));return mi({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function JM(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Jt(92));if(tg(n)){if(1<n.length)throw Error(Jt(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pc(n)}}function n8(e,t){var n=Pc(t.value),r=Pc(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 eR(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function r8(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 X2(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?r8(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Iy,i8=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(Iy=Iy||document.createElement("div"),Iy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Iy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $g(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hg={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},UG=["Webkit","ms","Moz","O"];Object.keys(hg).forEach(function(e){UG.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hg[t]=hg[e]})});function o8(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hg.hasOwnProperty(e)&&hg[e]?(""+t).trim():t+"px"}function a8(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=o8(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var jG=mi({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 Y2(e,t){if(t){if(jG[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Jt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Jt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Jt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Jt(62))}}function Q2(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 J2=null;function GE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var eS=null,Ih=null,Th=null;function tR(e){if(e=Ov(e)){if(typeof eS!="function")throw Error(Jt(280));var t=e.stateNode;t&&(t=Zb(t),eS(e.stateNode,e.type,t))}}function s8(e){Ih?Th?Th.push(e):Th=[e]:Ih=e}function l8(){if(Ih){var e=Ih,t=Th;if(Th=Ih=null,tR(e),t)for(e=0;e<t.length;e++)tR(t[e])}}function u8(e,t){return e(t)}function c8(){}var O4=!1;function d8(e,t,n){if(O4)return e(t,n);O4=!0;try{return u8(e,t,n)}finally{O4=!1,(Ih!==null||Th!==null)&&(c8(),l8())}}function Bg(e,t){var n=e.stateNode;if(n===null)return null;var r=Zb(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(Jt(231,t,typeof n));return n}var tS=!1;if(du)try{var Tm={};Object.defineProperty(Tm,"passive",{get:function(){tS=!0}}),window.addEventListener("test",Tm,Tm),window.removeEventListener("test",Tm,Tm)}catch{tS=!1}function HG(e,t,n,r,i,o,s,a,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(p){this.onError(p)}}var pg=!1,x1=null,b1=!1,nS=null,KG={onError:function(e){pg=!0,x1=e}};function WG(e,t,n,r,i,o,s,a,u){pg=!1,x1=null,HG.apply(KG,arguments)}function GG(e,t,n,r,i,o,s,a,u){if(WG.apply(this,arguments),pg){if(pg){var d=x1;pg=!1,x1=null}else throw Error(Jt(198));b1||(b1=!0,nS=d)}}function df(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 f8(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 nR(e){if(df(e)!==e)throw Error(Jt(188))}function qG(e){var t=e.alternate;if(!t){if(t=df(e),t===null)throw Error(Jt(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return nR(i),e;if(o===r)return nR(i),t;o=o.sibling}throw Error(Jt(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(Jt(189))}}if(n.alternate!==r)throw Error(Jt(190))}if(n.tag!==3)throw Error(Jt(188));return n.stateNode.current===n?e:t}function h8(e){return e=qG(e),e!==null?p8(e):null}function p8(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=p8(e);if(t!==null)return t;e=e.sibling}return null}var m8=Fa.unstable_scheduleCallback,rR=Fa.unstable_cancelCallback,ZG=Fa.unstable_shouldYield,XG=Fa.unstable_requestPaint,Ti=Fa.unstable_now,YG=Fa.unstable_getCurrentPriorityLevel,qE=Fa.unstable_ImmediatePriority,g8=Fa.unstable_UserBlockingPriority,_1=Fa.unstable_NormalPriority,QG=Fa.unstable_LowPriority,v8=Fa.unstable_IdlePriority,Kb=null,pl=null;function JG(e){if(pl&&typeof pl.onCommitFiberRoot=="function")try{pl.onCommitFiberRoot(Kb,e,void 0,(e.current.flags&128)===128)}catch{}}var $s=Math.clz32?Math.clz32:nq,eq=Math.log,tq=Math.LN2;function nq(e){return e>>>=0,e===0?32:31-(eq(e)/tq|0)|0}var Ty=64,ky=4194304;function ng(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 w1(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=ng(a):(o&=s,o!==0&&(r=ng(o)))}else s=n&~i,s!==0?r=ng(s):o!==0&&(r=ng(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&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-$s(t),i=1<<n,r|=e[n],t&=~i;return r}function rq(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 iq(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-$s(o),a=1<<s,u=i[s];u===-1?((a&n)===0||(a&r)!==0)&&(i[s]=rq(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function rS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function y8(){var e=Ty;return Ty<<=1,(Ty&4194240)===0&&(Ty=64),e}function N4(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Av(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$s(t),e[t]=n}function oq(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-$s(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function ZE(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$s(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Or=0;function x8(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var b8,XE,_8,w8,C8,iS=!1,My=[],fc=null,hc=null,pc=null,Vg=new Map,Ug=new Map,Qu=[],aq="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 iR(e,t){switch(e){case"focusin":case"focusout":fc=null;break;case"dragenter":case"dragleave":hc=null;break;case"mouseover":case"mouseout":pc=null;break;case"pointerover":case"pointerout":Vg.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ug.delete(t.pointerId)}}function km(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Ov(t),t!==null&&XE(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function sq(e,t,n,r,i){switch(t){case"focusin":return fc=km(fc,e,t,n,r,i),!0;case"dragenter":return hc=km(hc,e,t,n,r,i),!0;case"mouseover":return pc=km(pc,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Vg.set(o,km(Vg.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ug.set(o,km(Ug.get(o)||null,e,t,n,r,i)),!0}return!1}function S8(e){var t=Md(e.target);if(t!==null){var n=df(t);if(n!==null){if(t=n.tag,t===13){if(t=f8(n),t!==null){e.blockedOn=t,C8(e.priority,function(){_8(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 Lx(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=oS(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);J2=r,n.target.dispatchEvent(r),J2=null}else return t=Ov(n),t!==null&&XE(t),e.blockedOn=n,!1;t.shift()}return!0}function oR(e,t,n){Lx(e)&&n.delete(t)}function lq(){iS=!1,fc!==null&&Lx(fc)&&(fc=null),hc!==null&&Lx(hc)&&(hc=null),pc!==null&&Lx(pc)&&(pc=null),Vg.forEach(oR),Ug.forEach(oR)}function Mm(e,t){e.blockedOn===t&&(e.blockedOn=null,iS||(iS=!0,Fa.unstable_scheduleCallback(Fa.unstable_NormalPriority,lq)))}function jg(e){function t(i){return Mm(i,e)}if(0<My.length){Mm(My[0],e);for(var n=1;n<My.length;n++){var r=My[n];r.blockedOn===e&&(r.blockedOn=null)}}for(fc!==null&&Mm(fc,e),hc!==null&&Mm(hc,e),pc!==null&&Mm(pc,e),Vg.forEach(t),Ug.forEach(t),n=0;n<Qu.length;n++)r=Qu[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qu.length&&(n=Qu[0],n.blockedOn===null);)S8(n),n.blockedOn===null&&Qu.shift()}var kh=yu.ReactCurrentBatchConfig,C1=!0;function uq(e,t,n,r){var i=Or,o=kh.transition;kh.transition=null;try{Or=1,YE(e,t,n,r)}finally{Or=i,kh.transition=o}}function cq(e,t,n,r){var i=Or,o=kh.transition;kh.transition=null;try{Or=4,YE(e,t,n,r)}finally{Or=i,kh.transition=o}}function YE(e,t,n,r){if(C1){var i=oS(e,t,n,r);if(i===null)K4(e,t,r,S1,n),iR(e,r);else if(sq(i,e,t,n,r))r.stopPropagation();else if(iR(e,r),t&4&&-1<aq.indexOf(e)){for(;i!==null;){var o=Ov(i);if(o!==null&&b8(o),o=oS(e,t,n,r),o===null&&K4(e,t,r,S1,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else K4(e,t,r,null,n)}}var S1=null;function oS(e,t,n,r){if(S1=null,e=GE(r),e=Md(e),e!==null)if(t=df(e),t===null)e=null;else if(n=t.tag,n===13){if(e=f8(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 S1=e,null}function E8(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(YG()){case qE:return 1;case g8:return 4;case _1:case QG:return 16;case v8:return 536870912;default:return 16}default:return 16}}var ec=null,QE=null,Fx=null;function P8(){if(Fx)return Fx;var e,t=QE,n=t.length,r,i="value"in ec?ec.value:ec.textContent,o=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[o-r];r++);return Fx=i.slice(e,1<r?1-r:void 0)}function zx(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ry(){return!0}function aR(){return!1}function Va(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ry:aR,this.isPropagationStopped=aR,this}return mi(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=Ry)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ry)},persist:function(){},isPersistent:Ry}),t}var pp={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},JE=Va(pp),Dv=mi({},pp,{view:0,detail:0}),dq=Va(Dv),L4,F4,Rm,Wb=mi({},Dv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eP,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!==Rm&&(Rm&&e.type==="mousemove"?(L4=e.screenX-Rm.screenX,F4=e.screenY-Rm.screenY):F4=L4=0,Rm=e),L4)},movementY:function(e){return"movementY"in e?e.movementY:F4}}),sR=Va(Wb),fq=mi({},Wb,{dataTransfer:0}),hq=Va(fq),pq=mi({},Dv,{relatedTarget:0}),z4=Va(pq),mq=mi({},pp,{animationName:0,elapsedTime:0,pseudoElement:0}),gq=Va(mq),vq=mi({},pp,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yq=Va(vq),xq=mi({},pp,{data:0}),lR=Va(xq),bq={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_q={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"},wq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cq(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wq[e])?!!t[e]:!1}function eP(){return Cq}var Sq=mi({},Dv,{key:function(e){if(e.key){var t=bq[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zx(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_q[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eP,charCode:function(e){return e.type==="keypress"?zx(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zx(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Eq=Va(Sq),Pq=mi({},Wb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uR=Va(Pq),Iq=mi({},Dv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eP}),Tq=Va(Iq),kq=mi({},pp,{propertyName:0,elapsedTime:0,pseudoElement:0}),Mq=Va(kq),Rq=mi({},Wb,{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}),Aq=Va(Rq),Dq=[9,13,27,32],tP=du&&"CompositionEvent"in window,mg=null;du&&"documentMode"in document&&(mg=document.documentMode);var Oq=du&&"TextEvent"in window&&!mg,I8=du&&(!tP||mg&&8<mg&&11>=mg),cR=String.fromCharCode(32),dR=!1;function T8(e,t){switch(e){case"keyup":return Dq.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k8(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fh=!1;function Nq(e,t){switch(e){case"compositionend":return k8(t);case"keypress":return t.which!==32?null:(dR=!0,cR);case"textInput":return e=t.data,e===cR&&dR?null:e;default:return null}}function Lq(e,t){if(fh)return e==="compositionend"||!tP&&T8(e,t)?(e=P8(),Fx=QE=ec=null,fh=!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 I8&&t.locale!=="ko"?null:t.data;default:return null}}var Fq={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 fR(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fq[e.type]:t==="textarea"}function M8(e,t,n,r){s8(r),t=E1(t,"onChange"),0<t.length&&(n=new JE("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gg=null,Hg=null;function zq(e){V8(e,0)}function Gb(e){var t=mh(e);if(e8(t))return e}function $q(e,t){if(e==="change")return t}var R8=!1;if(du){var $4;if(du){var B4="oninput"in document;if(!B4){var hR=document.createElement("div");hR.setAttribute("oninput","return;"),B4=typeof hR.oninput=="function"}$4=B4}else $4=!1;R8=$4&&(!document.documentMode||9<document.documentMode)}function pR(){gg&&(gg.detachEvent("onpropertychange",A8),Hg=gg=null)}function A8(e){if(e.propertyName==="value"&&Gb(Hg)){var t=[];M8(t,Hg,e,GE(e)),d8(zq,t)}}function Bq(e,t,n){e==="focusin"?(pR(),gg=t,Hg=n,gg.attachEvent("onpropertychange",A8)):e==="focusout"&&pR()}function Vq(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gb(Hg)}function Uq(e,t){if(e==="click")return Gb(t)}function jq(e,t){if(e==="input"||e==="change")return Gb(t)}function Hq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Us=typeof Object.is=="function"?Object.is:Hq;function Kg(e,t){if(Us(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(!V2.call(t,i)||!Us(e[i],t[i]))return!1}return!0}function mR(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gR(e,t){var n=mR(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=mR(n)}}function D8(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?D8(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function O8(){for(var e=window,t=y1();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=y1(e.document)}return t}function nP(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 Kq(e){var t=O8(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&D8(n.ownerDocument.documentElement,n)){if(r!==null&&nP(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,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=gR(n,o);var s=gR(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(),o>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 Wq=du&&"documentMode"in document&&11>=document.documentMode,hh=null,aS=null,vg=null,sS=!1;function vR(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;sS||hh==null||hh!==y1(r)||(r=hh,"selectionStart"in r&&nP(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}),vg&&Kg(vg,r)||(vg=r,r=E1(aS,"onSelect"),0<r.length&&(t=new JE("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hh)))}function Ay(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ph={animationend:Ay("Animation","AnimationEnd"),animationiteration:Ay("Animation","AnimationIteration"),animationstart:Ay("Animation","AnimationStart"),transitionend:Ay("Transition","TransitionEnd")},V4={},N8={};du&&(N8=document.createElement("div").style,"AnimationEvent"in window||(delete ph.animationend.animation,delete ph.animationiteration.animation,delete ph.animationstart.animation),"TransitionEvent"in window||delete ph.transitionend.transition);function qb(e){if(V4[e])return V4[e];if(!ph[e])return e;var t=ph[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in N8)return V4[e]=t[n];return e}var L8=qb("animationend"),F8=qb("animationiteration"),z8=qb("animationstart"),$8=qb("transitionend"),B8=new Map,yR="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 Oc(e,t){B8.set(e,t),cf(t,[e])}for(var U4=0;U4<yR.length;U4++){var j4=yR[U4],Gq=j4.toLowerCase(),qq=j4[0].toUpperCase()+j4.slice(1);Oc(Gq,"on"+qq)}Oc(L8,"onAnimationEnd");Oc(F8,"onAnimationIteration");Oc(z8,"onAnimationStart");Oc("dblclick","onDoubleClick");Oc("focusin","onFocus");Oc("focusout","onBlur");Oc($8,"onTransitionEnd");Bh("onMouseEnter",["mouseout","mouseover"]);Bh("onMouseLeave",["mouseout","mouseover"]);Bh("onPointerEnter",["pointerout","pointerover"]);Bh("onPointerLeave",["pointerout","pointerover"]);cf("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));cf("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));cf("onBeforeInput",["compositionend","keypress","textInput","paste"]);cf("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));cf("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));cf("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rg="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(" "),Zq=new Set("cancel close invalid load scroll toggle".split(" ").concat(rg));function xR(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,GG(r,t,void 0,e),e.currentTarget=null}function V8(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 o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],u=a.instance,d=a.currentTarget;if(a=a.listener,u!==o&&i.isPropagationStopped())break e;xR(i,a,d),o=u}else for(s=0;s<r.length;s++){if(a=r[s],u=a.instance,d=a.currentTarget,a=a.listener,u!==o&&i.isPropagationStopped())break e;xR(i,a,d),o=u}}}if(b1)throw e=nS,b1=!1,nS=null,e}function ei(e,t){var n=t[fS];n===void 0&&(n=t[fS]=new Set);var r=e+"__bubble";n.has(r)||(U8(t,e,2,!1),n.add(r))}function H4(e,t,n){var r=0;t&&(r|=4),U8(n,e,r,t)}var Dy="_reactListening"+Math.random().toString(36).slice(2);function Wg(e){if(!e[Dy]){e[Dy]=!0,ZL.forEach(function(n){n!=="selectionchange"&&(Zq.has(n)||H4(n,!1,e),H4(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dy]||(t[Dy]=!0,H4("selectionchange",!1,t))}}function U8(e,t,n,r){switch(E8(t)){case 1:var i=uq;break;case 4:i=cq;break;default:i=YE}n=i.bind(null,t,n,e),i=void 0,!tS||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 K4(e,t,n,r,i){var o=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 a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;a!==null;){if(s=Md(a),s===null)return;if(u=s.tag,u===5||u===6){r=o=s;continue e}a=a.parentNode}}r=r.return}d8(function(){var d=o,p=GE(n),m=[];e:{var v=B8.get(e);if(v!==void 0){var x=JE,_=e;switch(e){case"keypress":if(zx(n)===0)break e;case"keydown":case"keyup":x=Eq;break;case"focusin":_="focus",x=z4;break;case"focusout":_="blur",x=z4;break;case"beforeblur":case"afterblur":x=z4;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":x=sR;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=hq;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Tq;break;case L8:case F8:case z8:x=gq;break;case $8:x=Mq;break;case"scroll":x=dq;break;case"wheel":x=Aq;break;case"copy":case"cut":case"paste":x=yq;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=uR}var P=(t&4)!==0,k=!P&&e==="scroll",T=P?v!==null?v+"Capture":null:v;P=[];for(var M=d,O;M!==null;){O=M;var N=O.stateNode;if(O.tag===5&&N!==null&&(O=N,T!==null&&(N=Bg(M,T),N!=null&&P.push(Gg(M,N,O)))),k)break;M=M.return}0<P.length&&(v=new x(v,_,null,n,p),m.push({event:v,listeners:P}))}}if((t&7)===0){e:{if(v=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",v&&n!==J2&&(_=n.relatedTarget||n.fromElement)&&(Md(_)||_[fu]))break e;if((x||v)&&(v=p.window===p?p:(v=p.ownerDocument)?v.defaultView||v.parentWindow:window,x?(_=n.relatedTarget||n.toElement,x=d,_=_?Md(_):null,_!==null&&(k=df(_),_!==k||_.tag!==5&&_.tag!==6)&&(_=null)):(x=null,_=d),x!==_)){if(P=sR,N="onMouseLeave",T="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(P=uR,N="onPointerLeave",T="onPointerEnter",M="pointer"),k=x==null?v:mh(x),O=_==null?v:mh(_),v=new P(N,M+"leave",x,n,p),v.target=k,v.relatedTarget=O,N=null,Md(p)===d&&(P=new P(T,M+"enter",_,n,p),P.target=O,P.relatedTarget=k,N=P),k=N,x&&_)t:{for(P=x,T=_,M=0,O=P;O;O=Jf(O))M++;for(O=0,N=T;N;N=Jf(N))O++;for(;0<M-O;)P=Jf(P),M--;for(;0<O-M;)T=Jf(T),O--;for(;M--;){if(P===T||T!==null&&P===T.alternate)break t;P=Jf(P),T=Jf(T)}P=null}else P=null;x!==null&&bR(m,v,x,P,!1),_!==null&&k!==null&&bR(m,k,_,P,!0)}}e:{if(v=d?mh(d):window,x=v.nodeName&&v.nodeName.toLowerCase(),x==="select"||x==="input"&&v.type==="file")var L=$q;else if(fR(v))if(R8)L=jq;else{L=Vq;var F=Bq}else(x=v.nodeName)&&x.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(L=Uq);if(L&&(L=L(e,d))){M8(m,L,n,p);break e}F&&F(e,v,d),e==="focusout"&&(F=v._wrapperState)&&F.controlled&&v.type==="number"&&q2(v,"number",v.value)}switch(F=d?mh(d):window,e){case"focusin":(fR(F)||F.contentEditable==="true")&&(hh=F,aS=d,vg=null);break;case"focusout":vg=aS=hh=null;break;case"mousedown":sS=!0;break;case"contextmenu":case"mouseup":case"dragend":sS=!1,vR(m,n,p);break;case"selectionchange":if(Wq)break;case"keydown":case"keyup":vR(m,n,p)}var V;if(tP)e:{switch(e){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else fh?T8(e,n)&&(B="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(B="onCompositionStart");B&&(I8&&n.locale!=="ko"&&(fh||B!=="onCompositionStart"?B==="onCompositionEnd"&&fh&&(V=P8()):(ec=p,QE="value"in ec?ec.value:ec.textContent,fh=!0)),F=E1(d,B),0<F.length&&(B=new lR(B,e,null,n,p),m.push({event:B,listeners:F}),V?B.data=V:(V=k8(n),V!==null&&(B.data=V)))),(V=Oq?Nq(e,n):Lq(e,n))&&(d=E1(d,"onBeforeInput"),0<d.length&&(p=new lR("onBeforeInput","beforeinput",null,n,p),m.push({event:p,listeners:d}),p.data=V))}V8(m,t)})}function Gg(e,t,n){return{instance:e,listener:t,currentTarget:n}}function E1(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Bg(e,n),o!=null&&r.unshift(Gg(e,o,i)),o=Bg(e,t),o!=null&&r.push(Gg(e,o,i))),e=e.return}return r}function Jf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bR(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var a=n,u=a.alternate,d=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&d!==null&&(a=d,i?(u=Bg(n,o),u!=null&&s.unshift(Gg(n,u,a))):i||(u=Bg(n,o),u!=null&&s.push(Gg(n,u,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Xq=/\r\n?/g,Yq=/\u0000|\uFFFD/g;function _R(e){return(typeof e=="string"?e:""+e).replace(Xq,`
|
|
|
`).replace(Yq,"")}function Oy(e,t,n){if(t=_R(t),_R(e)!==t&&n)throw Error(Jt(425))}function P1(){}var lS=null,uS=null;function cS(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 dS=typeof setTimeout=="function"?setTimeout:void 0,Qq=typeof clearTimeout=="function"?clearTimeout:void 0,wR=typeof Promise=="function"?Promise:void 0,Jq=typeof queueMicrotask=="function"?queueMicrotask:typeof wR<"u"?function(e){return wR.resolve(null).then(e).catch(eZ)}:dS;function eZ(e){setTimeout(function(){throw e})}function W4(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),jg(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);jg(t)}function mc(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 CR(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 mp=Math.random().toString(36).slice(2),cl="__reactFiber$"+mp,qg="__reactProps$"+mp,fu="__reactContainer$"+mp,fS="__reactEvents$"+mp,tZ="__reactListeners$"+mp,nZ="__reactHandles$"+mp;function Md(e){var t=e[cl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fu]||n[cl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=CR(e);e!==null;){if(n=e[cl])return n;e=CR(e)}return t}e=n,n=e.parentNode}return null}function Ov(e){return e=e[cl]||e[fu],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mh(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Jt(33))}function Zb(e){return e[qg]||null}var hS=[],gh=-1;function Nc(e){return{current:e}}function ni(e){0>gh||(e.current=hS[gh],hS[gh]=null,gh--)}function Jr(e,t){gh++,hS[gh]=e.current,e.current=t}var Ic={},ko=Nc(Ic),fa=Nc(!1),Xd=Ic;function Vh(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={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ha(e){return e=e.childContextTypes,e!=null}function I1(){ni(fa),ni(ko)}function SR(e,t,n){if(ko.current!==Ic)throw Error(Jt(168));Jr(ko,t),Jr(fa,n)}function j8(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(Jt(108,BG(e)||"Unknown",i));return mi({},n,r)}function T1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ic,Xd=ko.current,Jr(ko,e),Jr(fa,fa.current),!0}function ER(e,t,n){var r=e.stateNode;if(!r)throw Error(Jt(169));n?(e=j8(e,t,Xd),r.__reactInternalMemoizedMergedChildContext=e,ni(fa),ni(ko),Jr(ko,e)):ni(fa),Jr(fa,n)}var Ql=null,Xb=!1,G4=!1;function H8(e){Ql===null?Ql=[e]:Ql.push(e)}function rZ(e){Xb=!0,H8(e)}function Lc(){if(!G4&&Ql!==null){G4=!0;var e=0,t=Or;try{var n=Ql;for(Or=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ql=null,Xb=!1}catch(i){throw Ql!==null&&(Ql=Ql.slice(e+1)),m8(qE,Lc),i}finally{Or=t,G4=!1}}return null}var vh=[],yh=0,k1=null,M1=0,ns=[],rs=0,Yd=null,iu=1,ou="";function bd(e,t){vh[yh++]=M1,vh[yh++]=k1,k1=e,M1=t}function K8(e,t,n){ns[rs++]=iu,ns[rs++]=ou,ns[rs++]=Yd,Yd=e;var r=iu;e=ou;var i=32-$s(r)-1;r&=~(1<<i),n+=1;var o=32-$s(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,iu=1<<32-$s(t)+i|n<<i|r,ou=o+e}else iu=1<<o|n<<i|r,ou=e}function rP(e){e.return!==null&&(bd(e,1),K8(e,1,0))}function iP(e){for(;e===k1;)k1=vh[--yh],vh[yh]=null,M1=vh[--yh],vh[yh]=null;for(;e===Yd;)Yd=ns[--rs],ns[rs]=null,ou=ns[--rs],ns[rs]=null,iu=ns[--rs],ns[rs]=null}var Oa=null,ka=null,si=!1,Ls=null;function W8(e,t){var n=as(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 PR(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,Oa=e,ka=mc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Oa=e,ka=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yd!==null?{id:iu,overflow:ou}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=as(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oa=e,ka=null,!0):!1;default:return!1}}function pS(e){return(e.mode&1)!==0&&(e.flags&128)===0}function mS(e){if(si){var t=ka;if(t){var n=t;if(!PR(e,t)){if(pS(e))throw Error(Jt(418));t=mc(n.nextSibling);var r=Oa;t&&PR(e,t)?W8(r,n):(e.flags=e.flags&-4097|2,si=!1,Oa=e)}}else{if(pS(e))throw Error(Jt(418));e.flags=e.flags&-4097|2,si=!1,Oa=e}}}function IR(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Oa=e}function Ny(e){if(e!==Oa)return!1;if(!si)return IR(e),si=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!cS(e.type,e.memoizedProps)),t&&(t=ka)){if(pS(e))throw G8(),Error(Jt(418));for(;t;)W8(e,t),t=mc(t.nextSibling)}if(IR(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Jt(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ka=mc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ka=null}}else ka=Oa?mc(e.stateNode.nextSibling):null;return!0}function G8(){for(var e=ka;e;)e=mc(e.nextSibling)}function Uh(){ka=Oa=null,si=!1}function oP(e){Ls===null?Ls=[e]:Ls.push(e)}var iZ=yu.ReactCurrentBatchConfig;function Ds(e,t){if(e&&e.defaultProps){t=mi({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var R1=Nc(null),A1=null,xh=null,aP=null;function sP(){aP=xh=A1=null}function lP(e){var t=R1.current;ni(R1),e._currentValue=t}function gS(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 Mh(e,t){A1=e,aP=xh=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(ca=!0),e.firstContext=null)}function fs(e){var t=e._currentValue;if(aP!==e)if(e={context:e,memoizedValue:t,next:null},xh===null){if(A1===null)throw Error(Jt(308));xh=e,A1.dependencies={lanes:0,firstContext:e}}else xh=xh.next=e;return t}var Rd=null;function uP(e){Rd===null?Rd=[e]:Rd.push(e)}function q8(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,uP(t)):(n.next=i.next,i.next=n),t.interleaved=n,hu(e,r)}function hu(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 Zu=!1;function cP(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Z8(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 su(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function gc(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(_r&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,hu(e,n)}return i=r.interleaved,i===null?(t.next=t,uP(r)):(t.next=i.next,i.next=t),r.interleaved=t,hu(e,n)}function $x(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,ZE(e,n)}}function TR(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=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};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function D1(e,t,n,r){var i=e.updateQueue;Zu=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,d=u.next;u.next=null,s===null?o=d:s.next=d,s=u;var p=e.alternate;p!==null&&(p=p.updateQueue,a=p.lastBaseUpdate,a!==s&&(a===null?p.firstBaseUpdate=d:a.next=d,p.lastBaseUpdate=u))}if(o!==null){var m=i.baseState;s=0,p=d=u=null,a=o;do{var v=a.lane,x=a.eventTime;if((r&v)===v){p!==null&&(p=p.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var _=e,P=a;switch(v=t,x=n,P.tag){case 1:if(_=P.payload,typeof _=="function"){m=_.call(x,m,v);break e}m=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=P.payload,v=typeof _=="function"?_.call(x,m,v):_,v==null)break e;m=mi({},m,v);break e;case 2:Zu=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,v=i.effects,v===null?i.effects=[a]:v.push(a))}else x={eventTime:x,lane:v,tag:a.tag,payload:a.payload,callback:a.callback,next:null},p===null?(d=p=x,u=m):p=p.next=x,s|=v;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;v=a,a=v.next,v.next=null,i.lastBaseUpdate=v,i.shared.pending=null}}while(1);if(p===null&&(u=m),i.baseState=u,i.firstBaseUpdate=d,i.lastBaseUpdate=p,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Jd|=s,e.lanes=s,e.memoizedState=m}}function kR(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(Jt(191,i));i.call(r)}}}var X8=new qL.Component().refs;function vS(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:mi({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Yb={isMounted:function(e){return(e=e._reactInternals)?df(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Wo(),i=yc(e),o=su(r,i);o.payload=t,n!=null&&(o.callback=n),t=gc(e,o,i),t!==null&&(Bs(t,e,i,r),$x(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Wo(),i=yc(e),o=su(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=gc(e,o,i),t!==null&&(Bs(t,e,i,r),$x(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wo(),r=yc(e),i=su(n,r);i.tag=2,t!=null&&(i.callback=t),t=gc(e,i,r),t!==null&&(Bs(t,e,r,n),$x(t,e,r))}};function MR(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Kg(n,r)||!Kg(i,o):!0}function Y8(e,t,n){var r=!1,i=Ic,o=t.contextType;return typeof o=="object"&&o!==null?o=fs(o):(i=ha(t)?Xd:ko.current,r=t.contextTypes,o=(r=r!=null)?Vh(e,i):Ic),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Yb,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function RR(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&&Yb.enqueueReplaceState(t,t.state,null)}function yS(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=X8,cP(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=fs(o):(o=ha(t)?Xd:ko.current,i.context=Vh(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(vS(e,t,o,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&&Yb.enqueueReplaceState(i,i.state,null),D1(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Am(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(Jt(309));var r=n.stateNode}if(!r)throw Error(Jt(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=i.refs;a===X8&&(a=i.refs={}),s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(Jt(284));if(!n._owner)throw Error(Jt(290,e))}return e}function Ly(e,t){throw e=Object.prototype.toString.call(t),Error(Jt(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function AR(e){var t=e._init;return t(e._payload)}function Q8(e){function t(T,M){if(e){var O=T.deletions;O===null?(T.deletions=[M],T.flags|=16):O.push(M)}}function n(T,M){if(!e)return null;for(;M!==null;)t(T,M),M=M.sibling;return null}function r(T,M){for(T=new Map;M!==null;)M.key!==null?T.set(M.key,M):T.set(M.index,M),M=M.sibling;return T}function i(T,M){return T=xc(T,M),T.index=0,T.sibling=null,T}function o(T,M,O){return T.index=O,e?(O=T.alternate,O!==null?(O=O.index,O<M?(T.flags|=2,M):O):(T.flags|=2,M)):(T.flags|=1048576,M)}function s(T){return e&&T.alternate===null&&(T.flags|=2),T}function a(T,M,O,N){return M===null||M.tag!==6?(M=eC(O,T.mode,N),M.return=T,M):(M=i(M,O),M.return=T,M)}function u(T,M,O,N){var L=O.type;return L===dh?p(T,M,O.props.children,N,O.key):M!==null&&(M.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===qu&&AR(L)===M.type)?(N=i(M,O.props),N.ref=Am(T,M,O),N.return=T,N):(N=Kx(O.type,O.key,O.props,null,T.mode,N),N.ref=Am(T,M,O),N.return=T,N)}function d(T,M,O,N){return M===null||M.tag!==4||M.stateNode.containerInfo!==O.containerInfo||M.stateNode.implementation!==O.implementation?(M=tC(O,T.mode,N),M.return=T,M):(M=i(M,O.children||[]),M.return=T,M)}function p(T,M,O,N,L){return M===null||M.tag!==7?(M=jd(O,T.mode,N,L),M.return=T,M):(M=i(M,O),M.return=T,M)}function m(T,M,O){if(typeof M=="string"&&M!==""||typeof M=="number")return M=eC(""+M,T.mode,O),M.return=T,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Ey:return O=Kx(M.type,M.key,M.props,null,T.mode,O),O.ref=Am(T,null,M),O.return=T,O;case ch:return M=tC(M,T.mode,O),M.return=T,M;case qu:var N=M._init;return m(T,N(M._payload),O)}if(tg(M)||Im(M))return M=jd(M,T.mode,O,null),M.return=T,M;Ly(T,M)}return null}function v(T,M,O,N){var L=M!==null?M.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return L!==null?null:a(T,M,""+O,N);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case Ey:return O.key===L?u(T,M,O,N):null;case ch:return O.key===L?d(T,M,O,N):null;case qu:return L=O._init,v(T,M,L(O._payload),N)}if(tg(O)||Im(O))return L!==null?null:p(T,M,O,N,null);Ly(T,O)}return null}function x(T,M,O,N,L){if(typeof N=="string"&&N!==""||typeof N=="number")return T=T.get(O)||null,a(M,T,""+N,L);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Ey:return T=T.get(N.key===null?O:N.key)||null,u(M,T,N,L);case ch:return T=T.get(N.key===null?O:N.key)||null,d(M,T,N,L);case qu:var F=N._init;return x(T,M,O,F(N._payload),L)}if(tg(N)||Im(N))return T=T.get(O)||null,p(M,T,N,L,null);Ly(M,N)}return null}function _(T,M,O,N){for(var L=null,F=null,V=M,B=M=0,H=null;V!==null&&B<O.length;B++){V.index>B?(H=V,V=null):H=V.sibling;var G=v(T,V,O[B],N);if(G===null){V===null&&(V=H);break}e&&V&&G.alternate===null&&t(T,V),M=o(G,M,B),F===null?L=G:F.sibling=G,F=G,V=H}if(B===O.length)return n(T,V),si&&bd(T,B),L;if(V===null){for(;B<O.length;B++)V=m(T,O[B],N),V!==null&&(M=o(V,M,B),F===null?L=V:F.sibling=V,F=V);return si&&bd(T,B),L}for(V=r(T,V);B<O.length;B++)H=x(V,T,B,O[B],N),H!==null&&(e&&H.alternate!==null&&V.delete(H.key===null?B:H.key),M=o(H,M,B),F===null?L=H:F.sibling=H,F=H);return e&&V.forEach(function(ee){return t(T,ee)}),si&&bd(T,B),L}function P(T,M,O,N){var L=Im(O);if(typeof L!="function")throw Error(Jt(150));if(O=L.call(O),O==null)throw Error(Jt(151));for(var F=L=null,V=M,B=M=0,H=null,G=O.next();V!==null&&!G.done;B++,G=O.next()){V.index>B?(H=V,V=null):H=V.sibling;var ee=v(T,V,G.value,N);if(ee===null){V===null&&(V=H);break}e&&V&&ee.alternate===null&&t(T,V),M=o(ee,M,B),F===null?L=ee:F.sibling=ee,F=ee,V=H}if(G.done)return n(T,V),si&&bd(T,B),L;if(V===null){for(;!G.done;B++,G=O.next())G=m(T,G.value,N),G!==null&&(M=o(G,M,B),F===null?L=G:F.sibling=G,F=G);return si&&bd(T,B),L}for(V=r(T,V);!G.done;B++,G=O.next())G=x(V,T,B,G.value,N),G!==null&&(e&&G.alternate!==null&&V.delete(G.key===null?B:G.key),M=o(G,M,B),F===null?L=G:F.sibling=G,F=G);return e&&V.forEach(function(X){return t(T,X)}),si&&bd(T,B),L}function k(T,M,O,N){if(typeof O=="object"&&O!==null&&O.type===dh&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case Ey:e:{for(var L=O.key,F=M;F!==null;){if(F.key===L){if(L=O.type,L===dh){if(F.tag===7){n(T,F.sibling),M=i(F,O.props.children),M.return=T,T=M;break e}}else if(F.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===qu&&AR(L)===F.type){n(T,F.sibling),M=i(F,O.props),M.ref=Am(T,F,O),M.return=T,T=M;break e}n(T,F);break}else t(T,F);F=F.sibling}O.type===dh?(M=jd(O.props.children,T.mode,N,O.key),M.return=T,T=M):(N=Kx(O.type,O.key,O.props,null,T.mode,N),N.ref=Am(T,M,O),N.return=T,T=N)}return s(T);case ch:e:{for(F=O.key;M!==null;){if(M.key===F)if(M.tag===4&&M.stateNode.containerInfo===O.containerInfo&&M.stateNode.implementation===O.implementation){n(T,M.sibling),M=i(M,O.children||[]),M.return=T,T=M;break e}else{n(T,M);break}else t(T,M);M=M.sibling}M=tC(O,T.mode,N),M.return=T,T=M}return s(T);case qu:return F=O._init,k(T,M,F(O._payload),N)}if(tg(O))return _(T,M,O,N);if(Im(O))return P(T,M,O,N);Ly(T,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,M!==null&&M.tag===6?(n(T,M.sibling),M=i(M,O),M.return=T,T=M):(n(T,M),M=eC(O,T.mode,N),M.return=T,T=M),s(T)):n(T,M)}return k}var jh=Q8(!0),J8=Q8(!1),Nv={},ml=Nc(Nv),Zg=Nc(Nv),Xg=Nc(Nv);function Ad(e){if(e===Nv)throw Error(Jt(174));return e}function dP(e,t){switch(Jr(Xg,t),Jr(Zg,e),Jr(ml,Nv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:X2(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=X2(t,e)}ni(ml),Jr(ml,t)}function Hh(){ni(ml),ni(Zg),ni(Xg)}function eF(e){Ad(Xg.current);var t=Ad(ml.current),n=X2(t,e.type);t!==n&&(Jr(Zg,e),Jr(ml,n))}function fP(e){Zg.current===e&&(ni(ml),ni(Zg))}var hi=Nc(0);function O1(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 q4=[];function hP(){for(var e=0;e<q4.length;e++)q4[e]._workInProgressVersionPrimary=null;q4.length=0}var Bx=yu.ReactCurrentDispatcher,Z4=yu.ReactCurrentBatchConfig,Qd=0,pi=null,Ki=null,no=null,N1=!1,yg=!1,Yg=0,oZ=0;function So(){throw Error(Jt(321))}function pP(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Us(e[n],t[n]))return!1;return!0}function mP(e,t,n,r,i,o){if(Qd=o,pi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bx.current=e===null||e.memoizedState===null?uZ:cZ,e=n(r,i),yg){o=0;do{if(yg=!1,Yg=0,25<=o)throw Error(Jt(301));o+=1,no=Ki=null,t.updateQueue=null,Bx.current=dZ,e=n(r,i)}while(yg)}if(Bx.current=L1,t=Ki!==null&&Ki.next!==null,Qd=0,no=Ki=pi=null,N1=!1,t)throw Error(Jt(300));return e}function gP(){var e=Yg!==0;return Yg=0,e}function al(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return no===null?pi.memoizedState=no=e:no=no.next=e,no}function hs(){if(Ki===null){var e=pi.alternate;e=e!==null?e.memoizedState:null}else e=Ki.next;var t=no===null?pi.memoizedState:no.next;if(t!==null)no=t,Ki=e;else{if(e===null)throw Error(Jt(310));Ki=e,e={memoizedState:Ki.memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},no===null?pi.memoizedState=no=e:no=no.next=e}return no}function Qg(e,t){return typeof t=="function"?t(e):t}function X4(e){var t=hs(),n=t.queue;if(n===null)throw Error(Jt(311));n.lastRenderedReducer=e;var r=Ki,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,u=null,d=o;do{var p=d.lane;if((Qd&p)===p)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var m={lane:p,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(a=u=m,s=r):u=u.next=m,pi.lanes|=p,Jd|=p}d=d.next}while(d!==null&&d!==o);u===null?s=r:u.next=a,Us(r,t.memoizedState)||(ca=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,pi.lanes|=o,Jd|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Y4(e){var t=hs(),n=t.queue;if(n===null)throw Error(Jt(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Us(o,t.memoizedState)||(ca=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function tF(){}function nF(e,t){var n=pi,r=hs(),i=t(),o=!Us(r.memoizedState,i);if(o&&(r.memoizedState=i,ca=!0),r=r.queue,vP(oF.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||no!==null&&no.memoizedState.tag&1){if(n.flags|=2048,Jg(9,iF.bind(null,n,r,i,t),void 0,null),io===null)throw Error(Jt(349));(Qd&30)!==0||rF(n,t,i)}return i}function rF(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=pi.updateQueue,t===null?(t={lastEffect:null,stores:null},pi.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function iF(e,t,n,r){t.value=n,t.getSnapshot=r,aF(t)&&sF(e)}function oF(e,t,n){return n(function(){aF(t)&&sF(e)})}function aF(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Us(e,n)}catch{return!0}}function sF(e){var t=hu(e,1);t!==null&&Bs(t,e,1,-1)}function DR(e){var t=al();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qg,lastRenderedState:e},t.queue=e,e=e.dispatch=lZ.bind(null,pi,e),[t.memoizedState,e]}function Jg(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=pi.updateQueue,t===null?(t={lastEffect:null,stores:null},pi.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 lF(){return hs().memoizedState}function Vx(e,t,n,r){var i=al();pi.flags|=e,i.memoizedState=Jg(1|t,n,void 0,r===void 0?null:r)}function Qb(e,t,n,r){var i=hs();r=r===void 0?null:r;var o=void 0;if(Ki!==null){var s=Ki.memoizedState;if(o=s.destroy,r!==null&&pP(r,s.deps)){i.memoizedState=Jg(t,n,o,r);return}}pi.flags|=e,i.memoizedState=Jg(1|t,n,o,r)}function OR(e,t){return Vx(8390656,8,e,t)}function vP(e,t){return Qb(2048,8,e,t)}function uF(e,t){return Qb(4,2,e,t)}function cF(e,t){return Qb(4,4,e,t)}function dF(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 fF(e,t,n){return n=n!=null?n.concat([e]):null,Qb(4,4,dF.bind(null,t,e),n)}function yP(){}function hF(e,t){var n=hs();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pP(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pF(e,t){var n=hs();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pP(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mF(e,t,n){return(Qd&21)===0?(e.baseState&&(e.baseState=!1,ca=!0),e.memoizedState=n):(Us(n,t)||(n=y8(),pi.lanes|=n,Jd|=n,e.baseState=!0),t)}function aZ(e,t){var n=Or;Or=n!==0&&4>n?n:4,e(!0);var r=Z4.transition;Z4.transition={};try{e(!1),t()}finally{Or=n,Z4.transition=r}}function gF(){return hs().memoizedState}function sZ(e,t,n){var r=yc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vF(e))yF(t,n);else if(n=q8(e,t,n,r),n!==null){var i=Wo();Bs(n,e,r,i),xF(n,t,r)}}function lZ(e,t,n){var r=yc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vF(e))yF(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Us(a,s)){var u=t.interleaved;u===null?(i.next=i,uP(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=q8(e,t,i,r),n!==null&&(i=Wo(),Bs(n,e,r,i),xF(n,t,r))}}function vF(e){var t=e.alternate;return e===pi||t!==null&&t===pi}function yF(e,t){yg=N1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xF(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ZE(e,n)}}var L1={readContext:fs,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useInsertionEffect:So,useLayoutEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useMutableSource:So,useSyncExternalStore:So,useId:So,unstable_isNewReconciler:!1},uZ={readContext:fs,useCallback:function(e,t){return al().memoizedState=[e,t===void 0?null:t],e},useContext:fs,useEffect:OR,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vx(4194308,4,dF.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vx(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vx(4,2,e,t)},useMemo:function(e,t){var n=al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=al();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=sZ.bind(null,pi,e),[r.memoizedState,e]},useRef:function(e){var t=al();return e={current:e},t.memoizedState=e},useState:DR,useDebugValue:yP,useDeferredValue:function(e){return al().memoizedState=e},useTransition:function(){var e=DR(!1),t=e[0];return e=aZ.bind(null,e[1]),al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pi,i=al();if(si){if(n===void 0)throw Error(Jt(407));n=n()}else{if(n=t(),io===null)throw Error(Jt(349));(Qd&30)!==0||rF(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,OR(oF.bind(null,r,o,e),[e]),r.flags|=2048,Jg(9,iF.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=al(),t=io.identifierPrefix;if(si){var n=ou,r=iu;n=(r&~(1<<32-$s(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yg++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=oZ++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cZ={readContext:fs,useCallback:hF,useContext:fs,useEffect:vP,useImperativeHandle:fF,useInsertionEffect:uF,useLayoutEffect:cF,useMemo:pF,useReducer:X4,useRef:lF,useState:function(){return X4(Qg)},useDebugValue:yP,useDeferredValue:function(e){var t=hs();return mF(t,Ki.memoizedState,e)},useTransition:function(){var e=X4(Qg)[0],t=hs().memoizedState;return[e,t]},useMutableSource:tF,useSyncExternalStore:nF,useId:gF,unstable_isNewReconciler:!1},dZ={readContext:fs,useCallback:hF,useContext:fs,useEffect:vP,useImperativeHandle:fF,useInsertionEffect:uF,useLayoutEffect:cF,useMemo:pF,useReducer:Y4,useRef:lF,useState:function(){return Y4(Qg)},useDebugValue:yP,useDeferredValue:function(e){var t=hs();return Ki===null?t.memoizedState=e:mF(t,Ki.memoizedState,e)},useTransition:function(){var e=Y4(Qg)[0],t=hs().memoizedState;return[e,t]},useMutableSource:tF,useSyncExternalStore:nF,useId:gF,unstable_isNewReconciler:!1};function Kh(e,t){try{var n="",r=t;do n+=$G(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
|
Error generating stack: `+o.message+`
|
|
|
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Q4(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function xS(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var fZ=typeof WeakMap=="function"?WeakMap:Map;function bF(e,t,n){n=su(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){z1||(z1=!0,kS=r),xS(e,t)},n}function _F(e,t,n){n=su(-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(){xS(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){xS(e,t),typeof r!="function"&&(vc===null?vc=new Set([this]):vc.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function NR(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new fZ;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=PZ.bind(null,e,t,n),t.then(e,e))}function LR(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 FR(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=su(-1,1),t.tag=2,gc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var hZ=yu.ReactCurrentOwner,ca=!1;function Ho(e,t,n,r){t.child=e===null?J8(t,null,n,r):jh(t,e.child,n,r)}function zR(e,t,n,r,i){n=n.render;var o=t.ref;return Mh(t,i),r=mP(e,t,n,r,o,i),n=gP(),e!==null&&!ca?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pu(e,t,i)):(si&&n&&rP(t),t.flags|=1,Ho(e,t,r,i),t.child)}function $R(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!PP(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,wF(e,t,o,r,i)):(e=Kx(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Kg,n(s,r)&&e.ref===t.ref)return pu(e,t,i)}return t.flags|=1,e=xc(o,r),e.ref=t.ref,e.return=t,t.child=e}function wF(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Kg(o,r)&&e.ref===t.ref)if(ca=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(ca=!0);else return t.lanes=e.lanes,pu(e,t,i)}return bS(e,t,n,r,i)}function CF(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Jr(_h,Ta),Ta|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Jr(_h,Ta),Ta|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Jr(_h,Ta),Ta|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Jr(_h,Ta),Ta|=r;return Ho(e,t,i,n),t.child}function SF(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function bS(e,t,n,r,i){var o=ha(n)?Xd:ko.current;return o=Vh(t,o),Mh(t,i),n=mP(e,t,n,r,o,i),r=gP(),e!==null&&!ca?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pu(e,t,i)):(si&&r&&rP(t),t.flags|=1,Ho(e,t,n,i),t.child)}function BR(e,t,n,r,i){if(ha(n)){var o=!0;T1(t)}else o=!1;if(Mh(t,i),t.stateNode===null)Ux(e,t),Y8(t,n,r),yS(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,d=n.contextType;typeof d=="object"&&d!==null?d=fs(d):(d=ha(n)?Xd:ko.current,d=Vh(t,d));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==d)&&RR(t,s,r,d),Zu=!1;var v=t.memoizedState;s.state=v,D1(t,r,s,i),u=t.memoizedState,a!==r||v!==u||fa.current||Zu?(typeof p=="function"&&(vS(t,n,p,r),u=t.memoizedState),(a=Zu||MR(t,n,a,r,v,u,d))?(m||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=u),s.props=r,s.state=u,s.context=d,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Z8(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:Ds(t.type,a),s.props=d,m=t.pendingProps,v=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=fs(u):(u=ha(n)?Xd:ko.current,u=Vh(t,u));var x=n.getDerivedStateFromProps;(p=typeof x=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==m||v!==u)&&RR(t,s,r,u),Zu=!1,v=t.memoizedState,s.state=v,D1(t,r,s,i);var _=t.memoizedState;a!==m||v!==_||fa.current||Zu?(typeof x=="function"&&(vS(t,n,x,r),_=t.memoizedState),(d=Zu||MR(t,n,d,r,v,_,u)||!1)?(p||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,_,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,_,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=_),s.props=r,s.state=_,s.context=u,r=d):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),r=!1)}return _S(e,t,n,r,o,i)}function _S(e,t,n,r,i,o){SF(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&ER(t,n,!1),pu(e,t,o);r=t.stateNode,hZ.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=jh(t,e.child,null,o),t.child=jh(t,null,a,o)):Ho(e,t,a,o),t.memoizedState=r.state,i&&ER(t,n,!0),t.child}function EF(e){var t=e.stateNode;t.pendingContext?SR(e,t.pendingContext,t.pendingContext!==t.context):t.context&&SR(e,t.context,!1),dP(e,t.containerInfo)}function VR(e,t,n,r,i){return Uh(),oP(i),t.flags|=256,Ho(e,t,n,r),t.child}var wS={dehydrated:null,treeContext:null,retryLane:0};function CS(e){return{baseLanes:e,cachePool:null,transitions:null}}function PF(e,t,n){var r=t.pendingProps,i=hi.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Jr(hi,i&1),e===null)return mS(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,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=s):o=t_(s,r,0,null),e=jd(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=CS(n),t.memoizedState=wS,e):xP(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return pZ(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var u={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=xc(i,u),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=xc(a,o):(o=jd(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?CS(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=wS,r}return o=e.child,e=o.sibling,r=xc(o,{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 xP(e,t){return t=t_({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fy(e,t,n,r){return r!==null&&oP(r),jh(t,e.child,null,n),e=xP(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pZ(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Q4(Error(Jt(422))),Fy(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=t_({mode:"visible",children:r.children},i,0,null),o=jd(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&jh(t,e.child,null,s),t.child.memoizedState=CS(s),t.memoizedState=wS,o);if((t.mode&1)===0)return Fy(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(Jt(419)),r=Q4(o,r,void 0),Fy(e,t,s,r)}if(a=(s&e.childLanes)!==0,ca||a){if(r=io,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!==o.retryLane&&(o.retryLane=i,hu(e,i),Bs(r,e,i,-1))}return EP(),r=Q4(Error(Jt(421))),Fy(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=IZ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ka=mc(i.nextSibling),Oa=t,si=!0,Ls=null,e!==null&&(ns[rs++]=iu,ns[rs++]=ou,ns[rs++]=Yd,iu=e.id,ou=e.overflow,Yd=t),t=xP(t,r.children),t.flags|=4096,t)}function UR(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),gS(e.return,t,n)}function J4(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function IF(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ho(e,t,r.children,n),r=hi.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&&UR(e,n,t);else if(e.tag===19)UR(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(Jr(hi,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&&O1(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),J4(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&O1(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}J4(t,!0,n,null,o);break;case"together":J4(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ux(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jd|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Jt(153));if(t.child!==null){for(e=t.child,n=xc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=xc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mZ(e,t,n){switch(t.tag){case 3:EF(t),Uh();break;case 5:eF(t);break;case 1:ha(t.type)&&T1(t);break;case 4:dP(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Jr(R1,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Jr(hi,hi.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?PF(e,t,n):(Jr(hi,hi.current&1),e=pu(e,t,n),e!==null?e.sibling:null);Jr(hi,hi.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return IF(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Jr(hi,hi.current),r)break;return null;case 22:case 23:return t.lanes=0,CF(e,t,n)}return pu(e,t,n)}var TF,SS,kF,MF;TF=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}};SS=function(){};kF=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ad(ml.current);var o=null;switch(n){case"input":i=W2(e,i),r=W2(e,r),o=[];break;case"select":i=mi({},i,{value:void 0}),r=mi({},r,{value:void 0}),o=[];break;case"textarea":i=Z2(e,i),r=Z2(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=P1)}Y2(n,r);var s;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var a=i[d];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(zg.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var u=r[d];if(a=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&u!==a&&(u!=null||a!=null))if(d==="style")if(a){for(s in a)!a.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&a[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(zg.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&ei("scroll",e),o||a===u||(o=[])):(o=o||[]).push(d,u))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};MF=function(e,t,n,r){n!==r&&(t.flags|=4)};function Dm(e,t){if(!si)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 Eo(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 gZ(e,t,n){var r=t.pendingProps;switch(iP(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Eo(t),null;case 1:return ha(t.type)&&I1(),Eo(t),null;case 3:return r=t.stateNode,Hh(),ni(fa),ni(ko),hP(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ny(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ls!==null&&(AS(Ls),Ls=null))),SS(e,t),Eo(t),null;case 5:fP(t);var i=Ad(Xg.current);if(n=t.type,e!==null&&t.stateNode!=null)kF(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Jt(166));return Eo(t),null}if(e=Ad(ml.current),Ny(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[cl]=t,r[qg]=o,e=(t.mode&1)!==0,n){case"dialog":ei("cancel",r),ei("close",r);break;case"iframe":case"object":case"embed":ei("load",r);break;case"video":case"audio":for(i=0;i<rg.length;i++)ei(rg[i],r);break;case"source":ei("error",r);break;case"img":case"image":case"link":ei("error",r),ei("load",r);break;case"details":ei("toggle",r);break;case"input":YM(r,o),ei("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ei("invalid",r);break;case"textarea":JM(r,o),ei("invalid",r)}Y2(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Oy(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Oy(r.textContent,a,e),i=["children",""+a]):zg.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&ei("scroll",r)}switch(n){case"input":Py(r),QM(r,o,!0);break;case"textarea":Py(r),eR(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=P1)}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=r8(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[cl]=t,e[qg]=r,TF(e,t,!1,!1),t.stateNode=e;e:{switch(s=Q2(n,r),n){case"dialog":ei("cancel",e),ei("close",e),i=r;break;case"iframe":case"object":case"embed":ei("load",e),i=r;break;case"video":case"audio":for(i=0;i<rg.length;i++)ei(rg[i],e);i=r;break;case"source":ei("error",e),i=r;break;case"img":case"image":case"link":ei("error",e),ei("load",e),i=r;break;case"details":ei("toggle",e),i=r;break;case"input":YM(e,r),i=W2(e,r),ei("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=mi({},r,{value:void 0}),ei("invalid",e);break;case"textarea":JM(e,r),i=Z2(e,r),ei("invalid",e);break;default:i=r}Y2(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?a8(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&i8(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&$g(e,u):typeof u=="number"&&$g(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(zg.hasOwnProperty(o)?u!=null&&o==="onScroll"&&ei("scroll",e):u!=null&&jE(e,o,u,s))}switch(n){case"input":Py(e),QM(e,r,!1);break;case"textarea":Py(e),eR(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Pc(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Ph(e,!!r.multiple,o,!1):r.defaultValue!=null&&Ph(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=P1)}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 Eo(t),null;case 6:if(e&&t.stateNode!=null)MF(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Jt(166));if(n=Ad(Xg.current),Ad(ml.current),Ny(t)){if(r=t.stateNode,n=t.memoizedProps,r[cl]=t,(o=r.nodeValue!==n)&&(e=Oa,e!==null))switch(e.tag){case 3:Oy(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Oy(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[cl]=t,t.stateNode=r}return Eo(t),null;case 13:if(ni(hi),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(si&&ka!==null&&(t.mode&1)!==0&&(t.flags&128)===0)G8(),Uh(),t.flags|=98560,o=!1;else if(o=Ny(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Jt(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Jt(317));o[cl]=t}else Uh(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Eo(t),o=!1}else Ls!==null&&(AS(Ls),Ls=null),o=!0;if(!o)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||(hi.current&1)!==0?Wi===0&&(Wi=3):EP())),t.updateQueue!==null&&(t.flags|=4),Eo(t),null);case 4:return Hh(),SS(e,t),e===null&&Wg(t.stateNode.containerInfo),Eo(t),null;case 10:return lP(t.type._context),Eo(t),null;case 17:return ha(t.type)&&I1(),Eo(t),null;case 19:if(ni(hi),o=t.memoizedState,o===null)return Eo(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Dm(o,!1);else{if(Wi!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=O1(e),s!==null){for(t.flags|=128,Dm(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Jr(hi,hi.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ti()>Wh&&(t.flags|=128,r=!0,Dm(o,!1),t.lanes=4194304)}else{if(!r)if(e=O1(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dm(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!si)return Eo(t),null}else 2*Ti()-o.renderingStartTime>Wh&&n!==1073741824&&(t.flags|=128,r=!0,Dm(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ti(),t.sibling=null,n=hi.current,Jr(hi,r?n&1|2:n&1),t):(Eo(t),null);case 22:case 23:return SP(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Ta&1073741824)!==0&&(Eo(t),t.subtreeFlags&6&&(t.flags|=8192)):Eo(t),null;case 24:return null;case 25:return null}throw Error(Jt(156,t.tag))}function vZ(e,t){switch(iP(t),t.tag){case 1:return ha(t.type)&&I1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hh(),ni(fa),ni(ko),hP(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return fP(t),null;case 13:if(ni(hi),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Jt(340));Uh()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ni(hi),null;case 4:return Hh(),null;case 10:return lP(t.type._context),null;case 22:case 23:return SP(),null;case 24:return null;default:return null}}var zy=!1,To=!1,yZ=typeof WeakSet=="function"?WeakSet:Set,In=null;function bh(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xi(e,t,r)}else n.current=null}function ES(e,t,n){try{n()}catch(r){xi(e,t,r)}}var jR=!1;function xZ(e,t){if(lS=C1,e=O8(),nP(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,u=-1,d=0,p=0,m=e,v=null;t:for(;;){for(var x;m!==n||i!==0&&m.nodeType!==3||(a=s+i),m!==o||r!==0&&m.nodeType!==3||(u=s+r),m.nodeType===3&&(s+=m.nodeValue.length),(x=m.firstChild)!==null;)v=m,m=x;for(;;){if(m===e)break t;if(v===n&&++d===i&&(a=s),v===o&&++p===r&&(u=s),(x=m.nextSibling)!==null)break;m=v,v=m.parentNode}m=x}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(uS={focusedElem:e,selectionRange:n},C1=!1,In=t;In!==null;)if(t=In,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,In=e;else for(;In!==null;){t=In;try{var _=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var P=_.memoizedProps,k=_.memoizedState,T=t.stateNode,M=T.getSnapshotBeforeUpdate(t.elementType===t.type?P:Ds(t.type,P),k);T.__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(Jt(163))}}catch(N){xi(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,In=e;break}In=t.return}return _=jR,jR=!1,_}function xg(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 o=i.destroy;i.destroy=void 0,o!==void 0&&ES(t,n,o)}i=i.next}while(i!==r)}}function Jb(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 PS(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 RF(e){var t=e.alternate;t!==null&&(e.alternate=null,RF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cl],delete t[qg],delete t[fS],delete t[tZ],delete t[nZ])),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 AF(e){return e.tag===5||e.tag===3||e.tag===4}function HR(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||AF(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 IS(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=P1));else if(r!==4&&(e=e.child,e!==null))for(IS(e,t,n),e=e.sibling;e!==null;)IS(e,t,n),e=e.sibling}function TS(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(TS(e,t,n),e=e.sibling;e!==null;)TS(e,t,n),e=e.sibling}var ho=null,Os=!1;function Vu(e,t,n){for(n=n.child;n!==null;)DF(e,t,n),n=n.sibling}function DF(e,t,n){if(pl&&typeof pl.onCommitFiberUnmount=="function")try{pl.onCommitFiberUnmount(Kb,n)}catch{}switch(n.tag){case 5:To||bh(n,t);case 6:var r=ho,i=Os;ho=null,Vu(e,t,n),ho=r,Os=i,ho!==null&&(Os?(e=ho,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ho.removeChild(n.stateNode));break;case 18:ho!==null&&(Os?(e=ho,n=n.stateNode,e.nodeType===8?W4(e.parentNode,n):e.nodeType===1&&W4(e,n),jg(e)):W4(ho,n.stateNode));break;case 4:r=ho,i=Os,ho=n.stateNode.containerInfo,Os=!0,Vu(e,t,n),ho=r,Os=i;break;case 0:case 11:case 14:case 15:if(!To&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&((o&2)!==0||(o&4)!==0)&&ES(n,t,s),i=i.next}while(i!==r)}Vu(e,t,n);break;case 1:if(!To&&(bh(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){xi(n,t,a)}Vu(e,t,n);break;case 21:Vu(e,t,n);break;case 22:n.mode&1?(To=(r=To)||n.memoizedState!==null,Vu(e,t,n),To=r):Vu(e,t,n);break;default:Vu(e,t,n)}}function KR(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yZ),t.forEach(function(r){var i=TZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ks(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:ho=a.stateNode,Os=!1;break e;case 3:ho=a.stateNode.containerInfo,Os=!0;break e;case 4:ho=a.stateNode.containerInfo,Os=!0;break e}a=a.return}if(ho===null)throw Error(Jt(160));DF(o,s,i),ho=null,Os=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(d){xi(i,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)OF(t,e),t=t.sibling}function OF(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ks(t,e),rl(e),r&4){try{xg(3,e,e.return),Jb(3,e)}catch(P){xi(e,e.return,P)}try{xg(5,e,e.return)}catch(P){xi(e,e.return,P)}}break;case 1:ks(t,e),rl(e),r&512&&n!==null&&bh(n,n.return);break;case 5:if(ks(t,e),rl(e),r&512&&n!==null&&bh(n,n.return),e.flags&32){var i=e.stateNode;try{$g(i,"")}catch(P){xi(e,e.return,P)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&t8(i,o),Q2(a,s);var d=Q2(a,o);for(s=0;s<u.length;s+=2){var p=u[s],m=u[s+1];p==="style"?a8(i,m):p==="dangerouslySetInnerHTML"?i8(i,m):p==="children"?$g(i,m):jE(i,p,m,d)}switch(a){case"input":G2(i,o);break;case"textarea":n8(i,o);break;case"select":var v=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var x=o.value;x!=null?Ph(i,!!o.multiple,x,!1):v!==!!o.multiple&&(o.defaultValue!=null?Ph(i,!!o.multiple,o.defaultValue,!0):Ph(i,!!o.multiple,o.multiple?[]:"",!1))}i[qg]=o}catch(P){xi(e,e.return,P)}}break;case 6:if(ks(t,e),rl(e),r&4){if(e.stateNode===null)throw Error(Jt(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(P){xi(e,e.return,P)}}break;case 3:if(ks(t,e),rl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{jg(t.containerInfo)}catch(P){xi(e,e.return,P)}break;case 4:ks(t,e),rl(e);break;case 13:ks(t,e),rl(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(wP=Ti())),r&4&&KR(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(To=(d=To)||p,ks(t,e),To=d):ks(t,e),rl(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!p&&(e.mode&1)!==0)for(In=e,p=e.child;p!==null;){for(m=In=p;In!==null;){switch(v=In,x=v.child,v.tag){case 0:case 11:case 14:case 15:xg(4,v,v.return);break;case 1:bh(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(P){xi(r,n,P)}}break;case 5:bh(v,v.return);break;case 22:if(v.memoizedState!==null){GR(m);continue}}x!==null?(x.return=v,In=x):GR(m)}p=p.sibling}e:for(p=null,m=e;;){if(m.tag===5){if(p===null){p=m;try{i=m.stateNode,d?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=m.stateNode,u=m.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=o8("display",s))}catch(P){xi(e,e.return,P)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=d?"":m.memoizedProps}catch(P){xi(e,e.return,P)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:ks(t,e),rl(e),r&4&&KR(e);break;case 21:break;default:ks(t,e),rl(e)}}function rl(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(AF(n)){var r=n;break e}n=n.return}throw Error(Jt(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($g(i,""),r.flags&=-33);var o=HR(e);TS(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=HR(e);IS(e,a,s);break;default:throw Error(Jt(161))}}catch(u){xi(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bZ(e,t,n){In=e,NF(e)}function NF(e,t,n){for(var r=(e.mode&1)!==0;In!==null;){var i=In,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||zy;if(!s){var a=i.alternate,u=a!==null&&a.memoizedState!==null||To;a=zy;var d=To;if(zy=s,(To=u)&&!d)for(In=i;In!==null;)s=In,u=s.child,s.tag===22&&s.memoizedState!==null?qR(i):u!==null?(u.return=s,In=u):qR(i);for(;o!==null;)In=o,NF(o),o=o.sibling;In=i,zy=a,To=d}WR(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,In=o):WR(e)}}function WR(e){for(;In!==null;){var t=In;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:To||Jb(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!To)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ds(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&kR(t,o,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}kR(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var p=d.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&jg(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Jt(163))}To||t.flags&512&&PS(t)}catch(v){xi(t,t.return,v)}}if(t===e){In=null;break}if(n=t.sibling,n!==null){n.return=t.return,In=n;break}In=t.return}}function GR(e){for(;In!==null;){var t=In;if(t===e){In=null;break}var n=t.sibling;if(n!==null){n.return=t.return,In=n;break}In=t.return}}function qR(e){for(;In!==null;){var t=In;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Jb(4,t)}catch(u){xi(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){xi(t,i,u)}}var o=t.return;try{PS(t)}catch(u){xi(t,o,u)}break;case 5:var s=t.return;try{PS(t)}catch(u){xi(t,s,u)}}}catch(u){xi(t,t.return,u)}if(t===e){In=null;break}var a=t.sibling;if(a!==null){a.return=t.return,In=a;break}In=t.return}}var _Z=Math.ceil,F1=yu.ReactCurrentDispatcher,bP=yu.ReactCurrentOwner,us=yu.ReactCurrentBatchConfig,_r=0,io=null,zi=null,mo=0,Ta=0,_h=Nc(0),Wi=0,ev=null,Jd=0,e_=0,_P=0,bg=null,sa=null,wP=0,Wh=1/0,Xl=null,z1=!1,kS=null,vc=null,$y=!1,tc=null,$1=0,_g=0,MS=null,jx=-1,Hx=0;function Wo(){return(_r&6)!==0?Ti():jx!==-1?jx:jx=Ti()}function yc(e){return(e.mode&1)===0?1:(_r&2)!==0&&mo!==0?mo&-mo:iZ.transition!==null?(Hx===0&&(Hx=y8()),Hx):(e=Or,e!==0||(e=window.event,e=e===void 0?16:E8(e.type)),e)}function Bs(e,t,n,r){if(50<_g)throw _g=0,MS=null,Error(Jt(185));Av(e,n,r),((_r&2)===0||e!==io)&&(e===io&&((_r&2)===0&&(e_|=n),Wi===4&&Ju(e,mo)),pa(e,r),n===1&&_r===0&&(t.mode&1)===0&&(Wh=Ti()+500,Xb&&Lc()))}function pa(e,t){var n=e.callbackNode;iq(e,t);var r=w1(e,e===io?mo:0);if(r===0)n!==null&&rR(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&rR(n),t===1)e.tag===0?rZ(ZR.bind(null,e)):H8(ZR.bind(null,e)),Jq(function(){(_r&6)===0&&Lc()}),n=null;else{switch(x8(r)){case 1:n=qE;break;case 4:n=g8;break;case 16:n=_1;break;case 536870912:n=v8;break;default:n=_1}n=jF(n,LF.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function LF(e,t){if(jx=-1,Hx=0,(_r&6)!==0)throw Error(Jt(327));var n=e.callbackNode;if(Rh()&&e.callbackNode!==n)return null;var r=w1(e,e===io?mo:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=B1(e,r);else{t=r;var i=_r;_r|=2;var o=zF();(io!==e||mo!==t)&&(Xl=null,Wh=Ti()+500,Ud(e,t));do try{SZ();break}catch(a){FF(e,a)}while(1);sP(),F1.current=o,_r=i,zi!==null?t=0:(io=null,mo=0,t=Wi)}if(t!==0){if(t===2&&(i=rS(e),i!==0&&(r=i,t=RS(e,i))),t===1)throw n=ev,Ud(e,0),Ju(e,r),pa(e,Ti()),n;if(t===6)Ju(e,r);else{if(i=e.current.alternate,(r&30)===0&&!wZ(i)&&(t=B1(e,r),t===2&&(o=rS(e),o!==0&&(r=o,t=RS(e,o))),t===1))throw n=ev,Ud(e,0),Ju(e,r),pa(e,Ti()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Jt(345));case 2:_d(e,sa,Xl);break;case 3:if(Ju(e,r),(r&130023424)===r&&(t=wP+500-Ti(),10<t)){if(w1(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Wo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=dS(_d.bind(null,e,sa,Xl),t);break}_d(e,sa,Xl);break;case 4:if(Ju(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-$s(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Ti()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_Z(r/1960))-r,10<r){e.timeoutHandle=dS(_d.bind(null,e,sa,Xl),r);break}_d(e,sa,Xl);break;case 5:_d(e,sa,Xl);break;default:throw Error(Jt(329))}}}return pa(e,Ti()),e.callbackNode===n?LF.bind(null,e):null}function RS(e,t){var n=bg;return e.current.memoizedState.isDehydrated&&(Ud(e,t).flags|=256),e=B1(e,t),e!==2&&(t=sa,sa=n,t!==null&&AS(t)),e}function AS(e){sa===null?sa=e:sa.push.apply(sa,e)}function wZ(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],o=i.getSnapshot;i=i.value;try{if(!Us(o(),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 Ju(e,t){for(t&=~_P,t&=~e_,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$s(t),r=1<<n;e[n]=-1,t&=~r}}function ZR(e){if((_r&6)!==0)throw Error(Jt(327));Rh();var t=w1(e,0);if((t&1)===0)return pa(e,Ti()),null;var n=B1(e,t);if(e.tag!==0&&n===2){var r=rS(e);r!==0&&(t=r,n=RS(e,r))}if(n===1)throw n=ev,Ud(e,0),Ju(e,t),pa(e,Ti()),n;if(n===6)throw Error(Jt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_d(e,sa,Xl),pa(e,Ti()),null}function CP(e,t){var n=_r;_r|=1;try{return e(t)}finally{_r=n,_r===0&&(Wh=Ti()+500,Xb&&Lc())}}function ef(e){tc!==null&&tc.tag===0&&(_r&6)===0&&Rh();var t=_r;_r|=1;var n=us.transition,r=Or;try{if(us.transition=null,Or=1,e)return e()}finally{Or=r,us.transition=n,_r=t,(_r&6)===0&&Lc()}}function SP(){Ta=_h.current,ni(_h)}function Ud(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Qq(n)),zi!==null)for(n=zi.return;n!==null;){var r=n;switch(iP(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&I1();break;case 3:Hh(),ni(fa),ni(ko),hP();break;case 5:fP(r);break;case 4:Hh();break;case 13:ni(hi);break;case 19:ni(hi);break;case 10:lP(r.type._context);break;case 22:case 23:SP()}n=n.return}if(io=e,zi=e=xc(e.current,null),mo=Ta=t,Wi=0,ev=null,_P=e_=Jd=0,sa=bg=null,Rd!==null){for(t=0;t<Rd.length;t++)if(n=Rd[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Rd=null}return e}function FF(e,t){do{var n=zi;try{if(sP(),Bx.current=L1,N1){for(var r=pi.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}N1=!1}if(Qd=0,no=Ki=pi=null,yg=!1,Yg=0,bP.current=null,n===null||n.return===null){Wi=1,ev=t,zi=null;break}e:{var o=e,s=n.return,a=n,u=t;if(t=mo,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,p=a,m=p.tag;if((p.mode&1)===0&&(m===0||m===11||m===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 x=LR(s);if(x!==null){x.flags&=-257,FR(x,s,a,o,t),x.mode&1&&NR(o,d,t),t=x,u=d;var _=t.updateQueue;if(_===null){var P=new Set;P.add(u),t.updateQueue=P}else _.add(u);break e}else{if((t&1)===0){NR(o,d,t),EP();break e}u=Error(Jt(426))}}else if(si&&a.mode&1){var k=LR(s);if(k!==null){(k.flags&65536)===0&&(k.flags|=256),FR(k,s,a,o,t),oP(Kh(u,a));break e}}o=u=Kh(u,a),Wi!==4&&(Wi=2),bg===null?bg=[o]:bg.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var T=bF(o,u,t);TR(o,T);break e;case 1:a=u;var M=o.type,O=o.stateNode;if((o.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(vc===null||!vc.has(O)))){o.flags|=65536,t&=-t,o.lanes|=t;var N=_F(o,a,t);TR(o,N);break e}}o=o.return}while(o!==null)}BF(n)}catch(L){t=L,zi===n&&n!==null&&(zi=n=n.return);continue}break}while(1)}function zF(){var e=F1.current;return F1.current=L1,e===null?L1:e}function EP(){(Wi===0||Wi===3||Wi===2)&&(Wi=4),io===null||(Jd&268435455)===0&&(e_&268435455)===0||Ju(io,mo)}function B1(e,t){var n=_r;_r|=2;var r=zF();(io!==e||mo!==t)&&(Xl=null,Ud(e,t));do try{CZ();break}catch(i){FF(e,i)}while(1);if(sP(),_r=n,F1.current=r,zi!==null)throw Error(Jt(261));return io=null,mo=0,Wi}function CZ(){for(;zi!==null;)$F(zi)}function SZ(){for(;zi!==null&&!ZG();)$F(zi)}function $F(e){var t=UF(e.alternate,e,Ta);e.memoizedProps=e.pendingProps,t===null?BF(e):zi=t,bP.current=null}function BF(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=gZ(n,t,Ta),n!==null){zi=n;return}}else{if(n=vZ(n,t),n!==null){n.flags&=32767,zi=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Wi=6,zi=null;return}}if(t=t.sibling,t!==null){zi=t;return}zi=t=e}while(t!==null);Wi===0&&(Wi=5)}function _d(e,t,n){var r=Or,i=us.transition;try{us.transition=null,Or=1,EZ(e,t,n,r)}finally{us.transition=i,Or=r}return null}function EZ(e,t,n,r){do Rh();while(tc!==null);if((_r&6)!==0)throw Error(Jt(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(Jt(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(oq(e,o),e===io&&(zi=io=null,mo=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||$y||($y=!0,jF(_1,function(){return Rh(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=us.transition,us.transition=null;var s=Or;Or=1;var a=_r;_r|=4,bP.current=null,xZ(e,n),OF(n,e),Kq(uS),C1=!!lS,uS=lS=null,e.current=n,bZ(n),XG(),_r=a,Or=s,us.transition=o}else e.current=n;if($y&&($y=!1,tc=e,$1=i),o=e.pendingLanes,o===0&&(vc=null),JG(n.stateNode),pa(e,Ti()),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(z1)throw z1=!1,e=kS,kS=null,e;return($1&1)!==0&&e.tag!==0&&Rh(),o=e.pendingLanes,(o&1)!==0?e===MS?_g++:(_g=0,MS=e):_g=0,Lc(),null}function Rh(){if(tc!==null){var e=x8($1),t=us.transition,n=Or;try{if(us.transition=null,Or=16>e?16:e,tc===null)var r=!1;else{if(e=tc,tc=null,$1=0,(_r&6)!==0)throw Error(Jt(331));var i=_r;for(_r|=4,In=e.current;In!==null;){var o=In,s=o.child;if((In.flags&16)!==0){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var d=a[u];for(In=d;In!==null;){var p=In;switch(p.tag){case 0:case 11:case 15:xg(8,p,o)}var m=p.child;if(m!==null)m.return=p,In=m;else for(;In!==null;){p=In;var v=p.sibling,x=p.return;if(RF(p),p===d){In=null;break}if(v!==null){v.return=x,In=v;break}In=x}}}var _=o.alternate;if(_!==null){var P=_.child;if(P!==null){_.child=null;do{var k=P.sibling;P.sibling=null,P=k}while(P!==null)}}In=o}}if((o.subtreeFlags&2064)!==0&&s!==null)s.return=o,In=s;else e:for(;In!==null;){if(o=In,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:xg(9,o,o.return)}var T=o.sibling;if(T!==null){T.return=o.return,In=T;break e}In=o.return}}var M=e.current;for(In=M;In!==null;){s=In;var O=s.child;if((s.subtreeFlags&2064)!==0&&O!==null)O.return=s,In=O;else e:for(s=M;In!==null;){if(a=In,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Jb(9,a)}}catch(L){xi(a,a.return,L)}if(a===s){In=null;break e}var N=a.sibling;if(N!==null){N.return=a.return,In=N;break e}In=a.return}}if(_r=i,Lc(),pl&&typeof pl.onPostCommitFiberRoot=="function")try{pl.onPostCommitFiberRoot(Kb,e)}catch{}r=!0}return r}finally{Or=n,us.transition=t}}return!1}function XR(e,t,n){t=Kh(n,t),t=bF(e,t,1),e=gc(e,t,1),t=Wo(),e!==null&&(Av(e,1,t),pa(e,t))}function xi(e,t,n){if(e.tag===3)XR(e,e,n);else for(;t!==null;){if(t.tag===3){XR(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(vc===null||!vc.has(r))){e=Kh(n,e),e=_F(t,e,1),t=gc(t,e,1),e=Wo(),t!==null&&(Av(t,1,e),pa(t,e));break}}t=t.return}}function PZ(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Wo(),e.pingedLanes|=e.suspendedLanes&n,io===e&&(mo&n)===n&&(Wi===4||Wi===3&&(mo&130023424)===mo&&500>Ti()-wP?Ud(e,0):_P|=n),pa(e,t)}function VF(e,t){t===0&&((e.mode&1)===0?t=1:(t=ky,ky<<=1,(ky&130023424)===0&&(ky=4194304)));var n=Wo();e=hu(e,t),e!==null&&(Av(e,t,n),pa(e,n))}function IZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),VF(e,n)}function TZ(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(Jt(314))}r!==null&&r.delete(t),VF(e,n)}var UF;UF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fa.current)ca=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return ca=!1,mZ(e,t,n);ca=(e.flags&131072)!==0}else ca=!1,si&&(t.flags&1048576)!==0&&K8(t,M1,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ux(e,t),e=t.pendingProps;var i=Vh(t,ko.current);Mh(t,n),i=mP(null,t,r,e,i,n);var o=gP();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,ha(r)?(o=!0,T1(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,cP(t),i.updater=Yb,t.stateNode=i,i._reactInternals=t,yS(t,r,e,n),t=_S(null,t,r,!0,o,n)):(t.tag=0,si&&o&&rP(t),Ho(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ux(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=MZ(r),e=Ds(r,e),i){case 0:t=bS(null,t,r,e,n);break e;case 1:t=BR(null,t,r,e,n);break e;case 11:t=zR(null,t,r,e,n);break e;case 14:t=$R(null,t,r,Ds(r.type,e),n);break e}throw Error(Jt(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ds(r,i),bS(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ds(r,i),BR(e,t,r,i,n);case 3:e:{if(EF(t),e===null)throw Error(Jt(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Z8(e,t),D1(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Kh(Error(Jt(423)),t),t=VR(e,t,r,n,i);break e}else if(r!==i){i=Kh(Error(Jt(424)),t),t=VR(e,t,r,n,i);break e}else for(ka=mc(t.stateNode.containerInfo.firstChild),Oa=t,si=!0,Ls=null,n=J8(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Uh(),r===i){t=pu(e,t,n);break e}Ho(e,t,r,n)}t=t.child}return t;case 5:return eF(t),e===null&&mS(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,cS(r,i)?s=null:o!==null&&cS(r,o)&&(t.flags|=32),SF(e,t),Ho(e,t,s,n),t.child;case 6:return e===null&&mS(t),null;case 13:return PF(e,t,n);case 4:return dP(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jh(t,null,r,n):Ho(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ds(r,i),zR(e,t,r,i,n);case 7:return Ho(e,t,t.pendingProps,n),t.child;case 8:return Ho(e,t,t.pendingProps.children,n),t.child;case 12:return Ho(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Jr(R1,r._currentValue),r._currentValue=s,o!==null)if(Us(o.value,s)){if(o.children===i.children&&!fa.current){t=pu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=su(-1,n&-n),u.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?u.next=u:(u.next=p.next,p.next=u),d.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),gS(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Jt(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),gS(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ho(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Mh(t,n),i=fs(i),r=r(i),t.flags|=1,Ho(e,t,r,n),t.child;case 14:return r=t.type,i=Ds(r,t.pendingProps),i=Ds(r.type,i),$R(e,t,r,i,n);case 15:return wF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ds(r,i),Ux(e,t),t.tag=1,ha(r)?(e=!0,T1(t)):e=!1,Mh(t,n),Y8(t,r,i),yS(t,r,i,n),_S(null,t,r,!0,e,n);case 19:return IF(e,t,n);case 22:return CF(e,t,n)}throw Error(Jt(156,t.tag))};function jF(e,t){return m8(e,t)}function kZ(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 as(e,t,n,r){return new kZ(e,t,n,r)}function PP(e){return e=e.prototype,!(!e||!e.isReactComponent)}function MZ(e){if(typeof e=="function")return PP(e)?1:0;if(e!=null){if(e=e.$$typeof,e===KE)return 11;if(e===WE)return 14}return 2}function xc(e,t){var n=e.alternate;return n===null?(n=as(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 Kx(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")PP(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case dh:return jd(n.children,i,o,t);case HE:s=8,i|=8;break;case U2:return e=as(12,n,t,i|2),e.elementType=U2,e.lanes=o,e;case j2:return e=as(13,n,t,i),e.elementType=j2,e.lanes=o,e;case H2:return e=as(19,n,t,i),e.elementType=H2,e.lanes=o,e;case QL:return t_(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case XL:s=10;break e;case YL:s=9;break e;case KE:s=11;break e;case WE:s=14;break e;case qu:s=16,r=null;break e}throw Error(Jt(130,e==null?e:typeof e,""))}return t=as(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jd(e,t,n,r){return e=as(7,e,r,t),e.lanes=n,e}function t_(e,t,n,r){return e=as(22,e,r,t),e.elementType=QL,e.lanes=n,e.stateNode={isHidden:!1},e}function eC(e,t,n){return e=as(6,e,null,t),e.lanes=n,e}function tC(e,t,n){return t=as(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function RZ(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=N4(0),this.expirationTimes=N4(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=N4(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function IP(e,t,n,r,i,o,s,a,u){return e=new RZ(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=as(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},cP(o),e}function AZ(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ch,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function HF(e){if(!e)return Ic;e=e._reactInternals;e:{if(df(e)!==e||e.tag!==1)throw Error(Jt(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ha(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Jt(171))}if(e.tag===1){var n=e.type;if(ha(n))return j8(e,n,t)}return t}function KF(e,t,n,r,i,o,s,a,u){return e=IP(n,r,!0,e,i,o,s,a,u),e.context=HF(null),n=e.current,r=Wo(),i=yc(n),o=su(r,i),o.callback=t!=null?t:null,gc(n,o,i),e.current.lanes=i,Av(e,i,r),pa(e,r),e}function n_(e,t,n,r){var i=t.current,o=Wo(),s=yc(i);return n=HF(n),t.context===null?t.context=n:t.pendingContext=n,t=su(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=gc(i,t,s),e!==null&&(Bs(e,i,s,o),$x(e,i,s)),s}function V1(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 YR(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function TP(e,t){YR(e,t),(e=e.alternate)&&YR(e,t)}function DZ(){return null}var WF=typeof reportError=="function"?reportError:function(e){console.error(e)};function kP(e){this._internalRoot=e}r_.prototype.render=kP.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Jt(409));n_(e,t,null,null)};r_.prototype.unmount=kP.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ef(function(){n_(null,e,null,null)}),t[fu]=null}};function r_(e){this._internalRoot=e}r_.prototype.unstable_scheduleHydration=function(e){if(e){var t=w8();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qu.length&&t!==0&&t<Qu[n].priority;n++);Qu.splice(n,0,e),n===0&&S8(e)}};function MP(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function i_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function QR(){}function OZ(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var d=V1(s);o.call(d)}}var s=KF(t,r,e,0,null,!1,!1,"",QR);return e._reactRootContainer=s,e[fu]=s.current,Wg(e.nodeType===8?e.parentNode:e),ef(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var d=V1(u);a.call(d)}}var u=IP(e,0,!1,null,null,!1,!1,"",QR);return e._reactRootContainer=u,e[fu]=u.current,Wg(e.nodeType===8?e.parentNode:e),ef(function(){n_(t,u,n,r)}),u}function o_(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var u=V1(s);a.call(u)}}n_(t,s,e,i)}else s=OZ(n,t,e,i,r);return V1(s)}b8=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ng(t.pendingLanes);n!==0&&(ZE(t,n|1),pa(t,Ti()),(_r&6)===0&&(Wh=Ti()+500,Lc()))}break;case 13:ef(function(){var r=hu(e,1);if(r!==null){var i=Wo();Bs(r,e,1,i)}}),TP(e,1)}};XE=function(e){if(e.tag===13){var t=hu(e,134217728);if(t!==null){var n=Wo();Bs(t,e,134217728,n)}TP(e,134217728)}};_8=function(e){if(e.tag===13){var t=yc(e),n=hu(e,t);if(n!==null){var r=Wo();Bs(n,e,t,r)}TP(e,t)}};w8=function(){return Or};C8=function(e,t){var n=Or;try{return Or=e,t()}finally{Or=n}};eS=function(e,t,n){switch(t){case"input":if(G2(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=Zb(r);if(!i)throw Error(Jt(90));e8(r),G2(r,i)}}}break;case"textarea":n8(e,n);break;case"select":t=n.value,t!=null&&Ph(e,!!n.multiple,t,!1)}};u8=CP;c8=ef;var NZ={usingClientEntryPoint:!1,Events:[Ov,mh,Zb,s8,l8,CP]},Om={findFiberByHostInstance:Md,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},LZ={bundleType:Om.bundleType,version:Om.version,rendererPackageName:Om.rendererPackageName,rendererConfig:Om.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yu.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=h8(e),e===null?null:e.stateNode},findFiberByHostInstance:Om.findFiberByHostInstance||DZ,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 By=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!By.isDisabled&&By.supportsFiber)try{Kb=By.inject(LZ),pl=By}catch{}}Ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NZ;Ba.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!MP(t))throw Error(Jt(200));return AZ(e,t,null,n)};Ba.createRoot=function(e,t){if(!MP(e))throw Error(Jt(299));var n=!1,r="",i=WF;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=IP(e,1,!1,null,null,n,!1,r,i),e[fu]=t.current,Wg(e.nodeType===8?e.parentNode:e),new kP(t)};Ba.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Jt(188)):(e=Object.keys(e).join(","),Error(Jt(268,e)));return e=h8(t),e=e===null?null:e.stateNode,e};Ba.flushSync=function(e){return ef(e)};Ba.hydrate=function(e,t,n){if(!i_(t))throw Error(Jt(200));return o_(null,e,t,!0,n)};Ba.hydrateRoot=function(e,t,n){if(!MP(e))throw Error(Jt(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=WF;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=KF(t,null,e,1,n!=null?n:null,i,!1,o,s),e[fu]=t.current,Wg(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 r_(t)};Ba.render=function(e,t,n){if(!i_(t))throw Error(Jt(200));return o_(null,e,t,!1,n)};Ba.unmountComponentAtNode=function(e){if(!i_(e))throw Error(Jt(40));return e._reactRootContainer?(ef(function(){o_(null,null,e,!1,function(){e._reactRootContainer=null,e[fu]=null})}),!0):!1};Ba.unstable_batchedUpdates=CP;Ba.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!i_(n))throw Error(Jt(200));if(e==null||e._reactInternals===void 0)throw Error(Jt(38));return o_(e,t,n,!1,r)};Ba.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Ba})(Cl);const Tc=LE(Cl.exports),FZ=zL({__proto__:null,default:Tc},[Cl.exports]);var JR=Cl.exports;B2.createRoot=JR.createRoot,B2.hydrateRoot=JR.hydrateRoot;class gp{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 tv=typeof window>"u"||"Deno"in window;function ts(){}function zZ(e,t){return typeof e=="function"?e(t):e}function DS(e){return typeof e=="number"&&e>=0&&e!==1/0}function GF(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ig(e,t,n){return Lv(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function $Z(e,t,n){return Lv(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Xu(e,t,n){return Lv(e)?[{...t,queryKey:e},n]:[e||{},t]}function eA(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(Lv(s)){if(r){if(t.queryHash!==RP(s,t.options))return!1}else if(!U1(t.queryKey,s))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function tA(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(Lv(o)){if(!t.options.mutationKey)return!1;if(n){if(Dd(t.options.mutationKey)!==Dd(o))return!1}else if(!U1(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function RP(e,t){return((t==null?void 0:t.queryKeyHashFn)||Dd)(e)}function Dd(e){return JSON.stringify(e,(t,n)=>NS(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function U1(e,t){return qF(e,t)}function qF(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!qF(e[n],t[n])):!1}function ZF(e,t){if(e===t)return e;const n=nA(e)&&nA(t);if(n||NS(e)&&NS(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let u=0;u<o;u++){const d=n?u:i[u];s[d]=ZF(e[d],t[d]),s[d]===e[d]&&a++}return r===o&&a===r?e:s}return t}function OS(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function nA(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function NS(e){if(!rA(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!rA(n)||!n.hasOwnProperty("isPrototypeOf"))}function rA(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lv(e){return Array.isArray(e)}function XF(e){return new Promise(t=>{setTimeout(t,e)})}function iA(e){XF(0).then(e)}function BZ(){if(typeof AbortController=="function")return new AbortController}function LS(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ZF(e,t):t}class VZ extends gp{constructor(){super(),this.setup=t=>{if(!tv&&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 j1=new VZ;class UZ extends gp{constructor(){super(),this.setup=t=>{if(!tv&&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 H1=new UZ;function jZ(e){return Math.min(1e3*2**e,3e4)}function a_(e){return(e!=null?e:"online")==="online"?H1.isOnline():!0}class YF{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Wx(e){return e instanceof YF}function QF(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((k,T)=>{o=k,s=T}),u=k=>{r||(x(new YF(k)),e.abort==null||e.abort())},d=()=>{t=!0},p=()=>{t=!1},m=()=>!j1.isFocused()||e.networkMode!=="always"&&!H1.isOnline(),v=k=>{r||(r=!0,e.onSuccess==null||e.onSuccess(k),i==null||i(),o(k))},x=k=>{r||(r=!0,e.onError==null||e.onError(k),i==null||i(),s(k))},_=()=>new Promise(k=>{i=T=>{const M=r||!m();return M&&k(T),M},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),P=()=>{if(r)return;let k;try{k=e.fn()}catch(T){k=Promise.reject(T)}Promise.resolve(k).then(v).catch(T=>{var M,O;if(r)return;const N=(M=e.retry)!=null?M:3,L=(O=e.retryDelay)!=null?O:jZ,F=typeof L=="function"?L(n,T):L,V=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,T);if(t||!V){x(T);return}n++,e.onFail==null||e.onFail(n,T),XF(F).then(()=>{if(m())return _()}).then(()=>{t?x(T):P()})})};return a_(e.networkMode)?P():_().then(P),{promise:a,cancel:u,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:d,continueRetry:p}}const AP=console;function HZ(){let e=[],t=0,n=p=>{p()},r=p=>{p()};const i=p=>{let m;t++;try{m=p()}finally{t--,t||a()}return m},o=p=>{t?e.push(p):iA(()=>{n(p)})},s=p=>(...m)=>{o(()=>{p(...m)})},a=()=>{const p=e;e=[],p.length&&iA(()=>{r(()=>{p.forEach(m=>{n(m)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:p=>{n=p},setBatchNotifyFunction:p=>{r=p}}}const bi=HZ();class JF{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),DS(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:tv?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class KZ extends JF{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||AP,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||WZ(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=LS(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(ts).catch(ts):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||!GF(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 o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(_=>_.options.queryFn);x&&this.setOptions(x.options)}Array.isArray(this.options.queryKey);const s=BZ(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};u(a);const d=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),p={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:d};if(u(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 m;this.dispatch({type:"fetch",meta:(m=p.fetchOptions)==null?void 0:m.meta})}const v=x=>{if(Wx(x)&&x.silent||this.dispatch({type:"error",error:x}),!Wx(x)){var _,P;(_=(P=this.cache.config).onError)==null||_.call(P,x,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=QF({fn:p.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:x=>{var _,P;if(typeof x>"u"){v(new Error("undefined"));return}this.setData(x),(_=(P=this.cache.config).onSuccess)==null||_.call(P,x,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:v,onFail:(x,_)=>{this.dispatch({type:"failed",failureCount:x,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,o;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:a_(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Wx(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),bi.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function WZ(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 GZ extends gp{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:RP(o,n);let a=this.get(s);return a||(a=new KZ({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}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(){bi.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Xu(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>eA(r,i))}findAll(t,n){const[r]=Xu(t,n);return Object.keys(r).length>0?this.queries.filter(i=>eA(r,i)):this.queries}notify(t){bi.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){bi.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){bi.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class qZ extends JF{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||AP,this.observers=[],this.state=t.state||ez(),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=QF({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,o,s,a,u;if(!n){var d,p,m,v;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(p=this.mutationCache.config).onMutate)==null?void 0:d.call(p,this.state.variables,this));const N=await((m=(v=this.options).onMutate)==null?void 0:m.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((o=(s=this.options).onSuccess)==null?void 0:o.call(s,O,this.state.variables,this.state.context)),await((a=(u=this.options).onSettled)==null?void 0:a.call(u,O,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:O}),O}catch(O){try{var x,_,P,k,T,M;throw await((x=(_=this.mutationCache.config).onError)==null?void 0:x.call(_,O,this.state.variables,this.state.context,this)),await((P=(k=this.options).onError)==null?void 0:P.call(k,O,this.state.variables,this.state.context)),await((T=(M=this.options).onSettled)==null?void 0:T.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:!a_(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),bi.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function ez(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ZZ extends gp{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new qZ({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(){bi.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=>tA(t,n))}findAll(t){return this.mutations.filter(n=>tA(t,n))}notify(t){bi.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 bi.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(ts)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function XZ(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,d=u==null?void 0:u.pageParam,p=(u==null?void 0:u.direction)==="forward",m=(u==null?void 0:u.direction)==="backward",v=((o=e.state.data)==null?void 0:o.pages)||[],x=((s=e.state.data)==null?void 0:s.pageParams)||[];let _=x,P=!1;const k=F=>{Object.defineProperty(F,"signal",{enumerable:!0,get:()=>{var V;if((V=e.signal)!=null&&V.aborted)P=!0;else{var B;(B=e.signal)==null||B.addEventListener("abort",()=>{P=!0})}return e.signal}})},T=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),M=(F,V,B,H)=>(_=H?[V,..._]:[..._,V],H?[B,...F]:[...F,B]),O=(F,V,B,H)=>{if(P)return Promise.reject("Cancelled");if(typeof B>"u"&&!V&&F.length)return Promise.resolve(F);const G={queryKey:e.queryKey,pageParam:B,meta:e.options.meta};k(G);const ee=T(G);return Promise.resolve(ee).then(Z=>M(F,B,Z,H))};let N;if(!v.length)N=O([]);else if(p){const F=typeof d<"u",V=F?d:oA(e.options,v);N=O(v,F,V)}else if(m){const F=typeof d<"u",V=F?d:YZ(e.options,v);N=O(v,F,V,!0)}else{_=[];const F=typeof e.options.getNextPageParam>"u";N=(a&&v[0]?a(v[0],0,v):!0)?O([],F,x[0]):Promise.resolve(M([],x[0],v[0]));for(let B=1;B<v.length;B++)N=N.then(H=>{if(a&&v[B]?a(v[B],B,v):!0){const ee=F?x[B]:oA(e.options,H);return O(H,F,ee)}return Promise.resolve(M(H,x[B],v[B]))})}return N.then(F=>({pages:F,pageParams:_}))}}}}function oA(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function YZ(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class QZ{constructor(t={}){this.queryCache=t.queryCache||new GZ,this.mutationCache=t.mutationCache||new ZZ,this.logger=t.logger||AP,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=j1.subscribe(()=>{j1.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=H1.subscribe(()=>{H1.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]=Xu(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=ig(t,n,r),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):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),o=i==null?void 0:i.state.data,s=zZ(n,o);if(typeof s>"u")return;const a=ig(t),u=this.defaultQueryOptions(a);return this.queryCache.build(this,u).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return bi.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]=Xu(t,n),i=this.queryCache;bi.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=Xu(t,n,r),s=this.queryCache,a={type:"active",...i};return bi.batch(()=>(s.findAll(i).forEach(u=>{u.reset()}),this.refetchQueries(a,o)))}cancelQueries(t,n,r){const[i,o={}]=Xu(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=bi.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(o)));return Promise.all(s).then(ts).catch(ts)}invalidateQueries(t,n,r){const[i,o]=Xu(t,n,r);return bi.batch(()=>{var s,a;if(this.queryCache.findAll(i).forEach(d=>{d.invalidate()}),i.refetchType==="none")return Promise.resolve();const u={...i,type:(s=(a=i.refetchType)!=null?a:i.type)!=null?s:"active"};return this.refetchQueries(u,o)})}refetchQueries(t,n,r){const[i,o]=Xu(t,n,r),s=bi.batch(()=>this.queryCache.findAll(i).filter(u=>!u.isDisabled()).map(u=>{var d;return u.fetch(void 0,{...o,cancelRefetch:(d=o==null?void 0:o.cancelRefetch)!=null?d:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(s).then(ts);return o!=null&&o.throwOnError||(a=a.catch(ts)),a}fetchQuery(t,n,r){const i=ig(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(ts).catch(ts)}fetchInfiniteQuery(t,n,r){const i=ig(t,n,r);return i.behavior=XZ(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(ts).catch(ts)}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=>Dd(t)===Dd(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>U1(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>Dd(t)===Dd(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>U1(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=RP(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 JZ extends gp{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),aA(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return FS(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return FS(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),OS(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 o=this.hasListeners();o&&sA(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(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(ts)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),tv||this.currentResult.isStale||!DS(this.options.staleTime))return;const n=GF(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,!(tv||this.options.enabled===!1||!DS(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||j1.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,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,u=t!==r,d=u?t.state:this.currentQueryInitialState,p=u?this.currentResult:this.previousQueryResult,{state:m}=t;let{dataUpdatedAt:v,error:x,errorUpdatedAt:_,fetchStatus:P,status:k}=m,T=!1,M=!1,O;if(n._optimisticResults){const B=this.hasListeners(),H=!B&&aA(t,n),G=B&&sA(t,r,n,i);(H||G)&&(P=a_(t.options.networkMode)?"fetching":"paused",v||(k="loading")),n._optimisticResults==="isRestoring"&&(P="idle")}if(n.keepPreviousData&&!m.dataUpdatedAt&&p!=null&&p.isSuccess&&k!=="error")O=p.data,v=p.dataUpdatedAt,k=p.status,T=!0;else if(n.select&&typeof m.data<"u")if(o&&m.data===(s==null?void 0:s.data)&&n.select===this.selectFn)O=this.selectResult;else try{this.selectFn=n.select,O=n.select(m.data),O=LS(o==null?void 0:o.data,O,n),this.selectResult=O,this.selectError=null}catch(B){this.selectError=B}else O=m.data;if(typeof n.placeholderData<"u"&&typeof O>"u"&&k==="loading"){let B;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))B=o.data;else if(B=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof B<"u")try{B=n.select(B),this.selectError=null}catch(H){this.selectError=H}typeof B<"u"&&(k="success",O=LS(o==null?void 0:o.data,B,n),M=!0)}this.selectError&&(x=this.selectError,O=this.selectResult,_=Date.now(),k="error");const N=P==="fetching",L=k==="loading",F=k==="error";return{status:k,fetchStatus:P,isLoading:L,isSuccess:k==="success",isError:F,isInitialLoading:L&&N,data:O,dataUpdatedAt:v,error:x,errorUpdatedAt:_,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:N,isRefetching:N&&!L,isLoadingError:F&&m.dataUpdatedAt===0,isPaused:P==="paused",isPlaceholderData:M,isPreviousData:T,isRefetchError:F&&m.dataUpdatedAt!==0,isStale:DP(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,OS(r,n))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options;if(s==="all"||!s&&!this.trackedProps.size)return!0;const a=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==n[d]&&a.has(d)})};(t==null?void 0:t.listeners)!==!1&&o()&&(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"&&!Wx(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){bi.batch(()=>{if(t.onSuccess){var n,r,i,o;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(t.onError){var s,a,u,d;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(u=(d=this.options).onSettled)==null||u.call(d,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 eX(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function aA(e,t){return eX(e,t)||e.state.dataUpdatedAt>0&&FS(e,t,t.refetchOnMount)}function FS(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&DP(e,t)}return!1}function sA(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&DP(e,n)}function DP(e,t){return e.isStaleByTime(t.staleTime)}class tX extends gp{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.client.defaultMutationOptions(t),OS(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this})}onUnsubscribe(){if(!this.listeners.length){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:ez(),n={...t,isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=n}notify(t){bi.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,i,o;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(o=this.mutateOptions).onSettled)==null||i.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var s,a,u,d;(s=(a=this.mutateOptions).onError)==null||s.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(d=this.mutateOptions).onSettled)==null||u.call(d,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(p=>{p(this.currentResult)})})}}var OP={exports:{}},tz={};/**
|
|
|
* @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 Gh=w.exports;function nX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rX=typeof Object.is=="function"?Object.is:nX,iX=Gh.useState,oX=Gh.useEffect,aX=Gh.useLayoutEffect,sX=Gh.useDebugValue;function lX(e,t){var n=t(),r=iX({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return aX(function(){i.value=n,i.getSnapshot=t,nC(i)&&o({inst:i})},[e,n,t]),oX(function(){return nC(i)&&o({inst:i}),e(function(){nC(i)&&o({inst:i})})},[e]),sX(n),n}function nC(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rX(e,n)}catch{return!0}}function uX(e,t){return t()}var cX=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?uX:lX;tz.useSyncExternalStore=Gh.useSyncExternalStore!==void 0?Gh.useSyncExternalStore:cX;(function(e){e.exports=tz})(OP);const nz=OP.exports.useSyncExternalStore;var s_={exports:{}},l_={};/**
|
|
|
* @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 dX=w.exports,fX=Symbol.for("react.element"),hX=Symbol.for("react.fragment"),pX=Object.prototype.hasOwnProperty,mX=dX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gX={key:!0,ref:!0,__self:!0,__source:!0};function rz(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)pX.call(t,r)&&!gX.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:fX,type:e,key:o,ref:s,props:i,_owner:mX.current}}l_.Fragment=hX;l_.jsx=rz;l_.jsxs=rz;(function(e){e.exports=l_})(s_);const Tn=s_.exports.Fragment,I=s_.exports.jsx,$e=s_.exports.jsxs,lA=w.exports.createContext(void 0),iz=w.exports.createContext(!1);function oz(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=lA),window.ReactQueryClientContext):lA)}const ff=({context:e}={})=>{const t=w.exports.useContext(oz(e,w.exports.useContext(iz)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vX=({client:e,children:t,context:n,contextSharing:r=!1})=>{w.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=oz(n,r);return I(iz.Provider,{value:!n&&r,children:I(i.Provider,{value:e,children:t})})},az=w.exports.createContext(!1),yX=()=>w.exports.useContext(az);az.Provider;function xX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const bX=w.exports.createContext(xX()),_X=()=>w.exports.useContext(bX);function sz(e,t){return typeof e=="function"?e(...t):!!e}const wX=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},CX=e=>{w.exports.useEffect(()=>{e.clearReset()},[e])},SX=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&sz(n,[e.error,r]),EX=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},PX=(e,t)=>e.isLoading&&e.isFetching&&!t,IX=(e,t,n)=>(e==null?void 0:e.suspense)&&PX(t,n),TX=(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 kX(e,t){const n=ff({context:e.context}),r=yX(),i=_X(),o=n.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=bi.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=bi.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=bi.batchCalls(o.onSettled)),EX(o),wX(o,i),CX(i);const[s]=w.exports.useState(()=>new t(n,o)),a=s.getOptimisticResult(o);if(nz(w.exports.useCallback(u=>r?()=>{}:s.subscribe(bi.batchCalls(u)),[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),w.exports.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),IX(o,a,r))throw TX(o,s,i);if(SX({result:a,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return o.notifyOnChangeProps?a:s.trackResult(a)}function Vi(e,t,n){const r=ig(e,t,n);return kX(r,JZ)}function NP(e,t,n){const r=$Z(e,t,n),i=ff({context:r.context}),[o]=w.exports.useState(()=>new tX(i,r));w.exports.useEffect(()=>{o.setOptions(r)},[o,r]);const s=nz(w.exports.useCallback(u=>o.subscribe(bi.batchCalls(u)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),a=w.exports.useCallback((u,d)=>{o.mutate(u,d).catch(MX)},[o]);if(s.error&&sz(o.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}function MX(){}function is(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 qh(e){return!!e&&!!e[kr]}function mu(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)===BX}(e)||Array.isArray(e)||!!e[mA]||!!(!((t=e.constructor)===null||t===void 0)&&t[mA])||LP(e)||FP(e))}function Zh(e,t,n){n===void 0&&(n=!1),vp(e)===0?(n?Object.keys:UP)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function vp(e){var t=e[kr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:LP(e)?2:FP(e)?3:0}function zS(e,t){return vp(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function RX(e,t){return vp(e)===2?e.get(t):e[t]}function lz(e,t,n){var r=vp(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function AX(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function LP(e){return zX&&e instanceof Map}function FP(e){return $X&&e instanceof Set}function to(e){return e.o||e.t}function zP(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=VX(e);delete t[kr];for(var n=UP(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function $P(e,t){return t===void 0&&(t=!1),BP(e)||qh(e)||!mu(e)||(vp(e)>1&&(e.set=e.add=e.clear=e.delete=DX),Object.freeze(e),t&&Zh(e,function(n,r){return $P(r,!0)},!0)),e}function DX(){is(2)}function BP(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function gl(e){var t=BS[e];return t||is(18,e),t}function OX(e,t){BS[e]||(BS[e]=t)}function K1(){return rv}function rC(e,t){t&&(gl("Patches"),e.u=[],e.s=[],e.v=t)}function W1(e){$S(e),e.p.forEach(NX),e.p=null}function $S(e){e===rv&&(rv=e.l)}function uA(e){return rv={p:[],l:rv,h:e,m:!0,_:0}}function NX(e){var t=e[kr];t.i===0||t.i===1?t.j():t.O=!0}function iC(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||gl("ES5").S(t,e,r),r?(n[kr].P&&(W1(t),is(4)),mu(e)&&(e=G1(t,e),t.l||q1(t,e)),t.u&&gl("Patches").M(n[kr].t,e,t.u,t.s)):e=G1(t,n,[]),W1(t),t.u&&t.v(t.u,t.s),e!==uz?e:void 0}function G1(e,t,n){if(BP(t))return t;var r=t[kr];if(!r)return Zh(t,function(a,u){return cA(e,r,t,a,u,n)},!0),t;if(r.A!==e)return t;if(!r.P)return q1(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=zP(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),Zh(o,function(a,u){return cA(e,r,i,a,u,n,s)}),q1(e,i,!1),n&&e.u&&gl("Patches").N(r,n,e.u,e.s)}return r.o}function cA(e,t,n,r,i,o,s){if(qh(i)){var a=G1(e,i,o&&t&&t.i!==3&&!zS(t.R,r)?o.concat(r):void 0);if(lz(n,r,a),!qh(a))return;e.m=!1}else s&&n.add(i);if(mu(i)&&!BP(i)){if(!e.h.D&&e._<1)return;G1(e,i),t&&t.A.l||q1(e,i)}}function q1(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&$P(t,n)}function oC(e,t){var n=e[kr];return(n?to(n):e)[t]}function dA(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 Jl(e){e.P||(e.P=!0,e.l&&Jl(e.l))}function aC(e){e.o||(e.o=zP(e.t))}function nv(e,t,n){var r=LP(t)?gl("MapSet").F(t,n):FP(t)?gl("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:K1(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},u=a,d=VS;s&&(u=[a],d=og);var p=Proxy.revocable(u,d),m=p.revoke,v=p.proxy;return a.k=v,a.j=m,v}(t,n):gl("ES5").J(t,n);return(n?n.A:K1()).p.push(r),r}function LX(e){return qh(e)||is(22,e),function t(n){if(!mu(n))return n;var r,i=n[kr],o=vp(n);if(i){if(!i.P&&(i.i<4||!gl("ES5").K(i)))return i.t;i.I=!0,r=fA(n,o),i.I=!1}else r=fA(n,o);return Zh(r,function(s,a){i&&RX(i.t,s)===a||lz(r,s,t(a))}),o===3?new Set(r):r}(e)}function fA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return zP(e)}function FX(){function e(a,u){function d(){this.constructor=a}i(a,u),a.prototype=(d.prototype=u.prototype,new d)}function t(a){a.o||(a.R=new Map,a.o=new Map(a.t))}function n(a){a.o||(a.o=new Set,a.t.forEach(function(u){if(mu(u)){var d=nv(a.A.h,u,a);a.p.set(u,d),a.o.add(d)}else a.o.add(u)}))}function r(a){a.O&&is(3,JSON.stringify(to(a)))}var i=function(a,u){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var m in p)p.hasOwnProperty(m)&&(d[m]=p[m])})(a,u)},o=function(){function a(d,p){return this[kr]={i:2,l:p,A:p?p.A:K1(),P:!1,I:!1,o:void 0,R:void 0,t:d,k:this,C:!1,O:!1},this}e(a,Map);var u=a.prototype;return Object.defineProperty(u,"size",{get:function(){return to(this[kr]).size}}),u.has=function(d){return to(this[kr]).has(d)},u.set=function(d,p){var m=this[kr];return r(m),to(m).has(d)&&to(m).get(d)===p||(t(m),Jl(m),m.R.set(d,!0),m.o.set(d,p),m.R.set(d,!0)),this},u.delete=function(d){if(!this.has(d))return!1;var p=this[kr];return r(p),t(p),Jl(p),p.t.has(d)?p.R.set(d,!1):p.R.delete(d),p.o.delete(d),!0},u.clear=function(){var d=this[kr];r(d),to(d).size&&(t(d),Jl(d),d.R=new Map,Zh(d.t,function(p){d.R.set(p,!1)}),d.o.clear())},u.forEach=function(d,p){var m=this;to(this[kr]).forEach(function(v,x){d.call(p,m.get(x),x,m)})},u.get=function(d){var p=this[kr];r(p);var m=to(p).get(d);if(p.I||!mu(m)||m!==p.t.get(d))return m;var v=nv(p.A.h,m,p);return t(p),p.o.set(d,v),v},u.keys=function(){return to(this[kr]).keys()},u.values=function(){var d,p=this,m=this.keys();return(d={})[Vy]=function(){return p.values()},d.next=function(){var v=m.next();return v.done?v:{done:!1,value:p.get(v.value)}},d},u.entries=function(){var d,p=this,m=this.keys();return(d={})[Vy]=function(){return p.entries()},d.next=function(){var v=m.next();if(v.done)return v;var x=p.get(v.value);return{done:!1,value:[v.value,x]}},d},u[Vy]=function(){return this.entries()},a}(),s=function(){function a(d,p){return this[kr]={i:3,l:p,A:p?p.A:K1(),P:!1,I:!1,o:void 0,t:d,k:this,p:new Map,O:!1,C:!1},this}e(a,Set);var u=a.prototype;return Object.defineProperty(u,"size",{get:function(){return to(this[kr]).size}}),u.has=function(d){var p=this[kr];return r(p),p.o?!!p.o.has(d)||!(!p.p.has(d)||!p.o.has(p.p.get(d))):p.t.has(d)},u.add=function(d){var p=this[kr];return r(p),this.has(d)||(n(p),Jl(p),p.o.add(d)),this},u.delete=function(d){if(!this.has(d))return!1;var p=this[kr];return r(p),n(p),Jl(p),p.o.delete(d)||!!p.p.has(d)&&p.o.delete(p.p.get(d))},u.clear=function(){var d=this[kr];r(d),to(d).size&&(n(d),Jl(d),d.o.clear())},u.values=function(){var d=this[kr];return r(d),n(d),d.o.values()},u.entries=function(){var d=this[kr];return r(d),n(d),d.o.entries()},u.keys=function(){return this.values()},u[Vy]=function(){return this.values()},u.forEach=function(d,p){for(var m=this.values(),v=m.next();!v.done;)d.call(p,v.value,v.value,this),v=m.next()},a}();OX("MapSet",{F:function(a,u){return new o(a,u)},T:function(a,u){return new s(a,u)}})}var hA,rv,VP=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",zX=typeof Map<"u",$X=typeof Set<"u",pA=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",uz=VP?Symbol.for("immer-nothing"):((hA={})["immer-nothing"]=!0,hA),mA=VP?Symbol.for("immer-draftable"):"__$immer_draftable",kr=VP?Symbol.for("immer-state"):"__$immer_state",Vy=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",BX=""+Object.prototype.constructor,UP=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,VX=Object.getOwnPropertyDescriptors||function(e){var t={};return UP(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},BS={},VS={get:function(e,t){if(t===kr)return e;var n=to(e);if(!zS(n,t))return function(i,o,s){var a,u=dA(o,s);return u?"value"in u?u.value:(a=u.get)===null||a===void 0?void 0:a.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!mu(r)?r:r===oC(e.t,t)?(aC(e),e.o[t]=nv(e.A.h,r,e)):r},has:function(e,t){return t in to(e)},ownKeys:function(e){return Reflect.ownKeys(to(e))},set:function(e,t,n){var r=dA(to(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=oC(to(e),t),o=i==null?void 0:i[kr];if(o&&o.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(AX(n,i)&&(n!==void 0||zS(e.t,t)))return!0;aC(e),Jl(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 oC(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,aC(e),Jl(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=to(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){is(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){is(12)}},og={};Zh(VS,function(e,t){og[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),og.deleteProperty=function(e,t){return og.set.call(this,e,t,void 0)},og.set=function(e,t,n){return VS.set.call(this,e[0],t,n,e[0])};var UX=function(){function e(n){var r=this;this.g=pA,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var u=r;return function(P){var k=this;P===void 0&&(P=a);for(var T=arguments.length,M=Array(T>1?T-1:0),O=1;O<T;O++)M[O-1]=arguments[O];return u.produce(P,function(N){var L;return(L=o).call.apply(L,[k,N].concat(M))})}}var d;if(typeof o!="function"&&is(6),s!==void 0&&typeof s!="function"&&is(7),mu(i)){var p=uA(r),m=nv(r,i,void 0),v=!0;try{d=o(m),v=!1}finally{v?W1(p):$S(p)}return typeof Promise<"u"&&d instanceof Promise?d.then(function(P){return rC(p,s),iC(P,p)},function(P){throw W1(p),P}):(rC(p,s),iC(d,p))}if(!i||typeof i!="object"){if((d=o(i))===void 0&&(d=i),d===uz&&(d=void 0),r.D&&$P(d,!0),s){var x=[],_=[];gl("Patches").M(i,d,x,_),s(x,_)}return d}is(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(d){for(var p=arguments.length,m=Array(p>1?p-1:0),v=1;v<p;v++)m[v-1]=arguments[v];return r.produceWithPatches(d,function(x){return i.apply(void 0,[x].concat(m))})};var s,a,u=r.produce(i,o,function(d,p){s=d,a=p});return typeof Promise<"u"&&u instanceof Promise?u.then(function(d){return[d,s,a]}):[u,s,a]},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){mu(n)||is(8),qh(n)&&(n=LX(n));var r=uA(this),i=nv(this,n,void 0);return i[kr].C=!0,$S(r),i},t.finishDraft=function(n,r){var i=n&&n[kr],o=i.A;return rC(o,r),iC(void 0,o)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!pA&&is(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=gl("Patches").$;return qh(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),za=new UX,jX=za.produce;za.produceWithPatches.bind(za);za.setAutoFreeze.bind(za);za.setUseProxies.bind(za);za.applyPatches.bind(za);za.createDraft.bind(za);za.finishDraft.bind(za);/**
|
|
|
* @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 Z1(){return Z1=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},Z1.apply(this,arguments)}var nc;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(nc||(nc={}));const gA="popstate";function HX(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:s,hash:a}=r.location;return US("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:cz(i)}return WX(t,n,null,e)}function ma(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function KX(){return Math.random().toString(36).substr(2,8)}function vA(e,t){return{usr:e.state,key:e.key,idx:t}}function US(e,t,n,r){return n===void 0&&(n=null),Z1({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?u_(t):t,{state:n,key:t&&t.key||r||KX()})}function cz(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 u_(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 WX(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=nc.Pop,u=null,d=p();d==null&&(d=0,s.replaceState(Z1({},s.state,{idx:d}),""));function p(){return(s.state||{idx:null}).idx}function m(){a=nc.Pop;let k=p(),T=k==null?null:k-d;d=k,u&&u({action:a,location:P.location,delta:T})}function v(k,T){a=nc.Push;let M=US(P.location,k,T);n&&n(M,k),d=p()+1;let O=vA(M,d),N=P.createHref(M);try{s.pushState(O,"",N)}catch{i.location.assign(N)}o&&u&&u({action:a,location:P.location,delta:1})}function x(k,T){a=nc.Replace;let M=US(P.location,k,T);n&&n(M,k),d=p();let O=vA(M,d),N=P.createHref(M);s.replaceState(O,"",N),o&&u&&u({action:a,location:P.location,delta:0})}function _(k){let T=i.location.origin!=="null"?i.location.origin:i.location.href,M=typeof k=="string"?k:cz(k);return ma(T,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,T)}let P={get action(){return a},get location(){return e(i,s)},listen(k){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(gA,m),u=k,()=>{i.removeEventListener(gA,m),u=null}},createHref(k){return t(i,k)},createURL:_,encodeLocation(k){let T=_(k);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:v,replace:x,go(k){return s.go(k)}};return P}var yA;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yA||(yA={}));function GX(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?u_(t):t,i=hz(r.pathname||"/",n);if(i==null)return null;let o=dz(e);qX(o);let s=null;for(let a=0;s==null&&a<o.length;++a)s=rY(o[a],aY(i));return s}function dz(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,s,a)=>{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};u.relativePath.startsWith("/")&&(ma(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let d=Ah([r,u.relativePath]),p=n.concat(u);o.children&&o.children.length>0&&(ma(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),dz(o.children,t,p,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:tY(d,o.index),routesMeta:p})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let u of fz(o.path))i(o,s,u)}),t}function fz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=fz(r.join("/")),a=[];return a.push(...s.map(u=>u===""?o:[o,u].join("/"))),i&&a.push(...s),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function qX(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:nY(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ZX=/^:\w+$/,XX=3,YX=2,QX=1,JX=10,eY=-2,xA=e=>e==="*";function tY(e,t){let n=e.split("/"),r=n.length;return n.some(xA)&&(r+=eY),t&&(r+=YX),n.filter(i=>!xA(i)).reduce((i,o)=>i+(ZX.test(o)?XX:o===""?QX:JX),r)}function nY(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 rY(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s<n.length;++s){let a=n[s],u=s===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",p=iY({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},d);if(!p)return null;Object.assign(r,p.params);let m=a.route;o.push({params:r,pathname:Ah([i,p.pathname]),pathnameBase:lY(Ah([i,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(i=Ah([i,p.pathnameBase]))}return o}function iY(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=oY(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((d,p,m)=>{if(p==="*"){let v=a[m]||"";s=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}return d[p]=sY(a[m]||"",p),d},{}),pathname:o,pathnameBase:s,pattern:e}}function oY(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jP(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,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function aY(e){try{return decodeURI(e)}catch(t){return jP(!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 sY(e,t){try{return decodeURIComponent(e)}catch(n){return jP(!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 hz(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 jP(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}const Ah=e=>e.join("/").replace(/\/\/+/g,"/"),lY=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function uY(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const cY=["post","put","patch","delete"];[...cY];/**
|
|
|
* 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 jS(){return jS=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},jS.apply(this,arguments)}function dY(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const fY=typeof Object.is=="function"?Object.is:dY,{useState:hY,useEffect:pY,useLayoutEffect:mY,useDebugValue:gY}=v1;function vY(e,t,n){const r=t(),[{inst:i},o]=hY({inst:{value:r,getSnapshot:t}});return mY(()=>{i.value=r,i.getSnapshot=t,sC(i)&&o({inst:i})},[e,r,t]),pY(()=>(sC(i)&&o({inst:i}),e(()=>{sC(i)&&o({inst:i})})),[e]),gY(r),r}function sC(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!fY(n,r)}catch{return!0}}function yY(e,t,n){return t()}const xY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bY=!xY,_Y=bY?yY:vY;"useSyncExternalStore"in v1&&(e=>e.useSyncExternalStore)(v1);const pz=w.exports.createContext(null),mz=w.exports.createContext(null),gz=w.exports.createContext(null),c_=w.exports.createContext(null),d_=w.exports.createContext({outlet:null,matches:[]}),vz=w.exports.createContext(null);function HP(){return w.exports.useContext(c_)!=null}function wY(){return HP()||ma(!1),w.exports.useContext(c_).location}function CY(e,t){HP()||ma(!1);let{navigator:n}=w.exports.useContext(gz),r=w.exports.useContext(mz),{matches:i}=w.exports.useContext(d_),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let u=wY(),d;if(t){var p;let P=typeof t=="string"?u_(t):t;a==="/"||((p=P.pathname)==null?void 0:p.startsWith(a))||ma(!1),d=P}else d=u;let m=d.pathname||"/",v=a==="/"?m:m.slice(a.length)||"/",x=GX(e,{pathname:v}),_=IY(x&&x.map(P=>Object.assign({},P,{params:Object.assign({},s,P.params),pathname:Ah([a,n.encodeLocation?n.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?a:Ah([a,n.encodeLocation?n.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),i,r||void 0);return t&&_?I(c_.Provider,{value:{location:jS({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:nc.Pop},children:_}):_}function SY(){let e=RY(),t=uY(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return $e(Tn,{children:[I("h2",{children:"Unexpected Application Error!"}),I("h3",{style:{fontStyle:"italic"},children:t}),n?I("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},children:n}):null,null]})}class EY extends w.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?I(d_.Provider,{value:this.props.routeContext,children:I(vz.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function PY(e){let{routeContext:t,match:n,children:r}=e,i=w.exports.useContext(pz);return i&&i.static&&i.staticContext&&n.route.errorElement&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),I(d_.Provider,{value:t,children:r})}function IY(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 o=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));o>=0||ma(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,s,a)=>{let u=s.route.id?i==null?void 0:i[s.route.id]:null,d=n?s.route.errorElement||I(SY,{}):null,p=t.concat(r.slice(0,a+1)),m=()=>I(PY,{match:s,routeContext:{outlet:o,matches:p},children:u?d:s.route.element!==void 0?s.route.element:o});return n&&(s.route.errorElement||a===0)?I(EY,{location:n.location,component:d,error:u,children:m(),routeContext:{outlet:null,matches:p}}):m()},null)}var bA;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(bA||(bA={}));var X1;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(X1||(X1={}));function TY(e){let t=w.exports.useContext(mz);return t||ma(!1),t}function kY(e){let t=w.exports.useContext(d_);return t||ma(!1),t}function MY(e){let t=kY(),n=t.matches[t.matches.length-1];return n.route.id||ma(!1),n.route.id}function RY(){var e;let t=w.exports.useContext(vz),n=TY(X1.UseRouteError),r=MY(X1.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function yz(e){ma(!1)}function AY(e){let{basename:t="/",children:n=null,location:r,navigationType:i=nc.Pop,navigator:o,static:s=!1}=e;HP()&&ma(!1);let a=t.replace(/^\/*/,"/"),u=w.exports.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=u_(r));let{pathname:d="/",search:p="",hash:m="",state:v=null,key:x="default"}=r,_=w.exports.useMemo(()=>{let P=hz(d,a);return P==null?null:{pathname:P,search:p,hash:m,state:v,key:x}},[a,d,p,m,v,x]);return _==null?null:I(gz.Provider,{value:u,children:I(c_.Provider,{children:n,value:{location:_,navigationType:i}})})}function DY(e){let{children:t,location:n}=e,r=w.exports.useContext(pz),i=r&&!t?r.router.routes:HS(t);return CY(i,n)}var _A;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(_A||(_A={}));new Promise(()=>{});function HS(e,t){t===void 0&&(t=[]);let n=[];return w.exports.Children.forEach(e,(r,i)=>{if(!w.exports.isValidElement(r))return;if(r.type===w.exports.Fragment){n.push.apply(n,HS(r.props.children,t));return}r.type!==yz&&ma(!1),!r.props.index||!r.props.children||ma(!1);let o=[...t,i],s={id:r.props.id||o.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=HS(r.props.children,o)),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 OY(e){let{basename:t,children:n,window:r}=e,i=w.exports.useRef();i.current==null&&(i.current=HX({window:r,v5Compat:!0}));let o=i.current,[s,a]=w.exports.useState({action:o.action,location:o.location});return w.exports.useLayoutEffect(()=>o.listen(a),[o]),I(AY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}var wA;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(wA||(wA={}));var CA;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(CA||(CA={}));const iv=(e,t)=>{const[n,r]=w.exports.useState(()=>{let i;try{i=JSON.parse(localStorage.getItem(e)||String(t))}catch{i=t}return i});return w.exports.useEffect(()=>{localStorage.setItem(e,JSON.stringify(n))},[n,e]),[n,r]};var NY="Expected a function",SA=0/0,LY="[object Symbol]",FY=/^\s+|\s+$/g,zY=/^[-+]0x[0-9a-f]+$/i,$Y=/^0b[01]+$/i,BY=/^0o[0-7]+$/i,VY=parseInt,UY=typeof ru=="object"&&ru&&ru.Object===Object&&ru,jY=typeof self=="object"&&self&&self.Object===Object&&self,HY=UY||jY||Function("return this")(),KY=Object.prototype,WY=KY.toString,GY=Math.max,qY=Math.min,lC=function(){return HY.Date.now()};function ZY(e,t,n){var r,i,o,s,a,u,d=0,p=!1,m=!1,v=!0;if(typeof e!="function")throw new TypeError(NY);t=EA(t)||0,KS(n)&&(p=!!n.leading,m="maxWait"in n,o=m?GY(EA(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v);function x(F){var V=r,B=i;return r=i=void 0,d=F,s=e.apply(B,V),s}function _(F){return d=F,a=setTimeout(T,t),p?x(F):s}function P(F){var V=F-u,B=F-d,H=t-V;return m?qY(H,o-B):H}function k(F){var V=F-u,B=F-d;return u===void 0||V>=t||V<0||m&&B>=o}function T(){var F=lC();if(k(F))return M(F);a=setTimeout(T,P(F))}function M(F){return a=void 0,v&&r?x(F):(r=i=void 0,s)}function O(){a!==void 0&&clearTimeout(a),d=0,r=u=i=a=void 0}function N(){return a===void 0?s:M(lC())}function L(){var F=lC(),V=k(F);if(r=arguments,i=this,u=F,V){if(a===void 0)return _(u);if(m)return a=setTimeout(T,t),x(u)}return a===void 0&&(a=setTimeout(T,t)),s}return L.cancel=O,L.flush=N,L}function KS(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function XY(e){return!!e&&typeof e=="object"}function YY(e){return typeof e=="symbol"||XY(e)&&WY.call(e)==LY}function EA(e){if(typeof e=="number")return e;if(YY(e))return SA;if(KS(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=KS(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(FY,"");var n=$Y.test(e);return n||BY.test(e)?VY(e.slice(2),n?2:8):zY.test(e)?SA:+e}var QY=ZY,xz={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ru,function(){var n,r,i;function o(a,u){if(!n)n=u;else if(!r)r=u;else{var d="var sharedChunk = {}; ("+n+")(sharedChunk); ("+r+")(sharedChunk);",p={};n(p),i=u(p),typeof window<"u"&&(i.workerUrl=window.URL.createObjectURL(new Blob([d],{type:"text/javascript"})))}}o(["exports"],function(a){var u=d;function d(f,l,h,y){this.cx=3*f,this.bx=3*(h-f)-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=f,this.p1y=l,this.p2x=h,this.p2y=y}function p(f,l,h,y){const S=new u(f,l,h,y);return function(R){return S.solve(R)}}d.prototype={sampleCurveX:function(f){return((this.ax*f+this.bx)*f+this.cx)*f},sampleCurveY:function(f){return((this.ay*f+this.by)*f+this.cy)*f},sampleCurveDerivativeX:function(f){return(3*this.ax*f+2*this.bx)*f+this.cx},solveCurveX:function(f,l){if(l===void 0&&(l=1e-6),f<0)return 0;if(f>1)return 1;for(var h=f,y=0;y<8;y++){var S=this.sampleCurveX(h)-f;if(Math.abs(S)<l)return h;var R=this.sampleCurveDerivativeX(h);if(Math.abs(R)<1e-6)break;h-=S/R}var D=0,$=1;for(h=f,y=0;y<20&&(S=this.sampleCurveX(h),!(Math.abs(S-f)<l));y++)f>S?D=h:$=h,h=.5*($-D)+D;return h},solve:function(f,l){return this.sampleCurveY(this.solveCurveX(f,l))}};const m=p(.25,.1,.25,1);function v(f,l,h){return Math.min(h,Math.max(l,f))}function x(f,l,h){const y=h-l,S=((f-l)%y+y)%y+l;return S===l?h:S}function _(f,...l){for(const h of l)for(const y in h)f[y]=h[y];return f}let P=1;function k(f,l){f.forEach(h=>{l[h]&&(l[h]=l[h].bind(l))})}function T(f,l,h){const y={};for(const S in f)y[S]=l.call(h||this,f[S],S,f);return y}function M(f,l,h){const y={};for(const S in f)l.call(h||this,f[S],S,f)&&(y[S]=f[S]);return y}function O(f){return Array.isArray(f)?f.map(O):typeof f=="object"&&f?T(f,O):f}const N={};function L(f){N[f]||(typeof console<"u"&&console.warn(f),N[f]=!0)}function F(f,l,h){return(h.y-f.y)*(l.x-f.x)>(l.y-f.y)*(h.x-f.x)}function V(f){let l=0;for(let h,y,S=0,R=f.length,D=R-1;S<R;D=S++)h=f[S],y=f[D],l+=(y.x-h.x)*(h.y+y.y);return l}function B(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function H(f){const l={};if(f.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,y,S,R)=>{const D=S||R;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 G,ee,X=null;function Z(f){if(X==null){const l=f.navigator?f.navigator.userAgent:null;X=!!f.safari||!(!l||!(/\b(iPad|iPhone|iPod)\b/.test(l)||l.match("Safari")&&!l.match("Chrome")))}return X}function Q(f){return typeof ImageBitmap<"u"&&f instanceof ImageBitmap}const le={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(f){const l=requestAnimationFrame(f);return{cancel:()=>cancelAnimationFrame(l)}},getImageData(f,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=f.width,h.height=f.height,y.drawImage(f,0,0,f.width,f.height),y.getImageData(-l,-l,f.width+2*l,f.height+2*l)},resolveURL:f=>(G||(G=document.createElement("a")),G.href=f,G.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(ee==null&&(ee=matchMedia("(prefers-reduced-motion: reduce)")),ee.matches)}};var ne=se;function se(f,l){this.x=f,this.y=l}se.prototype={clone:function(){return new se(this.x,this.y)},add:function(f){return this.clone()._add(f)},sub:function(f){return this.clone()._sub(f)},multByPoint:function(f){return this.clone()._multByPoint(f)},divByPoint:function(f){return this.clone()._divByPoint(f)},mult:function(f){return this.clone()._mult(f)},div:function(f){return this.clone()._div(f)},rotate:function(f){return this.clone()._rotate(f)},rotateAround:function(f,l){return this.clone()._rotateAround(f,l)},matMult:function(f){return this.clone()._matMult(f)},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(f){return this.x===f.x&&this.y===f.y},dist:function(f){return Math.sqrt(this.distSqr(f))},distSqr:function(f){var l=f.x-this.x,h=f.y-this.y;return l*l+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(f){return Math.atan2(this.y-f.y,this.x-f.x)},angleWith:function(f){return this.angleWithSep(f.x,f.y)},angleWithSep:function(f,l){return Math.atan2(this.x*l-this.y*f,this.x*f+this.y*l)},_matMult:function(f){var l=f[2]*this.x+f[3]*this.y;return this.x=f[0]*this.x+f[1]*this.y,this.y=l,this},_add:function(f){return this.x+=f.x,this.y+=f.y,this},_sub:function(f){return this.x-=f.x,this.y-=f.y,this},_mult:function(f){return this.x*=f,this.y*=f,this},_div:function(f){return this.x/=f,this.y/=f,this},_multByPoint:function(f){return this.x*=f.x,this.y*=f.y,this},_divByPoint:function(f){return this.x/=f.x,this.y/=f.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var f=this.y;return this.y=this.x,this.x=-f,this},_rotate:function(f){var l=Math.cos(f),h=Math.sin(f),y=h*this.x+l*this.y;return this.x=l*this.x-h*this.y,this.y=y,this},_rotateAround:function(f,l){var h=Math.cos(f),y=Math.sin(f),S=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=S,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},se.convert=function(f){return f instanceof se?f:Array.isArray(f)?new se(f[0],f[1]):f};const oe={MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},he="mapbox-tiles";let _e,be,xe=500,Te=50;function Ee(){typeof caches>"u"||_e||(_e=caches.open(he))}let Ce=1/0;const ke={supported:!1,testSupport:function(f){!Ue&&Ke&&(tt?lt(f):De=f)}};let De,Ke,Ue=!1,tt=!1;function lt(f){const l=f.createTexture();f.bindTexture(f.TEXTURE_2D,l);try{if(f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,Ke),f.isContextLost())return;ke.supported=!0}catch{}f.deleteTexture(l),Ue=!0}typeof document<"u"&&(Ke=document.createElement("img"),Ke.onload=function(){De&<(De),De=null,tt=!0},Ke.onerror=function(){Ue=!0,De=null},Ke.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const St={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(St);class We extends Error{constructor(l,h,y,S){super(`AJAXError: ${h} (${l}): ${y}`),this.status=l,this.statusText=h,this.url=y,this.body=S}}const bt=B()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href;function Qe(f,l){const h=new AbortController,y=new Request(f.url,{method:f.method||"GET",body:f.body,credentials:f.credentials,headers:f.headers,referrer:bt(),signal:h.signal});let S=!1,R=!1;return f.type==="json"&&y.headers.set("Accept","application/json"),((D,$,U)=>{if(R)return;const W=Date.now();fetch(y).then(te=>te.ok?((ae,de,ge)=>{(f.type==="arrayBuffer"?ae.arrayBuffer():f.type==="json"?ae.json():ae.text()).then(ve=>{R||(de&&ge&&function(Fe,Ne,it){if(Ee(),!_e)return;const yt={status:Ne.status,statusText:Ne.statusText,headers:new Headers};Ne.headers.forEach((pt,Ot)=>yt.headers.set(Ot,pt));const Ye=H(Ne.headers.get("Cache-Control")||"");Ye["no-store"]||(Ye["max-age"]&&yt.headers.set("Expires",new Date(it+1e3*Ye["max-age"]).toUTCString()),new Date(yt.headers.get("Expires")).getTime()-it<42e4||function(pt,Ot){if(be===void 0)try{new Response(new ReadableStream),be=!0}catch{be=!1}be?Ot(pt.body):pt.blob().then(Ot)}(Ne,pt=>{const Ot=new Response(pt,yt);Ee(),_e&&_e.then(At=>At.put(function(gn){const _n=gn.indexOf("?");return _n<0?gn:gn.slice(0,_n)}(Fe.url),Ot)).catch(At=>L(At.message))}))}(y,de,ge),S=!0,l(null,ve,ae.headers.get("Cache-Control"),ae.headers.get("Expires")))}).catch(ve=>{R||l(new Error(ve.message))})})(te,null,W):te.blob().then(ae=>l(new We(te.status,te.statusText,f.url,ae)))).catch(te=>{te.code!==20&&l(new Error(te.message))})})(),{cancel:()=>{R=!0,S||h.abort()}}}const mt=function(f,l){if(/:\/\//.test(f.url)&&!/^https?:|^file:/.test(f.url)){if(B()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",f,l);if(!B()){const y=f.url.substring(0,f.url.indexOf("://"));return(oe.REGISTERED_PROTOCOLS[y]||Qe)(f,l)}}if(!(/^file:/.test(h=f.url)||/^file:/.test(bt())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return Qe(f,l);if(B()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",f,l,void 0,!0)}var h;return function(y,S){const R=new XMLHttpRequest;R.open(y.method||"GET",y.url,!0),y.type==="arrayBuffer"&&(R.responseType="arraybuffer");for(const D in y.headers)R.setRequestHeader(D,y.headers[D]);return y.type==="json"&&(R.responseType="text",R.setRequestHeader("Accept","application/json")),R.withCredentials=y.credentials==="include",R.onerror=()=>{S(new Error(R.statusText))},R.onload=()=>{if((R.status>=200&&R.status<300||R.status===0)&&R.response!==null){let D=R.response;if(y.type==="json")try{D=JSON.parse(R.response)}catch($){return S($)}S(null,D,R.getResponseHeader("Cache-Control"),R.getResponseHeader("Expires"))}else{const D=new Blob([R.response],{type:R.getResponseHeader("Content-Type")});S(new We(R.status,R.statusText,y.url,D))}},R.send(y.body),{cancel:()=>R.abort()}}(f,l)},ct=function(f,l){return mt(_(f,{type:"arrayBuffer"}),l)};function wt(f){const l=window.document.createElement("a");return l.href=f,l.protocol===window.document.location.protocol&&l.host===window.document.location.host}const rt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let ut,nt;ut=[],nt=0;const qe=function(f,l){if(ke.supported&&(f.headers||(f.headers={}),f.headers.accept="image/webp,*/*"),nt>=oe.MAX_PARALLEL_IMAGE_REQUESTS){const R={requestParameters:f,callback:l,cancelled:!1,cancel(){this.cancelled=!0}};return ut.push(R),R}nt++;let h=!1;const y=()=>{if(!h)for(h=!0,nt--;ut.length&&nt<oe.MAX_PARALLEL_IMAGE_REQUESTS;){const R=ut.shift(),{requestParameters:D,callback:$,cancelled:U}=R;U||(R.cancel=qe(D,$).cancel)}},S=ct(f,(R,D,$,U)=>{y(),R?l(R):D&&function(W,te){typeof createImageBitmap=="function"?function(ae,de){const ge=new Blob([new Uint8Array(ae)],{type:"image/png"});createImageBitmap(ge).then(ve=>{de(null,ve)}).catch(ve=>{de(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.`))})}(W,te):function(ae,de){const ge=new Image;ge.onload=()=>{de(null,ge),URL.revokeObjectURL(ge.src),ge.onload=null,window.requestAnimationFrame(()=>{ge.src=rt})},ge.onerror=()=>de(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(ae)],{type:"image/png"});ge.src=ae.byteLength?URL.createObjectURL(ve):rt}(W,te)}(D,(W,te)=>{W!=null?l(W):te!=null&&l(null,te,{cacheControl:$,expires:U})})});return{cancel:()=>{S.cancel(),y()}}};function dt(f,l,h){h[f]&&h[f].indexOf(l)!==-1||(h[f]=h[f]||[],h[f].push(l))}function _t(f,l,h){if(h&&h[f]){const y=h[f].indexOf(l);y!==-1&&h[f].splice(y,1)}}class Dt{constructor(l,h={}){_(this,h),this.type=l}}class Nt extends Dt{constructor(l,h={}){super("error",_({error:l},h))}}class jt{on(l,h){return this._listeners=this._listeners||{},dt(l,h,this._listeners),this}off(l,h){return _t(l,h,this._listeners),_t(l,h,this._oneTimeListeners),this}once(l,h){return this._oneTimeListeners=this._oneTimeListeners||{},dt(l,h,this._oneTimeListeners),this}fire(l,h){typeof l=="string"&&(l=new Dt(l,h||{}));const y=l.type;if(this.listens(y)){l.target=this;const S=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];for(const $ of S)$.call(this,l);const R=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];for(const $ of R)_t(y,$,this._oneTimeListeners),$.call(this,l);const D=this._eventedParent;D&&(_(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),D.fire(l))}else l instanceof Nt&&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 Ve={$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 Ze{constructor(l,h,y,S){this.message=(l?`${l}: `:"")+y,S&&(this.identifier=S),h!=null&&h.__line__&&(this.line=h.__line__)}}function Yt(f){const l=f.value;return l?[new Ze(f.key,l,"constants have been deprecated as of v8")]:[]}function sn(f,...l){for(const h of l)for(const y in h)f[y]=h[y];return f}function Gt(f){return f instanceof Number||f instanceof String||f instanceof Boolean?f.valueOf():f}function zt(f){if(Array.isArray(f))return f.map(zt);if(f instanceof Object&&!(f instanceof Number||f instanceof String||f instanceof Boolean)){const l={};for(const h in f)l[h]=zt(f[h]);return l}return Gt(f)}class Rt extends Error{constructor(l,h){super(h),this.message=h,this.key=l}}class Qt{constructor(l,h=[]){this.parent=l,this.bindings={};for(const[y,S]of h)this.bindings[y]=S}concat(l){return new Qt(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"},ot={kind:"number"},Lt={kind:"string"},Tt={kind:"boolean"},Kt={kind:"color"},Zt={kind:"object"},ht={kind:"value"},xn={kind:"collator"},bn={kind:"formatted"},tn={kind:"padding"},Bt={kind:"resolvedImage"};function gt(f,l){return{kind:"array",itemType:f,N:l}}function xt(f){if(f.kind==="array"){const l=xt(f.itemType);return typeof f.N=="number"?`array<${l}, ${f.N}>`:f.itemType.kind==="value"?"array":`array<${l}>`}return f.kind}const Vt=[pn,ot,Lt,Tt,Kt,bn,Zt,gt(ht),tn,Bt];function qt(f,l){if(l.kind==="error")return null;if(f.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!qt(f.itemType,l.itemType))&&(typeof f.N!="number"||f.N===l.N))return null}else{if(f.kind===l.kind)return null;if(f.kind==="value"){for(const h of Vt)if(!qt(h,l))return null}}return`Expected ${xt(f)} but found ${xt(l)} instead.`}function vn(f,l){return l.some(h=>h.kind===f.kind)}function Fn(f,l){return l.some(h=>h==="null"?f===null:h==="array"?Array.isArray(f):h==="object"?f&&!Array.isArray(f)&&typeof f=="object":h===typeof f)}var tr,nr={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(f){return(f=Math.round(f))<0?0:f>255?255:f}function q(f){return ye(f[f.length-1]==="%"?parseFloat(f)/100*255:parseInt(f))}function J(f){return(l=f[f.length-1]==="%"?parseFloat(f)/100:parseFloat(f))<0?0:l>1?1:l;var l}function pe(f,l,h){return h<0?h+=1:h>1&&(h-=1),6*h<1?f+(l-f)*h*6:2*h<1?l:3*h<2?f+(l-f)*(2/3-h)*6:f}try{tr={}.parseCSSColor=function(f){var l,h=f.replace(/ /g,"").toLowerCase();if(h in nr)return nr[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("("),S=h.indexOf(")");if(y!==-1&&S+1===h.length){var R=h.substr(0,y),D=h.substr(y+1,S-(y+1)).split(","),$=1;switch(R){case"rgba":if(D.length!==4)return null;$=J(D.pop());case"rgb":return D.length!==3?null:[q(D[0]),q(D[1]),q(D[2]),$];case"hsla":if(D.length!==4)return null;$=J(D.pop());case"hsl":if(D.length!==3)return null;var U=(parseFloat(D[0])%360+360)%360/360,W=J(D[1]),te=J(D[2]),ae=te<=.5?te*(W+1):te+W-te*W,de=2*te-ae;return[ye(255*pe(de,ae,U+1/3)),ye(255*pe(de,ae,U)),ye(255*pe(de,ae,U-1/3)),$];default:return null}}return null}}catch{}class ce{constructor(l,h,y,S=1){this.r=l,this.g=h,this.b=y,this.a=S}static parse(l){if(!l)return;if(l instanceof ce)return l;if(typeof l!="string")return;const h=tr(l);return h?new ce(h[0]/255*h[3],h[1]/255*h[3],h[2]/255*h[3],h[3]):void 0}toString(){const[l,h,y,S]=this.toArray();return`rgba(${Math.round(l)},${Math.round(h)},${Math.round(y)},${S})`}toArray(){const{r:l,g:h,b:y,a:S}=this;return S===0?[0,0,0,0]:[255*l/S,255*h/S,255*y/S,S]}}ce.black=new ce(0,0,0,1),ce.white=new ce(1,1,1,1),ce.transparent=new ce(0,0,0,0),ce.red=new ce(1,0,0,1);class we{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 Ae{constructor(l,h,y,S,R){this.text=l,this.image=h,this.scale=y,this.fontStack=S,this.textColor=R}}class Pe{constructor(l){this.sections=l}static fromString(l){return new Pe([new Ae(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 Pe?l:Pe.fromString(l)}toString(){return this.sections.length===0?"":this.sections.map(l=>l.text).join("")}}class Me{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof Me)return l;if(typeof l=="number")return new Me([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 Me(l)}}toString(){return JSON.stringify(this.values)}}class Be{constructor(l){this.name=l.name,this.available=l.available}toString(){return this.name}static fromString(l){return l?new Be({name:l,available:!1}):null}}function Je(f,l,h,y){return typeof f=="number"&&f>=0&&f<=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 [${[f,l,h,y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof y=="number"?[f,l,h,y]:[f,l,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function et(f){if(f===null||typeof f=="string"||typeof f=="boolean"||typeof f=="number"||f instanceof ce||f instanceof we||f instanceof Pe||f instanceof Me||f instanceof Be)return!0;if(Array.isArray(f)){for(const l of f)if(!et(l))return!1;return!0}if(typeof f=="object"){for(const l in f)if(!et(f[l]))return!1;return!0}return!1}function Ge(f){if(f===null)return pn;if(typeof f=="string")return Lt;if(typeof f=="boolean")return Tt;if(typeof f=="number")return ot;if(f instanceof ce)return Kt;if(f instanceof we)return xn;if(f instanceof Pe)return bn;if(f instanceof Me)return tn;if(f instanceof Be)return Bt;if(Array.isArray(f)){const l=f.length;let h;for(const y of f){const S=Ge(y);if(h){if(h===S)continue;h=ht;break}h=S}return gt(h||ht,l)}return Zt}function Ut(f){const l=typeof f;return f===null?"":l==="string"||l==="number"||l==="boolean"?String(f):f instanceof ce||f instanceof Pe||f instanceof Me||f instanceof Be?f.toString():JSON.stringify(f)}class Mt{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(!et(l[1]))return h.error("invalid value");const y=l[1];let S=Ge(y);const R=h.expectedType;return S.kind!=="array"||S.N!==0||!R||R.kind!=="array"||typeof R.N=="number"&&R.N!==0||(S=R),new Mt(S,y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class at{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const $t={string:Lt,number:ot,boolean:Tt,object:Zt};class Xt{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,S=1;const R=l[0];if(R==="array"){let $,U;if(l.length>2){const W=l[1];if(typeof W!="string"||!(W in $t)||W==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);$=$t[W],S++}else $=ht;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);U=l[2],S++}y=gt($,U)}else{if(!$t[R])throw new Error(`Types doesn't contain name = ${R}`);y=$t[R]}const D=[];for(;S<l.length;S++){const $=h.parse(l[S],S,ht);if(!$)return null;D.push($)}return new Xt(y,D)}evaluate(l){for(let h=0;h<this.args.length;h++){const y=this.args[h].evaluate(l);if(!qt(this.type,Ge(y)))return y;if(h===this.args.length-1)throw new at(`Expected value to be of type ${xt(this.type)}, but found ${xt(Ge(y))} instead.`)}throw new Error}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const En={"to-boolean":Tt,"to-color":Kt,"to-number":ot,"to-string":Lt};class hn{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(!En[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 S=En[y],R=[];for(let D=1;D<l.length;D++){const $=h.parse(l[D],D,ht);if(!$)return null;R.push($)}return new hn(S,R)}evaluate(l){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(l));if(this.type.kind==="color"){let h,y;for(const S of this.args){if(h=S.evaluate(l),y=null,h instanceof ce)return h;if(typeof h=="string"){const R=l.parseColor(h);if(R)return R}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.`:Je(h[0],h[1],h[2],h[3]),!y))return new ce(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new at(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 S=Me.parse(h);if(S)return S}throw new at(`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 S=Number(h);if(!isNaN(S))return S}throw new at(`Could not convert ${JSON.stringify(h)} to number.`)}return this.type.kind==="formatted"?Pe.fromString(Ut(this.args[0].evaluate(l))):this.type.kind==="resolvedImage"?Be.fromString(Ut(this.args[0].evaluate(l))):Ut(this.args[0].evaluate(l))}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const Pn=["Unknown","Point","LineString","Polygon"];class Gn{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"?Pn[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]=ce.parse(l)),h}}class lr{constructor(l,h,y,S){this.name=l,this.type=h,this._evaluate=y,this.args=S}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],S=lr.definitions[y];if(!S)return h.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0);const R=Array.isArray(S)?S[0]:S.type,D=Array.isArray(S)?[[S[1],S[2]]]:S.overloads,$=D.filter(([W])=>!Array.isArray(W)||W.length===l.length-1);let U=null;for(const[W,te]of $){U=new Gs(h.registry,h.path,null,h.scope);const ae=[];let de=!1;for(let ge=1;ge<l.length;ge++){const ve=l[ge],Fe=Array.isArray(W)?W[ge-1]:W.type,Ne=U.parse(ve,1+ae.length,Fe);if(!Ne){de=!0;break}ae.push(Ne)}if(!de)if(Array.isArray(W)&&W.length!==ae.length)U.error(`Expected ${W.length} arguments, but found ${ae.length} instead.`);else{for(let ge=0;ge<ae.length;ge++){const ve=Array.isArray(W)?W[ge]:W.type,Fe=ae[ge];U.concat(ge+1).checkSubtype(ve,Fe.type)}if(U.errors.length===0)return new lr(y,R,te,ae)}}if($.length===1)h.errors.push(...U.errors);else{const W=($.length?$:D).map(([ae])=>{return de=ae,Array.isArray(de)?`(${de.map(xt).join(", ")})`:`(${xt(de.type)}...)`;var de}).join(" | "),te=[];for(let ae=1;ae<l.length;ae++){const de=h.parse(l[ae],1+te.length);if(!de)return null;te.push(xt(de.type))}h.error(`Expected arguments of type ${W}, but found (${te.join(", ")}) instead.`)}return null}static register(l,h){lr.definitions=h;for(const y in h)l[y]=lr}}class Zr{constructor(l,h,y){this.type=xn,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 S=h.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,Tt);if(!S)return null;const R=h.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,Tt);if(!R)return null;let D=null;return y.locale&&(D=h.parse(y.locale,1,Lt),!D)?null:new Zr(S,R,D)}evaluate(l){return new we(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 hr=8192;function Vr(f,l){f[0]=Math.min(f[0],l[0]),f[1]=Math.min(f[1],l[1]),f[2]=Math.max(f[2],l[0]),f[3]=Math.max(f[3],l[1])}function Nn(f,l){return!(f[0]<=l[0]||f[2]>=l[2]||f[1]<=l[1]||f[3]>=l[3])}function An(f,l){const h=(180+f[0])/360,y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f[1]*Math.PI/360)))/360,S=Math.pow(2,l.z);return[Math.round(h*S*hr),Math.round(y*S*hr)]}function zn(f,l,h){const y=f[0]-l[0],S=f[1]-l[1],R=f[0]-h[0],D=f[1]-h[1];return y*D-R*S==0&&y*R<=0&&S*D<=0}function ri(f,l){let h=!1;for(let D=0,$=l.length;D<$;D++){const U=l[D];for(let W=0,te=U.length;W<te-1;W++){if(zn(f,U[W],U[W+1]))return!1;(S=U[W])[1]>(y=f)[1]!=(R=U[W+1])[1]>y[1]&&y[0]<(R[0]-S[0])*(y[1]-S[1])/(R[1]-S[1])+S[0]&&(h=!h)}}var y,S,R;return h}function Er(f,l){for(let h=0;h<l.length;h++)if(ri(f,l[h]))return!0;return!1}function Xn(f,l,h,y){const S=y[0]-h[0],R=y[1]-h[1],D=(f[0]-h[0])*R-S*(f[1]-h[1]),$=(l[0]-h[0])*R-S*(l[1]-h[1]);return D>0&&$<0||D<0&&$>0}function Kn(f,l,h){for(const W of h)for(let te=0;te<W.length-1;++te)if(($=[(D=W[te+1])[0]-(R=W[te])[0],D[1]-R[1]])[0]*(U=[(S=l)[0]-(y=f)[0],S[1]-y[1]])[1]-$[1]*U[0]!=0&&Xn(y,S,R,D)&&Xn(R,D,y,S))return!0;var y,S,R,D,$,U;return!1}function or(f,l){for(let h=0;h<f.length;++h)if(!ri(f[h],l))return!1;for(let h=0;h<f.length-1;++h)if(Kn(f[h],f[h+1],l))return!1;return!0}function Tr(f,l){for(let h=0;h<l.length;h++)if(or(f,l[h]))return!0;return!1}function Mr(f,l,h){const y=[];for(let S=0;S<f.length;S++){const R=[];for(let D=0;D<f[S].length;D++){const $=An(f[S][D],h);Vr(l,$),R.push($)}y.push(R)}return y}function Xr(f,l,h){const y=[];for(let S=0;S<f.length;S++){const R=Mr(f[S],l,h);y.push(R)}return y}function Oo(f,l,h,y){if(f[0]<h[0]||f[0]>h[2]){const S=.5*y;let R=f[0]-h[0]>S?-y:h[0]-f[0]>S?y:0;R===0&&(R=f[0]-h[2]>S?-y:h[2]-f[0]>S?y:0),f[0]+=R}Vr(l,f)}function Eu(f,l,h,y){const S=Math.pow(2,y.z)*hr,R=[y.x*hr,y.y*hr],D=[];for(const $ of f)for(const U of $){const W=[U.x+R[0],U.y+R[1]];Oo(W,l,h,S),D.push(W)}return D}function Pf(f,l,h,y){const S=Math.pow(2,y.z)*hr,R=[y.x*hr,y.y*hr],D=[];for(const U of f){const W=[];for(const te of U){const ae=[te.x+R[0],te.y+R[1]];Vr(l,ae),W.push(ae)}D.push(W)}if(l[2]-l[0]<=S/2){($=l)[0]=$[1]=1/0,$[2]=$[3]=-1/0;for(const U of D)for(const W of U)Oo(W,l,h,S)}var $;return D}class xs{constructor(l,h){this.type=Tt,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(et(l[1])){const y=l[1];if(y.type==="FeatureCollection")for(let S=0;S<y.features.length;++S){const R=y.features[S].geometry.type;if(R==="Polygon"||R==="MultiPolygon")return new xs(y,y.features[S].geometry)}else if(y.type==="Feature"){const S=y.geometry.type;if(S==="Polygon"||S==="MultiPolygon")return new xs(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new xs(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 S=[1/0,1/0,-1/0,-1/0],R=[1/0,1/0,-1/0,-1/0],D=h.canonicalID();if(y.type==="Polygon"){const $=Mr(y.coordinates,R,D),U=Eu(h.geometry(),S,R,D);if(!Nn(S,R))return!1;for(const W of U)if(!ri(W,$))return!1}if(y.type==="MultiPolygon"){const $=Xr(y.coordinates,R,D),U=Eu(h.geometry(),S,R,D);if(!Nn(S,R))return!1;for(const W of U)if(!Er(W,$))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(h,y){const S=[1/0,1/0,-1/0,-1/0],R=[1/0,1/0,-1/0,-1/0],D=h.canonicalID();if(y.type==="Polygon"){const $=Mr(y.coordinates,R,D),U=Pf(h.geometry(),S,R,D);if(!Nn(S,R))return!1;for(const W of U)if(!or(W,$))return!1}if(y.type==="MultiPolygon"){const $=Xr(y.coordinates,R,D),U=Pf(h.geometry(),S,R,D);if(!Nn(S,R))return!1;for(const W of U)if(!Tr(W,$))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}function Wn(f){if(f instanceof lr&&(f.name==="get"&&f.args.length===1||f.name==="feature-state"||f.name==="has"&&f.args.length===1||f.name==="properties"||f.name==="geometry-type"||f.name==="id"||/^filter-/.test(f.name))||f instanceof xs)return!1;let l=!0;return f.eachChild(h=>{l&&!Wn(h)&&(l=!1)}),l}function rr(f){if(f instanceof lr&&f.name==="feature-state")return!1;let l=!0;return f.eachChild(h=>{l&&!rr(h)&&(l=!1)}),l}function Ur(f,l){if(f instanceof lr&&l.indexOf(f.name)>=0)return!1;let h=!0;return f.eachChild(y=>{h&&!Ur(y,l)&&(h=!1)}),h}class Ui{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 Ui(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 Gs{constructor(l,h=[],y,S=new Qt,R=[]){this.registry=l,this.path=h,this.key=h.map(D=>`[${D}]`).join(""),this.scope=S,this.errors=R,this.expectedType=y}parse(l,h,y,S,R={}){return h?this.concat(h,y,S)._parse(l,R):this._parse(l,R)}_parse(l,h){function y(S,R,D){return D==="assert"?new Xt(R,[S]):D==="coerce"?new hn(R,[S]):S}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 S=l[0];if(typeof S!="string")return this.error(`Expression name must be a string, but found ${typeof S} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const R=this.registry[S];if(R){let D=R.parse(l,this);if(!D)return null;if(this.expectedType){const $=this.expectedType,U=D.type;if($.kind!=="string"&&$.kind!=="number"&&$.kind!=="boolean"&&$.kind!=="object"&&$.kind!=="array"||U.kind!=="value")if($.kind!=="color"&&$.kind!=="formatted"&&$.kind!=="resolvedImage"||U.kind!=="value"&&U.kind!=="string")if($.kind!=="padding"||U.kind!=="value"&&U.kind!=="number"&&U.kind!=="array"){if(this.checkSubtype($,U))return null}else D=y(D,$,h.typeAnnotation||"coerce");else D=y(D,$,h.typeAnnotation||"coerce");else D=y(D,$,h.typeAnnotation||"assert")}if(!(D instanceof Mt)&&D.type.kind!=="resolvedImage"&&Jo(D)){const $=new Gn;try{D=new Mt(D.type,D.evaluate($))}catch(U){return this.error(U.message),null}}return D}return this.error(`Unknown expression "${S}". 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 S=typeof l=="number"?this.path.concat(l):this.path,R=y?this.scope.concat(y):this.scope;return new Gs(this.registry,S,h||null,R,this.errors)}error(l,...h){const y=`${this.key}${h.map(S=>`[${S}]`).join("")}`;this.errors.push(new Rt(y,l))}checkSubtype(l,h){const y=qt(l,h);return y&&this.error(y),y}}function Jo(f){if(f instanceof Ui)return Jo(f.boundExpression);if(f instanceof lr&&f.name==="error"||f instanceof Zr||f instanceof xs)return!1;const l=f instanceof hn||f instanceof Xt;let h=!0;return f.eachChild(y=>{h=l?h&&Jo(y):h&&y instanceof Mt}),!!h&&Wn(f)&&Ur(f,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Rl(f,l){const h=f.length-1;let y,S,R=0,D=h,$=0;for(;R<=D;)if($=Math.floor((R+D)/2),y=f[$],S=f[$+1],y<=l){if($===h||l<S)return $;R=$+1}else{if(!(y>l))throw new at("Input is not a number.");D=$-1}return 0}class bs{constructor(l,h,y){this.type=l,this.input=h,this.labels=[],this.outputs=[];for(const[S,R]of y)this.labels.push(S),this.outputs.push(R)}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,ot);if(!y)return null;const S=[];let R=null;h.expectedType&&h.expectedType.kind!=="value"&&(R=h.expectedType);for(let D=1;D<l.length;D+=2){const $=D===1?-1/0:l[D],U=l[D+1],W=D,te=D+1;if(typeof $!="number")return h.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',W);if(S.length&&S[S.length-1][0]>=$)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',W);const ae=h.parse(U,te,R);if(!ae)return null;R=R||ae.type,S.push([$,ae])}return new bs(R,y,S)}evaluate(l){const h=this.labels,y=this.outputs;if(h.length===1)return y[0].evaluate(l);const S=this.input.evaluate(l);if(S<=h[0])return y[0].evaluate(l);const R=h.length;return S>=h[R-1]?y[R-1].evaluate(l):y[Rl(h,S)].evaluate(l)}eachChild(l){l(this.input);for(const h of this.outputs)l(h)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function Pr(f,l,h){return f*(1-h)+l*h}var _s=Object.freeze({__proto__:null,number:Pr,color:function(f,l,h){return new ce(Pr(f.r,l.r,h),Pr(f.g,l.g,h),Pr(f.b,l.b,h),Pr(f.a,l.a,h))},array:function(f,l,h){return f.map((y,S)=>Pr(y,l[S],h))},padding:function(f,l,h){const y=f.values,S=l.values;return new Me([Pr(y[0],S[0],h),Pr(y[1],S[1],h),Pr(y[2],S[2],h),Pr(y[3],S[3],h)])}});const w0=.95047,C0=1.08883,Np=4/29,If=6/29,S0=3*If*If,Iw=Math.PI/180,Tw=180/Math.PI;function Lp(f){return f>.008856451679035631?Math.pow(f,1/3):f/S0+Np}function Fp(f){return f>If?f*f*f:S0*(f-Np)}function zp(f){return 255*(f<=.0031308?12.92*f:1.055*Math.pow(f,1/2.4)-.055)}function $p(f){return(f/=255)<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)}function pr(f){const l=$p(f.r),h=$p(f.g),y=$p(f.b),S=Lp((.4124564*l+.3575761*h+.1804375*y)/w0),R=Lp((.2126729*l+.7151522*h+.072175*y)/1);return{l:116*R-16,a:500*(S-R),b:200*(R-Lp((.0193339*l+.119192*h+.9503041*y)/C0)),alpha:f.a}}function E0(f){let l=(f.l+16)/116,h=isNaN(f.a)?l:l+f.a/500,y=isNaN(f.b)?l:l-f.b/200;return l=1*Fp(l),h=w0*Fp(h),y=C0*Fp(y),new ce(zp(3.2404542*h-1.5371385*l-.4985314*y),zp(-.969266*h+1.8760108*l+.041556*y),zp(.0556434*h-.2040259*l+1.0572252*y),f.alpha)}function kw(f,l,h){const y=l-f;return f+h*(y>180||y<-180?y-360*Math.round(y/360):y)}const Uc={forward:pr,reverse:E0,interpolate:function(f,l,h){return{l:Pr(f.l,l.l,h),a:Pr(f.a,l.a,h),b:Pr(f.b,l.b,h),alpha:Pr(f.alpha,l.alpha,h)}}},jc={forward:function(f){const{l,a:h,b:y}=pr(f),S=Math.atan2(y,h)*Tw;return{h:S<0?S+360:S,c:Math.sqrt(h*h+y*y),l,alpha:f.a}},reverse:function(f){const l=f.h*Iw,h=f.c;return E0({l:f.l,a:Math.cos(l)*h,b:Math.sin(l)*h,alpha:f.alpha})},interpolate:function(f,l,h){return{h:kw(f.h,l.h,h),c:Pr(f.c,l.c,h),l:Pr(f.l,l.l,h),alpha:Pr(f.alpha,l.alpha,h)}}};var P0=Object.freeze({__proto__:null,lab:Uc,hcl:jc});class No{constructor(l,h,y,S,R){this.type=l,this.operator=h,this.interpolation=y,this.input=S,this.labels=[],this.outputs=[];for(const[D,$]of R)this.labels.push(D),this.outputs.push($)}static interpolationFactor(l,h,y,S){let R=0;if(l.name==="exponential")R=Bp(h,l.base,y,S);else if(l.name==="linear")R=Bp(h,1,y,S);else if(l.name==="cubic-bezier"){const D=l.controlPoints;R=new u(D[0],D[1],D[2],D[3]).solve(Bp(h,1,y,S))}return R}static parse(l,h){let[y,S,R,...D]=l;if(!Array.isArray(S)||S.length===0)return h.error("Expected an interpolation type expression.",1);if(S[0]==="linear")S={name:"linear"};else if(S[0]==="exponential"){const W=S[1];if(typeof W!="number")return h.error("Exponential interpolation requires a numeric base.",1,1);S={name:"exponential",base:W}}else{if(S[0]!=="cubic-bezier")return h.error(`Unknown interpolation type ${String(S[0])}`,1,0);{const W=S.slice(1);if(W.length!==4||W.some(te=>typeof te!="number"||te<0||te>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);S={name:"cubic-bezier",controlPoints:W}}}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(R=h.parse(R,2,ot),!R)return null;const $=[];let U=null;y==="interpolate-hcl"||y==="interpolate-lab"?U=Kt:h.expectedType&&h.expectedType.kind!=="value"&&(U=h.expectedType);for(let W=0;W<D.length;W+=2){const te=D[W],ae=D[W+1],de=W+3,ge=W+4;if(typeof te!="number")return h.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',de);if($.length&&$[$.length-1][0]>=te)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',de);const ve=h.parse(ae,ge,U);if(!ve)return null;U=U||ve.type,$.push([te,ve])}return U.kind==="number"||U.kind==="color"||U.kind==="padding"||U.kind==="array"&&U.itemType.kind==="number"&&typeof U.N=="number"?new No(U,y,S,R,$):h.error(`Type ${xt(U)} is not interpolatable.`)}evaluate(l){const h=this.labels,y=this.outputs;if(h.length===1)return y[0].evaluate(l);const S=this.input.evaluate(l);if(S<=h[0])return y[0].evaluate(l);const R=h.length;if(S>=h[R-1])return y[R-1].evaluate(l);const D=Rl(h,S),$=No.interpolationFactor(this.interpolation,S,h[D],h[D+1]),U=y[D].evaluate(l),W=y[D+1].evaluate(l);return this.operator==="interpolate"?_s[this.type.kind.toLowerCase()](U,W,$):this.operator==="interpolate-hcl"?jc.reverse(jc.interpolate(jc.forward(U),jc.forward(W),$)):Uc.reverse(Uc.interpolate(Uc.forward(U),Uc.forward(W),$))}eachChild(l){l(this.input);for(const h of this.outputs)l(h)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function Bp(f,l,h,y){const S=y-h,R=f-h;return S===0?0:l===1?R/S:(Math.pow(l,R)-1)/(Math.pow(l,S)-1)}class Tf{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 S=h.expectedType;S&&S.kind!=="value"&&(y=S);const R=[];for(const $ of l.slice(1)){const U=h.parse($,1+R.length,y,void 0,{typeAnnotation:"omit"});if(!U)return null;y=y||U.type,R.push(U)}if(!y)throw new Error("No output type");const D=S&&R.some($=>qt(S,$.type));return new Tf(D?ht:y,R)}evaluate(l){let h,y=null,S=0;for(const R of this.args)if(S++,y=R.evaluate(l),y&&y instanceof Be&&!y.available&&(h||(h=y.name),y=null,S===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 kf{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 R=1;R<l.length-1;R+=2){const D=l[R];if(typeof D!="string")return h.error(`Expected string, but found ${typeof D} instead.`,R);if(/[^a-zA-Z0-9_]/.test(D))return h.error("Variable names must contain only alphanumeric characters or '_'.",R);const $=h.parse(l[R+1],R+1);if(!$)return null;y.push([D,$])}const S=h.parse(l[l.length-1],l.length-1,h.expectedType,y);return S?new kf(y,S):null}outputDefined(){return this.result.outputDefined()}}class Vp{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,ot),S=h.parse(l[2],2,gt(h.expectedType||ht));return y&&S?new Vp(S.type.itemType,y,S):null}evaluate(l){const h=this.index.evaluate(l),y=this.input.evaluate(l);if(h<0)throw new at(`Array index out of bounds: ${h} < 0.`);if(h>=y.length)throw new at(`Array index out of bounds: ${h} > ${y.length-1}.`);if(h!==Math.floor(h))throw new at(`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=Tt,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,ht),S=h.parse(l[2],2,ht);return y&&S?vn(y.type,[Tt,Lt,ot,pn,ht])?new Up(y,S):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${xt(y.type)} instead`):null}evaluate(l){const h=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!y)return!1;if(!Fn(h,["boolean","string","number","null"]))throw new at(`Expected first argument to be of type boolean, string, number or null, but found ${xt(Ge(h))} instead.`);if(!Fn(y,["string","array"]))throw new at(`Expected second argument to be of type array or string, but found ${xt(Ge(y))} instead.`);return y.indexOf(h)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class Mf{constructor(l,h,y){this.type=ot,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,ht),S=h.parse(l[2],2,ht);if(!y||!S)return null;if(!vn(y.type,[Tt,Lt,ot,pn,ht]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${xt(y.type)} instead`);if(l.length===4){const R=h.parse(l[3],3,ot);return R?new Mf(y,S,R):null}return new Mf(y,S)}evaluate(l){const h=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!Fn(h,["boolean","string","number","null"]))throw new at(`Expected first argument to be of type boolean, string, number or null, but found ${xt(Ge(h))} instead.`);if(!Fn(y,["string","array"]))throw new at(`Expected second argument to be of type array or string, but found ${xt(Ge(y))} instead.`);if(this.fromIndex){const S=this.fromIndex.evaluate(l);return y.indexOf(h,S)}return y.indexOf(h)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class jp{constructor(l,h,y,S,R,D){this.inputType=l,this.type=h,this.input=y,this.cases=S,this.outputs=R,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,S;h.expectedType&&h.expectedType.kind!=="value"&&(S=h.expectedType);const R={},D=[];for(let W=2;W<l.length-1;W+=2){let te=l[W];const ae=l[W+1];Array.isArray(te)||(te=[te]);const de=h.concat(W);if(te.length===0)return de.error("Expected at least one branch label.");for(const ve of te){if(typeof ve!="number"&&typeof ve!="string")return de.error("Branch labels must be numbers or strings.");if(typeof ve=="number"&&Math.abs(ve)>Number.MAX_SAFE_INTEGER)return de.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ve=="number"&&Math.floor(ve)!==ve)return de.error("Numeric branch labels must be integer values.");if(y){if(de.checkSubtype(y,Ge(ve)))return null}else y=Ge(ve);if(R[String(ve)]!==void 0)return de.error("Branch labels must be unique.");R[String(ve)]=D.length}const ge=h.parse(ae,W,S);if(!ge)return null;S=S||ge.type,D.push(ge)}const $=h.parse(l[1],1,ht);if(!$)return null;const U=h.parse(l[l.length-1],l.length-1,S);return U?$.type.kind!=="value"&&h.concat(1).checkSubtype(y,$.type)?null:new jp(y,S,$,R,D,U):null}evaluate(l){const h=this.input.evaluate(l);return(Ge(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 Hp{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 S=[];for(let D=1;D<l.length-1;D+=2){const $=h.parse(l[D],D,Tt);if(!$)return null;const U=h.parse(l[D+1],D+1,y);if(!U)return null;S.push([$,U]),y=y||U.type}const R=h.parse(l[l.length-1],l.length-1,y);if(!R)return null;if(!y)throw new Error("Can't infer output type");return new Hp(y,S,R)}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 Rf{constructor(l,h,y,S){this.type=l,this.input=h,this.beginIndex=y,this.endIndex=S}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,ht),S=h.parse(l[2],2,ot);if(!y||!S)return null;if(!vn(y.type,[gt(ht),Lt,ht]))return h.error(`Expected first argument to be of type array or string, but found ${xt(y.type)} instead`);if(l.length===4){const R=h.parse(l[3],3,ot);return R?new Rf(y.type,y,S,R):null}return new Rf(y.type,y,S)}evaluate(l){const h=this.input.evaluate(l),y=this.beginIndex.evaluate(l);if(!Fn(h,["string","array"]))throw new at(`Expected first argument to be of type array or string, but found ${xt(Ge(h))} instead.`);if(this.endIndex){const S=this.endIndex.evaluate(l);return h.slice(y,S)}return h.slice(y)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function I0(f,l){return f==="=="||f==="!="?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 T0(f,l,h,y){return y.compare(l,h)===0}function Pu(f,l,h){const y=f!=="=="&&f!=="!=";return class bz{constructor(R,D,$){this.type=Tt,this.lhs=R,this.rhs=D,this.collator=$,this.hasUntypedArgument=R.type.kind==="value"||D.type.kind==="value"}static parse(R,D){if(R.length!==3&&R.length!==4)return D.error("Expected two or three arguments.");const $=R[0];let U=D.parse(R[1],1,ht);if(!U)return null;if(!I0($,U.type))return D.concat(1).error(`"${$}" comparisons are not supported for type '${xt(U.type)}'.`);let W=D.parse(R[2],2,ht);if(!W)return null;if(!I0($,W.type))return D.concat(2).error(`"${$}" comparisons are not supported for type '${xt(W.type)}'.`);if(U.type.kind!==W.type.kind&&U.type.kind!=="value"&&W.type.kind!=="value")return D.error(`Cannot compare types '${xt(U.type)}' and '${xt(W.type)}'.`);y&&(U.type.kind==="value"&&W.type.kind!=="value"?U=new Xt(W.type,[U]):U.type.kind!=="value"&&W.type.kind==="value"&&(W=new Xt(U.type,[W])));let te=null;if(R.length===4){if(U.type.kind!=="string"&&W.type.kind!=="string"&&U.type.kind!=="value"&&W.type.kind!=="value")return D.error("Cannot use collator to compare non-string types.");if(te=D.parse(R[3],3,xn),!te)return null}return new bz(U,W,te)}evaluate(R){const D=this.lhs.evaluate(R),$=this.rhs.evaluate(R);if(y&&this.hasUntypedArgument){const U=Ge(D),W=Ge($);if(U.kind!==W.kind||U.kind!=="string"&&U.kind!=="number")throw new at(`Expected arguments for "${f}" to be (string, string) or (number, number), but found (${U.kind}, ${W.kind}) instead.`)}if(this.collator&&!y&&this.hasUntypedArgument){const U=Ge(D),W=Ge($);if(U.kind!=="string"||W.kind!=="string")return l(R,D,$)}return this.collator?h(R,D,$,this.collator.evaluate(R)):l(R,D,$)}eachChild(R){R(this.lhs),R(this.rhs),this.collator&&R(this.collator)}outputDefined(){return!0}}}const Mw=Pu("==",function(f,l,h){return l===h},T0),Rw=Pu("!=",function(f,l,h){return l!==h},function(f,l,h,y){return!T0(0,l,h,y)}),Aw=Pu("<",function(f,l,h){return l<h},function(f,l,h,y){return y.compare(l,h)<0}),Dw=Pu(">",function(f,l,h){return l>h},function(f,l,h,y){return y.compare(l,h)>0}),Ow=Pu("<=",function(f,l,h){return l<=h},function(f,l,h,y){return y.compare(l,h)<=0}),Nw=Pu(">=",function(f,l,h){return l>=h},function(f,l,h,y){return y.compare(l,h)>=0});class Kp{constructor(l,h,y,S,R){this.type=Lt,this.number=l,this.locale=h,this.currency=y,this.minFractionDigits=S,this.maxFractionDigits=R}static parse(l,h){if(l.length!==3)return h.error("Expected two arguments.");const y=h.parse(l[1],1,ot);if(!y)return null;const S=l[2];if(typeof S!="object"||Array.isArray(S))return h.error("NumberFormat options argument must be an object.");let R=null;if(S.locale&&(R=h.parse(S.locale,1,Lt),!R))return null;let D=null;if(S.currency&&(D=h.parse(S.currency,1,Lt),!D))return null;let $=null;if(S["min-fraction-digits"]&&($=h.parse(S["min-fraction-digits"],1,ot),!$))return null;let U=null;return S["max-fraction-digits"]&&(U=h.parse(S["max-fraction-digits"],1,ot),!U)?null:new Kp(y,R,D,$,U)}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 Af{constructor(l){this.type=bn,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 S=[];let R=!1;for(let D=1;D<=l.length-1;++D){const $=l[D];if(R&&typeof $=="object"&&!Array.isArray($)){R=!1;let U=null;if($["font-scale"]&&(U=h.parse($["font-scale"],1,ot),!U))return null;let W=null;if($["text-font"]&&(W=h.parse($["text-font"],1,gt(Lt)),!W))return null;let te=null;if($["text-color"]&&(te=h.parse($["text-color"],1,Kt),!te))return null;const ae=S[S.length-1];ae.scale=U,ae.font=W,ae.textColor=te}else{const U=h.parse(l[D],1,ht);if(!U)return null;const W=U.type.kind;if(W!=="string"&&W!=="value"&&W!=="null"&&W!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");R=!0,S.push({content:U,scale:null,font:null,textColor:null})}}return new Af(S)}evaluate(l){return new Pe(this.sections.map(h=>{const y=h.content.evaluate(l);return Ge(y)===Bt?new Ae("",y,null,null,null):new Ae(Ut(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 Wp{constructor(l){this.type=Bt,this.input=l}static parse(l,h){if(l.length!==2)return h.error("Expected two arguments.");const y=h.parse(l[1],1,Lt);return y?new Wp(y):h.error("No image name provided.")}evaluate(l){const h=this.input.evaluate(l),y=Be.fromString(h);return y&&l.availableImages&&(y.available=l.availableImages.indexOf(h)>-1),y}eachChild(l){l(this.input)}outputDefined(){return!1}}class Gp{constructor(l){this.type=ot,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 ${xt(y.type)} instead.`):new Gp(y):null}evaluate(l){const h=this.input.evaluate(l);if(typeof h=="string"||Array.isArray(h))return h.length;throw new at(`Expected value to be of type string or array, but found ${xt(Ge(h))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const Iu={"==":Mw,"!=":Rw,">":Dw,"<":Aw,">=":Nw,"<=":Ow,array:Xt,at:Vp,boolean:Xt,case:Hp,coalesce:Tf,collator:Zr,format:Af,image:Wp,in:Up,"index-of":Mf,interpolate:No,"interpolate-hcl":No,"interpolate-lab":No,length:Gp,let:kf,literal:Mt,match:jp,number:Xt,"number-format":Kp,object:Xt,slice:Rf,step:bs,string:Xt,"to-boolean":hn,"to-color":hn,"to-number":hn,"to-string":hn,var:Ui,within:xs};function k0(f,[l,h,y,S]){l=l.evaluate(f),h=h.evaluate(f),y=y.evaluate(f);const R=S?S.evaluate(f):1,D=Je(l,h,y,R);if(D)throw new at(D);return new ce(l/255*R,h/255*R,y/255*R,R)}function M0(f,l){return f in l}function Df(f,l){const h=l[f];return h===void 0?null:h}function Al(f){return{type:f}}function R0(f){return{result:"success",value:f}}function Tu(f){return{result:"error",value:f}}function zr(f){return f["property-type"]==="data-driven"||f["property-type"]==="cross-faded-data-driven"}function A0(f){return!!f.expression&&f.expression.parameters.indexOf("zoom")>-1}function ir(f){return!!f.expression&&f.expression.interpolated}function mr(f){return f instanceof Number?"number":f instanceof String?"string":f instanceof Boolean?"boolean":Array.isArray(f)?"array":f===null?"null":typeof f}function Rr(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)}function jr(f){return f}function Hc(f,l){const h=l.type==="color",y=f.stops&&typeof f.stops[0][0]=="object",S=y||!(y||f.property!==void 0),R=f.type||(ir(l)?"exponential":"interval");if(h||l.type==="padding"){const W=h?ce.parse:Me.parse;(f=sn({},f)).stops&&(f.stops=f.stops.map(te=>[te[0],W(te[1])])),f.default=W(f.default?f.default:l.default)}if(f.colorSpace&&f.colorSpace!=="rgb"&&!P0[f.colorSpace])throw new Error(`Unknown color space: ${f.colorSpace}`);let D,$,U;if(R==="exponential")D=D0;else if(R==="interval")D=Fw;else if(R==="categorical"){D=Lw,$=Object.create(null);for(const W of f.stops)$[W[0]]=W[1];U=typeof f.stops[0][0]}else{if(R!=="identity")throw new Error(`Unknown function type "${R}"`);D=zw}if(y){const W={},te=[];for(let ge=0;ge<f.stops.length;ge++){const ve=f.stops[ge],Fe=ve[0].zoom;W[Fe]===void 0&&(W[Fe]={zoom:Fe,type:f.type,property:f.property,default:f.default,stops:[]},te.push(Fe)),W[Fe].stops.push([ve[0].value,ve[1]])}const ae=[];for(const ge of te)ae.push([W[ge].zoom,Hc(W[ge],l)]);const de={name:"linear"};return{kind:"composite",interpolationType:de,interpolationFactor:No.interpolationFactor.bind(void 0,de),zoomStops:ae.map(ge=>ge[0]),evaluate:({zoom:ge},ve)=>D0({stops:ae,base:f.base},l,ge).evaluate(ge,ve)}}if(S){const W=R==="exponential"?{name:"exponential",base:f.base!==void 0?f.base:1}:null;return{kind:"camera",interpolationType:W,interpolationFactor:No.interpolationFactor.bind(void 0,W),zoomStops:f.stops.map(te=>te[0]),evaluate:({zoom:te})=>D(f,l,te,$,U)}}return{kind:"source",evaluate(W,te){const ae=te&&te.properties?te.properties[f.property]:void 0;return ae===void 0?ku(f.default,l.default):D(f,l,ae,$,U)}}}function ku(f,l,h){return f!==void 0?f:l!==void 0?l:h!==void 0?h:void 0}function Lw(f,l,h,y,S){return ku(typeof h===S?y[h]:void 0,f.default,l.default)}function Fw(f,l,h){if(mr(h)!=="number")return ku(f.default,l.default);const y=f.stops.length;if(y===1||h<=f.stops[0][0])return f.stops[0][1];if(h>=f.stops[y-1][0])return f.stops[y-1][1];const S=Rl(f.stops.map(R=>R[0]),h);return f.stops[S][1]}function D0(f,l,h){const y=f.base!==void 0?f.base:1;if(mr(h)!=="number")return ku(f.default,l.default);const S=f.stops.length;if(S===1||h<=f.stops[0][0])return f.stops[0][1];if(h>=f.stops[S-1][0])return f.stops[S-1][1];const R=Rl(f.stops.map(te=>te[0]),h),D=function(te,ae,de,ge){const ve=ge-de,Fe=te-de;return ve===0?0:ae===1?Fe/ve:(Math.pow(ae,Fe)-1)/(Math.pow(ae,ve)-1)}(h,y,f.stops[R][0],f.stops[R+1][0]),$=f.stops[R][1],U=f.stops[R+1][1];let W=_s[l.type]||jr;if(f.colorSpace&&f.colorSpace!=="rgb"){const te=P0[f.colorSpace];W=(ae,de)=>te.reverse(te.interpolate(te.forward(ae),te.forward(de),D))}return typeof $.evaluate=="function"?{evaluate(...te){const ae=$.evaluate.apply(void 0,te),de=U.evaluate.apply(void 0,te);if(ae!==void 0&&de!==void 0)return W(ae,de,D)}}:W($,U,D)}function zw(f,l,h){switch(l.type){case"color":h=ce.parse(h);break;case"formatted":h=Pe.fromString(h.toString());break;case"resolvedImage":h=Be.fromString(h.toString());break;case"padding":h=Me.parse(h);break;default:mr(h)===l.type||l.type==="enum"&&l.values[h]||(h=void 0)}return ku(h,f.default,l.default)}lr.register(Iu,{error:[{kind:"error"},[Lt],(f,[l])=>{throw new at(l.evaluate(f))}],typeof:[Lt,[ht],(f,[l])=>xt(Ge(l.evaluate(f)))],"to-rgba":[gt(ot,4),[Kt],(f,[l])=>l.evaluate(f).toArray()],rgb:[Kt,[ot,ot,ot],k0],rgba:[Kt,[ot,ot,ot,ot],k0],has:{type:Tt,overloads:[[[Lt],(f,[l])=>M0(l.evaluate(f),f.properties())],[[Lt,Zt],(f,[l,h])=>M0(l.evaluate(f),h.evaluate(f))]]},get:{type:ht,overloads:[[[Lt],(f,[l])=>Df(l.evaluate(f),f.properties())],[[Lt,Zt],(f,[l,h])=>Df(l.evaluate(f),h.evaluate(f))]]},"feature-state":[ht,[Lt],(f,[l])=>Df(l.evaluate(f),f.featureState||{})],properties:[Zt,[],f=>f.properties()],"geometry-type":[Lt,[],f=>f.geometryType()],id:[ht,[],f=>f.id()],zoom:[ot,[],f=>f.globals.zoom],"heatmap-density":[ot,[],f=>f.globals.heatmapDensity||0],"line-progress":[ot,[],f=>f.globals.lineProgress||0],accumulated:[ht,[],f=>f.globals.accumulated===void 0?null:f.globals.accumulated],"+":[ot,Al(ot),(f,l)=>{let h=0;for(const y of l)h+=y.evaluate(f);return h}],"*":[ot,Al(ot),(f,l)=>{let h=1;for(const y of l)h*=y.evaluate(f);return h}],"-":{type:ot,overloads:[[[ot,ot],(f,[l,h])=>l.evaluate(f)-h.evaluate(f)],[[ot],(f,[l])=>-l.evaluate(f)]]},"/":[ot,[ot,ot],(f,[l,h])=>l.evaluate(f)/h.evaluate(f)],"%":[ot,[ot,ot],(f,[l,h])=>l.evaluate(f)%h.evaluate(f)],ln2:[ot,[],()=>Math.LN2],pi:[ot,[],()=>Math.PI],e:[ot,[],()=>Math.E],"^":[ot,[ot,ot],(f,[l,h])=>Math.pow(l.evaluate(f),h.evaluate(f))],sqrt:[ot,[ot],(f,[l])=>Math.sqrt(l.evaluate(f))],log10:[ot,[ot],(f,[l])=>Math.log(l.evaluate(f))/Math.LN10],ln:[ot,[ot],(f,[l])=>Math.log(l.evaluate(f))],log2:[ot,[ot],(f,[l])=>Math.log(l.evaluate(f))/Math.LN2],sin:[ot,[ot],(f,[l])=>Math.sin(l.evaluate(f))],cos:[ot,[ot],(f,[l])=>Math.cos(l.evaluate(f))],tan:[ot,[ot],(f,[l])=>Math.tan(l.evaluate(f))],asin:[ot,[ot],(f,[l])=>Math.asin(l.evaluate(f))],acos:[ot,[ot],(f,[l])=>Math.acos(l.evaluate(f))],atan:[ot,[ot],(f,[l])=>Math.atan(l.evaluate(f))],min:[ot,Al(ot),(f,l)=>Math.min(...l.map(h=>h.evaluate(f)))],max:[ot,Al(ot),(f,l)=>Math.max(...l.map(h=>h.evaluate(f)))],abs:[ot,[ot],(f,[l])=>Math.abs(l.evaluate(f))],round:[ot,[ot],(f,[l])=>{const h=l.evaluate(f);return h<0?-Math.round(-h):Math.round(h)}],floor:[ot,[ot],(f,[l])=>Math.floor(l.evaluate(f))],ceil:[ot,[ot],(f,[l])=>Math.ceil(l.evaluate(f))],"filter-==":[Tt,[Lt,ht],(f,[l,h])=>f.properties()[l.value]===h.value],"filter-id-==":[Tt,[ht],(f,[l])=>f.id()===l.value],"filter-type-==":[Tt,[Lt],(f,[l])=>f.geometryType()===l.value],"filter-<":[Tt,[Lt,ht],(f,[l,h])=>{const y=f.properties()[l.value],S=h.value;return typeof y==typeof S&&y<S}],"filter-id-<":[Tt,[ht],(f,[l])=>{const h=f.id(),y=l.value;return typeof h==typeof y&&h<y}],"filter->":[Tt,[Lt,ht],(f,[l,h])=>{const y=f.properties()[l.value],S=h.value;return typeof y==typeof S&&y>S}],"filter-id->":[Tt,[ht],(f,[l])=>{const h=f.id(),y=l.value;return typeof h==typeof y&&h>y}],"filter-<=":[Tt,[Lt,ht],(f,[l,h])=>{const y=f.properties()[l.value],S=h.value;return typeof y==typeof S&&y<=S}],"filter-id-<=":[Tt,[ht],(f,[l])=>{const h=f.id(),y=l.value;return typeof h==typeof y&&h<=y}],"filter->=":[Tt,[Lt,ht],(f,[l,h])=>{const y=f.properties()[l.value],S=h.value;return typeof y==typeof S&&y>=S}],"filter-id->=":[Tt,[ht],(f,[l])=>{const h=f.id(),y=l.value;return typeof h==typeof y&&h>=y}],"filter-has":[Tt,[ht],(f,[l])=>l.value in f.properties()],"filter-has-id":[Tt,[],f=>f.id()!==null&&f.id()!==void 0],"filter-type-in":[Tt,[gt(Lt)],(f,[l])=>l.value.indexOf(f.geometryType())>=0],"filter-id-in":[Tt,[gt(ht)],(f,[l])=>l.value.indexOf(f.id())>=0],"filter-in-small":[Tt,[Lt,gt(ht)],(f,[l,h])=>h.value.indexOf(f.properties()[l.value])>=0],"filter-in-large":[Tt,[Lt,gt(ht)],(f,[l,h])=>function(y,S,R,D){for(;R<=D;){const $=R+D>>1;if(S[$]===y)return!0;S[$]>y?D=$-1:R=$+1}return!1}(f.properties()[l.value],h.value,0,h.value.length-1)],all:{type:Tt,overloads:[[[Tt,Tt],(f,[l,h])=>l.evaluate(f)&&h.evaluate(f)],[Al(Tt),(f,l)=>{for(const h of l)if(!h.evaluate(f))return!1;return!0}]]},any:{type:Tt,overloads:[[[Tt,Tt],(f,[l,h])=>l.evaluate(f)||h.evaluate(f)],[Al(Tt),(f,l)=>{for(const h of l)if(h.evaluate(f))return!0;return!1}]]},"!":[Tt,[Tt],(f,[l])=>!l.evaluate(f)],"is-supported-script":[Tt,[Lt],(f,[l])=>{const h=f.globals&&f.globals.isSupportedScript;return!h||h(l.evaluate(f))}],upcase:[Lt,[Lt],(f,[l])=>l.evaluate(f).toUpperCase()],downcase:[Lt,[Lt],(f,[l])=>l.evaluate(f).toLowerCase()],concat:[Lt,Al(ht),(f,l)=>l.map(h=>Ut(h.evaluate(f))).join("")],"resolved-locale":[Lt,[xn],(f,[l])=>l.evaluate(f).resolvedLocale()]});class Of{constructor(l,h){this.expression=l,this._warningHistory={},this._evaluator=new Gn,this._defaultValue=h?function(y){return y.type==="color"&&Rr(y.default)?new ce(0,0,0,0):y.type==="color"?ce.parse(y.default)||null:y.type==="padding"?Me.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,S,R,D){return this._evaluator.globals=l,this._evaluator.feature=h,this._evaluator.featureState=y,this._evaluator.canonical=S,this._evaluator.availableImages=R||null,this._evaluator.formattedSection=D,this.expression.evaluate(this._evaluator)}evaluate(l,h,y,S,R,D){this._evaluator.globals=l,this._evaluator.feature=h||null,this._evaluator.featureState=y||null,this._evaluator.canonical=S,this._evaluator.availableImages=R||null,this._evaluator.formattedSection=D||null;try{const $=this.expression.evaluate(this._evaluator);if($==null||typeof $=="number"&&$!=$)return this._defaultValue;if(this._enumValues&&!($ in this._enumValues))throw new at(`Expected value to be one of ${Object.keys(this._enumValues).map(U=>JSON.stringify(U)).join(", ")}, but found ${JSON.stringify($)} instead.`);return $}catch($){return this._warningHistory[$.message]||(this._warningHistory[$.message]=!0,typeof console<"u"&&console.warn($.message)),this._defaultValue}}}function Kc(f){return Array.isArray(f)&&f.length>0&&typeof f[0]=="string"&&f[0]in Iu}function Wc(f,l){const h=new Gs(Iu,[],l?function(S){const R={color:Kt,string:Lt,number:ot,enum:Lt,boolean:Tt,formatted:bn,padding:tn,resolvedImage:Bt};return S.type==="array"?gt(R[S.value]||ht,S.length):R[S.type]}(l):void 0),y=h.parse(f,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return y?R0(new Of(y,l)):Tu(h.errors)}class Gc{constructor(l,h){this.kind=l,this._styleExpression=h,this.isStateDependent=l!=="constant"&&!rr(h.expression)}evaluateWithoutErrorHandling(l,h,y,S,R,D){return this._styleExpression.evaluateWithoutErrorHandling(l,h,y,S,R,D)}evaluate(l,h,y,S,R,D){return this._styleExpression.evaluate(l,h,y,S,R,D)}}class qp{constructor(l,h,y,S){this.kind=l,this.zoomStops=y,this._styleExpression=h,this.isStateDependent=l!=="camera"&&!rr(h.expression),this.interpolationType=S}evaluateWithoutErrorHandling(l,h,y,S,R,D){return this._styleExpression.evaluateWithoutErrorHandling(l,h,y,S,R,D)}evaluate(l,h,y,S,R,D){return this._styleExpression.evaluate(l,h,y,S,R,D)}interpolationFactor(l,h,y){return this.interpolationType?No.interpolationFactor(this.interpolationType,l,h,y):0}}function O0(f,l){const h=Wc(f,l);if(h.result==="error")return h;const y=h.value.expression,S=Wn(y);if(!S&&!zr(l))return Tu([new Rt("","data expressions not supported")]);const R=Ur(y,["zoom"]);if(!R&&!A0(l))return Tu([new Rt("","zoom expressions not supported")]);const D=Lf(y);return D||R?D instanceof Rt?Tu([D]):D instanceof No&&!ir(l)?Tu([new Rt("",'"interpolate" expressions cannot be used with this property')]):R0(D?new qp(S?"camera":"composite",h.value,D.labels,D instanceof No?D.interpolation:void 0):new Gc(S?"constant":"source",h.value)):Tu([new Rt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Nf{constructor(l,h){this._parameters=l,this._specification=h,sn(this,Hc(this._parameters,this._specification))}static deserialize(l){return new Nf(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function Lf(f){let l=null;if(f instanceof kf)l=Lf(f.result);else if(f instanceof Tf){for(const h of f.args)if(l=Lf(h),l)break}else(f instanceof bs||f instanceof No)&&f.input instanceof lr&&f.input.name==="zoom"&&(l=f);return l instanceof Rt||f.eachChild(h=>{const y=Lf(h);y instanceof Rt?l=y:!l&&y?l=new Rt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&y&&l!==y&&(l=new Rt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function ya(f){const l=f.key,h=f.value,y=f.valueSpec||{},S=f.objectElementValidators||{},R=f.style,D=f.styleSpec;let $=[];const U=mr(h);if(U!=="object")return[new Ze(l,h,`object expected, ${U} found`)];for(const W in h){const te=W.split(".")[0],ae=y[te]||y["*"];let de;if(S[te])de=S[te];else if(y[te])de=Fo;else if(S["*"])de=S["*"];else{if(!y["*"]){$.push(new Ze(l,h[W],`unknown property "${W}"`));continue}de=Fo}$=$.concat(de({key:(l&&`${l}.`)+W,value:h[W],valueSpec:ae,style:R,styleSpec:D,object:h,objectKey:W},h))}for(const W in y)S[W]||y[W].required&&y[W].default===void 0&&h[W]===void 0&&$.push(new Ze(l,h,`missing required property "${W}"`));return $}function N0(f){const l=f.value,h=f.valueSpec,y=f.style,S=f.styleSpec,R=f.key,D=f.arrayElementValidator||Fo;if(mr(l)!=="array")return[new Ze(R,l,`array expected, ${mr(l)} found`)];if(h.length&&l.length!==h.length)return[new Ze(R,l,`array length ${h.length} expected, length ${l.length} found`)];if(h["min-length"]&&l.length<h["min-length"])return[new Ze(R,l,`array length at least ${h["min-length"]} expected, length ${l.length} found`)];let $={type:h.value,values:h.values};S.$version<7&&($.function=h.function),mr(h.value)==="object"&&($=h.value);let U=[];for(let W=0;W<l.length;W++)U=U.concat(D({array:l,arrayIndex:W,value:l[W],valueSpec:$,style:y,styleSpec:S,key:`${R}[${W}]`}));return U}function Zp(f){const l=f.key,h=f.value,y=f.valueSpec;let S=mr(h);return S==="number"&&h!=h&&(S="NaN"),S!=="number"?[new Ze(l,h,`number expected, ${S} found`)]:"minimum"in y&&h<y.minimum?[new Ze(l,h,`${h} is less than the minimum value ${y.minimum}`)]:"maximum"in y&&h>y.maximum?[new Ze(l,h,`${h} is greater than the maximum value ${y.maximum}`)]:[]}function L0(f){const l=f.valueSpec,h=Gt(f.value.type);let y,S,R,D={};const $=h!=="categorical"&&f.value.property===void 0,U=!$,W=mr(f.value.stops)==="array"&&mr(f.value.stops[0])==="array"&&mr(f.value.stops[0][0])==="object",te=ya({key:f.key,value:f.value,valueSpec:f.styleSpec.function,style:f.style,styleSpec:f.styleSpec,objectElementValidators:{stops:function(ge){if(h==="identity")return[new Ze(ge.key,ge.value,'identity function may not have a "stops" property')];let ve=[];const Fe=ge.value;return ve=ve.concat(N0({key:ge.key,value:Fe,valueSpec:ge.valueSpec,style:ge.style,styleSpec:ge.styleSpec,arrayElementValidator:ae})),mr(Fe)==="array"&&Fe.length===0&&ve.push(new Ze(ge.key,Fe,"array must have at least one stop")),ve},default:function(ge){return Fo({key:ge.key,value:ge.value,valueSpec:l,style:ge.style,styleSpec:ge.styleSpec})}}});return h==="identity"&&$&&te.push(new Ze(f.key,f.value,'missing required property "property"')),h==="identity"||f.value.stops||te.push(new Ze(f.key,f.value,'missing required property "stops"')),h==="exponential"&&f.valueSpec.expression&&!ir(f.valueSpec)&&te.push(new Ze(f.key,f.value,"exponential functions not supported")),f.styleSpec.$version>=8&&(U&&!zr(f.valueSpec)?te.push(new Ze(f.key,f.value,"property functions not supported")):$&&!A0(f.valueSpec)&&te.push(new Ze(f.key,f.value,"zoom functions not supported"))),h!=="categorical"&&!W||f.value.property!==void 0||te.push(new Ze(f.key,f.value,'"property" property is required')),te;function ae(ge){let ve=[];const Fe=ge.value,Ne=ge.key;if(mr(Fe)!=="array")return[new Ze(Ne,Fe,`array expected, ${mr(Fe)} found`)];if(Fe.length!==2)return[new Ze(Ne,Fe,`array length 2 expected, length ${Fe.length} found`)];if(W){if(mr(Fe[0])!=="object")return[new Ze(Ne,Fe,`object expected, ${mr(Fe[0])} found`)];if(Fe[0].zoom===void 0)return[new Ze(Ne,Fe,"object stop key must have zoom")];if(Fe[0].value===void 0)return[new Ze(Ne,Fe,"object stop key must have value")];if(R&&R>Gt(Fe[0].zoom))return[new Ze(Ne,Fe[0].zoom,"stop zoom values must appear in ascending order")];Gt(Fe[0].zoom)!==R&&(R=Gt(Fe[0].zoom),S=void 0,D={}),ve=ve.concat(ya({key:`${Ne}[0]`,value:Fe[0],valueSpec:{zoom:{}},style:ge.style,styleSpec:ge.styleSpec,objectElementValidators:{zoom:Zp,value:de}}))}else ve=ve.concat(de({key:`${Ne}[0]`,value:Fe[0],valueSpec:{},style:ge.style,styleSpec:ge.styleSpec},Fe));return Kc(zt(Fe[1]))?ve.concat([new Ze(`${Ne}[1]`,Fe[1],"expressions are not allowed in function stops.")]):ve.concat(Fo({key:`${Ne}[1]`,value:Fe[1],valueSpec:l,style:ge.style,styleSpec:ge.styleSpec}))}function de(ge,ve){const Fe=mr(ge.value),Ne=Gt(ge.value),it=ge.value!==null?ge.value:ve;if(y){if(Fe!==y)return[new Ze(ge.key,it,`${Fe} stop domain type must match previous stop domain type ${y}`)]}else y=Fe;if(Fe!=="number"&&Fe!=="string"&&Fe!=="boolean")return[new Ze(ge.key,it,"stop domain value must be a number, string, or boolean")];if(Fe!=="number"&&h!=="categorical"){let yt=`number expected, ${Fe} found`;return zr(l)&&h===void 0&&(yt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ze(ge.key,it,yt)]}return h!=="categorical"||Fe!=="number"||isFinite(Ne)&&Math.floor(Ne)===Ne?h!=="categorical"&&Fe==="number"&&S!==void 0&&Ne<S?[new Ze(ge.key,it,"stop domain values must appear in ascending order")]:(S=Ne,h==="categorical"&&Ne in D?[new Ze(ge.key,it,"stop domain values must be unique")]:(D[Ne]=!0,[])):[new Ze(ge.key,it,`integer expected, found ${Ne}`)]}}function Dl(f){const l=(f.expressionContext==="property"?O0:Wc)(zt(f.value),f.valueSpec);if(l.result==="error")return l.value.map(y=>new Ze(`${f.key}${y.key}`,f.value,y.message));const h=l.value.expression||l.value._styleExpression.expression;if(f.expressionContext==="property"&&f.propertyKey==="text-font"&&!h.outputDefined())return[new Ze(f.key,f.value,`Invalid data expression for "${f.propertyKey}". Output values must be contained as literals within the expression.`)];if(f.expressionContext==="property"&&f.propertyType==="layout"&&!rr(h))return[new Ze(f.key,f.value,'"feature-state" data expressions are not supported with layout properties.')];if(f.expressionContext==="filter"&&!rr(h))return[new Ze(f.key,f.value,'"feature-state" data expressions are not supported with filters.')];if(f.expressionContext&&f.expressionContext.indexOf("cluster")===0){if(!Ur(h,["zoom","feature-state"]))return[new Ze(f.key,f.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(f.expressionContext==="cluster-initial"&&!Wn(h))return[new Ze(f.key,f.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function qc(f){const l=f.key,h=f.value,y=f.valueSpec,S=[];return Array.isArray(y.values)?y.values.indexOf(Gt(h))===-1&&S.push(new Ze(l,h,`expected one of [${y.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(y.values).indexOf(Gt(h))===-1&&S.push(new Ze(l,h,`expected one of [${Object.keys(y.values).join(", ")}], ${JSON.stringify(h)} found`)),S}function Mu(f){if(f===!0||f===!1)return!0;if(!Array.isArray(f)||f.length===0)return!1;switch(f[0]){case"has":return f.length>=2&&f[1]!=="$id"&&f[1]!=="$type";case"in":return f.length>=3&&(typeof f[1]!="string"||Array.isArray(f[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return f.length!==3||Array.isArray(f[1])||Array.isArray(f[2]);case"any":case"all":for(const l of f.slice(1))if(!Mu(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const $w={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ff(f){if(f==null)return{filter:()=>!0,needGeometry:!1};Mu(f)||(f=Zc(f));const l=Wc(f,$w);if(l.result==="error")throw new Error(l.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,y,S)=>l.value.evaluate(h,y,{},S),needGeometry:z0(f)}}function F0(f,l){return f<l?-1:f>l?1:0}function z0(f){if(!Array.isArray(f))return!1;if(f[0]==="within")return!0;for(let l=1;l<f.length;l++)if(z0(f[l]))return!0;return!1}function Zc(f){if(!f)return!0;const l=f[0];return f.length<=1?l!=="any":l==="=="?Xp(f[1],f[2],"=="):l==="!="?Ru(Xp(f[1],f[2],"==")):l==="<"||l===">"||l==="<="||l===">="?Xp(f[1],f[2],l):l==="any"?(h=f.slice(1),["any"].concat(h.map(Zc))):l==="all"?["all"].concat(f.slice(1).map(Zc)):l==="none"?["all"].concat(f.slice(1).map(Zc).map(Ru)):l==="in"?zf(f[1],f.slice(2)):l==="!in"?Ru(zf(f[1],f.slice(2))):l==="has"?Xc(f[1]):l==="!has"?Ru(Xc(f[1])):l!=="within"||f;var h}function Xp(f,l,h){switch(f){case"$type":return[`filter-type-${h}`,l];case"$id":return[`filter-id-${h}`,l];default:return[`filter-${h}`,f,l]}}function zf(f,l){if(l.length===0)return!1;switch(f){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",f,["literal",l.sort(F0)]]:["filter-in-small",f,["literal",l]]}}function Xc(f){switch(f){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",f]}}function Ru(f){return["!",f]}function Yc(f){return Mu(zt(f.value))?Dl(sn({},f,{expressionContext:"filter",valueSpec:{value:"boolean"}})):$0(f)}function $0(f){const l=f.value,h=f.key;if(mr(l)!=="array")return[new Ze(h,l,`array expected, ${mr(l)} found`)];const y=f.styleSpec;let S,R=[];if(l.length<1)return[new Ze(h,l,"filter array must have at least 1 element")];switch(R=R.concat(qc({key:`${h}[0]`,value:l[0],valueSpec:y.filter_operator,style:f.style,styleSpec:f.styleSpec})),Gt(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&Gt(l[1])==="$type"&&R.push(new Ze(h,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&R.push(new Ze(h,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(S=mr(l[1]),S!=="string"&&R.push(new Ze(`${h}[1]`,l[1],`string expected, ${S} found`)));for(let D=2;D<l.length;D++)S=mr(l[D]),Gt(l[1])==="$type"?R=R.concat(qc({key:`${h}[${D}]`,value:l[D],valueSpec:y.geometry_type,style:f.style,styleSpec:f.styleSpec})):S!=="string"&&S!=="number"&&S!=="boolean"&&R.push(new Ze(`${h}[${D}]`,l[D],`string, number, or boolean expected, ${S} found`));break;case"any":case"all":case"none":for(let D=1;D<l.length;D++)R=R.concat($0({key:`${h}[${D}]`,value:l[D],style:f.style,styleSpec:f.styleSpec}));break;case"has":case"!has":S=mr(l[1]),l.length!==2?R.push(new Ze(h,l,`filter array for "${l[0]}" operator must have 2 elements`)):S!=="string"&&R.push(new Ze(`${h}[1]`,l[1],`string expected, ${S} found`));break;case"within":S=mr(l[1]),l.length!==2?R.push(new Ze(h,l,`filter array for "${l[0]}" operator must have 2 elements`)):S!=="object"&&R.push(new Ze(`${h}[1]`,l[1],`object expected, ${S} found`))}return R}function Qc(f,l){const h=f.key,y=f.style,S=f.styleSpec,R=f.value,D=f.objectKey,$=S[`${l}_${f.layerType}`];if(!$)return[];const U=D.match(/^(.*)-transition$/);if(l==="paint"&&U&&$[U[1]]&&$[U[1]].transition)return Fo({key:h,value:R,valueSpec:S.transition,style:y,styleSpec:S});const W=f.valueSpec||$[D];if(!W)return[new Ze(h,R,`unknown property "${D}"`)];let te;if(mr(R)==="string"&&zr(W)&&!W.tokens&&(te=/^{([^}]+)}$/.exec(R)))return[new Ze(h,R,`"${D}" does not support interpolation syntax
|
|
|
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(te[1])} }\`.`)];const ae=[];return f.layerType==="symbol"&&(D==="text-field"&&y&&!y.glyphs&&ae.push(new Ze(h,R,'use of "text-field" requires a style "glyphs" property')),D==="text-font"&&Rr(zt(R))&&Gt(R.type)==="identity"&&ae.push(new Ze(h,R,'"text-font" does not support identity functions'))),ae.concat(Fo({key:f.key,value:R,valueSpec:W,style:y,styleSpec:S,expressionContext:"property",propertyType:l,propertyKey:D}))}function B0(f){return Qc(f,"paint")}function V0(f){return Qc(f,"layout")}function U0(f){let l=[];const h=f.value,y=f.key,S=f.style,R=f.styleSpec;h.type||h.ref||l.push(new Ze(y,h,'either "type" or "ref" is required'));let D=Gt(h.type);const $=Gt(h.ref);if(h.id){const U=Gt(h.id);for(let W=0;W<f.arrayIndex;W++){const te=S.layers[W];Gt(te.id)===U&&l.push(new Ze(y,h.id,`duplicate layer id "${h.id}", previously used at line ${te.id.__line__}`))}}if("ref"in h){let U;["type","source","source-layer","filter","layout"].forEach(W=>{W in h&&l.push(new Ze(y,h[W],`"${W}" is prohibited for ref layers`))}),S.layers.forEach(W=>{Gt(W.id)===$&&(U=W)}),U?U.ref?l.push(new Ze(y,h.ref,"ref cannot reference another ref layer")):D=Gt(U.type):l.push(new Ze(y,h.ref,`ref layer "${$}" not found`))}else if(D!=="background")if(h.source){const U=S.sources&&S.sources[h.source],W=U&&Gt(U.type);U?W==="vector"&&D==="raster"?l.push(new Ze(y,h.source,`layer "${h.id}" requires a raster source`)):W==="raster"&&D!=="raster"?l.push(new Ze(y,h.source,`layer "${h.id}" requires a vector source`)):W!=="vector"||h["source-layer"]?W==="raster-dem"&&D!=="hillshade"?l.push(new Ze(y,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):D!=="line"||!h.paint||!h.paint["line-gradient"]||W==="geojson"&&U.lineMetrics||l.push(new Ze(y,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):l.push(new Ze(y,h,`layer "${h.id}" must specify a "source-layer"`)):l.push(new Ze(y,h.source,`source "${h.source}" not found`))}else l.push(new Ze(y,h,'missing required property "source"'));return l=l.concat(ya({key:y,value:h,valueSpec:R.layer,style:f.style,styleSpec:f.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Fo({key:`${y}.type`,value:h.type,valueSpec:R.layer.type,style:f.style,styleSpec:f.styleSpec,object:h,objectKey:"type"}),filter:Yc,layout:U=>ya({layer:h,key:U.key,value:U.value,style:U.style,styleSpec:U.styleSpec,objectElementValidators:{"*":W=>V0(sn({layerType:D},W))}}),paint:U=>ya({layer:h,key:U.key,value:U.value,style:U.style,styleSpec:U.styleSpec,objectElementValidators:{"*":W=>B0(sn({layerType:D},W))}})}})),l}function Au(f){const l=f.value,h=f.key,y=mr(l);return y!=="string"?[new Ze(h,l,`string expected, ${y} found`)]:[]}const j0={promoteId:function({key:f,value:l}){if(mr(l)==="string")return Au({key:f,value:l});{const h=[];for(const y in l)h.push(...Au({key:`${f}.${y}`,value:l[y]}));return h}}};function Jc(f){const l=f.value,h=f.key,y=f.styleSpec,S=f.style;if(!l.type)return[new Ze(h,l,'"type" is required')];const R=Gt(l.type);let D;switch(R){case"vector":case"raster":case"raster-dem":return D=ya({key:h,value:l,valueSpec:y[`source_${R.replace("-","_")}`],style:f.style,styleSpec:y,objectElementValidators:j0}),D;case"geojson":if(D=ya({key:h,value:l,valueSpec:y.source_geojson,style:S,styleSpec:y,objectElementValidators:j0}),l.cluster)for(const $ in l.clusterProperties){const[U,W]=l.clusterProperties[$],te=typeof U=="string"?[U,["accumulated"],["get",$]]:U;D.push(...Dl({key:`${h}.${$}.map`,value:W,expressionContext:"cluster-map"})),D.push(...Dl({key:`${h}.${$}.reduce`,value:te,expressionContext:"cluster-reduce"}))}return D;case"video":return ya({key:h,value:l,valueSpec:y.source_video,style:S,styleSpec:y});case"image":return ya({key:h,value:l,valueSpec:y.source_image,style:S,styleSpec:y});case"canvas":return[new Ze(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return qc({key:`${h}.type`,value:l.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:S,styleSpec:y})}}function ed(f){const l=f.value,h=f.styleSpec,y=h.light,S=f.style;let R=[];const D=mr(l);if(l===void 0)return R;if(D!=="object")return R=R.concat([new Ze("light",l,`object expected, ${D} found`)]),R;for(const $ in l){const U=$.match(/^(.*)-transition$/);R=R.concat(U&&y[U[1]]&&y[U[1]].transition?Fo({key:$,value:l[$],valueSpec:h.transition,style:S,styleSpec:h}):y[$]?Fo({key:$,value:l[$],valueSpec:y[$],style:S,styleSpec:h}):[new Ze($,l[$],`unknown property "${$}"`)])}return R}function Lo(f){const l=f.value,h=f.styleSpec,y=h.terrain,S=f.style;let R=[];const D=mr(l);if(l===void 0)return R;if(D!=="object")return R=R.concat([new Ze("terrain",l,`object expected, ${D} found`)]),R;for(const $ in l)R=R.concat(y[$]?Fo({key:$,value:l[$],valueSpec:y[$],style:S,styleSpec:h}):[new Ze($,l[$],`unknown property "${$}"`)]);return R}const td={"*":()=>[],array:N0,boolean:function(f){const l=f.value,h=f.key,y=mr(l);return y!=="boolean"?[new Ze(h,l,`boolean expected, ${y} found`)]:[]},number:Zp,color:function(f){const l=f.key,h=f.value,y=mr(h);return y!=="string"?[new Ze(l,h,`color expected, ${y} found`)]:tr(h)===null?[new Ze(l,h,`color expected, "${h}" found`)]:[]},constants:Yt,enum:qc,filter:Yc,function:L0,layer:U0,object:ya,source:Jc,light:ed,terrain:Lo,string:Au,formatted:function(f){return Au(f).length===0?[]:Dl(f)},resolvedImage:function(f){return Au(f).length===0?[]:Dl(f)},padding:function(f){const l=f.key,h=f.value;if(mr(h)==="array"){if(h.length<1||h.length>4)return[new Ze(l,h,`padding requires 1 to 4 values; ${h.length} values found`)];const y={type:"number"};let S=[];for(let R=0;R<h.length;R++)S=S.concat(Fo({key:`${l}[${R}]`,value:h[R],valueSpec:y}));return S}return Zp({key:l,value:h,valueSpec:{}})}};function Fo(f){const l=f.value,h=f.valueSpec,y=f.styleSpec;return h.expression&&Rr(Gt(l))?L0(f):h.expression&&Kc(zt(l))?Dl(f):h.type&&td[h.type]?td[h.type](f):ya(sn({},f,{valueSpec:h.type?y[h.type]:h}))}function Bw(f){const l=f.value,h=f.key,y=Au(f);return y.length||(l.indexOf("{fontstack}")===-1&&y.push(new Ze(h,l,'"glyphs" url must include a "{fontstack}" token')),l.indexOf("{range}")===-1&&y.push(new Ze(h,l,'"glyphs" url must include a "{range}" token'))),y}function qs(f,l=Ve){let h=[];return h=h.concat(Fo({key:"",value:f,valueSpec:l.$root,styleSpec:l,style:f,objectElementValidators:{glyphs:Bw,"*":()=>[]}})),f.constants&&(h=h.concat(Yt({key:"constants",value:f.constants,style:f,styleSpec:l}))),H0(h)}function H0(f){return[].concat(f).sort((l,h)=>l.line-h.line)}function ws(f){return function(...l){return H0(f.apply(this,l))}}qs.source=ws(Jc),qs.light=ws(ed),qs.terrain=ws(Lo),qs.layer=ws(U0),qs.filter=ws(Yc),qs.paintProperty=ws(B0),qs.layoutProperty=ws(V0);const nd=qs,Yp=nd.light,Vw=nd.paintProperty,Uw=nd.layoutProperty;function $f(f,l){let h=!1;if(l&&l.length)for(const y of l)f.fire(new Nt(new Error(y.message))),h=!0;return h}class rd{constructor(l,h,y){const S=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 U=0;U<this.d*this.d;U++){const W=D[3+U],te=D[3+U+1];S.push(W===te?null:D.subarray(W,te))}const $=D[3+S.length+1];this.keys=D.subarray(D[3+S.length],$),this.bboxes=D.subarray($),this.insert=this._insertReadonly}else{this.d=h+2*y;for(let D=0;D<this.d*this.d;D++)S.push([]);this.keys=[],this.bboxes=[]}this.n=h,this.extent=l,this.padding=y,this.scale=h/l,this.uid=0;const R=y/h*l;this.min=-R,this.max=l+R}insert(l,h,y,S,R){this._forEachCell(h,y,S,R,this._insertCell,this.uid++,void 0,void 0),this.keys.push(l),this.bboxes.push(h),this.bboxes.push(y),this.bboxes.push(S),this.bboxes.push(R)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(l,h,y,S,R,D){this.cells[R].push(D)}query(l,h,y,S,R){const D=this.min,$=this.max;if(l<=D&&h<=D&&$<=y&&$<=S&&!R)return Array.prototype.slice.call(this.keys);{const U=[];return this._forEachCell(l,h,y,S,this._queryCell,U,{},R),U}}_queryCell(l,h,y,S,R,D,$,U){const W=this.cells[R];if(W!==null){const te=this.keys,ae=this.bboxes;for(let de=0;de<W.length;de++){const ge=W[de];if($[ge]===void 0){const ve=4*ge;(U?U(ae[ve+0],ae[ve+1],ae[ve+2],ae[ve+3]):l<=ae[ve+2]&&h<=ae[ve+3]&&y>=ae[ve+0]&&S>=ae[ve+1])?($[ge]=!0,D.push(te[ge])):$[ge]=!1}}}}_forEachCell(l,h,y,S,R,D,$,U){const W=this._convertToCellCoord(l),te=this._convertToCellCoord(h),ae=this._convertToCellCoord(y),de=this._convertToCellCoord(S);for(let ge=W;ge<=ae;ge++)for(let ve=te;ve<=de;ve++){const Fe=this.d*ve+ge;if((!U||U(this._convertFromCellCoord(ge),this._convertFromCellCoord(ve),this._convertFromCellCoord(ge+1),this._convertFromCellCoord(ve+1)))&&R.call(this,l,h,y,S,Fe,D,$,U))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 S=new Int32Array(h+y+this.keys.length+this.bboxes.length);S[0]=this.extent,S[1]=this.n,S[2]=this.padding;let R=h;for(let D=0;D<l.length;D++){const $=l[D];S[3+D]=R,S.set($,R),R+=$.length}return S[3+l.length]=R,S.set(this.keys,R),R+=this.keys.length,S[3+l.length+1]=R,S.set(this.bboxes,R),R+=this.bboxes.length,S.buffer}static serialize(l,h){const y=l.toArrayBuffer();return h&&h.push(y),{buffer:y}}static deserialize(l){return new rd(l.buffer)}}const Cs={};function yn(f,l,h={}){if(Cs[f])throw new Error(`${f} is already registered.`);Object.defineProperty(l,"_classRegistryKey",{value:f,writeable:!1}),Cs[f]={klass:l,omit:h.omit||[],shallow:h.shallow||[]}}yn("Object",Object),yn("TransferableGridIndex",rd),yn("Color",ce),yn("Error",Error),yn("AJAXError",We),yn("ResolvedImage",Be),yn("StylePropertyFunction",Nf),yn("StyleExpression",Of,{omit:["_evaluator"]}),yn("ZoomDependentExpression",qp),yn("ZoomConstantExpression",Gc),yn("CompoundExpression",lr,{omit:["_evaluate"]});for(const f in Iu)Iu[f]._classRegistryKey||yn(`Expression_${f}`,Iu[f]);function K0(f){return f&&typeof ArrayBuffer<"u"&&(f instanceof ArrayBuffer||f.constructor&&f.constructor.name==="ArrayBuffer")}function Ol(f,l){if(f==null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||f instanceof Boolean||f instanceof Number||f instanceof String||f instanceof Date||f instanceof RegExp||f instanceof Blob)return f;if(K0(f)||Q(f))return l&&l.push(f),f;if(ArrayBuffer.isView(f)){const h=f;return l&&l.push(h.buffer),h}if(f instanceof ImageData)return l&&l.push(f.data.buffer),f;if(Array.isArray(f)){const h=[];for(const y of f)h.push(Ol(y,l));return h}if(typeof f=="object"){const h=f.constructor,y=h._classRegistryKey;if(!y)throw new Error("can't serialize object of unregistered class");if(!Cs[y])throw new Error(`${y} is not registered.`);const S=h.serialize?h.serialize(f,l):{};if(h.serialize){if(l&&S===l[l.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const R in f){if(!f.hasOwnProperty(R)||Cs[y].omit.indexOf(R)>=0)continue;const D=f[R];S[R]=Cs[y].shallow.indexOf(R)>=0?D:Ol(D,l)}f instanceof Error&&(S.message=f.message)}if(S.$name)throw new Error("$name property is reserved for worker serialization logic.");return y!=="Object"&&(S.$name=y),S}throw new Error("can't serialize object of type "+typeof f)}function Zs(f){if(f==null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||f instanceof Boolean||f instanceof Number||f instanceof String||f instanceof Date||f instanceof RegExp||f instanceof Blob||K0(f)||Q(f)||ArrayBuffer.isView(f)||f instanceof ImageData)return f;if(Array.isArray(f))return f.map(Zs);if(typeof f=="object"){const l=f.$name||"Object";if(!Cs[l])throw new Error(`can't deserialize unregistered class ${l}`);const{klass:h}=Cs[l];if(!h)throw new Error(`can't deserialize unregistered class ${l}`);if(h.deserialize)return h.deserialize(f);const y=Object.create(h.prototype);for(const S of Object.keys(f)){if(S==="$name")continue;const R=f[S];y[S]=Cs[l].shallow.indexOf(S)>=0?R:Zs(R)}return y}throw new Error("can't deserialize object of type "+typeof f)}class Qp{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 un={"Latin-1 Supplement":f=>f>=128&&f<=255,Arabic:f=>f>=1536&&f<=1791,"Arabic Supplement":f=>f>=1872&&f<=1919,"Arabic Extended-A":f=>f>=2208&&f<=2303,"Hangul Jamo":f=>f>=4352&&f<=4607,"Unified Canadian Aboriginal Syllabics":f=>f>=5120&&f<=5759,Khmer:f=>f>=6016&&f<=6143,"Unified Canadian Aboriginal Syllabics Extended":f=>f>=6320&&f<=6399,"General Punctuation":f=>f>=8192&&f<=8303,"Letterlike Symbols":f=>f>=8448&&f<=8527,"Number Forms":f=>f>=8528&&f<=8591,"Miscellaneous Technical":f=>f>=8960&&f<=9215,"Control Pictures":f=>f>=9216&&f<=9279,"Optical Character Recognition":f=>f>=9280&&f<=9311,"Enclosed Alphanumerics":f=>f>=9312&&f<=9471,"Geometric Shapes":f=>f>=9632&&f<=9727,"Miscellaneous Symbols":f=>f>=9728&&f<=9983,"Miscellaneous Symbols and Arrows":f=>f>=11008&&f<=11263,"CJK Radicals Supplement":f=>f>=11904&&f<=12031,"Kangxi Radicals":f=>f>=12032&&f<=12255,"Ideographic Description Characters":f=>f>=12272&&f<=12287,"CJK Symbols and Punctuation":f=>f>=12288&&f<=12351,Hiragana:f=>f>=12352&&f<=12447,Katakana:f=>f>=12448&&f<=12543,Bopomofo:f=>f>=12544&&f<=12591,"Hangul Compatibility Jamo":f=>f>=12592&&f<=12687,Kanbun:f=>f>=12688&&f<=12703,"Bopomofo Extended":f=>f>=12704&&f<=12735,"CJK Strokes":f=>f>=12736&&f<=12783,"Katakana Phonetic Extensions":f=>f>=12784&&f<=12799,"Enclosed CJK Letters and Months":f=>f>=12800&&f<=13055,"CJK Compatibility":f=>f>=13056&&f<=13311,"CJK Unified Ideographs Extension A":f=>f>=13312&&f<=19903,"Yijing Hexagram Symbols":f=>f>=19904&&f<=19967,"CJK Unified Ideographs":f=>f>=19968&&f<=40959,"Yi Syllables":f=>f>=40960&&f<=42127,"Yi Radicals":f=>f>=42128&&f<=42191,"Hangul Jamo Extended-A":f=>f>=43360&&f<=43391,"Hangul Syllables":f=>f>=44032&&f<=55215,"Hangul Jamo Extended-B":f=>f>=55216&&f<=55295,"Private Use Area":f=>f>=57344&&f<=63743,"CJK Compatibility Ideographs":f=>f>=63744&&f<=64255,"Arabic Presentation Forms-A":f=>f>=64336&&f<=65023,"Vertical Forms":f=>f>=65040&&f<=65055,"CJK Compatibility Forms":f=>f>=65072&&f<=65103,"Small Form Variants":f=>f>=65104&&f<=65135,"Arabic Presentation Forms-B":f=>f>=65136&&f<=65279,"Halfwidth and Fullwidth Forms":f=>f>=65280&&f<=65519};function Bf(f){for(const l of f)if(em(l.charCodeAt(0)))return!0;return!1}function jw(f){for(const l of f)if(!Jp(l.charCodeAt(0)))return!1;return!0}function Jp(f){return!(un.Arabic(f)||un["Arabic Supplement"](f)||un["Arabic Extended-A"](f)||un["Arabic Presentation Forms-A"](f)||un["Arabic Presentation Forms-B"](f))}function em(f){return!(f!==746&&f!==747&&(f<4352||!(un["Bopomofo Extended"](f)||un.Bopomofo(f)||un["CJK Compatibility Forms"](f)&&!(f>=65097&&f<=65103)||un["CJK Compatibility Ideographs"](f)||un["CJK Compatibility"](f)||un["CJK Radicals Supplement"](f)||un["CJK Strokes"](f)||!(!un["CJK Symbols and Punctuation"](f)||f>=12296&&f<=12305||f>=12308&&f<=12319||f===12336)||un["CJK Unified Ideographs Extension A"](f)||un["CJK Unified Ideographs"](f)||un["Enclosed CJK Letters and Months"](f)||un["Hangul Compatibility Jamo"](f)||un["Hangul Jamo Extended-A"](f)||un["Hangul Jamo Extended-B"](f)||un["Hangul Jamo"](f)||un["Hangul Syllables"](f)||un.Hiragana(f)||un["Ideographic Description Characters"](f)||un.Kanbun(f)||un["Kangxi Radicals"](f)||un["Katakana Phonetic Extensions"](f)||un.Katakana(f)&&f!==12540||!(!un["Halfwidth and Fullwidth Forms"](f)||f===65288||f===65289||f===65293||f>=65306&&f<=65310||f===65339||f===65341||f===65343||f>=65371&&f<=65503||f===65507||f>=65512&&f<=65519)||!(!un["Small Form Variants"](f)||f>=65112&&f<=65118||f>=65123&&f<=65126)||un["Unified Canadian Aboriginal Syllabics"](f)||un["Unified Canadian Aboriginal Syllabics Extended"](f)||un["Vertical Forms"](f)||un["Yijing Hexagram Symbols"](f)||un["Yi Syllables"](f)||un["Yi Radicals"](f))))}function W0(f){return!(em(f)||function(l){return!!(un["Latin-1 Supplement"](l)&&(l===167||l===169||l===174||l===177||l===188||l===189||l===190||l===215||l===247)||un["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)||un["Letterlike Symbols"](l)||un["Number Forms"](l)||un["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)||un["Control Pictures"](l)&&l!==9251||un["Optical Character Recognition"](l)||un["Enclosed Alphanumerics"](l)||un["Geometric Shapes"](l)||un["Miscellaneous Symbols"](l)&&!(l>=9754&&l<=9759)||un["Miscellaneous Symbols and Arrows"](l)&&(l>=11026&&l<=11055||l>=11088&&l<=11097||l>=11192&&l<=11243)||un["CJK Symbols and Punctuation"](l)||un.Katakana(l)||un["Private Use Area"](l)||un["CJK Compatibility Forms"](l)||un["Small Form Variants"](l)||un["Halfwidth and Fullwidth Forms"](l)||l===8734||l===8756||l===8757||l>=9984&&l<=10087||l>=10102&&l<=10131||l===65532||l===65533)}(f))}function G0(f){return f>=1424&&f<=2303||un["Arabic Presentation Forms-A"](f)||un["Arabic Presentation Forms-B"](f)}function Hw(f,l){return!(!l&&G0(f)||f>=2304&&f<=3583||f>=3840&&f<=4255||un.Khmer(f))}function q0(f){for(const l of f)if(G0(l.charCodeAt(0)))return!0;return!1}const tm="deferred",nm="loading",rm="loaded";let im=null,xo="unavailable",Xs=null;const Z0=function(f){f&&typeof f=="string"&&f.indexOf("NetworkError")>-1&&(xo="error"),im&&im(f)};function Du(){om.fire(new Dt("pluginStateChange",{pluginStatus:xo,pluginURL:Xs}))}const om=new jt,id=function(){return xo},X0=function(){if(xo!==tm||!Xs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");xo=nm,Du(),Xs&&ct({url:Xs},f=>{f?Z0(f):(xo=rm,Du())})},ea={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>xo===rm||ea.applyArabicShaping!=null,isLoading:()=>xo===nm,setState(f){if(!B())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");xo=f.pluginStatus,Xs=f.pluginURL},isParsed(){if(!B())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return ea.applyArabicShaping!=null&&ea.processBidirectionalText!=null&&ea.processStyledBidirectionalText!=null},getPluginURL(){if(!B())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return Xs}};class Hr{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 Qp,this.transition={})}isSupportedScript(l){return function(h,y){for(const S of h)if(!Hw(S.charCodeAt(0),y))return!1;return!0}(l,ea.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 od{constructor(l,h){this.property=l,this.value=h,this.expression=function(y,S){if(Rr(y))return new Nf(y,S);if(Kc(y)){const R=O0(y,S);if(R.result==="error")throw new Error(R.value.map(D=>`${D.key}: ${D.message}`).join(", "));return R.value}{let R=y;return S.type==="color"&&typeof y=="string"?R=ce.parse(y):S.type!=="padding"||typeof y!="number"&&!Array.isArray(y)||(R=Me.parse(y)),{kind:"constant",evaluate:()=>R}}}(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 Vf{constructor(l){this.property=l,this.value=new od(l,void 0)}transitioned(l,h){return new Q0(this.property,this.value,h,_({},l.transition,this.transition),l.now)}untransitioned(){return new Q0(this.property,this.value,null,{},0)}}class Y0{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 Vf(this._values[l].property)),this._values[l].value=new od(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 Vf(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 S=this.getTransition(h);S!==void 0&&(l[`${h}-transition`]=S)}return l}transitioned(l,h){const y=new J0(this._properties);for(const S of Object.keys(this._values))y._values[S]=this._values[S].transitioned(l,h._values[S]);return y}untransitioned(){const l=new J0(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].untransitioned();return l}}class Q0{constructor(l,h,y,S,R){this.property=l,this.value=h,this.begin=R+S.delay||0,this.end=this.begin+S.duration||0,l.specification.transition&&(S.delay||S.duration)&&(this.prior=y)}possiblyEvaluate(l,h,y){const S=l.now||0,R=this.value.possiblyEvaluate(l,h,y),D=this.prior;if(D){if(S>this.end)return this.prior=null,R;if(this.value.isDataDriven())return this.prior=null,R;if(S<this.begin)return D.possiblyEvaluate(l,h,y);{const $=(S-this.begin)/(this.end-this.begin);return this.property.interpolate(D.possiblyEvaluate(l,h,y),R,function(U){if(U<=0)return 0;if(U>=1)return 1;const W=U*U,te=W*U;return 4*(U<.5?te:3*(U-W)+te-.75)}($))}}return R}}class J0{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitioningPropertyValues)}possiblyEvaluate(l,h,y){const S=new ad(this._properties);for(const R of Object.keys(this._values))S._values[R]=this._values[R].possiblyEvaluate(l,h,y);return S}hasTransition(){for(const l of Object.keys(this._values))if(this._values[l].prior)return!0;return!1}}class Kw{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 od(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 S=new ad(this._properties);for(const R of Object.keys(this._values))S._values[R]=this._values[R].possiblyEvaluate(l,h,y);return S}}class ja{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,S){return this.property.evaluate(this.value,this.parameters,l,h,y,S)}}class ad{constructor(l){this._properties=l,this._values=Object.create(l.defaultPossiblyEvaluatedValues)}get(l){return this._values[l]}}class wn{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 S=_s[this.specification.type];return S?S(l,h,y):l}}class Dn{constructor(l,h){this.specification=l,this.overrides=h}possiblyEvaluate(l,h,y,S){return new ja(this,l.expression.kind==="constant"||l.expression.kind==="camera"?{kind:"constant",value:l.expression.evaluate(h,null,{},y,S)}: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 ja(this,{kind:"constant",value:void 0},l.parameters);const S=_s[this.specification.type];return S?new ja(this,{kind:"constant",value:S(l.value.value,h.value.value,y)},l.parameters):l}evaluate(l,h,y,S,R,D){return l.kind==="constant"?l.value:l.evaluate(h,y,S,R,D)}}class Ou extends Dn{possiblyEvaluate(l,h,y,S){if(l.value===void 0)return new ja(this,{kind:"constant",value:void 0},h);if(l.expression.kind==="constant"){const R=l.expression.evaluate(h,null,{},y,S),D=l.property.specification.type==="resolvedImage"&&typeof R!="string"?R.name:R,$=this._calculate(D,D,D,h);return new ja(this,{kind:"constant",value:$},h)}if(l.expression.kind==="camera"){const R=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 ja(this,{kind:"constant",value:R},h)}return new ja(this,l.expression,h)}evaluate(l,h,y,S,R,D){if(l.kind==="source"){const $=l.evaluate(h,y,S,R,D);return this._calculate($,$,$,h)}return l.kind==="composite"?this._calculate(l.evaluate({zoom:Math.floor(h.zoom)-1},y,S),l.evaluate({zoom:Math.floor(h.zoom)},y,S),l.evaluate({zoom:Math.floor(h.zoom)+1},y,S),h):l.value}_calculate(l,h,y,S){return S.zoom>S.zoomHistory.lastIntegerZoom?{from:l,to:h}:{from:y,to:h}}interpolate(l){return l}}class am{constructor(l){this.specification=l}possiblyEvaluate(l,h,y,S){if(l.value!==void 0){if(l.expression.kind==="constant"){const R=l.expression.evaluate(h,null,{},y,S);return this._calculate(R,R,R,h)}return this._calculate(l.expression.evaluate(new Hr(Math.floor(h.zoom-1),h)),l.expression.evaluate(new Hr(Math.floor(h.zoom),h)),l.expression.evaluate(new Hr(Math.floor(h.zoom+1),h)),h)}}_calculate(l,h,y,S){return S.zoom>S.zoomHistory.lastIntegerZoom?{from:l,to:h}:{from:y,to:h}}interpolate(l){return l}}class Ys{constructor(l){this.specification=l}possiblyEvaluate(l,h,y,S){return!!l.expression.evaluate(h,null,{},y,S)}interpolate(){return!1}}class ji{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 S=this.defaultPropertyValues[h]=new od(y,void 0),R=this.defaultTransitionablePropertyValues[h]=new Vf(y);this.defaultTransitioningPropertyValues[h]=R.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=S.possiblyEvaluate({})}}}yn("DataDrivenProperty",Dn),yn("DataConstantProperty",wn),yn("CrossFadedDataDrivenProperty",Ou),yn("CrossFadedProperty",am),yn("ColorRampProperty",Ys);const Qs="-transition";class Ha extends jt{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 Kw(h.layout)),h.paint)){this._transitionablePaint=new Y0(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 ad(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(Uw,`layers.${this.id}.layout.${l}`,l,h,y)||(l!=="visibility"?this._unevaluatedLayout.setValue(l,h):this.visibility=h)}getPaintProperty(l){return l.endsWith(Qs)?this._transitionablePaint.getTransition(l.slice(0,-Qs.length)):this._transitionablePaint.getValue(l)}setPaintProperty(l,h,y={}){if(h!=null&&this._validate(Vw,`layers.${this.id}.paint.${l}`,l,h,y))return!1;if(l.endsWith(Qs))return this._transitionablePaint.setTransition(l.slice(0,-Qs.length),h||void 0),!1;{const S=this._transitionablePaint._values[l],R=S.property.specification["property-type"]==="cross-faded-data-driven",D=S.value.isDataDriven(),$=S.value;this._transitionablePaint.setValue(l,h),this._handleSpecialPaintPropertyUpdate(l);const U=this._transitionablePaint._values[l].value;return U.isDataDriven()||D||R||this._handleOverridablePaintPropertyUpdate(l,$,U)}}_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,S,R={}){return(!R||R.validate!==!1)&&$f(this,l.call(nd,{key:h,layerType:this.type,objectKey:y,value:S,styleSpec:Ve,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 ja&&zr(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const ey={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Js{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 ii{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 gi(f,l=1){let h=0,y=0;return{members:f.map(S=>{const R=ey[S.type].BYTES_PER_ELEMENT,D=h=sm(h,Math.max(l,R)),$=S.components||1;return y=Math.max(y,R),h+=R*$,{name:S.name,type:S.type,components:$,offset:D}}),size:sm(h,Math.max(y,l)),alignment:l}}function sm(f,l){return Math.ceil(f/l)*l}class Nl extends ii{_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 S=2*l;return this.int16[S+0]=h,this.int16[S+1]=y,l}}Nl.prototype.bytesPerElement=4,yn("StructArrayLayout2i4",Nl);class C extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,S){const R=this.length;return this.resize(R+1),this.emplace(R,l,h,y,S)}emplace(l,h,y,S,R){const D=4*l;return this.int16[D+0]=h,this.int16[D+1]=y,this.int16[D+2]=S,this.int16[D+3]=R,l}}C.prototype.bytesPerElement=8,yn("StructArrayLayout4i8",C);class c extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,S,R,D){const $=this.length;return this.resize($+1),this.emplace($,l,h,y,S,R,D)}emplace(l,h,y,S,R,D,$){const U=6*l;return this.int16[U+0]=h,this.int16[U+1]=y,this.int16[U+2]=S,this.int16[U+3]=R,this.int16[U+4]=D,this.int16[U+5]=$,l}}c.prototype.bytesPerElement=12,yn("StructArrayLayout2i4i12",c);class g extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,S,R,D){const $=this.length;return this.resize($+1),this.emplace($,l,h,y,S,R,D)}emplace(l,h,y,S,R,D,$){const U=4*l,W=8*l;return this.int16[U+0]=h,this.int16[U+1]=y,this.uint8[W+4]=S,this.uint8[W+5]=R,this.uint8[W+6]=D,this.uint8[W+7]=$,l}}g.prototype.bytesPerElement=8,yn("StructArrayLayout2i4ub8",g);class b extends ii{_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 S=2*l;return this.float32[S+0]=h,this.float32[S+1]=y,l}}b.prototype.bytesPerElement=8,yn("StructArrayLayout2f8",b);class E extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,S,R,D,$,U,W,te){const ae=this.length;return this.resize(ae+1),this.emplace(ae,l,h,y,S,R,D,$,U,W,te)}emplace(l,h,y,S,R,D,$,U,W,te,ae){const de=10*l;return this.uint16[de+0]=h,this.uint16[de+1]=y,this.uint16[de+2]=S,this.uint16[de+3]=R,this.uint16[de+4]=D,this.uint16[de+5]=$,this.uint16[de+6]=U,this.uint16[de+7]=W,this.uint16[de+8]=te,this.uint16[de+9]=ae,l}}E.prototype.bytesPerElement=20,yn("StructArrayLayout10ui20",E);class A extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,S,R,D,$,U,W,te,ae,de){const ge=this.length;return this.resize(ge+1),this.emplace(ge,l,h,y,S,R,D,$,U,W,te,ae,de)}emplace(l,h,y,S,R,D,$,U,W,te,ae,de,ge){const ve=12*l;return this.int16[ve+0]=h,this.int16[ve+1]=y,this.int16[ve+2]=S,this.int16[ve+3]=R,this.uint16[ve+4]=D,this.uint16[ve+5]=$,this.uint16[ve+6]=U,this.uint16[ve+7]=W,this.int16[ve+8]=te,this.int16[ve+9]=ae,this.int16[ve+10]=de,this.int16[ve+11]=ge,l}}A.prototype.bytesPerElement=24,yn("StructArrayLayout4i4ui4i24",A);class z extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y){const S=this.length;return this.resize(S+1),this.emplace(S,l,h,y)}emplace(l,h,y,S){const R=3*l;return this.float32[R+0]=h,this.float32[R+1]=y,this.float32[R+2]=S,l}}z.prototype.bytesPerElement=12,yn("StructArrayLayout3f12",z);class j extends ii{_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}}j.prototype.bytesPerElement=4,yn("StructArrayLayout1ul4",j);class K extends ii{_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,S,R,D,$,U,W){const te=this.length;return this.resize(te+1),this.emplace(te,l,h,y,S,R,D,$,U,W)}emplace(l,h,y,S,R,D,$,U,W,te){const ae=10*l,de=5*l;return this.int16[ae+0]=h,this.int16[ae+1]=y,this.int16[ae+2]=S,this.int16[ae+3]=R,this.int16[ae+4]=D,this.int16[ae+5]=$,this.uint32[de+3]=U,this.uint16[ae+8]=W,this.uint16[ae+9]=te,l}}K.prototype.bytesPerElement=20,yn("StructArrayLayout6i1ul2ui20",K);class Y extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,S,R,D){const $=this.length;return this.resize($+1),this.emplace($,l,h,y,S,R,D)}emplace(l,h,y,S,R,D,$){const U=6*l;return this.int16[U+0]=h,this.int16[U+1]=y,this.int16[U+2]=S,this.int16[U+3]=R,this.int16[U+4]=D,this.int16[U+5]=$,l}}Y.prototype.bytesPerElement=12,yn("StructArrayLayout2i2i2i12",Y);class ie extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,S,R){const D=this.length;return this.resize(D+1),this.emplace(D,l,h,y,S,R)}emplace(l,h,y,S,R,D){const $=4*l,U=8*l;return this.float32[$+0]=h,this.float32[$+1]=y,this.float32[$+2]=S,this.int16[U+6]=R,this.int16[U+7]=D,l}}ie.prototype.bytesPerElement=16,yn("StructArrayLayout2f1f2i16",ie);class ue extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,S){const R=this.length;return this.resize(R+1),this.emplace(R,l,h,y,S)}emplace(l,h,y,S,R){const D=12*l,$=3*l;return this.uint8[D+0]=h,this.uint8[D+1]=y,this.float32[$+1]=S,this.float32[$+2]=R,l}}ue.prototype.bytesPerElement=12,yn("StructArrayLayout2ub2f12",ue);class me extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y){const S=this.length;return this.resize(S+1),this.emplace(S,l,h,y)}emplace(l,h,y,S){const R=3*l;return this.uint16[R+0]=h,this.uint16[R+1]=y,this.uint16[R+2]=S,l}}me.prototype.bytesPerElement=6,yn("StructArrayLayout3ui6",me);class Re extends ii{_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,S,R,D,$,U,W,te,ae,de,ge,ve,Fe,Ne,it){const yt=this.length;return this.resize(yt+1),this.emplace(yt,l,h,y,S,R,D,$,U,W,te,ae,de,ge,ve,Fe,Ne,it)}emplace(l,h,y,S,R,D,$,U,W,te,ae,de,ge,ve,Fe,Ne,it,yt){const Ye=24*l,pt=12*l,Ot=48*l;return this.int16[Ye+0]=h,this.int16[Ye+1]=y,this.uint16[Ye+2]=S,this.uint16[Ye+3]=R,this.uint32[pt+2]=D,this.uint32[pt+3]=$,this.uint32[pt+4]=U,this.uint16[Ye+10]=W,this.uint16[Ye+11]=te,this.uint16[Ye+12]=ae,this.float32[pt+7]=de,this.float32[pt+8]=ge,this.uint8[Ot+36]=ve,this.uint8[Ot+37]=Fe,this.uint8[Ot+38]=Ne,this.uint32[pt+10]=it,this.int16[Ye+22]=yt,l}}Re.prototype.bytesPerElement=48,yn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Re);class Se extends ii{_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,S,R,D,$,U,W,te,ae,de,ge,ve,Fe,Ne,it,yt,Ye,pt,Ot,At,gn,_n,cn,on,en,dn){const an=this.length;return this.resize(an+1),this.emplace(an,l,h,y,S,R,D,$,U,W,te,ae,de,ge,ve,Fe,Ne,it,yt,Ye,pt,Ot,At,gn,_n,cn,on,en,dn)}emplace(l,h,y,S,R,D,$,U,W,te,ae,de,ge,ve,Fe,Ne,it,yt,Ye,pt,Ot,At,gn,_n,cn,on,en,dn,an){const Wt=34*l,Mn=17*l;return this.int16[Wt+0]=h,this.int16[Wt+1]=y,this.int16[Wt+2]=S,this.int16[Wt+3]=R,this.int16[Wt+4]=D,this.int16[Wt+5]=$,this.int16[Wt+6]=U,this.int16[Wt+7]=W,this.uint16[Wt+8]=te,this.uint16[Wt+9]=ae,this.uint16[Wt+10]=de,this.uint16[Wt+11]=ge,this.uint16[Wt+12]=ve,this.uint16[Wt+13]=Fe,this.uint16[Wt+14]=Ne,this.uint16[Wt+15]=it,this.uint16[Wt+16]=yt,this.uint16[Wt+17]=Ye,this.uint16[Wt+18]=pt,this.uint16[Wt+19]=Ot,this.uint16[Wt+20]=At,this.uint16[Wt+21]=gn,this.uint16[Wt+22]=_n,this.uint32[Mn+12]=cn,this.float32[Mn+13]=on,this.float32[Mn+14]=en,this.float32[Mn+15]=dn,this.float32[Mn+16]=an,l}}Se.prototype.bytesPerElement=68,yn("StructArrayLayout8i15ui1ul4f68",Se);class Ie extends ii{_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}}Ie.prototype.bytesPerElement=4,yn("StructArrayLayout1f4",Ie);class je extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y){const S=this.length;return this.resize(S+1),this.emplace(S,l,h,y)}emplace(l,h,y,S){const R=3*l;return this.int16[R+0]=h,this.int16[R+1]=y,this.int16[R+2]=S,l}}je.prototype.bytesPerElement=6,yn("StructArrayLayout3i6",je);class Xe extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y){const S=this.length;return this.resize(S+1),this.emplace(S,l,h,y)}emplace(l,h,y,S){const R=4*l;return this.uint32[2*l+0]=h,this.uint16[R+2]=y,this.uint16[R+3]=S,l}}Xe.prototype.bytesPerElement=8,yn("StructArrayLayout1ul2ui8",Xe);class st extends ii{_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 S=2*l;return this.uint16[S+0]=h,this.uint16[S+1]=y,l}}st.prototype.bytesPerElement=4,yn("StructArrayLayout2ui4",st);class Oe extends ii{_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}}Oe.prototype.bytesPerElement=2,yn("StructArrayLayout1ui2",Oe);class vt extends ii{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,S){const R=this.length;return this.resize(R+1),this.emplace(R,l,h,y,S)}emplace(l,h,y,S,R){const D=4*l;return this.float32[D+0]=h,this.float32[D+1]=y,this.float32[D+2]=S,this.float32[D+3]=R,l}}vt.prototype.bytesPerElement=16,yn("StructArrayLayout4f16",vt);class ft extends Js{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new ne(this.anchorPointX,this.anchorPointY)}}ft.prototype.size=20;class Et extends K{get(l){return new ft(this,l)}}yn("CollisionBoxArray",Et);class It extends Js{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]}}It.prototype.size=48;class Ht extends Re{get(l){return new It(this,l)}}yn("PlacedSymbolArray",Ht);class Ct extends Js{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]}}Ct.prototype.size=68;class fn extends Se{get(l){return new Ct(this,l)}}yn("SymbolInstanceArray",fn);class rn extends Ie{getoffsetX(l){return this.float32[1*l+0]}}yn("GlyphOffsetArray",rn);class mn extends je{getx(l){return this.int16[3*l+0]}gety(l){return this.int16[3*l+1]}gettileUnitDistanceFromAnchor(l){return this.int16[3*l+2]}}yn("SymbolLineVertexArray",mn);class Hn extends Js{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]}}Hn.prototype.size=8;class qn extends Xe{get(l){return new Hn(this,l)}}yn("FeatureIndexArray",qn);class kn extends Nl{}class vr extends Nl{}class yr extends Nl{}class sr extends c{}class ur extends g{}class Cr extends b{}class Ri extends E{}class Ka extends A{}class xa extends z{}class Wa extends j{}class el extends Y{}class ta extends ue{}class bo extends me{}class Ss extends st{}const Uf=gi([{name:"a_pos",components:2,type:"Int16"}],4),{members:Si}=Uf;class Jn{constructor(l=[]){this.segments=l}prepareSegment(l,h,y,S){let R=this.segments[this.segments.length-1];return l>Jn.MAX_VERTEX_ARRAY_LENGTH&&L(`Max vertices per segment is ${Jn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${l}`),(!R||R.vertexLength+l>Jn.MAX_VERTEX_ARRAY_LENGTH||R.sortKey!==S)&&(R={vertexOffset:h.length,primitiveOffset:y.length,vertexLength:0,primitiveLength:0},S!==void 0&&(R.sortKey=S),this.segments.push(R)),R}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,S){return new Jn([{vertexOffset:l,primitiveOffset:h,vertexLength:y,primitiveLength:S,vaos:{},sortKey:0}])}}function gr(f,l){return 256*(f=v(Math.floor(f),0,255))+v(Math.floor(l),0,255)}Jn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,yn("SegmentVector",Jn);const Ai=gi([{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 Di={exports:{}},Kr={exports:{}};Kr.exports=function(f,l){var h,y,S,R,D,$,U,W;for(y=f.length-(h=3&f.length),S=l,D=3432918353,$=461845907,W=0;W<y;)U=255&f.charCodeAt(W)|(255&f.charCodeAt(++W))<<8|(255&f.charCodeAt(++W))<<16|(255&f.charCodeAt(++W))<<24,++W,S=27492+(65535&(R=5*(65535&(S=(S^=U=(65535&(U=(U=(65535&U)*D+(((U>>>16)*D&65535)<<16)&4294967295)<<15|U>>>17))*$+(((U>>>16)*$&65535)<<16)&4294967295)<<13|S>>>19))+((5*(S>>>16)&65535)<<16)&4294967295))+((58964+(R>>>16)&65535)<<16);switch(U=0,h){case 3:U^=(255&f.charCodeAt(W+2))<<16;case 2:U^=(255&f.charCodeAt(W+1))<<8;case 1:S^=U=(65535&(U=(U=(65535&(U^=255&f.charCodeAt(W)))*D+(((U>>>16)*D&65535)<<16)&4294967295)<<15|U>>>17))*$+(((U>>>16)*$&65535)<<16)&4294967295}return S^=f.length,S=2246822507*(65535&(S^=S>>>16))+((2246822507*(S>>>16)&65535)<<16)&4294967295,S=3266489909*(65535&(S^=S>>>13))+((3266489909*(S>>>16)&65535)<<16)&4294967295,(S^=S>>>16)>>>0};var na={exports:{}};na.exports=function(f,l){for(var h,y=f.length,S=l^y,R=0;y>=4;)h=1540483477*(65535&(h=255&f.charCodeAt(R)|(255&f.charCodeAt(++R))<<8|(255&f.charCodeAt(++R))<<16|(255&f.charCodeAt(++R))<<24))+((1540483477*(h>>>16)&65535)<<16),S=1540483477*(65535&S)+((1540483477*(S>>>16)&65535)<<16)^(h=1540483477*(65535&(h^=h>>>24))+((1540483477*(h>>>16)&65535)<<16)),y-=4,++R;switch(y){case 3:S^=(255&f.charCodeAt(R+2))<<16;case 2:S^=(255&f.charCodeAt(R+1))<<8;case 1:S=1540483477*(65535&(S^=255&f.charCodeAt(R)))+((1540483477*(S>>>16)&65535)<<16)}return S=1540483477*(65535&(S^=S>>>13))+((1540483477*(S>>>16)&65535)<<16),(S^=S>>>15)>>>0};var Ll=Kr.exports,lm=na.exports;Di.exports=Ll,Di.exports.murmur3=Ll,Di.exports.murmur2=lm;class Nu{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(l,h,y,S){this.ids.push(ty(l)),this.positions.push(h,y,S)}getPositions(l){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=ty(l);let y=0,S=this.ids.length-1;for(;y<S;){const D=y+S>>1;this.ids[D]>=h?S=D:y=D+1}const R=[];for(;this.ids[y]===h;)R.push({index:this.positions[3*y],start:this.positions[3*y+1],end:this.positions[3*y+2]}),y++;return R}static serialize(l,h){const y=new Float64Array(l.ids),S=new Uint32Array(l.positions);return um(y,S,0,y.length-1),h&&h.push(y.buffer,S.buffer),{ids:y,positions:S}}static deserialize(l){const h=new Nu;return h.ids=l.ids,h.positions=l.positions,h.indexed=!0,h}}function ty(f){const l=+f;return!isNaN(l)&&l<=Number.MAX_SAFE_INTEGER?l:Di.exports(String(f))}function um(f,l,h,y){for(;h<y;){const S=f[h+y>>1];let R=h-1,D=y+1;for(;;){do R++;while(f[R]<S);do D--;while(f[D]>S);if(R>=D)break;tl(f,R,D),tl(l,3*R,3*D),tl(l,3*R+1,3*D+1),tl(l,3*R+2,3*D+2)}D-h<y-D?(um(f,l,h,D),h=D+1):(um(f,l,D+1,y),y=D)}}function tl(f,l,h){const y=f[l];f[l]=f[h],f[h]=y}yn("FeaturePositionMap",Nu);class Fl{constructor(l,h){this.gl=l.gl,this.location=h}}class zl extends Fl{constructor(l,h){super(l,h),this.current=0}set(l){this.current!==l&&(this.current=l,this.gl.uniform1f(this.location,l))}}class jf extends Fl{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 Ck extends Fl{constructor(l,h){super(l,h),this.current=ce.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 MK=new Float32Array(16);function Ww(f){return[gr(255*f.r,255*f.g),gr(255*f.b,255*f.a)]}class cm{constructor(l,h,y){this.value=l,this.uniformNames=h.map(S=>`u_${S}`),this.type=y}setUniform(l,h,y){l.set(y.constantOr(this.value))}getBinding(l,h,y){return this.type==="color"?new Ck(l,h):new zl(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,S){const R=S==="u_pattern_to"?this.patternTo:S==="u_pattern_from"?this.patternFrom:S==="u_pixel_ratio_to"?this.pixelRatioTo:S==="u_pixel_ratio_from"?this.pixelRatioFrom:null;R&&l.set(R)}getBinding(l,h,y){return y.substr(0,9)==="u_pattern"?new jf(l,h):new zl(l,h)}}class $l{constructor(l,h,y,S){this.expression=l,this.type=y,this.maxValue=0,this.paintVertexAttributes=h.map(R=>({name:`a_${R}`,type:"Float32",components:y==="color"?2:1,offset:0})),this.paintVertexArray=new S}populatePaintArray(l,h,y,S,R){const D=this.paintVertexArray.length,$=this.expression.evaluate(new Hr(0),h,{},S,[],R);this.paintVertexArray.resize(l),this._setPaintValue(D,l,$)}updatePaintArray(l,h,y,S){const R=this.expression.evaluate({zoom:0},y,S);this._setPaintValue(l,h,R)}_setPaintValue(l,h,y){if(this.type==="color"){const S=Ww(y);for(let R=l;R<h;R++)this.paintVertexArray.emplace(R,S[0],S[1])}else{for(let S=l;S<h;S++)this.paintVertexArray.emplace(S,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 Es{constructor(l,h,y,S,R,D){this.expression=l,this.uniformNames=h.map($=>`u_${$}_t`),this.type=y,this.useIntegerZoom=S,this.zoom=R,this.maxValue=0,this.paintVertexAttributes=h.map($=>({name:`a_${$}`,type:"Float32",components:y==="color"?4:2,offset:0})),this.paintVertexArray=new D}populatePaintArray(l,h,y,S,R){const D=this.expression.evaluate(new Hr(this.zoom),h,{},S,[],R),$=this.expression.evaluate(new Hr(this.zoom+1),h,{},S,[],R),U=this.paintVertexArray.length;this.paintVertexArray.resize(l),this._setPaintValue(U,l,D,$)}updatePaintArray(l,h,y,S){const R=this.expression.evaluate({zoom:this.zoom},y,S),D=this.expression.evaluate({zoom:this.zoom+1},y,S);this._setPaintValue(l,h,R,D)}_setPaintValue(l,h,y,S){if(this.type==="color"){const R=Ww(y),D=Ww(S);for(let $=l;$<h;$++)this.paintVertexArray.emplace($,R[0],R[1],D[0],D[1])}else{for(let R=l;R<h;R++)this.paintVertexArray.emplace(R,y,S);this.maxValue=Math.max(this.maxValue,Math.abs(y),Math.abs(S))}}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,S=v(this.expression.interpolationFactor(y,this.zoom,this.zoom+1),0,1);l.set(S)}getBinding(l,h,y){return new zl(l,h)}}class Lu{constructor(l,h,y,S,R,D){this.expression=l,this.type=h,this.useIntegerZoom=y,this.zoom=S,this.layerId=D,this.zoomInPaintVertexArray=new R,this.zoomOutPaintVertexArray=new R}populatePaintArray(l,h,y){const S=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(l),this.zoomOutPaintVertexArray.resize(l),this._setPaintValues(S,l,h.patterns&&h.patterns[this.layerId],y)}updatePaintArray(l,h,y,S,R){this._setPaintValues(l,h,y.patterns&&y.patterns[this.layerId],R)}_setPaintValues(l,h,y,S){if(!S||!y)return;const{min:R,mid:D,max:$}=y,U=S[R],W=S[D],te=S[$];if(U&&W&&te)for(let ae=l;ae<h;ae++)this.zoomInPaintVertexArray.emplace(ae,W.tl[0],W.tl[1],W.br[0],W.br[1],U.tl[0],U.tl[1],U.br[0],U.br[1],W.pixelRatio,U.pixelRatio),this.zoomOutPaintVertexArray.emplace(ae,W.tl[0],W.tl[1],W.br[0],W.br[1],te.tl[0],te.tl[1],te.br[0],te.br[1],W.pixelRatio,te.pixelRatio)}upload(l){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=l.createVertexBuffer(this.zoomInPaintVertexArray,Ai.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=l.createVertexBuffer(this.zoomOutPaintVertexArray,Ai.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Sk{constructor(l,h,y){this.binders={},this._buffers=[];const S=[];for(const R in l.paint._values){if(!y(R))continue;const D=l.paint.get(R);if(!(D instanceof ja&&zr(D.property.specification)))continue;const $=RK(R,l.type),U=D.value,W=D.property.specification.type,te=D.property.useIntegerZoom,ae=D.property.specification["property-type"],de=ae==="cross-faded"||ae==="cross-faded-data-driven";if(U.kind==="constant")this.binders[R]=de?new Hf(U.value,$):new cm(U.value,$,W),S.push(`/u_${R}`);else if(U.kind==="source"||de){const ge=Ek(R,W,"source");this.binders[R]=de?new Lu(U,W,te,h,ge,l.id):new $l(U,$,W,ge),S.push(`/a_${R}`)}else{const ge=Ek(R,W,"composite");this.binders[R]=new Es(U,$,W,te,h,ge),S.push(`/z_${R}`)}}this.cacheKey=S.sort().join("")}getMaxValue(l){const h=this.binders[l];return h instanceof $l||h instanceof Es?h.maxValue:0}populatePaintArrays(l,h,y,S,R){for(const D in this.binders){const $=this.binders[D];($ instanceof $l||$ instanceof Es||$ instanceof Lu)&&$.populatePaintArray(l,h,y,S,R)}}setConstantPatternPositions(l,h){for(const y in this.binders){const S=this.binders[y];S instanceof Hf&&S.setConstantPatternPositions(l,h)}}updatePaintArrays(l,h,y,S,R){let D=!1;for(const $ in l){const U=h.getPositions($);for(const W of U){const te=y.feature(W.index);for(const ae in this.binders){const de=this.binders[ae];if((de instanceof $l||de instanceof Es||de instanceof Lu)&&de.expression.isStateDependent===!0){const ge=S.paint.get(ae);de.expression=ge.value,de.updatePaintArray(W.start,W.end,te,l[$],R),D=!0}}}}return D}defines(){const l=[];for(const h in this.binders){const y=this.binders[h];(y instanceof cm||y instanceof Hf)&&l.push(...y.uniformNames.map(S=>`#define HAS_UNIFORM_${S}`))}return l}getBinderAttributes(){const l=[];for(const h in this.binders){const y=this.binders[h];if(y instanceof $l||y instanceof Es)for(let S=0;S<y.paintVertexAttributes.length;S++)l.push(y.paintVertexAttributes[S].name);else if(y instanceof Lu)for(let S=0;S<Ai.members.length;S++)l.push(Ai.members[S].name)}return l}getBinderUniforms(){const l=[];for(const h in this.binders){const y=this.binders[h];if(y instanceof cm||y instanceof Hf||y instanceof Es)for(const S of y.uniformNames)l.push(S)}return l}getPaintVertexBuffers(){return this._buffers}getUniforms(l,h){const y=[];for(const S in this.binders){const R=this.binders[S];if(R instanceof cm||R instanceof Hf||R instanceof Es){for(const D of R.uniformNames)if(h[D]){const $=R.getBinding(l,h[D],D);y.push({name:D,property:S,binding:$})}}}return y}setUniforms(l,h,y,S){for(const{name:R,property:D,binding:$}of h)this.binders[D].setUniform($,S,y.get(D),R)}updatePaintBuffers(l){this._buffers=[];for(const h in this.binders){const y=this.binders[h];if(l&&y instanceof Lu){const S=l.fromScale===2?y.zoomInPaintVertexBuffer:y.zoomOutPaintVertexBuffer;S&&this._buffers.push(S)}else(y instanceof $l||y instanceof Es)&&y.paintVertexBuffer&&this._buffers.push(y.paintVertexBuffer)}}upload(l){for(const h in this.binders){const y=this.binders[h];(y instanceof $l||y instanceof Es||y instanceof Lu)&&y.upload(l)}this.updatePaintBuffers()}destroy(){for(const l in this.binders){const h=this.binders[l];(h instanceof $l||h instanceof Es||h instanceof Lu)&&h.destroy()}}}class sd{constructor(l,h,y=()=>!0){this.programConfigurations={};for(const S of l)this.programConfigurations[S.id]=new Sk(S,h,y);this.needsUpload=!1,this._featureMap=new Nu,this._bufferOffset=0}populatePaintArrays(l,h,y,S,R,D){for(const $ in this.programConfigurations)this.programConfigurations[$].populatePaintArrays(l,h,S,R,D);h.id!==void 0&&this._featureMap.add(h.id,y,this._bufferOffset,l),this._bufferOffset=l,this.needsUpload=!0}updatePaintArrays(l,h,y,S){for(const R of y)this.needsUpload=this.programConfigurations[R.id].updatePaintArrays(l,this._featureMap,h,R,S)||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 RK(f,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"]}[f]||[f.replace(`${l}-`,"").replace(/-/g,"_")]}function Ek(f,l,h){const y={color:{source:b,composite:vt},number:{source:Ie,composite:b}},S=function(R){return{"line-pattern":{source:Ri,composite:Ri},"fill-pattern":{source:Ri,composite:Ri},"fill-extrusion-pattern":{source:Ri,composite:Ri}}[R]}(f);return S&&S[h]||y[l][h]}yn("ConstantBinder",cm),yn("CrossFadedConstantBinder",Hf),yn("SourceExpressionBinder",$l),yn("CrossFadedCompositeBinder",Lu),yn("CompositeExpressionBinder",Es),yn("ProgramConfiguration",Sk,{omit:["_buffers"]}),yn("ProgramConfigurationSet",sd);var Ei=8192;const Gw=Math.pow(2,14)-1,Pk=-Gw-1;function ld(f){const l=Ei/f.extent,h=f.loadGeometry();for(let y=0;y<h.length;y++){const S=h[y];for(let R=0;R<S.length;R++){const D=S[R],$=Math.round(D.x*l),U=Math.round(D.y*l);D.x=v($,Pk,Gw),D.y=v(U,Pk,Gw),($<D.x||$>D.x+1||U<D.y||U>D.y+1)&&L("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function ud(f,l){return{type:f.type,id:f.id,properties:f.properties,geometry:l?ld(f):[]}}function ny(f,l,h,y,S){f.emplaceBack(2*l+(y+1)/2,2*h+(S+1)/2)}class qw{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 vr,this.indexArray=new bo,this.segments=new Jn,this.programConfigurations=new sd(l.layers,l.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){const S=this.layers[0],R=[];let D=null,$=!1;S.type==="circle"&&(D=S.layout.get("circle-sort-key"),$=!D.isConstant());for(const{feature:U,id:W,index:te,sourceLayerIndex:ae}of l){const de=this.layers[0]._featureFilter.needGeometry,ge=ud(U,de);if(!this.layers[0]._featureFilter.filter(new Hr(this.zoom),ge,y))continue;const ve=$?D.evaluate(ge,{},y):void 0,Fe={id:W,properties:U.properties,type:U.type,sourceLayerIndex:ae,index:te,geometry:de?ge.geometry:ld(U),patterns:{},sortKey:ve};R.push(Fe)}$&&R.sort((U,W)=>U.sortKey-W.sortKey);for(const U of R){const{geometry:W,index:te,sourceLayerIndex:ae}=U,de=l[te].feature;this.addFeature(U,W,te,y),h.featureIndex.insert(de,W,te,ae,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,Si),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,S){for(const R of h)for(const D of R){const $=D.x,U=D.y;if($<0||$>=Ei||U<0||U>=Ei)continue;const W=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,l.sortKey),te=W.vertexLength;ny(this.layoutVertexArray,$,U,-1,-1),ny(this.layoutVertexArray,$,U,1,-1),ny(this.layoutVertexArray,$,U,1,1),ny(this.layoutVertexArray,$,U,-1,1),this.indexArray.emplaceBack(te,te+1,te+2),this.indexArray.emplaceBack(te,te+3,te+2),W.vertexLength+=4,W.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,{},S)}}function Ik(f,l){for(let h=0;h<f.length;h++)if(Kf(l,f[h]))return!0;for(let h=0;h<l.length;h++)if(Kf(f,l[h]))return!0;return!!Zw(f,l)}function AK(f,l,h){return!!Kf(f,l)||!!Xw(l,f,h)}function Tk(f,l){if(f.length===1)return Mk(l,f[0]);for(let h=0;h<l.length;h++){const y=l[h];for(let S=0;S<y.length;S++)if(Kf(f,y[S]))return!0}for(let h=0;h<f.length;h++)if(Mk(l,f[h]))return!0;for(let h=0;h<l.length;h++)if(Zw(f,l[h]))return!0;return!1}function DK(f,l,h){if(f.length>1){if(Zw(f,l))return!0;for(let y=0;y<l.length;y++)if(Xw(l[y],f,h))return!0}for(let y=0;y<f.length;y++)if(Xw(f[y],l,h))return!0;return!1}function Zw(f,l){if(f.length===0||l.length===0)return!1;for(let h=0;h<f.length-1;h++){const y=f[h],S=f[h+1];for(let R=0;R<l.length-1;R++)if(OK(y,S,l[R],l[R+1]))return!0}return!1}function OK(f,l,h,y){return F(f,h,y)!==F(l,h,y)&&F(f,l,h)!==F(f,l,y)}function Xw(f,l,h){const y=h*h;if(l.length===1)return f.distSqr(l[0])<y;for(let S=1;S<l.length;S++)if(kk(f,l[S-1],l[S])<y)return!0;return!1}function kk(f,l,h){const y=l.distSqr(h);if(y===0)return f.distSqr(l);const S=((f.x-l.x)*(h.x-l.x)+(f.y-l.y)*(h.y-l.y))/y;return f.distSqr(S<0?l:S>1?h:h.sub(l)._mult(S)._add(l))}function Mk(f,l){let h,y,S,R=!1;for(let D=0;D<f.length;D++){h=f[D];for(let $=0,U=h.length-1;$<h.length;U=$++)y=h[$],S=h[U],y.y>l.y!=S.y>l.y&&l.x<(S.x-y.x)*(l.y-y.y)/(S.y-y.y)+y.x&&(R=!R)}return R}function Kf(f,l){let h=!1;for(let y=0,S=f.length-1;y<f.length;S=y++){const R=f[y],D=f[S];R.y>l.y!=D.y>l.y&&l.x<(D.x-R.x)*(l.y-R.y)/(D.y-R.y)+R.x&&(h=!h)}return h}function NK(f,l,h){const y=h[0],S=h[2];if(f.x<y.x&&l.x<y.x||f.x>S.x&&l.x>S.x||f.y<y.y&&l.y<y.y||f.y>S.y&&l.y>S.y)return!1;const R=F(f,l,h[0]);return R!==F(f,l,h[1])||R!==F(f,l,h[2])||R!==F(f,l,h[3])}function dm(f,l,h){const y=l.paint.get(f).value;return y.kind==="constant"?y.value:h.programConfigurations.get(l.id).getMaxValue(f)}function ry(f){return Math.sqrt(f[0]*f[0]+f[1]*f[1])}function iy(f,l,h,y,S){if(!l[0]&&!l[1])return f;const R=ne.convert(l)._mult(S);h==="viewport"&&R._rotate(-y);const D=[];for(let $=0;$<f.length;$++)D.push(f[$].sub(R));return D}yn("CircleBucket",qw,{omit:["layers"]});const LK=new ji({"circle-sort-key":new Dn(Ve.layout_circle["circle-sort-key"])});var FK={paint:new ji({"circle-radius":new Dn(Ve.paint_circle["circle-radius"]),"circle-color":new Dn(Ve.paint_circle["circle-color"]),"circle-blur":new Dn(Ve.paint_circle["circle-blur"]),"circle-opacity":new Dn(Ve.paint_circle["circle-opacity"]),"circle-translate":new wn(Ve.paint_circle["circle-translate"]),"circle-translate-anchor":new wn(Ve.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new wn(Ve.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new wn(Ve.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Dn(Ve.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Dn(Ve.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Dn(Ve.paint_circle["circle-stroke-opacity"])}),layout:LK},_o=1e-6,wo=typeof Float32Array<"u"?Float32Array:Array;function Rk(){var f=new wo(9);return wo!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[5]=0,f[6]=0,f[7]=0),f[0]=1,f[4]=1,f[8]=1,f}function Yw(f){return f[0]=1,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=1,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=1,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f}function Ak(f,l,h){var y=l[0],S=l[1],R=l[2],D=l[3],$=l[4],U=l[5],W=l[6],te=l[7],ae=l[8],de=l[9],ge=l[10],ve=l[11],Fe=l[12],Ne=l[13],it=l[14],yt=l[15],Ye=h[0],pt=h[1],Ot=h[2],At=h[3];return f[0]=Ye*y+pt*$+Ot*ae+At*Fe,f[1]=Ye*S+pt*U+Ot*de+At*Ne,f[2]=Ye*R+pt*W+Ot*ge+At*it,f[3]=Ye*D+pt*te+Ot*ve+At*yt,f[4]=(Ye=h[4])*y+(pt=h[5])*$+(Ot=h[6])*ae+(At=h[7])*Fe,f[5]=Ye*S+pt*U+Ot*de+At*Ne,f[6]=Ye*R+pt*W+Ot*ge+At*it,f[7]=Ye*D+pt*te+Ot*ve+At*yt,f[8]=(Ye=h[8])*y+(pt=h[9])*$+(Ot=h[10])*ae+(At=h[11])*Fe,f[9]=Ye*S+pt*U+Ot*de+At*Ne,f[10]=Ye*R+pt*W+Ot*ge+At*it,f[11]=Ye*D+pt*te+Ot*ve+At*yt,f[12]=(Ye=h[12])*y+(pt=h[13])*$+(Ot=h[14])*ae+(At=h[15])*Fe,f[13]=Ye*S+pt*U+Ot*de+At*Ne,f[14]=Ye*R+pt*W+Ot*ge+At*it,f[15]=Ye*D+pt*te+Ot*ve+At*yt,f}Math.hypot||(Math.hypot=function(){for(var f=0,l=arguments.length;l--;)f+=arguments[l]*arguments[l];return Math.sqrt(f)});var fm,zK=Ak;function Dk(){var f=new wo(3);return wo!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0),f}function Ok(f,l,h){var y=new wo(3);return y[0]=f,y[1]=l,y[2]=h,y}function oy(f,l,h){var y=l[0],S=l[1],R=l[2],D=l[3];return f[0]=h[0]*y+h[4]*S+h[8]*R+h[12]*D,f[1]=h[1]*y+h[5]*S+h[9]*R+h[13]*D,f[2]=h[2]*y+h[6]*S+h[10]*R+h[14]*D,f[3]=h[3]*y+h[7]*S+h[11]*R+h[15]*D,f}function Nk(){var f=new wo(4);return wo!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0),f[3]=1,f}function Lk(f,l){const h=oy([],[f.x,f.y,0,1],l);return new ne(h[0]/h[3],h[1]/h[3])}Dk(),fm=new wo(4),wo!=Float32Array&&(fm[0]=0,fm[1]=0,fm[2]=0,fm[3]=0),Dk(),Ok(1,0,0),Ok(0,1,0),Nk(),Nk(),Rk(),function(){var f;f=new wo(2),wo!=Float32Array&&(f[0]=0,f[1]=0)}();class Fk extends qw{}yn("HeatmapBucket",Fk,{omit:["layers"]});var $K={paint:new ji({"heatmap-radius":new Dn(Ve.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Dn(Ve.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new wn(Ve.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ys(Ve.paint_heatmap["heatmap-color"]),"heatmap-opacity":new wn(Ve.paint_heatmap["heatmap-opacity"])})};function Qw(f,{width:l,height:h},y,S){if(S){if(S instanceof Uint8ClampedArray)S=new Uint8Array(S.buffer);else if(S.length!==l*h*y)throw new RangeError(`mismatched image size. expected: ${S.length} but got: ${l*h*y}`)}else S=new Uint8Array(l*h*y);return f.width=l,f.height=h,f.data=S,f}function zk(f,{width:l,height:h},y){if(l===f.width&&h===f.height)return;const S=Qw({},{width:l,height:h},y);Jw(f,S,{x:0,y:0},{x:0,y:0},{width:Math.min(f.width,l),height:Math.min(f.height,h)},y),f.width=l,f.height=h,f.data=S.data}function Jw(f,l,h,y,S,R){if(S.width===0||S.height===0)return l;if(S.width>f.width||S.height>f.height||h.x>f.width-S.width||h.y>f.height-S.height)throw new RangeError("out of range source coordinates for image copy");if(S.width>l.width||S.height>l.height||y.x>l.width-S.width||y.y>l.height-S.height)throw new RangeError("out of range destination coordinates for image copy");const D=f.data,$=l.data;if(D===$)throw new Error("srcData equals dstData, so image is already copied");for(let U=0;U<S.height;U++){const W=((h.y+U)*f.width+h.x)*R,te=((y.y+U)*l.width+y.x)*R;for(let ae=0;ae<S.width*R;ae++)$[te+ae]=D[W+ae]}return l}class hm{constructor(l,h){Qw(this,l,1,h)}resize(l){zk(this,l,1)}clone(){return new hm({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(l,h,y,S,R){Jw(l,h,y,S,R,1)}}class ba{constructor(l,h){Qw(this,l,4,h)}resize(l){zk(this,l,4)}replace(l,h){h?this.data.set(l):this.data=l instanceof Uint8ClampedArray?new Uint8Array(l.buffer):l}clone(){return new ba({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(l,h,y,S,R){Jw(l,h,y,S,R,4)}}function $k(f){const l={},h=f.resolution||256,y=f.clips?f.clips.length:1,S=f.image||new ba({width:h,height:y});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const R=(D,$,U)=>{l[f.evaluationKey]=U;const W=f.expression.evaluate(l);S.data[D+$+0]=Math.floor(255*W.r/W.a),S.data[D+$+1]=Math.floor(255*W.g/W.a),S.data[D+$+2]=Math.floor(255*W.b/W.a),S.data[D+$+3]=Math.floor(255*W.a)};if(f.clips)for(let D=0,$=0;D<y;++D,$+=4*h)for(let U=0,W=0;U<h;U++,W+=4){const te=U/(h-1),{start:ae,end:de}=f.clips[D];R($,W,ae*(1-te)+de*te)}else for(let D=0,$=0;D<h;D++,$+=4)R(0,$,D/(h-1));return S}yn("AlphaImage",hm),yn("RGBAImage",ba);var BK={paint:new ji({"hillshade-illumination-direction":new wn(Ve.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new wn(Ve.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new wn(Ve.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new wn(Ve.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new wn(Ve.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new wn(Ve.paint_hillshade["hillshade-accent-color"])})};const VK=gi([{name:"a_pos",components:2,type:"Int16"}],4),{members:UK}=VK;var ay={exports:{}};function sy(f,l,h){h=h||2;var y,S,R,D,$,U,W,te=l&&l.length,ae=te?l[0]*h:f.length,de=Bk(f,0,ae,h,!0),ge=[];if(!de||de.next===de.prev)return ge;if(te&&(de=function(Fe,Ne,it,yt){var Ye,pt,Ot,At=[];for(Ye=0,pt=Ne.length;Ye<pt;Ye++)(Ot=Bk(Fe,Ne[Ye]*yt,Ye<pt-1?Ne[Ye+1]*yt:Fe.length,yt,!1))===Ot.next&&(Ot.steiner=!0),At.push(XK(Ot));for(At.sort(GK),Ye=0;Ye<At.length;Ye++)it=qK(At[Ye],it);return it}(f,l,de,h)),f.length>80*h){y=R=f[0],S=D=f[1];for(var ve=h;ve<ae;ve+=h)($=f[ve])<y&&(y=$),(U=f[ve+1])<S&&(S=U),$>R&&(R=$),U>D&&(D=U);W=(W=Math.max(R-y,D-S))!==0?32767/W:0}return pm(de,ge,h,y,S,W,0),ge}function Bk(f,l,h,y,S){var R,D;if(S===n4(f,l,h,y)>0)for(R=l;R<h;R+=y)D=jk(R,f[R],f[R+1],D);else for(R=h-y;R>=l;R-=y)D=jk(R,f[R],f[R+1],D);return D&&ly(D,D.next)&&(gm(D),D=D.next),D}function cd(f,l){if(!f)return f;l||(l=f);var h,y=f;do if(h=!1,y.steiner||!ly(y,y.next)&&fi(y.prev,y,y.next)!==0)y=y.next;else{if(gm(y),(y=l=y.prev)===y.next)break;h=!0}while(h||y!==l);return l}function pm(f,l,h,y,S,R,D){if(f){!D&&R&&function(te,ae,de,ge){var ve=te;do ve.z===0&&(ve.z=e4(ve.x,ve.y,ae,de,ge)),ve.prevZ=ve.prev,ve.nextZ=ve.next,ve=ve.next;while(ve!==te);ve.prevZ.nextZ=null,ve.prevZ=null,function(Fe){var Ne,it,yt,Ye,pt,Ot,At,gn,_n=1;do{for(it=Fe,Fe=null,pt=null,Ot=0;it;){for(Ot++,yt=it,At=0,Ne=0;Ne<_n&&(At++,yt=yt.nextZ);Ne++);for(gn=_n;At>0||gn>0&&yt;)At!==0&&(gn===0||!yt||it.z<=yt.z)?(Ye=it,it=it.nextZ,At--):(Ye=yt,yt=yt.nextZ,gn--),pt?pt.nextZ=Ye:Fe=Ye,Ye.prevZ=pt,pt=Ye;it=yt}pt.nextZ=null,_n*=2}while(Ot>1)}(ve)}(f,y,S,R);for(var $,U,W=f;f.prev!==f.next;)if($=f.prev,U=f.next,R?HK(f,y,S,R):jK(f))l.push($.i/h|0),l.push(f.i/h|0),l.push(U.i/h|0),gm(f),f=U.next,W=U.next;else if((f=U)===W){D?D===1?pm(f=KK(cd(f),l,h),l,h,y,S,R,2):D===2&&WK(f,l,h,y,S,R):pm(cd(f),l,h,y,S,R,1);break}}}function jK(f){var l=f.prev,h=f,y=f.next;if(fi(l,h,y)>=0)return!1;for(var S=l.x,R=h.x,D=y.x,$=l.y,U=h.y,W=y.y,te=S<R?S<D?S:D:R<D?R:D,ae=$<U?$<W?$:W:U<W?U:W,de=S>R?S>D?S:D:R>D?R:D,ge=$>U?$>W?$:W:U>W?U:W,ve=y.next;ve!==l;){if(ve.x>=te&&ve.x<=de&&ve.y>=ae&&ve.y<=ge&&Wf(S,$,R,U,D,W,ve.x,ve.y)&&fi(ve.prev,ve,ve.next)>=0)return!1;ve=ve.next}return!0}function HK(f,l,h,y){var S=f.prev,R=f,D=f.next;if(fi(S,R,D)>=0)return!1;for(var $=S.x,U=R.x,W=D.x,te=S.y,ae=R.y,de=D.y,ge=$<U?$<W?$:W:U<W?U:W,ve=te<ae?te<de?te:de:ae<de?ae:de,Fe=$>U?$>W?$:W:U>W?U:W,Ne=te>ae?te>de?te:de:ae>de?ae:de,it=e4(ge,ve,l,h,y),yt=e4(Fe,Ne,l,h,y),Ye=f.prevZ,pt=f.nextZ;Ye&&Ye.z>=it&&pt&&pt.z<=yt;){if(Ye.x>=ge&&Ye.x<=Fe&&Ye.y>=ve&&Ye.y<=Ne&&Ye!==S&&Ye!==D&&Wf($,te,U,ae,W,de,Ye.x,Ye.y)&&fi(Ye.prev,Ye,Ye.next)>=0||(Ye=Ye.prevZ,pt.x>=ge&&pt.x<=Fe&&pt.y>=ve&&pt.y<=Ne&&pt!==S&&pt!==D&&Wf($,te,U,ae,W,de,pt.x,pt.y)&&fi(pt.prev,pt,pt.next)>=0))return!1;pt=pt.nextZ}for(;Ye&&Ye.z>=it;){if(Ye.x>=ge&&Ye.x<=Fe&&Ye.y>=ve&&Ye.y<=Ne&&Ye!==S&&Ye!==D&&Wf($,te,U,ae,W,de,Ye.x,Ye.y)&&fi(Ye.prev,Ye,Ye.next)>=0)return!1;Ye=Ye.prevZ}for(;pt&&pt.z<=yt;){if(pt.x>=ge&&pt.x<=Fe&&pt.y>=ve&&pt.y<=Ne&&pt!==S&&pt!==D&&Wf($,te,U,ae,W,de,pt.x,pt.y)&&fi(pt.prev,pt,pt.next)>=0)return!1;pt=pt.nextZ}return!0}function KK(f,l,h){var y=f;do{var S=y.prev,R=y.next.next;!ly(S,R)&&Vk(S,y,y.next,R)&&mm(S,R)&&mm(R,S)&&(l.push(S.i/h|0),l.push(y.i/h|0),l.push(R.i/h|0),gm(y),gm(y.next),y=f=R),y=y.next}while(y!==f);return cd(y)}function WK(f,l,h,y,S,R){var D=f;do{for(var $=D.next.next;$!==D.prev;){if(D.i!==$.i&&YK(D,$)){var U=Uk(D,$);return D=cd(D,D.next),U=cd(U,U.next),pm(D,l,h,y,S,R,0),void pm(U,l,h,y,S,R,0)}$=$.next}D=D.next}while(D!==f)}function GK(f,l){return f.x-l.x}function qK(f,l){var h=function(S,R){var D,$=R,U=S.x,W=S.y,te=-1/0;do{if(W<=$.y&&W>=$.next.y&&$.next.y!==$.y){var ae=$.x+(W-$.y)*($.next.x-$.x)/($.next.y-$.y);if(ae<=U&&ae>te&&(te=ae,D=$.x<$.next.x?$:$.next,ae===U))return D}$=$.next}while($!==R);if(!D)return null;var de,ge=D,ve=D.x,Fe=D.y,Ne=1/0;$=D;do U>=$.x&&$.x>=ve&&U!==$.x&&Wf(W<Fe?U:te,W,ve,Fe,W<Fe?te:U,W,$.x,$.y)&&(de=Math.abs(W-$.y)/(U-$.x),mm($,S)&&(de<Ne||de===Ne&&($.x>D.x||$.x===D.x&&ZK(D,$)))&&(D=$,Ne=de)),$=$.next;while($!==ge);return D}(f,l);if(!h)return l;var y=Uk(h,f);return cd(y,y.next),cd(h,h.next)}function ZK(f,l){return fi(f.prev,f,l.prev)<0&&fi(l.next,f,f.next)<0}function e4(f,l,h,y,S){return(f=1431655765&((f=858993459&((f=252645135&((f=16711935&((f=(f-h)*S|0)|f<<8))|f<<4))|f<<2))|f<<1))|(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=(l-y)*S|0)|l<<8))|l<<4))|l<<2))|l<<1))<<1}function XK(f){var l=f,h=f;do(l.x<h.x||l.x===h.x&&l.y<h.y)&&(h=l),l=l.next;while(l!==f);return h}function Wf(f,l,h,y,S,R,D,$){return(S-D)*(l-$)>=(f-D)*(R-$)&&(f-D)*(y-$)>=(h-D)*(l-$)&&(h-D)*(R-$)>=(S-D)*(y-$)}function YK(f,l){return f.next.i!==l.i&&f.prev.i!==l.i&&!function(h,y){var S=h;do{if(S.i!==h.i&&S.next.i!==h.i&&S.i!==y.i&&S.next.i!==y.i&&Vk(S,S.next,h,y))return!0;S=S.next}while(S!==h);return!1}(f,l)&&(mm(f,l)&&mm(l,f)&&function(h,y){var S=h,R=!1,D=(h.x+y.x)/2,$=(h.y+y.y)/2;do S.y>$!=S.next.y>$&&S.next.y!==S.y&&D<(S.next.x-S.x)*($-S.y)/(S.next.y-S.y)+S.x&&(R=!R),S=S.next;while(S!==h);return R}(f,l)&&(fi(f.prev,f,l.prev)||fi(f,l.prev,l))||ly(f,l)&&fi(f.prev,f,f.next)>0&&fi(l.prev,l,l.next)>0)}function fi(f,l,h){return(l.y-f.y)*(h.x-l.x)-(l.x-f.x)*(h.y-l.y)}function ly(f,l){return f.x===l.x&&f.y===l.y}function Vk(f,l,h,y){var S=cy(fi(f,l,h)),R=cy(fi(f,l,y)),D=cy(fi(h,y,f)),$=cy(fi(h,y,l));return S!==R&&D!==$||!(S!==0||!uy(f,h,l))||!(R!==0||!uy(f,y,l))||!(D!==0||!uy(h,f,y))||!($!==0||!uy(h,l,y))}function uy(f,l,h){return l.x<=Math.max(f.x,h.x)&&l.x>=Math.min(f.x,h.x)&&l.y<=Math.max(f.y,h.y)&&l.y>=Math.min(f.y,h.y)}function cy(f){return f>0?1:f<0?-1:0}function mm(f,l){return fi(f.prev,f,f.next)<0?fi(f,l,f.next)>=0&&fi(f,f.prev,l)>=0:fi(f,l,f.prev)<0||fi(f,f.next,l)<0}function Uk(f,l){var h=new t4(f.i,f.x,f.y),y=new t4(l.i,l.x,l.y),S=f.next,R=l.prev;return f.next=l,l.prev=f,h.next=S,S.prev=h,y.next=h,h.prev=y,R.next=y,y.prev=R,y}function jk(f,l,h,y){var S=new t4(f,l,h);return y?(S.next=y.next,S.prev=y,y.next.prev=S,y.next=S):(S.prev=S,S.next=S),S}function gm(f){f.next.prev=f.prev,f.prev.next=f.next,f.prevZ&&(f.prevZ.nextZ=f.nextZ),f.nextZ&&(f.nextZ.prevZ=f.prevZ)}function t4(f,l,h){this.i=f,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 n4(f,l,h,y){for(var S=0,R=l,D=h-y;R<h;R+=y)S+=(f[D]-f[R])*(f[R+1]+f[D+1]),D=R;return S}function QK(f,l,h,y,S){Hk(f,l,h||0,y||f.length-1,S||JK)}function Hk(f,l,h,y,S){for(;y>h;){if(y-h>600){var R=y-h+1,D=l-h+1,$=Math.log(R),U=.5*Math.exp(2*$/3),W=.5*Math.sqrt($*U*(R-U)/R)*(D-R/2<0?-1:1);Hk(f,l,Math.max(h,Math.floor(l-D*U/R+W)),Math.min(y,Math.floor(l+(R-D)*U/R+W)),S)}var te=f[l],ae=h,de=y;for(vm(f,h,l),S(f[y],te)>0&&vm(f,h,y);ae<de;){for(vm(f,ae,de),ae++,de--;S(f[ae],te)<0;)ae++;for(;S(f[de],te)>0;)de--}S(f[h],te)===0?vm(f,h,de):vm(f,++de,y),de<=l&&(h=de+1),l<=de&&(y=de-1)}}function vm(f,l,h){var y=f[l];f[l]=f[h],f[h]=y}function JK(f,l){return f<l?-1:f>l?1:0}function r4(f,l){const h=f.length;if(h<=1)return[f];const y=[];let S,R;for(let D=0;D<h;D++){const $=V(f[D]);$!==0&&(f[D].area=Math.abs($),R===void 0&&(R=$<0),R===$<0?(S&&y.push(S),S=[f[D]]):S.push(f[D]))}if(S&&y.push(S),l>1)for(let D=0;D<y.length;D++)y[D].length<=l||(QK(y[D],l,1,y[D].length-1,eW),y[D]=y[D].slice(0,l));return y}function eW(f,l){return l.area-f.area}function i4(f,l,h){const y=h.patternDependencies;let S=!1;for(const R of l){const D=R.paint.get(`${f}-pattern`);D.isConstant()||(S=!0);const $=D.constantOr(null);$&&(S=!0,y[$.to]=!0,y[$.from]=!0)}return S}function o4(f,l,h,y,S){const R=S.patternDependencies;for(const D of l){const $=D.paint.get(`${f}-pattern`).value;if($.kind!=="constant"){let U=$.evaluate({zoom:y-1},h,{},S.availableImages),W=$.evaluate({zoom:y},h,{},S.availableImages),te=$.evaluate({zoom:y+1},h,{},S.availableImages);U=U&&U.name?U.name:U,W=W&&W.name?W.name:W,te=te&&te.name?te.name:te,R[U]=!0,R[W]=!0,R[te]=!0,h.patterns[D.id]={min:U,mid:W,max:te}}}return h}ay.exports=sy,ay.exports.default=sy,sy.deviation=function(f,l,h,y){var S=l&&l.length,R=Math.abs(n4(f,0,S?l[0]*h:f.length,h));if(S)for(var D=0,$=l.length;D<$;D++)R-=Math.abs(n4(f,l[D]*h,D<$-1?l[D+1]*h:f.length,h));var U=0;for(D=0;D<y.length;D+=3){var W=y[D]*h,te=y[D+1]*h,ae=y[D+2]*h;U+=Math.abs((f[W]-f[ae])*(f[te+1]-f[W+1])-(f[W]-f[te])*(f[ae+1]-f[W+1]))}return R===0&&U===0?0:Math.abs((U-R)/R)},sy.flatten=function(f){for(var l=f[0][0].length,h={vertices:[],holes:[],dimensions:l},y=0,S=0;S<f.length;S++){for(var R=0;R<f[S].length;R++)for(var D=0;D<l;D++)h.vertices.push(f[S][R][D]);S>0&&h.holes.push(y+=f[S-1].length)}return h};class a4{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 yr,this.indexArray=new bo,this.indexArray2=new Ss,this.programConfigurations=new sd(l.layers,l.zoom),this.segments=new Jn,this.segments2=new Jn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.hasPattern=i4("fill",this.layers,h);const S=this.layers[0].layout.get("fill-sort-key"),R=!S.isConstant(),D=[];for(const{feature:$,id:U,index:W,sourceLayerIndex:te}of l){const ae=this.layers[0]._featureFilter.needGeometry,de=ud($,ae);if(!this.layers[0]._featureFilter.filter(new Hr(this.zoom),de,y))continue;const ge=R?S.evaluate(de,{},y,h.availableImages):void 0,ve={id:U,properties:$.properties,type:$.type,sourceLayerIndex:te,index:W,geometry:ae?de.geometry:ld($),patterns:{},sortKey:ge};D.push(ve)}R&&D.sort(($,U)=>$.sortKey-U.sortKey);for(const $ of D){const{geometry:U,index:W,sourceLayerIndex:te}=$;if(this.hasPattern){const ae=o4("fill",this.layers,$,this.zoom,h);this.patternFeatures.push(ae)}else this.addFeature($,U,W,y,{});h.featureIndex.insert(l[W].feature,U,W,te,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}addFeatures(l,h,y){for(const S of this.patternFeatures)this.addFeature(S,S.geometry,S.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,UK),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,S,R){for(const D of r4(h,500)){let $=0;for(const ge of D)$+=ge.length;const U=this.segments.prepareSegment($,this.layoutVertexArray,this.indexArray),W=U.vertexLength,te=[],ae=[];for(const ge of D){if(ge.length===0)continue;ge!==D[0]&&ae.push(te.length/2);const ve=this.segments2.prepareSegment(ge.length,this.layoutVertexArray,this.indexArray2),Fe=ve.vertexLength;this.layoutVertexArray.emplaceBack(ge[0].x,ge[0].y),this.indexArray2.emplaceBack(Fe+ge.length-1,Fe),te.push(ge[0].x),te.push(ge[0].y);for(let Ne=1;Ne<ge.length;Ne++)this.layoutVertexArray.emplaceBack(ge[Ne].x,ge[Ne].y),this.indexArray2.emplaceBack(Fe+Ne-1,Fe+Ne),te.push(ge[Ne].x),te.push(ge[Ne].y);ve.vertexLength+=ge.length,ve.primitiveLength+=ge.length}const de=ay.exports(te,ae);for(let ge=0;ge<de.length;ge+=3)this.indexArray.emplaceBack(W+de[ge],W+de[ge+1],W+de[ge+2]);U.vertexLength+=$,U.primitiveLength+=de.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,R,S)}}yn("FillBucket",a4,{omit:["layers","patternFeatures"]});const tW=new ji({"fill-sort-key":new Dn(Ve.layout_fill["fill-sort-key"])});var nW={paint:new ji({"fill-antialias":new wn(Ve.paint_fill["fill-antialias"]),"fill-opacity":new Dn(Ve.paint_fill["fill-opacity"]),"fill-color":new Dn(Ve.paint_fill["fill-color"]),"fill-outline-color":new Dn(Ve.paint_fill["fill-outline-color"]),"fill-translate":new wn(Ve.paint_fill["fill-translate"]),"fill-translate-anchor":new wn(Ve.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ou(Ve.paint_fill["fill-pattern"])}),layout:tW};const rW=gi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),iW=gi([{name:"a_centroid",components:2,type:"Int16"}],4),{members:oW}=rW;var Fu={},aW=ne,Kk=Gf;function Gf(f,l,h,y,S){this.properties={},this.extent=h,this.type=0,this._pbf=f,this._geometry=-1,this._keys=y,this._values=S,f.readFields(sW,this,l)}function sW(f,l,h){f==1?l.id=h.readVarint():f==2?function(y,S){for(var R=y.readVarint()+y.pos;y.pos<R;){var D=S._keys[y.readVarint()],$=S._values[y.readVarint()];S.properties[D]=$}}(h,l):f==3?l.type=h.readVarint():f==4&&(l._geometry=h.pos)}function lW(f){for(var l,h,y=0,S=0,R=f.length,D=R-1;S<R;D=S++)y+=((h=f[D]).x-(l=f[S]).x)*(l.y+h.y);return y}Gf.types=["Unknown","Point","LineString","Polygon"],Gf.prototype.loadGeometry=function(){var f=this._pbf;f.pos=this._geometry;for(var l,h=f.readVarint()+f.pos,y=1,S=0,R=0,D=0,$=[];f.pos<h;){if(S<=0){var U=f.readVarint();y=7&U,S=U>>3}if(S--,y===1||y===2)R+=f.readSVarint(),D+=f.readSVarint(),y===1&&(l&&$.push(l),l=[]),l.push(new aW(R,D));else{if(y!==7)throw new Error("unknown command "+y);l&&l.push(l[0].clone())}}return l&&$.push(l),$},Gf.prototype.bbox=function(){var f=this._pbf;f.pos=this._geometry;for(var l=f.readVarint()+f.pos,h=1,y=0,S=0,R=0,D=1/0,$=-1/0,U=1/0,W=-1/0;f.pos<l;){if(y<=0){var te=f.readVarint();h=7&te,y=te>>3}if(y--,h===1||h===2)(S+=f.readSVarint())<D&&(D=S),S>$&&($=S),(R+=f.readSVarint())<U&&(U=R),R>W&&(W=R);else if(h!==7)throw new Error("unknown command "+h)}return[D,U,$,W]},Gf.prototype.toGeoJSON=function(f,l,h){var y,S,R=this.extent*Math.pow(2,h),D=this.extent*f,$=this.extent*l,U=this.loadGeometry(),W=Gf.types[this.type];function te(ge){for(var ve=0;ve<ge.length;ve++){var Fe=ge[ve];ge[ve]=[360*(Fe.x+D)/R-180,360/Math.PI*Math.atan(Math.exp((180-360*(Fe.y+$)/R)*Math.PI/180))-90]}}switch(this.type){case 1:var ae=[];for(y=0;y<U.length;y++)ae[y]=U[y][0];te(U=ae);break;case 2:for(y=0;y<U.length;y++)te(U[y]);break;case 3:for(U=function(ge){var ve=ge.length;if(ve<=1)return[ge];for(var Fe,Ne,it=[],yt=0;yt<ve;yt++){var Ye=lW(ge[yt]);Ye!==0&&(Ne===void 0&&(Ne=Ye<0),Ne===Ye<0?(Fe&&it.push(Fe),Fe=[ge[yt]]):Fe.push(ge[yt]))}return Fe&&it.push(Fe),it}(U),y=0;y<U.length;y++)for(S=0;S<U[y].length;S++)te(U[y][S])}U.length===1?U=U[0]:W="Multi"+W;var de={type:"Feature",geometry:{type:W,coordinates:U},properties:this.properties};return"id"in this&&(de.id=this.id),de};var uW=Kk,Wk=Gk;function Gk(f,l){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=f,this._keys=[],this._values=[],this._features=[],f.readFields(cW,this,l),this.length=this._features.length}function cW(f,l,h){f===15?l.version=h.readVarint():f===1?l.name=h.readString():f===5?l.extent=h.readVarint():f===2?l._features.push(h.pos):f===3?l._keys.push(h.readString()):f===4&&l._values.push(function(y){for(var S=null,R=y.readVarint()+y.pos;y.pos<R;){var D=y.readVarint()>>3;S=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 S}(h))}Gk.prototype.feature=function(f){if(f<0||f>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[f];var l=this._pbf.readVarint()+this._pbf.pos;return new uW(this._pbf,l,this.extent,this._keys,this._values)};var dW=Wk;function fW(f,l,h){if(f===3){var y=new dW(h,h.readVarint()+h.pos);y.length&&(l[y.name]=y)}}Fu.VectorTile=function(f,l){this.layers=f.readFields(fW,{},l)},Fu.VectorTileFeature=Kk,Fu.VectorTileLayer=Wk;const hW=Fu.VectorTileFeature.types,s4=Math.pow(2,13);function ym(f,l,h,y,S,R,D,$){f.emplaceBack(l,h,2*Math.floor(y*s4)+D,S*s4*2,R*s4*2,Math.round($))}class l4{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 sr,this.centroidVertexArray=new kn,this.indexArray=new bo,this.programConfigurations=new sd(l.layers,l.zoom),this.segments=new Jn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.features=[],this.hasPattern=i4("fill-extrusion",this.layers,h);for(const{feature:S,id:R,index:D,sourceLayerIndex:$}of l){const U=this.layers[0]._featureFilter.needGeometry,W=ud(S,U);if(!this.layers[0]._featureFilter.filter(new Hr(this.zoom),W,y))continue;const te={id:R,sourceLayerIndex:$,index:D,geometry:U?W.geometry:ld(S),properties:S.properties,type:S.type,patterns:{}};this.hasPattern?this.features.push(o4("fill-extrusion",this.layers,te,this.zoom,h)):this.addFeature(te,te.geometry,D,y,{}),h.featureIndex.insert(S,te.geometry,D,$,this.index,!0)}}addFeatures(l,h,y){for(const S of this.features){const{geometry:R}=S;this.addFeature(S,R,S.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,oW),this.centroidVertexBuffer=l.createVertexBuffer(this.centroidVertexArray,iW.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,S,R){const D={x:0,y:0,vertexCount:0};for(const $ of r4(h,500)){let U=0;for(const ve of $)U+=ve.length;let W=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const ve of $){if(ve.length===0||mW(ve))continue;let Fe=0;for(let Ne=0;Ne<ve.length;Ne++){const it=ve[Ne];if(Ne>=1){const yt=ve[Ne-1];if(!pW(it,yt)){W.vertexLength+4>Jn.MAX_VERTEX_ARRAY_LENGTH&&(W=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ye=it.sub(yt)._perp()._unit(),pt=yt.dist(it);Fe+pt>32768&&(Fe=0),ym(this.layoutVertexArray,it.x,it.y,Ye.x,Ye.y,0,0,Fe),ym(this.layoutVertexArray,it.x,it.y,Ye.x,Ye.y,0,1,Fe),D.x+=2*it.x,D.y+=2*it.y,D.vertexCount+=2,Fe+=pt,ym(this.layoutVertexArray,yt.x,yt.y,Ye.x,Ye.y,0,0,Fe),ym(this.layoutVertexArray,yt.x,yt.y,Ye.x,Ye.y,0,1,Fe),D.x+=2*yt.x,D.y+=2*yt.y,D.vertexCount+=2;const Ot=W.vertexLength;this.indexArray.emplaceBack(Ot,Ot+2,Ot+1),this.indexArray.emplaceBack(Ot+1,Ot+2,Ot+3),W.vertexLength+=4,W.primitiveLength+=2}}}}if(W.vertexLength+U>Jn.MAX_VERTEX_ARRAY_LENGTH&&(W=this.segments.prepareSegment(U,this.layoutVertexArray,this.indexArray)),hW[l.type]!=="Polygon")continue;const te=[],ae=[],de=W.vertexLength;for(const ve of $)if(ve.length!==0){ve!==$[0]&&ae.push(te.length/2);for(let Fe=0;Fe<ve.length;Fe++){const Ne=ve[Fe];ym(this.layoutVertexArray,Ne.x,Ne.y,0,0,1,1,0),D.x+=Ne.x,D.y+=Ne.y,D.vertexCount+=1,te.push(Ne.x),te.push(Ne.y)}}const ge=ay.exports(te,ae);for(let ve=0;ve<ge.length;ve+=3)this.indexArray.emplaceBack(de+ge[ve],de+ge[ve+2],de+ge[ve+1]);W.primitiveLength+=ge.length/3,W.vertexLength+=U}for(let $=0;$<D.vertexCount;$++)this.centroidVertexArray.emplaceBack(Math.floor(D.x/D.vertexCount),Math.floor(D.y/D.vertexCount));this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,R,S)}}function pW(f,l){return f.x===l.x&&(f.x<0||f.x>Ei)||f.y===l.y&&(f.y<0||f.y>Ei)}function mW(f){return f.every(l=>l.x<0)||f.every(l=>l.x>Ei)||f.every(l=>l.y<0)||f.every(l=>l.y>Ei)}yn("FillExtrusionBucket",l4,{omit:["layers","features"]});var gW={paint:new ji({"fill-extrusion-opacity":new wn(Ve["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Dn(Ve["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new wn(Ve["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new wn(Ve["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ou(Ve["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Dn(Ve["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Dn(Ve["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new wn(Ve["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function xm(f,l){return f.x*l.x+f.y*l.y}function qk(f,l){if(f.length===1){let h=0;const y=l[h++];let S;for(;!S||y.equals(S);)if(S=l[h++],!S)return 1/0;for(;h<l.length;h++){const R=l[h],D=f[0],$=S.sub(y),U=R.sub(y),W=D.sub(y),te=xm($,$),ae=xm($,U),de=xm(U,U),ge=xm(W,$),ve=xm(W,U),Fe=te*de-ae*ae,Ne=(de*ge-ae*ve)/Fe,it=(te*ve-ae*ge)/Fe,yt=y.z*(1-Ne-it)+S.z*Ne+R.z*it;if(isFinite(yt))return yt}return 1/0}{let h=1/0;for(const y of l)h=Math.min(h,y.z);return h}}const vW=gi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:yW}=vW,xW=gi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:bW}=xW,_W=Fu.VectorTileFeature.types,wW=Math.cos(Math.PI/180*37.5),Zk=Math.pow(2,14)/.5;class u4{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 ur,this.layoutVertexArray2=new Cr,this.indexArray=new bo,this.programConfigurations=new sd(l.layers,l.zoom),this.segments=new Jn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.hasPattern=i4("line",this.layers,h);const S=this.layers[0].layout.get("line-sort-key"),R=!S.isConstant(),D=[];for(const{feature:$,id:U,index:W,sourceLayerIndex:te}of l){const ae=this.layers[0]._featureFilter.needGeometry,de=ud($,ae);if(!this.layers[0]._featureFilter.filter(new Hr(this.zoom),de,y))continue;const ge=R?S.evaluate(de,{},y):void 0,ve={id:U,properties:$.properties,type:$.type,sourceLayerIndex:te,index:W,geometry:ae?de.geometry:ld($),patterns:{},sortKey:ge};D.push(ve)}R&&D.sort(($,U)=>$.sortKey-U.sortKey);for(const $ of D){const{geometry:U,index:W,sourceLayerIndex:te}=$;if(this.hasPattern){const ae=o4("line",this.layers,$,this.zoom,h);this.patternFeatures.push(ae)}else this.addFeature($,U,W,y,{});h.featureIndex.insert(l[W].feature,U,W,te,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}addFeatures(l,h,y){for(const S of this.patternFeatures)this.addFeature(S,S.geometry,S.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,bW)),this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,yW),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,S,R){const D=this.layers[0].layout,$=D.get("line-join").evaluate(l,{}),U=D.get("line-cap"),W=D.get("line-miter-limit"),te=D.get("line-round-limit");this.lineClips=this.lineFeatureClips(l);for(const ae of h)this.addLine(ae,l,$,U,W,te);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,R,S)}addLine(l,h,y,S,R,D){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let it=0;it<l.length-1;it++)this.totalDistance+=l[it].dist(l[it+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const $=_W[h.type]==="Polygon";let U=l.length;for(;U>=2&&l[U-1].equals(l[U-2]);)U--;let W=0;for(;W<U-1&&l[W].equals(l[W+1]);)W++;if(U<($?3:2))return;y==="bevel"&&(R=1.05);const te=this.overscaling<=16?122880/(512*this.overscaling):0,ae=this.segments.prepareSegment(10*U,this.layoutVertexArray,this.indexArray);let de,ge,ve,Fe,Ne;this.e1=this.e2=-1,$&&(de=l[U-2],Ne=l[W].sub(de)._unit()._perp());for(let it=W;it<U;it++){if(ve=it===U-1?$?l[W+1]:void 0:l[it+1],ve&&l[it].equals(ve))continue;Ne&&(Fe=Ne),de&&(ge=de),de=l[it],Ne=ve?ve.sub(de)._unit()._perp():Fe,Fe=Fe||Ne;let yt=Fe.add(Ne);yt.x===0&&yt.y===0||yt._unit();const Ye=Fe.x*Ne.x+Fe.y*Ne.y,pt=yt.x*Ne.x+yt.y*Ne.y,Ot=pt!==0?1/pt:1/0,At=2*Math.sqrt(2-2*pt),gn=pt<wW&&ge&&ve,_n=Fe.x*Ne.y-Fe.y*Ne.x>0;if(gn&&it>W){const en=de.dist(ge);if(en>2*te){const dn=de.sub(de.sub(ge)._mult(te/en)._round());this.updateDistance(ge,dn),this.addCurrentVertex(dn,Fe,0,0,ae),ge=dn}}const cn=ge&&ve;let on=cn?y:$?"butt":S;if(cn&&on==="round"&&(Ot<D?on="miter":Ot<=2&&(on="fakeround")),on==="miter"&&Ot>R&&(on="bevel"),on==="bevel"&&(Ot>2&&(on="flipbevel"),Ot<R&&(on="miter")),ge&&this.updateDistance(ge,de),on==="miter")yt._mult(Ot),this.addCurrentVertex(de,yt,0,0,ae);else if(on==="flipbevel"){if(Ot>100)yt=Ne.mult(-1);else{const en=Ot*Fe.add(Ne).mag()/Fe.sub(Ne).mag();yt._perp()._mult(en*(_n?-1:1))}this.addCurrentVertex(de,yt,0,0,ae),this.addCurrentVertex(de,yt.mult(-1),0,0,ae)}else if(on==="bevel"||on==="fakeround"){const en=-Math.sqrt(Ot*Ot-1),dn=_n?en:0,an=_n?0:en;if(ge&&this.addCurrentVertex(de,Fe,dn,an,ae),on==="fakeround"){const Wt=Math.round(180*At/Math.PI/20);for(let Mn=1;Mn<Wt;Mn++){let Sn=Mn/Wt;if(Sn!==.5){const $r=Sn-.5;Sn+=Sn*$r*(Sn-1)*((1.0904+Ye*(Ye*(3.55645-1.43519*Ye)-3.2452))*$r*$r+(.848013+Ye*(.215638*Ye-1.06021)))}const Zn=Ne.sub(Fe)._mult(Sn)._add(Fe)._unit()._mult(_n?-1:1);this.addHalfVertex(de,Zn.x,Zn.y,!1,_n,0,ae)}}ve&&this.addCurrentVertex(de,Ne,-dn,-an,ae)}else if(on==="butt")this.addCurrentVertex(de,yt,0,0,ae);else if(on==="square"){const en=ge?1:-1;this.addCurrentVertex(de,yt,en,en,ae)}else on==="round"&&(ge&&(this.addCurrentVertex(de,Fe,0,0,ae),this.addCurrentVertex(de,Fe,1,1,ae,!0)),ve&&(this.addCurrentVertex(de,Ne,-1,-1,ae,!0),this.addCurrentVertex(de,Ne,0,0,ae)));if(gn&&it<U-1){const en=de.dist(ve);if(en>2*te){const dn=de.add(ve.sub(de)._mult(te/en)._round());this.updateDistance(de,dn),this.addCurrentVertex(dn,Ne,0,0,ae),de=dn}}}}addCurrentVertex(l,h,y,S,R,D=!1){const $=h.y*S-h.x,U=-h.y-h.x*S;this.addHalfVertex(l,h.x+h.y*y,h.y-h.x*y,D,!1,y,R),this.addHalfVertex(l,$,U,D,!0,-S,R),this.distance>Zk/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(l,h,y,S,R,D))}addHalfVertex({x:l,y:h},y,S,R,D,$,U){const W=.5*(this.lineClips?this.scaledDistance*(Zk-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((l<<1)+(R?1:0),(h<<1)+(D?1:0),Math.round(63*y)+128,Math.round(63*S)+128,1+($===0?0:$<0?-1:1)|(63&W)<<2,W>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const te=U.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,te),U.primitiveLength++),D?this.e2=te:this.e1=te}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()}}yn("LineBucket",u4,{omit:["layers","patternFeatures"]});const CW=new ji({"line-cap":new wn(Ve.layout_line["line-cap"]),"line-join":new Dn(Ve.layout_line["line-join"]),"line-miter-limit":new wn(Ve.layout_line["line-miter-limit"]),"line-round-limit":new wn(Ve.layout_line["line-round-limit"]),"line-sort-key":new Dn(Ve.layout_line["line-sort-key"])});var Xk={paint:new ji({"line-opacity":new Dn(Ve.paint_line["line-opacity"]),"line-color":new Dn(Ve.paint_line["line-color"]),"line-translate":new wn(Ve.paint_line["line-translate"]),"line-translate-anchor":new wn(Ve.paint_line["line-translate-anchor"]),"line-width":new Dn(Ve.paint_line["line-width"]),"line-gap-width":new Dn(Ve.paint_line["line-gap-width"]),"line-offset":new Dn(Ve.paint_line["line-offset"]),"line-blur":new Dn(Ve.paint_line["line-blur"]),"line-dasharray":new am(Ve.paint_line["line-dasharray"]),"line-pattern":new Ou(Ve.paint_line["line-pattern"]),"line-gradient":new Ys(Ve.paint_line["line-gradient"])}),layout:CW};const Yk=new class extends Dn{possiblyEvaluate(f,l){return l=new Hr(Math.floor(l.zoom),{now:l.now,fadeDuration:l.fadeDuration,zoomHistory:l.zoomHistory,transition:l.transition}),super.possiblyEvaluate(f,l)}evaluate(f,l,h,y){return l=_({},l,{zoom:Math.floor(l.zoom)}),super.evaluate(f,l,h,y)}}(Xk.paint.properties["line-width"].specification);function Qk(f,l){return l>0?l+2*f:f}Yk.useIntegerZoom=!0;const SW=gi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),EW=gi([{name:"a_projected_pos",components:3,type:"Float32"}],4);gi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const PW=gi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);gi([{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 Jk=gi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),IW=gi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function TW(f,l,h){return f.sections.forEach(y=>{y.text=function(S,R,D){const $=R.layout.get("text-transform").evaluate(D,{});return $==="uppercase"?S=S.toLocaleUpperCase():$==="lowercase"&&(S=S.toLocaleLowerCase()),ea.applyArabicShaping&&(S=ea.applyArabicShaping(S)),S}(y.text,l,h)}),f}gi([{name:"triangle",components:3,type:"Uint16"}]),gi([{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"}]),gi([{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"}]),gi([{type:"Float32",name:"offsetX"}]),gi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);const bm={"!":"\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 Hi=24,c4=Ir,eM=function(f,l,h,y,S){var R,D,$=8*S-y-1,U=(1<<$)-1,W=U>>1,te=-7,ae=h?S-1:0,de=h?-1:1,ge=f[l+ae];for(ae+=de,R=ge&(1<<-te)-1,ge>>=-te,te+=$;te>0;R=256*R+f[l+ae],ae+=de,te-=8);for(D=R&(1<<-te)-1,R>>=-te,te+=y;te>0;D=256*D+f[l+ae],ae+=de,te-=8);if(R===0)R=1-W;else{if(R===U)return D?NaN:1/0*(ge?-1:1);D+=Math.pow(2,y),R-=W}return(ge?-1:1)*D*Math.pow(2,R-y)},tM=function(f,l,h,y,S,R){var D,$,U,W=8*R-S-1,te=(1<<W)-1,ae=te>>1,de=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,ge=y?0:R-1,ve=y?1:-1,Fe=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?($=isNaN(l)?1:0,D=te):(D=Math.floor(Math.log(l)/Math.LN2),l*(U=Math.pow(2,-D))<1&&(D--,U*=2),(l+=D+ae>=1?de/U:de*Math.pow(2,1-ae))*U>=2&&(D++,U/=2),D+ae>=te?($=0,D=te):D+ae>=1?($=(l*U-1)*Math.pow(2,S),D+=ae):($=l*Math.pow(2,ae-1)*Math.pow(2,S),D=0));S>=8;f[h+ge]=255&$,ge+=ve,$/=256,S-=8);for(D=D<<S|$,W+=S;W>0;f[h+ge]=255&D,ge+=ve,D/=256,W-=8);f[h+ge-ve]|=128*Fe};function Ir(f){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(f)?f:new Uint8Array(f||0),this.pos=0,this.type=0,this.length=this.buf.length}Ir.Varint=0,Ir.Fixed64=1,Ir.Bytes=2,Ir.Fixed32=5;var zu,d4=4294967296,nM=1/d4,rM=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Bl(f){return f.type===Ir.Bytes?f.readVarint()+f.pos:f.pos+1}function qf(f,l,h){return h?4294967296*l+(f>>>0):4294967296*(l>>>0)+(f>>>0)}function iM(f,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 S=h.pos-1;S>=f;S--)h.buf[S+y]=h.buf[S]}function kW(f,l){for(var h=0;h<f.length;h++)l.writeVarint(f[h])}function MW(f,l){for(var h=0;h<f.length;h++)l.writeSVarint(f[h])}function RW(f,l){for(var h=0;h<f.length;h++)l.writeFloat(f[h])}function AW(f,l){for(var h=0;h<f.length;h++)l.writeDouble(f[h])}function DW(f,l){for(var h=0;h<f.length;h++)l.writeBoolean(f[h])}function OW(f,l){for(var h=0;h<f.length;h++)l.writeFixed32(f[h])}function NW(f,l){for(var h=0;h<f.length;h++)l.writeSFixed32(f[h])}function LW(f,l){for(var h=0;h<f.length;h++)l.writeFixed64(f[h])}function FW(f,l){for(var h=0;h<f.length;h++)l.writeSFixed64(f[h])}function dy(f,l){return(f[l]|f[l+1]<<8|f[l+2]<<16)+16777216*f[l+3]}function Zf(f,l,h){f[h]=l,f[h+1]=l>>>8,f[h+2]=l>>>16,f[h+3]=l>>>24}function oM(f,l){return(f[l]|f[l+1]<<8|f[l+2]<<16)+(f[l+3]<<24)}function zW(f,l,h){f===1&&h.readMessage($W,l)}function $W(f,l,h){if(f===3){const{id:y,bitmap:S,width:R,height:D,left:$,top:U,advance:W}=h.readMessage(BW,{});l.push({id:y,bitmap:new hm({width:R+6,height:D+6},S),metrics:{width:R,height:D,left:$,top:U,advance:W}})}}function BW(f,l,h){f===1?l.id=h.readVarint():f===2?l.bitmap=h.readBytes():f===3?l.width=h.readVarint():f===4?l.height=h.readVarint():f===5?l.left=h.readSVarint():f===6?l.top=h.readSVarint():f===7&&(l.advance=h.readVarint())}function aM(f){let l=0,h=0;for(const D of f)l+=D.w*D.h,h=Math.max(h,D.w);f.sort((D,$)=>$.h-D.h);const y=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(l/.95)),h),h:1/0}];let S=0,R=0;for(const D of f)for(let $=y.length-1;$>=0;$--){const U=y[$];if(!(D.w>U.w||D.h>U.h)){if(D.x=U.x,D.y=U.y,R=Math.max(R,D.y+D.h),S=Math.max(S,D.x+D.w),D.w===U.w&&D.h===U.h){const W=y.pop();$<y.length&&(y[$]=W)}else D.h===U.h?(U.x+=D.w,U.w-=D.w):D.w===U.w?(U.y+=D.h,U.h-=D.h):(y.push({x:U.x+D.w,y:U.y,w:U.w-D.w,h:D.h}),U.y+=D.h,U.h-=D.h);break}}return{w:S,h:R,fill:l/(S*R)||0}}Ir.prototype={destroy:function(){this.buf=null},readFields:function(f,l,h){for(h=h||this.length;this.pos<h;){var y=this.readVarint(),S=y>>3,R=this.pos;this.type=7&y,f(S,l,this),this.pos===R&&this.skip(y)}return l},readMessage:function(f,l){return this.readFields(f,l,this.readVarint()+this.pos)},readFixed32:function(){var f=dy(this.buf,this.pos);return this.pos+=4,f},readSFixed32:function(){var f=oM(this.buf,this.pos);return this.pos+=4,f},readFixed64:function(){var f=dy(this.buf,this.pos)+dy(this.buf,this.pos+4)*d4;return this.pos+=8,f},readSFixed64:function(){var f=dy(this.buf,this.pos)+oM(this.buf,this.pos+4)*d4;return this.pos+=8,f},readFloat:function(){var f=eM(this.buf,this.pos,!0,23,4);return this.pos+=4,f},readDouble:function(){var f=eM(this.buf,this.pos,!0,52,8);return this.pos+=8,f},readVarint:function(f){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(S,R,D){var $,U,W=D.buf;if($=(112&(U=W[D.pos++]))>>4,U<128||($|=(127&(U=W[D.pos++]))<<3,U<128)||($|=(127&(U=W[D.pos++]))<<10,U<128)||($|=(127&(U=W[D.pos++]))<<17,U<128)||($|=(127&(U=W[D.pos++]))<<24,U<128)||($|=(1&(U=W[D.pos++]))<<31,U<128))return qf(S,$,R);throw new Error("Expected varint not more than 10 bytes")}(l|=(15&(h=y[this.pos]))<<28,f,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var f=this.readVarint();return f%2==1?(f+1)/-2:f/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var f=this.readVarint()+this.pos,l=this.pos;return this.pos=f,f-l>=12&&rM?function(h,y,S){return rM.decode(h.subarray(y,S))}(this.buf,l,f):function(h,y,S){for(var R="",D=y;D<S;){var $,U,W,te=h[D],ae=null,de=te>239?4:te>223?3:te>191?2:1;if(D+de>S)break;de===1?te<128&&(ae=te):de===2?(192&($=h[D+1]))==128&&(ae=(31&te)<<6|63&$)<=127&&(ae=null):de===3?(U=h[D+2],(192&($=h[D+1]))==128&&(192&U)==128&&((ae=(15&te)<<12|(63&$)<<6|63&U)<=2047||ae>=55296&&ae<=57343)&&(ae=null)):de===4&&(U=h[D+2],W=h[D+3],(192&($=h[D+1]))==128&&(192&U)==128&&(192&W)==128&&((ae=(15&te)<<18|(63&$)<<12|(63&U)<<6|63&W)<=65535||ae>=1114112)&&(ae=null)),ae===null?(ae=65533,de=1):ae>65535&&(ae-=65536,R+=String.fromCharCode(ae>>>10&1023|55296),ae=56320|1023&ae),R+=String.fromCharCode(ae),D+=de}return R}(this.buf,l,f)},readBytes:function(){var f=this.readVarint()+this.pos,l=this.buf.subarray(this.pos,f);return this.pos=f,l},readPackedVarint:function(f,l){if(this.type!==Ir.Bytes)return f.push(this.readVarint(l));var h=Bl(this);for(f=f||[];this.pos<h;)f.push(this.readVarint(l));return f},readPackedSVarint:function(f){if(this.type!==Ir.Bytes)return f.push(this.readSVarint());var l=Bl(this);for(f=f||[];this.pos<l;)f.push(this.readSVarint());return f},readPackedBoolean:function(f){if(this.type!==Ir.Bytes)return f.push(this.readBoolean());var l=Bl(this);for(f=f||[];this.pos<l;)f.push(this.readBoolean());return f},readPackedFloat:function(f){if(this.type!==Ir.Bytes)return f.push(this.readFloat());var l=Bl(this);for(f=f||[];this.pos<l;)f.push(this.readFloat());return f},readPackedDouble:function(f){if(this.type!==Ir.Bytes)return f.push(this.readDouble());var l=Bl(this);for(f=f||[];this.pos<l;)f.push(this.readDouble());return f},readPackedFixed32:function(f){if(this.type!==Ir.Bytes)return f.push(this.readFixed32());var l=Bl(this);for(f=f||[];this.pos<l;)f.push(this.readFixed32());return f},readPackedSFixed32:function(f){if(this.type!==Ir.Bytes)return f.push(this.readSFixed32());var l=Bl(this);for(f=f||[];this.pos<l;)f.push(this.readSFixed32());return f},readPackedFixed64:function(f){if(this.type!==Ir.Bytes)return f.push(this.readFixed64());var l=Bl(this);for(f=f||[];this.pos<l;)f.push(this.readFixed64());return f},readPackedSFixed64:function(f){if(this.type!==Ir.Bytes)return f.push(this.readSFixed64());var l=Bl(this);for(f=f||[];this.pos<l;)f.push(this.readSFixed64());return f},skip:function(f){var l=7&f;if(l===Ir.Varint)for(;this.buf[this.pos++]>127;);else if(l===Ir.Bytes)this.pos=this.readVarint()+this.pos;else if(l===Ir.Fixed32)this.pos+=4;else{if(l!==Ir.Fixed64)throw new Error("Unimplemented type: "+l);this.pos+=8}},writeTag:function(f,l){this.writeVarint(f<<3|l)},realloc:function(f){for(var l=this.length||16;l<this.pos+f;)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(f){this.realloc(4),Zf(this.buf,f,this.pos),this.pos+=4},writeSFixed32:function(f){this.realloc(4),Zf(this.buf,f,this.pos),this.pos+=4},writeFixed64:function(f){this.realloc(8),Zf(this.buf,-1&f,this.pos),Zf(this.buf,Math.floor(f*nM),this.pos+4),this.pos+=8},writeSFixed64:function(f){this.realloc(8),Zf(this.buf,-1&f,this.pos),Zf(this.buf,Math.floor(f*nM),this.pos+4),this.pos+=8},writeVarint:function(f){(f=+f||0)>268435455||f<0?function(l,h){var y,S;if(l>=0?(y=l%4294967296|0,S=l/4294967296|0):(S=~(-l/4294967296),4294967295^(y=~(-l%4294967296))?y=y+1|0:(y=0,S=S+1|0)),l>=18446744073709552e3||l<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(R,D,$){$.buf[$.pos++]=127&R|128,R>>>=7,$.buf[$.pos++]=127&R|128,R>>>=7,$.buf[$.pos++]=127&R|128,R>>>=7,$.buf[$.pos++]=127&R|128,$.buf[$.pos]=127&(R>>>=7)}(y,0,h),function(R,D){var $=(7&R)<<4;D.buf[D.pos++]|=$|((R>>>=3)?128:0),R&&(D.buf[D.pos++]=127&R|((R>>>=7)?128:0),R&&(D.buf[D.pos++]=127&R|((R>>>=7)?128:0),R&&(D.buf[D.pos++]=127&R|((R>>>=7)?128:0),R&&(D.buf[D.pos++]=127&R|((R>>>=7)?128:0),R&&(D.buf[D.pos++]=127&R)))))}(S,h)}(f,this):(this.realloc(4),this.buf[this.pos++]=127&f|(f>127?128:0),f<=127||(this.buf[this.pos++]=127&(f>>>=7)|(f>127?128:0),f<=127||(this.buf[this.pos++]=127&(f>>>=7)|(f>127?128:0),f<=127||(this.buf[this.pos++]=f>>>7&127))))},writeSVarint:function(f){this.writeVarint(f<0?2*-f-1:2*f)},writeBoolean:function(f){this.writeVarint(Boolean(f))},writeString:function(f){f=String(f),this.realloc(4*f.length),this.pos++;var l=this.pos;this.pos=function(y,S,R){for(var D,$,U=0;U<S.length;U++){if((D=S.charCodeAt(U))>55295&&D<57344){if(!$){D>56319||U+1===S.length?(y[R++]=239,y[R++]=191,y[R++]=189):$=D;continue}if(D<56320){y[R++]=239,y[R++]=191,y[R++]=189,$=D;continue}D=$-55296<<10|D-56320|65536,$=null}else $&&(y[R++]=239,y[R++]=191,y[R++]=189,$=null);D<128?y[R++]=D:(D<2048?y[R++]=D>>6|192:(D<65536?y[R++]=D>>12|224:(y[R++]=D>>18|240,y[R++]=D>>12&63|128),y[R++]=D>>6&63|128),y[R++]=63&D|128)}return R}(this.buf,f,this.pos);var h=this.pos-l;h>=128&&iM(l,h,this),this.pos=l-1,this.writeVarint(h),this.pos+=h},writeFloat:function(f){this.realloc(4),tM(this.buf,f,this.pos,!0,23,4),this.pos+=4},writeDouble:function(f){this.realloc(8),tM(this.buf,f,this.pos,!0,52,8),this.pos+=8},writeBytes:function(f){var l=f.length;this.writeVarint(l),this.realloc(l);for(var h=0;h<l;h++)this.buf[this.pos++]=f[h]},writeRawMessage:function(f,l){this.pos++;var h=this.pos;f(l,this);var y=this.pos-h;y>=128&&iM(h,y,this),this.pos=h-1,this.writeVarint(y),this.pos+=y},writeMessage:function(f,l,h){this.writeTag(f,Ir.Bytes),this.writeRawMessage(l,h)},writePackedVarint:function(f,l){l.length&&this.writeMessage(f,kW,l)},writePackedSVarint:function(f,l){l.length&&this.writeMessage(f,MW,l)},writePackedBoolean:function(f,l){l.length&&this.writeMessage(f,DW,l)},writePackedFloat:function(f,l){l.length&&this.writeMessage(f,RW,l)},writePackedDouble:function(f,l){l.length&&this.writeMessage(f,AW,l)},writePackedFixed32:function(f,l){l.length&&this.writeMessage(f,OW,l)},writePackedSFixed32:function(f,l){l.length&&this.writeMessage(f,NW,l)},writePackedFixed64:function(f,l){l.length&&this.writeMessage(f,LW,l)},writePackedSFixed64:function(f,l){l.length&&this.writeMessage(f,FW,l)},writeBytesField:function(f,l){this.writeTag(f,Ir.Bytes),this.writeBytes(l)},writeFixed32Field:function(f,l){this.writeTag(f,Ir.Fixed32),this.writeFixed32(l)},writeSFixed32Field:function(f,l){this.writeTag(f,Ir.Fixed32),this.writeSFixed32(l)},writeFixed64Field:function(f,l){this.writeTag(f,Ir.Fixed64),this.writeFixed64(l)},writeSFixed64Field:function(f,l){this.writeTag(f,Ir.Fixed64),this.writeSFixed64(l)},writeVarintField:function(f,l){this.writeTag(f,Ir.Varint),this.writeVarint(l)},writeSVarintField:function(f,l){this.writeTag(f,Ir.Varint),this.writeSVarint(l)},writeStringField:function(f,l){this.writeTag(f,Ir.Bytes),this.writeString(l)},writeFloatField:function(f,l){this.writeTag(f,Ir.Fixed32),this.writeFloat(l)},writeDoubleField:function(f,l){this.writeTag(f,Ir.Fixed64),this.writeDouble(l)},writeBooleanField:function(f,l){this.writeVarintField(f,Boolean(l))}};class f4{constructor(l,{pixelRatio:h,version:y,stretchX:S,stretchY:R,content:D}){this.paddedRect=l,this.pixelRatio=h,this.stretchX=S,this.stretchY=R,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 sM{constructor(l,h){const y={},S={};this.haveRenderCallbacks=[];const R=[];this.addImages(l,y,R),this.addImages(h,S,R);const{w:D,h:$}=aM(R),U=new ba({width:D||1,height:$||1});for(const W in l){const te=l[W],ae=y[W].paddedRect;ba.copy(te.data,U,{x:0,y:0},{x:ae.x+1,y:ae.y+1},te.data)}for(const W in h){const te=h[W],ae=S[W].paddedRect,de=ae.x+1,ge=ae.y+1,ve=te.data.width,Fe=te.data.height;ba.copy(te.data,U,{x:0,y:0},{x:de,y:ge},te.data),ba.copy(te.data,U,{x:0,y:Fe-1},{x:de,y:ge-1},{width:ve,height:1}),ba.copy(te.data,U,{x:0,y:0},{x:de,y:ge+Fe},{width:ve,height:1}),ba.copy(te.data,U,{x:ve-1,y:0},{x:de-1,y:ge},{width:1,height:Fe}),ba.copy(te.data,U,{x:0,y:0},{x:de+ve,y:ge},{width:1,height:Fe})}this.image=U,this.iconPositions=y,this.patternPositions=S}addImages(l,h,y){for(const S in l){const R=l[S],D={x:0,y:0,w:R.data.width+2,h:R.data.height+2};y.push(D),h[S]=new f4(D,R),R.hasRenderCallback&&this.haveRenderCallbacks.push(S)}}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[S,R]=l.tl;y.update(h.data,void 0,{x:S,y:R})}}yn("ImagePosition",f4),yn("ImageAtlas",sM),a.WritingMode=void 0,(zu=a.WritingMode||(a.WritingMode={}))[zu.none=0]="none",zu[zu.horizontal=1]="horizontal",zu[zu.vertical=2]="vertical",zu[zu.horizontalOnly=3]="horizontalOnly";const fy=-17;class _m{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(l,h){const y=new _m;return y.scale=l||1,y.fontStack=h,y}static forImage(l){const h=new _m;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 S=0;S<l.sections.length;S++){const R=l.sections[S];R.image?y.addImageSection(R):y.addTextSection(R,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 S=l.charCodeAt(y+1)||null,R=l.charCodeAt(y-1)||null;h+=S&&W0(S)&&!bm[l[y+1]]||R&&W0(R)&&!bm[l[y-1]]||!bm[l[y]]?l[y]:bm[l[y]]}return h}(this.text)}trim(){let l=0;for(let y=0;y<this.text.length&&py[this.text.charCodeAt(y)];y++)l++;let h=this.text.length;for(let y=this.text.length-1;y>=0&&y>=l&&py[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(_m.forText(l.scale,l.fontStack||h));const y=this.sections.length-1;for(let S=0;S<l.text.length;++S)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(_m.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 hy(f,l,h,y,S,R,D,$,U,W,te,ae,de,ge,ve,Fe){const Ne=Xf.fromFeature(f,S);let it;ae===a.WritingMode.vertical&&Ne.verticalizePunctuation();const{processBidirectionalText:yt,processStyledBidirectionalText:Ye}=ea;if(yt&&Ne.sections.length===1){it=[];const At=yt(Ne.toString(),h4(Ne,W,R,l,y,ge,ve));for(const gn of At){const _n=new Xf;_n.text=gn,_n.sections=Ne.sections;for(let cn=0;cn<gn.length;cn++)_n.sectionIndex.push(0);it.push(_n)}}else if(Ye){it=[];const At=Ye(Ne.text,Ne.sectionIndex,h4(Ne,W,R,l,y,ge,ve));for(const gn of At){const _n=new Xf;_n.text=gn[0],_n.sectionIndex=gn[1],_n.sections=Ne.sections,it.push(_n)}}else it=function(At,gn){const _n=[],cn=At.text;let on=0;for(const en of gn)_n.push(At.substring(on,en)),on=en;return on<cn.length&&_n.push(At.substring(on,cn.length)),_n}(Ne,h4(Ne,W,R,l,y,ge,ve));const pt=[],Ot={positionedLines:pt,text:Ne.toString(),top:te[1],bottom:te[1],left:te[0],right:te[0],writingMode:ae,iconsInText:!1,verticalizable:!1};return function(At,gn,_n,cn,on,en,dn,an,Wt,Mn,Sn,Zn){let $r=0,Wr=fy,Pi=0,wa=0;const Yi=an==="right"?1:an==="left"?0:.5;let vi=0;for(const yi of on){yi.trim();const Ji=yi.getMaxScale(),uo=(Ji-1)*Hi,Co={positionedGlyphs:[],lineOffset:0};At.positionedLines[vi]=Co;const $o=Co.positionedGlyphs;let Bo=0;if(!yi.length()){Wr+=en,++vi;continue}for(let Ni=0;Ni<yi.length();Ni++){const er=yi.getSection(Ni),ra=yi.getSectionIndex(Ni),eo=yi.getCharCode(Ni);let co=0,Ga=null,Ps=null,Is=null,Ul=Hi;const qa=!(Wt===a.WritingMode.horizontal||!Sn&&!em(eo)||Sn&&(py[eo]||(Oi=eo,un.Arabic(Oi)||un["Arabic Supplement"](Oi)||un["Arabic Extended-A"](Oi)||un["Arabic Presentation Forms-A"](Oi)||un["Arabic Presentation Forms-B"](Oi))));if(er.imageName){const Ca=cn[er.imageName];if(!Ca)continue;Is=er.imageName,At.iconsInText=At.iconsInText||!0,Ps=Ca.paddedRect;const Vo=Ca.displaySize;er.scale=er.scale*Hi/Zn,Ga={width:Vo[0],height:Vo[1],left:1,top:-3,advance:qa?Vo[1]:Vo[0]},co=uo+(Hi-Vo[1]*er.scale),Ul=Ga.advance;const jl=qa?Vo[0]*er.scale-Hi*Ji:Vo[1]*er.scale-Hi*Ji;jl>0&&jl>Bo&&(Bo=jl)}else{const Ca=_n[er.fontStack],Vo=Ca&&Ca[eo];if(Vo&&Vo.rect)Ps=Vo.rect,Ga=Vo.metrics;else{const jl=gn[er.fontStack],Sm=jl&&jl[eo];if(!Sm)continue;Ga=Sm.metrics}co=(Ji-er.scale)*Hi}qa?(At.verticalizable=!0,$o.push({glyph:eo,imageName:Is,x:$r,y:Wr+co,vertical:qa,scale:er.scale,fontStack:er.fontStack,sectionIndex:ra,metrics:Ga,rect:Ps}),$r+=Ul*er.scale+Mn):($o.push({glyph:eo,imageName:Is,x:$r,y:Wr+co,vertical:qa,scale:er.scale,fontStack:er.fontStack,sectionIndex:ra,metrics:Ga,rect:Ps}),$r+=Ga.advance*er.scale+Mn)}$o.length!==0&&(Pi=Math.max($r-Mn,Pi),jW($o,0,$o.length-1,Yi,Bo)),$r=0;const Yr=en*Ji+Bo;Co.lineOffset=Math.max(Bo,uo),Wr+=Yr,wa=Math.max(Yr,wa),++vi}var Oi;const Qi=Wr-fy,{horizontalAlign:lo,verticalAlign:zo}=p4(dn);(function(yi,Ji,uo,Co,$o,Bo,Yr,Ni,er){const ra=(Ji-uo)*$o;let eo=0;eo=Bo!==Yr?-Ni*Co-fy:(-Co*er+.5)*Yr;for(const co of yi)for(const Ga of co.positionedGlyphs)Ga.x+=ra,Ga.y+=eo})(At.positionedLines,Yi,lo,zo,Pi,wa,en,Qi,on.length),At.top+=-zo*Qi,At.bottom=At.top+Qi,At.left+=-lo*Pi,At.right=At.left+Pi}(Ot,l,h,y,it,D,$,U,ae,W,de,Fe),!function(At){for(const gn of At)if(gn.positionedGlyphs.length!==0)return!1;return!0}(pt)&&Ot}const py={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},VW={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 lM(f,l,h,y,S,R){if(l.imageName){const D=y[l.imageName];return D?D.displaySize[0]*l.scale*Hi/R+S:0}{const D=h[l.fontStack],$=D&&D[f];return $?$.metrics.advance*l.scale+S:0}}function uM(f,l,h,y){const S=Math.pow(f-l,2);return y?f<l?S/2:2*S:S+Math.abs(h)*h}function UW(f,l,h){let y=0;return f===10&&(y-=1e4),h&&(y+=150),f!==40&&f!==65288||(y+=50),l!==41&&l!==65289||(y+=50),y}function cM(f,l,h,y,S,R){let D=null,$=uM(l,h,S,R);for(const U of y){const W=uM(l-U.x,h,S,R)+U.badness;W<=$&&(D=U,$=W)}return{index:f,x:l,priorBreak:D,badness:$}}function dM(f){return f?dM(f.priorBreak).concat(f.index):[]}function h4(f,l,h,y,S,R,D){if(R!=="point")return[];if(!f)return[];const $=[],U=function(de,ge,ve,Fe,Ne,it){let yt=0;for(let Ye=0;Ye<de.length();Ye++){const pt=de.getSection(Ye);yt+=lM(de.getCharCode(Ye),pt,Fe,Ne,ge,it)}return yt/Math.max(1,Math.ceil(yt/ve))}(f,l,h,y,S,D),W=f.text.indexOf("\u200B")>=0;let te=0;for(let de=0;de<f.length();de++){const ge=f.getSection(de),ve=f.getCharCode(de);if(py[ve]||(te+=lM(ve,ge,y,S,l,D)),de<f.length()-1){const Fe=!((ae=ve)<11904||!(un["Bopomofo Extended"](ae)||un.Bopomofo(ae)||un["CJK Compatibility Forms"](ae)||un["CJK Compatibility Ideographs"](ae)||un["CJK Compatibility"](ae)||un["CJK Radicals Supplement"](ae)||un["CJK Strokes"](ae)||un["CJK Symbols and Punctuation"](ae)||un["CJK Unified Ideographs Extension A"](ae)||un["CJK Unified Ideographs"](ae)||un["Enclosed CJK Letters and Months"](ae)||un["Halfwidth and Fullwidth Forms"](ae)||un.Hiragana(ae)||un["Ideographic Description Characters"](ae)||un["Kangxi Radicals"](ae)||un["Katakana Phonetic Extensions"](ae)||un.Katakana(ae)||un["Vertical Forms"](ae)||un["Yi Radicals"](ae)||un["Yi Syllables"](ae)));(VW[ve]||Fe||ge.imageName)&&$.push(cM(de+1,te,U,$,UW(ve,f.getCharCode(de+1),Fe&&W),!1))}}var ae;return dM(cM(f.length(),te,U,$,0,!0))}function p4(f){let l=.5,h=.5;switch(f){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(f){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 jW(f,l,h,y,S){if(!y&&!S)return;const R=f[h],D=(f[h].x+R.metrics.advance*R.scale)*y;for(let $=l;$<=h;$++)f[$].x-=D,f[$].y+=S}function HW(f,l,h){const{horizontalAlign:y,verticalAlign:S}=p4(h),R=l[0]-f.displaySize[0]*y,D=l[1]-f.displaySize[1]*S;return{image:f,top:D,bottom:D+f.displaySize[1],left:R,right:R+f.displaySize[0]}}function fM(f,l,h,y,S,R){const D=f.image;let $;if(D.content){const Ne=D.content,it=D.pixelRatio||1;$=[Ne[0]/it,Ne[1]/it,D.displaySize[0]-Ne[2]/it,D.displaySize[1]-Ne[3]/it]}const U=l.left*R,W=l.right*R;let te,ae,de,ge;h==="width"||h==="both"?(ge=S[0]+U-y[3],ae=S[0]+W+y[1]):(ge=S[0]+(U+W-D.displaySize[0])/2,ae=ge+D.displaySize[0]);const ve=l.top*R,Fe=l.bottom*R;return h==="height"||h==="both"?(te=S[1]+ve-y[0],de=S[1]+Fe+y[2]):(te=S[1]+(ve+Fe-D.displaySize[1])/2,de=te+D.displaySize[1]),{image:D,top:te,right:ae,bottom:de,left:ge,collisionPadding:$}}const Vl=128;function hM(f,l){const{expression:h}=l;if(h.kind==="constant")return{kind:"constant",layoutSize:h.evaluate(new Hr(f+1))};if(h.kind==="source")return{kind:"source"};{const{zoomStops:y,interpolationType:S}=h;let R=0;for(;R<y.length&&y[R]<=f;)R++;R=Math.max(0,R-1);let D=R;for(;D<y.length&&y[D]<f+1;)D++;D=Math.min(y.length-1,D);const $=y[R],U=y[D];return h.kind==="composite"?{kind:"composite",minZoom:$,maxZoom:U,interpolationType:S}:{kind:"camera",minZoom:$,maxZoom:U,minSize:h.evaluate(new Hr($)),maxSize:h.evaluate(new Hr(U)),interpolationType:S}}}class $u extends ne{constructor(l,h,y,S){super(l,h),this.angle=y,S!==void 0&&(this.segment=S)}clone(){return new $u(this.x,this.y,this.angle,this.segment)}}function pM(f,l,h,y,S){if(l.segment===void 0)return!0;let R=l,D=l.segment+1,$=0;for(;$>-h/2;){if(D--,D<0)return!1;$-=f[D].dist(R),R=f[D]}$+=f[D].dist(f[D+1]),D++;const U=[];let W=0;for(;$<h/2;){const te=f[D],ae=f[D+1];if(!ae)return!1;let de=f[D-1].angleTo(te)-te.angleTo(ae);for(de=Math.abs((de+3*Math.PI)%(2*Math.PI)-Math.PI),U.push({distance:$,angleDelta:de}),W+=de;$-U[0].distance>y;)W-=U.shift().angleDelta;if(W>S)return!1;D++,$+=te.dist(ae)}return!0}function mM(f){let l=0;for(let h=0;h<f.length-1;h++)l+=f[h].dist(f[h+1]);return l}function gM(f,l,h){return f?.6*l*h:0}function vM(f,l){return Math.max(f?f.right-f.left:0,l?l.right-l.left:0)}function KW(f,l,h,y,S,R){const D=gM(h,S,R),$=vM(h,y)*R;let U=0;const W=mM(f)/2;for(let te=0;te<f.length-1;te++){const ae=f[te],de=f[te+1],ge=ae.dist(de);if(U+ge>W){const ve=(W-U)/ge,Fe=Pr(ae.x,de.x,ve),Ne=Pr(ae.y,de.y,ve),it=new $u(Fe,Ne,de.angleTo(ae),te);return it._round(),!D||pM(f,it,$,D,l)?it:void 0}U+=ge}}function WW(f,l,h,y,S,R,D,$,U){const W=gM(y,R,D),te=vM(y,S),ae=te*D,de=f[0].x===0||f[0].x===U||f[0].y===0||f[0].y===U;return l-ae<l/4&&(l=ae+l/4),yM(f,de?l/2*$%l:(te/2+2*R)*D*$%l,l,W,h,ae,de,!1,U)}function yM(f,l,h,y,S,R,D,$,U){const W=R/2,te=mM(f);let ae=0,de=l-h,ge=[];for(let ve=0;ve<f.length-1;ve++){const Fe=f[ve],Ne=f[ve+1],it=Fe.dist(Ne),yt=Ne.angleTo(Fe);for(;de+h<ae+it;){de+=h;const Ye=(de-ae)/it,pt=Pr(Fe.x,Ne.x,Ye),Ot=Pr(Fe.y,Ne.y,Ye);if(pt>=0&&pt<U&&Ot>=0&&Ot<U&&de-W>=0&&de+W<=te){const At=new $u(pt,Ot,yt,ve);At._round(),y&&!pM(f,At,R,y,S)||ge.push(At)}}ae+=it}return $||ge.length||D||(ge=yM(f,ae/2,h,y,S,R,D,!0,U)),ge}function xM(f,l,h,y,S){const R=[];for(let D=0;D<f.length;D++){const $=f[D];let U;for(let W=0;W<$.length-1;W++){let te=$[W],ae=$[W+1];te.x<l&&ae.x<l||(te.x<l?te=new ne(l,te.y+(l-te.x)/(ae.x-te.x)*(ae.y-te.y))._round():ae.x<l&&(ae=new ne(l,te.y+(l-te.x)/(ae.x-te.x)*(ae.y-te.y))._round()),te.y<h&&ae.y<h||(te.y<h?te=new ne(te.x+(h-te.y)/(ae.y-te.y)*(ae.x-te.x),h)._round():ae.y<h&&(ae=new ne(te.x+(h-te.y)/(ae.y-te.y)*(ae.x-te.x),h)._round()),te.x>=y&&ae.x>=y||(te.x>=y?te=new ne(y,te.y+(y-te.x)/(ae.x-te.x)*(ae.y-te.y))._round():ae.x>=y&&(ae=new ne(y,te.y+(y-te.x)/(ae.x-te.x)*(ae.y-te.y))._round()),te.y>=S&&ae.y>=S||(te.y>=S?te=new ne(te.x+(S-te.y)/(ae.y-te.y)*(ae.x-te.x),S)._round():ae.y>=S&&(ae=new ne(te.x+(S-te.y)/(ae.y-te.y)*(ae.x-te.x),S)._round()),U&&te.equals(U[U.length-1])||(U=[te],R.push(U)),U.push(ae)))))}}return R}function bM(f,l,h,y){const S=[],R=f.image,D=R.pixelRatio,$=R.paddedRect.w-2,U=R.paddedRect.h-2,W=f.right-f.left,te=f.bottom-f.top,ae=R.stretchX||[[0,$]],de=R.stretchY||[[0,U]],ge=(en,dn)=>en+dn[1]-dn[0],ve=ae.reduce(ge,0),Fe=de.reduce(ge,0),Ne=$-ve,it=U-Fe;let yt=0,Ye=ve,pt=0,Ot=Fe,At=0,gn=Ne,_n=0,cn=it;if(R.content&&y){const en=R.content;yt=my(ae,0,en[0]),pt=my(de,0,en[1]),Ye=my(ae,en[0],en[2]),Ot=my(de,en[1],en[3]),At=en[0]-yt,_n=en[1]-pt,gn=en[2]-en[0]-Ye,cn=en[3]-en[1]-Ot}const on=(en,dn,an,Wt)=>{const Mn=gy(en.stretch-yt,Ye,W,f.left),Sn=vy(en.fixed-At,gn,en.stretch,ve),Zn=gy(dn.stretch-pt,Ot,te,f.top),$r=vy(dn.fixed-_n,cn,dn.stretch,Fe),Wr=gy(an.stretch-yt,Ye,W,f.left),Pi=vy(an.fixed-At,gn,an.stretch,ve),wa=gy(Wt.stretch-pt,Ot,te,f.top),Yi=vy(Wt.fixed-_n,cn,Wt.stretch,Fe),vi=new ne(Mn,Zn),Oi=new ne(Wr,Zn),Qi=new ne(Wr,wa),lo=new ne(Mn,wa),zo=new ne(Sn/D,$r/D),yi=new ne(Pi/D,Yi/D),Ji=l*Math.PI/180;if(Ji){const $o=Math.sin(Ji),Bo=Math.cos(Ji),Yr=[Bo,-$o,$o,Bo];vi._matMult(Yr),Oi._matMult(Yr),lo._matMult(Yr),Qi._matMult(Yr)}const uo=en.stretch+en.fixed,Co=dn.stretch+dn.fixed;return{tl:vi,tr:Oi,bl:lo,br:Qi,tex:{x:R.paddedRect.x+1+uo,y:R.paddedRect.y+1+Co,w:an.stretch+an.fixed-uo,h:Wt.stretch+Wt.fixed-Co},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:zo,pixelOffsetBR:yi,minFontScaleX:gn/D/W,minFontScaleY:cn/D/te,isSDF:h}};if(y&&(R.stretchX||R.stretchY)){const en=_M(ae,Ne,ve),dn=_M(de,it,Fe);for(let an=0;an<en.length-1;an++){const Wt=en[an],Mn=en[an+1];for(let Sn=0;Sn<dn.length-1;Sn++)S.push(on(Wt,dn[Sn],Mn,dn[Sn+1]))}}else S.push(on({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:$+1},{fixed:0,stretch:U+1}));return S}function my(f,l,h){let y=0;for(const S of f)y+=Math.max(l,Math.min(h,S[1]))-Math.max(l,Math.min(h,S[0]));return y}function _M(f,l,h){const y=[{fixed:-1,stretch:0}];for(const[S,R]of f){const D=y[y.length-1];y.push({fixed:S-D.stretch,stretch:D.stretch}),y.push({fixed:S-D.stretch,stretch:D.stretch+(R-S)})}return y.push({fixed:l+1,stretch:h}),y}function gy(f,l,h,y){return f/l*h+y}function vy(f,l,h,y){return f-l*h/y}yn("Anchor",$u);class yy{constructor(l,h,y,S,R,D,$,U,W,te){if(this.boxStartIndex=l.length,W){let ae=D.top,de=D.bottom;const ge=D.collisionPadding;ge&&(ae-=ge[1],de+=ge[3]);let ve=de-ae;ve>0&&(ve=Math.max(10,ve),this.circleDiameter=ve)}else{let ae=D.top*$-U[0],de=D.bottom*$+U[2],ge=D.left*$-U[3],ve=D.right*$+U[1];const Fe=D.collisionPadding;if(Fe&&(ge-=Fe[0]*$,ae-=Fe[1]*$,ve+=Fe[2]*$,de+=Fe[3]*$),te){const Ne=new ne(ge,ae),it=new ne(ve,ae),yt=new ne(ge,de),Ye=new ne(ve,de),pt=te*Math.PI/180;Ne._rotate(pt),it._rotate(pt),yt._rotate(pt),Ye._rotate(pt),ge=Math.min(Ne.x,it.x,yt.x,Ye.x),ve=Math.max(Ne.x,it.x,yt.x,Ye.x),ae=Math.min(Ne.y,it.y,yt.y,Ye.y),de=Math.max(Ne.y,it.y,yt.y,Ye.y)}l.emplaceBack(h.x,h.y,ge,ae,ve,de,y,S,R)}this.boxEndIndex=l.length}}class GW{constructor(l=[],h=qW){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,S=h[l];for(;l>0;){const R=l-1>>1,D=h[R];if(y(S,D)>=0)break;h[l]=D,l=R}h[l]=S}_down(l){const{data:h,compare:y}=this,S=this.length>>1,R=h[l];for(;l<S;){let D=1+(l<<1),$=h[D];const U=D+1;if(U<this.length&&y(h[U],$)<0&&(D=U,$=h[U]),y($,R)>=0)break;h[l]=$,l=D}h[l]=R}}function qW(f,l){return f<l?-1:f>l?1:0}function ZW(f,l=1,h=!1){let y=1/0,S=1/0,R=-1/0,D=-1/0;const $=f[0];for(let ge=0;ge<$.length;ge++){const ve=$[ge];(!ge||ve.x<y)&&(y=ve.x),(!ge||ve.y<S)&&(S=ve.y),(!ge||ve.x>R)&&(R=ve.x),(!ge||ve.y>D)&&(D=ve.y)}const U=Math.min(R-y,D-S);let W=U/2;const te=new GW([],XW);if(U===0)return new ne(y,S);for(let ge=y;ge<R;ge+=U)for(let ve=S;ve<D;ve+=U)te.push(new Yf(ge+W,ve+W,W,f));let ae=function(ge){let ve=0,Fe=0,Ne=0;const it=ge[0];for(let yt=0,Ye=it.length,pt=Ye-1;yt<Ye;pt=yt++){const Ot=it[yt],At=it[pt],gn=Ot.x*At.y-At.x*Ot.y;Fe+=(Ot.x+At.x)*gn,Ne+=(Ot.y+At.y)*gn,ve+=3*gn}return new Yf(Fe/ve,Ne/ve,0,ge)}(f),de=te.length;for(;te.length;){const ge=te.pop();(ge.d>ae.d||!ae.d)&&(ae=ge,h&&console.log("found best %d after %d probes",Math.round(1e4*ge.d)/1e4,de)),ge.max-ae.d<=l||(W=ge.h/2,te.push(new Yf(ge.p.x-W,ge.p.y-W,W,f)),te.push(new Yf(ge.p.x+W,ge.p.y-W,W,f)),te.push(new Yf(ge.p.x-W,ge.p.y+W,W,f)),te.push(new Yf(ge.p.x+W,ge.p.y+W,W,f)),de+=4)}return h&&(console.log(`num probes: ${de}`),console.log(`best distance: ${ae.d}`)),ae.p}function XW(f,l){return l.max-f.max}function Yf(f,l,h,y){this.p=new ne(f,l),this.h=h,this.d=function(S,R){let D=!1,$=1/0;for(let U=0;U<R.length;U++){const W=R[U];for(let te=0,ae=W.length,de=ae-1;te<ae;de=te++){const ge=W[te],ve=W[de];ge.y>S.y!=ve.y>S.y&&S.x<(ve.x-ge.x)*(S.y-ge.y)/(ve.y-ge.y)+ge.x&&(D=!D),$=Math.min($,kk(S,ge,ve))}}return(D?1:-1)*Math.sqrt($)}(this.p,y),this.max=this.d+this.h*Math.SQRT2}const m4=Number.POSITIVE_INFINITY;function wM(f,l){return l[1]!==m4?function(h,y,S){let R=0,D=0;switch(y=Math.abs(y),S=Math.abs(S),h){case"top-right":case"top-left":case"top":D=S-7;break;case"bottom-right":case"bottom-left":case"bottom":D=7-S}switch(h){case"top-right":case"bottom-right":case"right":R=-y;break;case"top-left":case"bottom-left":case"left":R=y}return[R,D]}(f,l[0],l[1]):function(h,y){let S=0,R=0;y<0&&(y=0);const D=y/Math.sqrt(2);switch(h){case"top-right":case"top-left":R=D-7;break;case"bottom-right":case"bottom-left":R=7-D;break;case"bottom":R=7-y;break;case"top":R=y-7}switch(h){case"top-right":case"bottom-right":S=-D;break;case"top-left":case"bottom-left":S=D;break;case"left":S=y;break;case"right":S=-y}return[S,R]}(f,l[0])}function g4(f){switch(f){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function YW(f,l,h,y,S,R,D,$,U,W,te){let ae=R.textMaxSize.evaluate(l,{});ae===void 0&&(ae=D);const de=f.layers[0].layout,ge=de.get("icon-offset").evaluate(l,{},te),ve=SM(h.horizontal),Fe=D/24,Ne=f.tilePixelRatio*Fe,it=f.tilePixelRatio*ae/24,yt=f.tilePixelRatio*$,Ye=f.tilePixelRatio*de.get("symbol-spacing"),pt=de.get("text-padding")*f.tilePixelRatio,Ot=function(Wt,Mn,Sn,Zn=1){const $r=Wt.get("icon-padding").evaluate(Mn,{},Sn),Wr=$r&&$r.values;return[Wr[0]*Zn,Wr[1]*Zn,Wr[2]*Zn,Wr[3]*Zn]}(de,l,te,f.tilePixelRatio),At=de.get("text-max-angle")/180*Math.PI,gn=de.get("text-rotation-alignment")!=="viewport"&&de.get("symbol-placement")!=="point",_n=de.get("icon-rotation-alignment")==="map"&&de.get("symbol-placement")!=="point",cn=de.get("symbol-placement"),on=Ye/2,en=de.get("icon-text-fit");let dn;y&&en!=="none"&&(f.allowVerticalPlacement&&h.vertical&&(dn=fM(y,h.vertical,en,de.get("icon-text-fit-padding"),ge,Fe)),ve&&(y=fM(y,ve,en,de.get("icon-text-fit-padding"),ge,Fe)));const an=(Wt,Mn)=>{Mn.x<0||Mn.x>=Ei||Mn.y<0||Mn.y>=Ei||function(Sn,Zn,$r,Wr,Pi,wa,Yi,vi,Oi,Qi,lo,zo,yi,Ji,uo,Co,$o,Bo,Yr,Ni,er,ra,eo,co,Ga){const Ps=Sn.addToLineVertexArray(Zn,$r);let Is,Ul,qa,Ca,Vo=0,jl=0,Sm=0,BM=0,P4=-1,I4=-1;const Hl={};let VM=Di.exports(""),T4=0,k4=0;if(vi._unevaluatedLayout.getValue("text-radial-offset")===void 0?[T4,k4]=vi.layout.get("text-offset").evaluate(er,{},co).map(Uo=>Uo*Hi):(T4=vi.layout.get("text-radial-offset").evaluate(er,{},co)*Hi,k4=m4),Sn.allowVerticalPlacement&&Wr.vertical){const Uo=vi.layout.get("text-rotate").evaluate(er,{},co)+90;qa=new yy(Oi,Zn,Qi,lo,zo,Wr.vertical,yi,Ji,uo,Uo),Yi&&(Ca=new yy(Oi,Zn,Qi,lo,zo,Yi,$o,Bo,uo,Uo))}if(Pi){const Uo=vi.layout.get("icon-rotate").evaluate(er,{}),nl=vi.layout.get("icon-text-fit")!=="none",Em=bM(Pi,Uo,eo,nl),Pm=Yi?bM(Yi,Uo,eo,nl):void 0;Ul=new yy(Oi,Zn,Qi,lo,zo,Pi,$o,Bo,!1,Uo),Vo=4*Em.length;const HM=Sn.iconSizeData;let fd=null;HM.kind==="source"?(fd=[Vl*vi.layout.get("icon-size").evaluate(er,{})],fd[0]>Bu&&L(`${Sn.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):HM.kind==="composite"&&(fd=[Vl*ra.compositeIconSizes[0].evaluate(er,{},co),Vl*ra.compositeIconSizes[1].evaluate(er,{},co)],(fd[0]>Bu||fd[1]>Bu)&&L(`${Sn.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),Sn.addSymbols(Sn.icon,Em,fd,Ni,Yr,er,a.WritingMode.none,Zn,Ps.lineStartIndex,Ps.lineLength,-1,co),P4=Sn.icon.placedSymbolArray.length-1,Pm&&(jl=4*Pm.length,Sn.addSymbols(Sn.icon,Pm,fd,Ni,Yr,er,a.WritingMode.vertical,Zn,Ps.lineStartIndex,Ps.lineLength,-1,co),I4=Sn.icon.placedSymbolArray.length-1)}const UM=Object.keys(Wr.horizontal);for(const Uo of UM){const nl=Wr.horizontal[Uo];if(!Is){VM=Di.exports(nl.text);const Pm=vi.layout.get("text-rotate").evaluate(er,{},co);Is=new yy(Oi,Zn,Qi,lo,zo,nl,yi,Ji,uo,Pm)}const Em=nl.positionedLines.length===1;if(Sm+=CM(Sn,Zn,nl,wa,vi,uo,er,Co,Ps,Wr.vertical?a.WritingMode.horizontal:a.WritingMode.horizontalOnly,Em?UM:[Uo],Hl,P4,ra,co),Em)break}Wr.vertical&&(BM+=CM(Sn,Zn,Wr.vertical,wa,vi,uo,er,Co,Ps,a.WritingMode.vertical,["vertical"],Hl,I4,ra,co));const cG=Is?Is.boxStartIndex:Sn.collisionBoxArray.length,dG=Is?Is.boxEndIndex:Sn.collisionBoxArray.length,fG=qa?qa.boxStartIndex:Sn.collisionBoxArray.length,hG=qa?qa.boxEndIndex:Sn.collisionBoxArray.length,pG=Ul?Ul.boxStartIndex:Sn.collisionBoxArray.length,mG=Ul?Ul.boxEndIndex:Sn.collisionBoxArray.length,gG=Ca?Ca.boxStartIndex:Sn.collisionBoxArray.length,vG=Ca?Ca.boxEndIndex:Sn.collisionBoxArray.length;let Ts=-1;const Cy=(Uo,nl)=>Uo&&Uo.circleDiameter?Math.max(Uo.circleDiameter,nl):nl;Ts=Cy(Is,Ts),Ts=Cy(qa,Ts),Ts=Cy(Ul,Ts),Ts=Cy(Ca,Ts);const jM=Ts>-1?1:0;jM&&(Ts*=Ga/Hi),Sn.glyphOffsetArray.length>=Qf.MAX_GLYPHS&&L("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),er.sortKey!==void 0&&Sn.addToSortKeyRanges(Sn.symbolInstances.length,er.sortKey),Sn.symbolInstances.emplaceBack(Zn.x,Zn.y,Hl.right>=0?Hl.right:-1,Hl.center>=0?Hl.center:-1,Hl.left>=0?Hl.left:-1,Hl.vertical||-1,P4,I4,VM,cG,dG,fG,hG,pG,mG,gG,vG,Qi,Sm,BM,Vo,jl,jM,0,yi,T4,k4,Ts)}(f,Mn,Wt,h,y,S,dn,f.layers[0],f.collisionBoxArray,l.index,l.sourceLayerIndex,f.index,Ne,[pt,pt,pt,pt],gn,U,yt,Ot,_n,ge,l,R,W,te,D)};if(cn==="line")for(const Wt of xM(l.geometry,0,0,Ei,Ei)){const Mn=WW(Wt,Ye,At,h.vertical||ve,y,24,it,f.overscaling,Ei);for(const Sn of Mn){const Zn=ve;Zn&&QW(f,Zn.text,on,Sn)||an(Wt,Sn)}}else if(cn==="line-center"){for(const Wt of l.geometry)if(Wt.length>1){const Mn=KW(Wt,At,h.vertical||ve,y,24,it);Mn&&an(Wt,Mn)}}else if(l.type==="Polygon")for(const Wt of r4(l.geometry,0)){const Mn=ZW(Wt,16);an(Wt[0],new $u(Mn.x,Mn.y,0))}else if(l.type==="LineString")for(const Wt of l.geometry)an(Wt,new $u(Wt[0].x,Wt[0].y,0));else if(l.type==="Point")for(const Wt of l.geometry)for(const Mn of Wt)an([Mn],new $u(Mn.x,Mn.y,0))}const Bu=32640;function CM(f,l,h,y,S,R,D,$,U,W,te,ae,de,ge,ve){const Fe=function(yt,Ye,pt,Ot,At,gn,_n,cn){const on=Ot.layout.get("text-rotate").evaluate(gn,{})*Math.PI/180,en=[];for(const dn of Ye.positionedLines)for(const an of dn.positionedGlyphs){if(!an.rect)continue;const Wt=an.rect||{};let Mn=4,Sn=!0,Zn=1,$r=0;const Wr=(At||cn)&&an.vertical,Pi=an.metrics.advance*an.scale/2;if(cn&&Ye.verticalizable){const Yr=(an.scale-1)*Hi,Ni=(Hi-an.metrics.width*an.scale)/2;$r=dn.lineOffset/2-(an.imageName?-Ni:Yr)}if(an.imageName){const Yr=_n[an.imageName];Sn=Yr.sdf,Zn=Yr.pixelRatio,Mn=1/Zn}const wa=At?[an.x+Pi,an.y]:[0,0];let Yi=At?[0,0]:[an.x+Pi+pt[0],an.y+pt[1]-$r],vi=[0,0];Wr&&(vi=Yi,Yi=[0,0]);const Oi=(an.metrics.left-Mn)*an.scale-Pi+Yi[0],Qi=(-an.metrics.top-Mn)*an.scale+Yi[1],lo=Oi+Wt.w*an.scale/Zn,zo=Qi+Wt.h*an.scale/Zn,yi=new ne(Oi,Qi),Ji=new ne(lo,Qi),uo=new ne(Oi,zo),Co=new ne(lo,zo);if(Wr){const Yr=new ne(-Pi,Pi-fy),Ni=-Math.PI/2,er=12-Pi,ra=new ne(22-er,-(an.imageName?er:0)),eo=new ne(...vi);yi._rotateAround(Ni,Yr)._add(ra)._add(eo),Ji._rotateAround(Ni,Yr)._add(ra)._add(eo),uo._rotateAround(Ni,Yr)._add(ra)._add(eo),Co._rotateAround(Ni,Yr)._add(ra)._add(eo)}if(on){const Yr=Math.sin(on),Ni=Math.cos(on),er=[Ni,-Yr,Yr,Ni];yi._matMult(er),Ji._matMult(er),uo._matMult(er),Co._matMult(er)}const $o=new ne(0,0),Bo=new ne(0,0);en.push({tl:yi,tr:Ji,bl:uo,br:Co,tex:Wt,writingMode:Ye.writingMode,glyphOffset:wa,sectionIndex:an.sectionIndex,isSDF:Sn,pixelOffsetTL:$o,pixelOffsetBR:Bo,minFontScaleX:0,minFontScaleY:0})}return en}(0,h,$,S,R,D,y,f.allowVerticalPlacement),Ne=f.textSizeData;let it=null;Ne.kind==="source"?(it=[Vl*S.layout.get("text-size").evaluate(D,{})],it[0]>Bu&&L(`${f.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Ne.kind==="composite"&&(it=[Vl*ge.compositeTextSizes[0].evaluate(D,{},ve),Vl*ge.compositeTextSizes[1].evaluate(D,{},ve)],(it[0]>Bu||it[1]>Bu)&&L(`${f.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),f.addSymbols(f.text,Fe,it,$,R,D,W,l,U.lineStartIndex,U.lineLength,de,ve);for(const yt of te)ae[yt]=f.text.placedSymbolArray.length-1;return 4*Fe.length}function SM(f){for(const l in f)return f[l];return null}function QW(f,l,h,y){const S=f.compareText;if(l in S){const R=S[l];for(let D=R.length-1;D>=0;D--)if(y.dist(R[D])<h)return!0}else S[l]=[];return S[l].push(y),!1}const JW=Fu.VectorTileFeature.types,eG=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function xy(f,l,h,y,S,R,D,$,U,W,te,ae,de){const ge=$?Math.min(Bu,Math.round($[0])):0,ve=$?Math.min(Bu,Math.round($[1])):0;f.emplaceBack(l,h,Math.round(32*y),Math.round(32*S),R,D,(ge<<1)+(U?1:0),ve,16*W,16*te,256*ae,256*de)}function v4(f,l,h){f.emplaceBack(l.x,l.y,h),f.emplaceBack(l.x,l.y,h),f.emplaceBack(l.x,l.y,h),f.emplaceBack(l.x,l.y,h)}function tG(f){for(const l of f.sections)if(q0(l.text))return!0;return!1}class y4{constructor(l){this.layoutVertexArray=new Ka,this.indexArray=new bo,this.programConfigurations=l,this.segments=new Jn,this.dynamicLayoutVertexArray=new xa,this.opacityVertexArray=new Wa,this.placedSymbolArray=new Ht}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(l,h,y,S){this.isEmpty()||(y&&(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,SW.members),this.indexBuffer=l.createIndexBuffer(this.indexArray,h),this.dynamicLayoutVertexBuffer=l.createVertexBuffer(this.dynamicLayoutVertexArray,EW.members,!0),this.opacityVertexBuffer=l.createVertexBuffer(this.opacityVertexArray,eG,!0),this.opacityVertexBuffer.itemSize=1),(y||S)&&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())}}yn("SymbolBuffers",y4);class x4{constructor(l,h,y){this.layoutVertexArray=new l,this.layoutAttributes=h,this.indexArray=new y,this.segments=new Jn,this.collisionVertexArray=new ta}upload(l){this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=l.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=l.createVertexBuffer(this.collisionVertexArray,PW.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}yn("CollisionBuffers",x4);class Qf{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=Yw([]),this.placementViewportMatrix=Yw([]);const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=hM(this.zoom,h["text-size"]),this.iconSizeData=hM(this.zoom,h["icon-size"]);const y=this.layers[0].layout,S=y.get("symbol-sort-key"),R=y.get("symbol-z-order");this.canOverlap=_4(y,"text-overlap","text-allow-overlap")!=="never"||_4(y,"icon-overlap","icon-allow-overlap")!=="never"||y.get("text-ignore-placement")||y.get("icon-ignore-placement"),this.sortFeaturesByKey=R!=="viewport-y"&&!S.isConstant(),this.sortFeaturesByY=(R==="viewport-y"||R==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,y.get("symbol-placement")==="point"&&(this.writingModes=y.get("text-writing-mode").map(D=>a.WritingMode[D])),this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id),this.sourceID=l.sourceID}createArrays(){this.text=new y4(new sd(this.layers,this.zoom,l=>/^text/.test(l))),this.icon=new y4(new sd(this.layers,this.zoom,l=>/^icon/.test(l))),this.glyphOffsetArray=new rn,this.lineVertexArray=new mn,this.symbolInstances=new fn}calculateGlyphDependencies(l,h,y,S,R){for(let D=0;D<l.length;D++)if(h[l.charCodeAt(D)]=!0,(y||S)&&R){const $=bm[l.charAt(D)];$&&(h[$.charCodeAt(0)]=!0)}}populate(l,h,y){const S=this.layers[0],R=S.layout,D=R.get("text-font"),$=R.get("text-field"),U=R.get("icon-image"),W=($.value.kind!=="constant"||$.value.value instanceof Pe&&!$.value.value.isEmpty()||$.value.value.toString().length>0)&&(D.value.kind!=="constant"||D.value.value.length>0),te=U.value.kind!=="constant"||!!U.value.value||Object.keys(U.parameters).length>0,ae=R.get("symbol-sort-key");if(this.features=[],!W&&!te)return;const de=h.iconDependencies,ge=h.glyphDependencies,ve=h.availableImages,Fe=new Hr(this.zoom);for(const{feature:Ne,id:it,index:yt,sourceLayerIndex:Ye}of l){const pt=S._featureFilter.needGeometry,Ot=ud(Ne,pt);if(!S._featureFilter.filter(Fe,Ot,y))continue;let At,gn;if(pt||(Ot.geometry=ld(Ne)),W){const cn=S.getValueAndResolveTokens("text-field",Ot,y,ve),on=Pe.factory(cn);tG(on)&&(this.hasRTLText=!0),(!this.hasRTLText||id()==="unavailable"||this.hasRTLText&&ea.isParsed())&&(At=TW(on,S,Ot))}if(te){const cn=S.getValueAndResolveTokens("icon-image",Ot,y,ve);gn=cn instanceof Be?cn:Be.fromString(cn)}if(!At&&!gn)continue;const _n=this.sortFeaturesByKey?ae.evaluate(Ot,{},y):void 0;if(this.features.push({id:it,text:At,icon:gn,index:yt,sourceLayerIndex:Ye,geometry:Ot.geometry,properties:Ne.properties,type:JW[Ne.type],sortKey:_n}),gn&&(de[gn.name]=!0),At){const cn=D.evaluate(Ot,{},y).join(","),on=R.get("text-rotation-alignment")!=="viewport"&&R.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(a.WritingMode.vertical)>=0;for(const en of At.sections)if(en.image)de[en.image.name]=!0;else{const dn=Bf(At.toString()),an=en.fontStack||cn,Wt=ge[an]=ge[an]||{};this.calculateGlyphDependencies(en.text,Wt,on,this.allowVerticalPlacement,dn)}}}R.get("symbol-placement")==="line"&&(this.features=function(Ne){const it={},yt={},Ye=[];let pt=0;function Ot(cn){Ye.push(Ne[cn]),pt++}function At(cn,on,en){const dn=yt[cn];return delete yt[cn],yt[on]=dn,Ye[dn].geometry[0].pop(),Ye[dn].geometry[0]=Ye[dn].geometry[0].concat(en[0]),dn}function gn(cn,on,en){const dn=it[on];return delete it[on],it[cn]=dn,Ye[dn].geometry[0].shift(),Ye[dn].geometry[0]=en[0].concat(Ye[dn].geometry[0]),dn}function _n(cn,on,en){const dn=en?on[0][on[0].length-1]:on[0][0];return`${cn}:${dn.x}:${dn.y}`}for(let cn=0;cn<Ne.length;cn++){const on=Ne[cn],en=on.geometry,dn=on.text?on.text.toString():null;if(!dn){Ot(cn);continue}const an=_n(dn,en),Wt=_n(dn,en,!0);if(an in yt&&Wt in it&&yt[an]!==it[Wt]){const Mn=gn(an,Wt,en),Sn=At(an,Wt,Ye[Mn].geometry);delete it[an],delete yt[Wt],yt[_n(dn,Ye[Sn].geometry,!0)]=Sn,Ye[Mn].geometry=null}else an in yt?At(an,Wt,en):Wt in it?gn(an,Wt,en):(Ot(cn),it[an]=pt-1,yt[Wt]=pt-1)}return Ye.filter(cn=>cn.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Ne,it)=>Ne.sortKey-it.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 S=l.dist(h[l.segment+1]),R=l.dist(h[l.segment]);const D={};for(let $=l.segment+1;$<h.length;$++)D[$]={x:h[$].x,y:h[$].y,tileUnitDistanceFromAnchor:S},$<h.length-1&&(S+=h[$+1].dist(h[$]));for(let $=l.segment||0;$>=0;$--)D[$]={x:h[$].x,y:h[$].y,tileUnitDistanceFromAnchor:R},$>0&&(R+=h[$-1].dist(h[$]));for(let $=0;$<h.length;$++){const U=D[$];this.lineVertexArray.emplaceBack(U.x,U.y,U.tileUnitDistanceFromAnchor)}}return{lineStartIndex:y,lineLength:this.lineVertexArray.length-y}}addSymbols(l,h,y,S,R,D,$,U,W,te,ae,de){const ge=l.indexArray,ve=l.layoutVertexArray,Fe=l.segments.prepareSegment(4*h.length,ve,ge,this.canOverlap?D.sortKey:void 0),Ne=this.glyphOffsetArray.length,it=Fe.vertexLength,yt=this.allowVerticalPlacement&&$===a.WritingMode.vertical?Math.PI/2:0,Ye=D.text&&D.text.sections;for(let pt=0;pt<h.length;pt++){const{tl:Ot,tr:At,bl:gn,br:_n,tex:cn,pixelOffsetTL:on,pixelOffsetBR:en,minFontScaleX:dn,minFontScaleY:an,glyphOffset:Wt,isSDF:Mn,sectionIndex:Sn}=h[pt],Zn=Fe.vertexLength,$r=Wt[1];xy(ve,U.x,U.y,Ot.x,$r+Ot.y,cn.x,cn.y,y,Mn,on.x,on.y,dn,an),xy(ve,U.x,U.y,At.x,$r+At.y,cn.x+cn.w,cn.y,y,Mn,en.x,on.y,dn,an),xy(ve,U.x,U.y,gn.x,$r+gn.y,cn.x,cn.y+cn.h,y,Mn,on.x,en.y,dn,an),xy(ve,U.x,U.y,_n.x,$r+_n.y,cn.x+cn.w,cn.y+cn.h,y,Mn,en.x,en.y,dn,an),v4(l.dynamicLayoutVertexArray,U,yt),ge.emplaceBack(Zn,Zn+1,Zn+2),ge.emplaceBack(Zn+1,Zn+2,Zn+3),Fe.vertexLength+=4,Fe.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Wt[0]),pt!==h.length-1&&Sn===h[pt+1].sectionIndex||l.programConfigurations.populatePaintArrays(ve.length,D,D.index,{},de,Ye&&Ye[Sn])}l.placedSymbolArray.emplaceBack(U.x,U.y,Ne,this.glyphOffsetArray.length-Ne,it,W,te,U.segment,y?y[0]:0,y?y[1]:0,S[0],S[1],$,0,!1,0,ae)}_addCollisionDebugVertex(l,h,y,S,R,D){return h.emplaceBack(0,0),l.emplaceBack(y.x,y.y,S,R,Math.round(D.x),Math.round(D.y))}addCollisionDebugVertices(l,h,y,S,R,D,$){const U=R.segments.prepareSegment(4,R.layoutVertexArray,R.indexArray),W=U.vertexLength,te=R.layoutVertexArray,ae=R.collisionVertexArray,de=$.anchorX,ge=$.anchorY;this._addCollisionDebugVertex(te,ae,D,de,ge,new ne(l,h)),this._addCollisionDebugVertex(te,ae,D,de,ge,new ne(y,h)),this._addCollisionDebugVertex(te,ae,D,de,ge,new ne(y,S)),this._addCollisionDebugVertex(te,ae,D,de,ge,new ne(l,S)),U.vertexLength+=4;const ve=R.indexArray;ve.emplaceBack(W,W+1),ve.emplaceBack(W+1,W+2),ve.emplaceBack(W+2,W+3),ve.emplaceBack(W+3,W),U.primitiveLength+=4}addDebugCollisionBoxes(l,h,y,S){for(let R=l;R<h;R++){const D=this.collisionBoxArray.get(R);this.addCollisionDebugVertices(D.x1,D.y1,D.x2,D.y2,S?this.textCollisionBox:this.iconCollisionBox,D.anchorPoint,y)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new x4(el,Jk.members,Ss),this.iconCollisionBox=new x4(el,Jk.members,Ss);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,S,R,D,$,U,W){const te={};for(let ae=h;ae<y;ae++){const de=l.get(ae);te.textBox={x1:de.x1,y1:de.y1,x2:de.x2,y2:de.y2,anchorPointX:de.anchorPointX,anchorPointY:de.anchorPointY},te.textFeatureIndex=de.featureIndex;break}for(let ae=S;ae<R;ae++){const de=l.get(ae);te.verticalTextBox={x1:de.x1,y1:de.y1,x2:de.x2,y2:de.y2,anchorPointX:de.anchorPointX,anchorPointY:de.anchorPointY},te.verticalTextFeatureIndex=de.featureIndex;break}for(let ae=D;ae<$;ae++){const de=l.get(ae);te.iconBox={x1:de.x1,y1:de.y1,x2:de.x2,y2:de.y2,anchorPointX:de.anchorPointX,anchorPointY:de.anchorPointY},te.iconFeatureIndex=de.featureIndex;break}for(let ae=U;ae<W;ae++){const de=l.get(ae);te.verticalIconBox={x1:de.x1,y1:de.y1,x2:de.x2,y2:de.y2,anchorPointX:de.anchorPointX,anchorPointY:de.anchorPointY},te.verticalIconFeatureIndex=de.featureIndex;break}return te}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),S=y.vertexStartIndex+4*y.numGlyphs;for(let R=y.vertexStartIndex;R<S;R+=4)l.indexArray.emplaceBack(R,R+1,R+2),l.indexArray.emplaceBack(R+1,R+2,R+3)}getSortedSymbolIndexes(l){if(this.sortedAngle===l&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(l),y=Math.cos(l),S=[],R=[],D=[];for(let $=0;$<this.symbolInstances.length;++$){D.push($);const U=this.symbolInstances.get($);S.push(0|Math.round(h*U.anchorX+y*U.anchorY)),R.push(U.featureIndex)}return D.sort(($,U)=>S[$]-S[U]||R[U]-R[$]),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((S,R,D)=>{S>=0&&D.indexOf(S)===R&&this.addIndicesForPlacedSymbol(this.text,S)}),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)}}}yn("SymbolBucket",Qf,{omit:["layers","collisionBoxArray","features","compareText"]}),Qf.MAX_GLYPHS=65535,Qf.addDynamicAttributes=v4;const nG=new ji({"symbol-placement":new wn(Ve.layout_symbol["symbol-placement"]),"symbol-spacing":new wn(Ve.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wn(Ve.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Dn(Ve.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wn(Ve.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wn(Ve.layout_symbol["icon-allow-overlap"]),"icon-overlap":new wn(Ve.layout_symbol["icon-overlap"]),"icon-ignore-placement":new wn(Ve.layout_symbol["icon-ignore-placement"]),"icon-optional":new wn(Ve.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wn(Ve.layout_symbol["icon-rotation-alignment"]),"icon-size":new Dn(Ve.layout_symbol["icon-size"]),"icon-text-fit":new wn(Ve.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wn(Ve.layout_symbol["icon-text-fit-padding"]),"icon-image":new Dn(Ve.layout_symbol["icon-image"]),"icon-rotate":new Dn(Ve.layout_symbol["icon-rotate"]),"icon-padding":new Dn(Ve.layout_symbol["icon-padding"]),"icon-keep-upright":new wn(Ve.layout_symbol["icon-keep-upright"]),"icon-offset":new Dn(Ve.layout_symbol["icon-offset"]),"icon-anchor":new Dn(Ve.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wn(Ve.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wn(Ve.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wn(Ve.layout_symbol["text-rotation-alignment"]),"text-field":new Dn(Ve.layout_symbol["text-field"]),"text-font":new Dn(Ve.layout_symbol["text-font"]),"text-size":new Dn(Ve.layout_symbol["text-size"]),"text-max-width":new Dn(Ve.layout_symbol["text-max-width"]),"text-line-height":new wn(Ve.layout_symbol["text-line-height"]),"text-letter-spacing":new Dn(Ve.layout_symbol["text-letter-spacing"]),"text-justify":new Dn(Ve.layout_symbol["text-justify"]),"text-radial-offset":new Dn(Ve.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wn(Ve.layout_symbol["text-variable-anchor"]),"text-anchor":new Dn(Ve.layout_symbol["text-anchor"]),"text-max-angle":new wn(Ve.layout_symbol["text-max-angle"]),"text-writing-mode":new wn(Ve.layout_symbol["text-writing-mode"]),"text-rotate":new Dn(Ve.layout_symbol["text-rotate"]),"text-padding":new wn(Ve.layout_symbol["text-padding"]),"text-keep-upright":new wn(Ve.layout_symbol["text-keep-upright"]),"text-transform":new Dn(Ve.layout_symbol["text-transform"]),"text-offset":new Dn(Ve.layout_symbol["text-offset"]),"text-allow-overlap":new wn(Ve.layout_symbol["text-allow-overlap"]),"text-overlap":new wn(Ve.layout_symbol["text-overlap"]),"text-ignore-placement":new wn(Ve.layout_symbol["text-ignore-placement"]),"text-optional":new wn(Ve.layout_symbol["text-optional"])});var b4={paint:new ji({"icon-opacity":new Dn(Ve.paint_symbol["icon-opacity"]),"icon-color":new Dn(Ve.paint_symbol["icon-color"]),"icon-halo-color":new Dn(Ve.paint_symbol["icon-halo-color"]),"icon-halo-width":new Dn(Ve.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Dn(Ve.paint_symbol["icon-halo-blur"]),"icon-translate":new wn(Ve.paint_symbol["icon-translate"]),"icon-translate-anchor":new wn(Ve.paint_symbol["icon-translate-anchor"]),"text-opacity":new Dn(Ve.paint_symbol["text-opacity"]),"text-color":new Dn(Ve.paint_symbol["text-color"],{runtimeType:Kt,getOverride:f=>f.textColor,hasOverride:f=>!!f.textColor}),"text-halo-color":new Dn(Ve.paint_symbol["text-halo-color"]),"text-halo-width":new Dn(Ve.paint_symbol["text-halo-width"]),"text-halo-blur":new Dn(Ve.paint_symbol["text-halo-blur"]),"text-translate":new wn(Ve.paint_symbol["text-translate"]),"text-translate-anchor":new wn(Ve.paint_symbol["text-translate-anchor"])}),layout:nG};class EM{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}}yn("FormatSectionOverride",EM,{omit:["defaultValue"]});class by extends Ha{constructor(l){super(l,b4)}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 S=[];for(const R of y)S.indexOf(R)<0&&S.push(R);this.layout._values["text-writing-mode"]=S}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(l,h,y,S){const R=this.layout.get(l).evaluate(h,{},y,S),D=this._unevaluatedLayout._values[l];return D.isDataDriven()||Kc(D.value)||!R?R:function($,U){return U.replace(/{([^{}]+)}/g,(W,te)=>te in $?String($[te]):"")}(h.properties,R)}createBucket(l){return new Qf(l)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const l of b4.paint.overridableProperties){if(!by.hasPaintOverride(this.layout,l))continue;const h=this.paint.get(l),y=new EM(h),S=new Of(y,h.property.specification);let R=null;R=h.value.kind==="constant"||h.value.kind==="source"?new Gc("source",S):new qp("composite",S,h.value.zoomStops),this.paint._values[l]=new ja(h.property,R,h.parameters)}}_handleOverridablePaintPropertyUpdate(l,h,y){return!(!this.layout||h.isDataDriven()||y.isDataDriven())&&by.hasPaintOverride(this.layout,l)}static hasPaintOverride(l,h){const y=l.get("text-field"),S=b4.paint.properties[h];let R=!1;const D=$=>{for(const U of $)if(S.overrides&&S.overrides.hasOverride(U))return void(R=!0)};if(y.value.kind==="constant"&&y.value.value instanceof Pe)D(y.value.value.sections);else if(y.value.kind==="source"){const $=W=>{R||(W instanceof Mt&&Ge(W.value)===bn?D(W.value.sections):W instanceof Af?D(W.sections):W.eachChild($))},U=y.value;U._styleExpression&&$(U._styleExpression.expression)}return R}}function _4(f,l,h){let y="never";const S=f.get(l);return S?y=S:f.get(h)&&(y="always"),y}var rG={paint:new ji({"background-color":new wn(Ve.paint_background["background-color"]),"background-pattern":new am(Ve.paint_background["background-pattern"]),"background-opacity":new wn(Ve.paint_background["background-opacity"])})},iG={paint:new ji({"raster-opacity":new wn(Ve.paint_raster["raster-opacity"]),"raster-hue-rotate":new wn(Ve.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new wn(Ve.paint_raster["raster-brightness-min"]),"raster-brightness-max":new wn(Ve.paint_raster["raster-brightness-max"]),"raster-saturation":new wn(Ve.paint_raster["raster-saturation"]),"raster-contrast":new wn(Ve.paint_raster["raster-contrast"]),"raster-resampling":new wn(Ve.paint_raster["raster-resampling"]),"raster-fade-duration":new wn(Ve.paint_raster["raster-fade-duration"])})};class oG extends Ha{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 aG={circle:class extends Ha{constructor(f){super(f,FK)}createBucket(f){return new qw(f)}queryRadius(f){const l=f;return dm("circle-radius",this,l)+dm("circle-stroke-width",this,l)+ry(this.paint.get("circle-translate"))}queryIntersectsFeature(f,l,h,y,S,R,D,$){const U=iy(f,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),R.angle,D),W=this.paint.get("circle-radius").evaluate(l,h)+this.paint.get("circle-stroke-width").evaluate(l,h),te=this.paint.get("circle-pitch-alignment")==="map",ae=te?U:function(ge,ve){return ge.map(Fe=>Lk(Fe,ve))}(U,$),de=te?W*D:W;for(const ge of y)for(const ve of ge){const Fe=te?ve:Lk(ve,$);let Ne=de;const it=oy([],[ve.x,ve.y,0,1],$);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ne*=it[3]/R.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ne*=R.cameraToCenterDistance/it[3]),AK(ae,Fe,Ne))return!0}return!1}},heatmap:class extends Ha{constructor(f){super(f,$K),this._updateColorRamp()}createBucket(f){return new Fk(f)}_handleSpecialPaintPropertyUpdate(f){f==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=$k({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 Ha{constructor(f){super(f,BK)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}},fill:class extends Ha{constructor(f){super(f,nW)}recalculate(f,l){super.recalculate(f,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(f){return new a4(f)}queryRadius(){return ry(this.paint.get("fill-translate"))}queryIntersectsFeature(f,l,h,y,S,R,D){return Tk(iy(f,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),R.angle,D),y)}isTileClipped(){return!0}},"fill-extrusion":class extends Ha{constructor(f){super(f,gW)}createBucket(f){return new l4(f)}queryRadius(){return ry(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(f,l,h,y,S,R,D,$){const U=iy(f,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),R.angle,D),W=this.paint.get("fill-extrusion-height").evaluate(l,h),te=this.paint.get("fill-extrusion-base").evaluate(l,h),ae=function(ge,ve,Fe,Ne){const it=[];for(const yt of ge){const Ye=[yt.x,yt.y,0,1];oy(Ye,Ye,ve),it.push(new ne(Ye[0]/Ye[3],Ye[1]/Ye[3]))}return it}(U,$),de=function(ge,ve,Fe,Ne){const it=[],yt=[],Ye=Ne[8]*ve,pt=Ne[9]*ve,Ot=Ne[10]*ve,At=Ne[11]*ve,gn=Ne[8]*Fe,_n=Ne[9]*Fe,cn=Ne[10]*Fe,on=Ne[11]*Fe;for(const en of ge){const dn=[],an=[];for(const Wt of en){const Mn=Wt.x,Sn=Wt.y,Zn=Ne[0]*Mn+Ne[4]*Sn+Ne[12],$r=Ne[1]*Mn+Ne[5]*Sn+Ne[13],Wr=Ne[2]*Mn+Ne[6]*Sn+Ne[14],Pi=Ne[3]*Mn+Ne[7]*Sn+Ne[15],wa=Wr+Ot,Yi=Pi+At,vi=Zn+gn,Oi=$r+_n,Qi=Wr+cn,lo=Pi+on,zo=new ne((Zn+Ye)/Yi,($r+pt)/Yi);zo.z=wa/Yi,dn.push(zo);const yi=new ne(vi/lo,Oi/lo);yi.z=Qi/lo,an.push(yi)}it.push(dn),yt.push(an)}return[it,yt]}(y,te,W,$);return function(ge,ve,Fe){let Ne=1/0;Tk(Fe,ve)&&(Ne=qk(Fe,ve[0]));for(let it=0;it<ve.length;it++){const yt=ve[it],Ye=ge[it];for(let pt=0;pt<yt.length-1;pt++){const Ot=yt[pt],At=[Ot,yt[pt+1],Ye[pt+1],Ye[pt],Ot];Ik(Fe,At)&&(Ne=Math.min(Ne,qk(Fe,At)))}}return Ne!==1/0&&Ne}(de[0],de[1],ae)}},line:class extends Ha{constructor(f){super(f,Xk),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(f){f==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof bs,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER)}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(f,l){super.recalculate(f,l),this.paint._values["line-floorwidth"]=Yk.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,f)}createBucket(f){return new u4(f)}queryRadius(f){const l=f,h=Qk(dm("line-width",this,l),dm("line-gap-width",this,l)),y=dm("line-offset",this,l);return h/2+Math.abs(y)+ry(this.paint.get("line-translate"))}queryIntersectsFeature(f,l,h,y,S,R,D){const $=iy(f,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),R.angle,D),U=D/2*Qk(this.paint.get("line-width").evaluate(l,h),this.paint.get("line-gap-width").evaluate(l,h)),W=this.paint.get("line-offset").evaluate(l,h);return W&&(y=function(te,ae){const de=[];for(let ge=0;ge<te.length;ge++){const ve=te[ge],Fe=[];for(let Ne=0;Ne<ve.length;Ne++){const it=ve[Ne-1],yt=ve[Ne],Ye=ve[Ne+1],pt=Ne===0?new ne(0,0):yt.sub(it)._unit()._perp(),Ot=Ne===ve.length-1?new ne(0,0):Ye.sub(yt)._unit()._perp(),At=pt._add(Ot)._unit(),gn=At.x*Ot.x+At.y*Ot.y;gn!==0&&At._mult(1/gn),Fe.push(At._mult(ae)._add(yt))}de.push(Fe)}return de}(y,W*D)),function(te,ae,de){for(let ge=0;ge<ae.length;ge++){const ve=ae[ge];if(te.length>=3){for(let Fe=0;Fe<ve.length;Fe++)if(Kf(te,ve[Fe]))return!0}if(DK(te,ve,de))return!0}return!1}($,y,U)}isTileClipped(){return!0}},symbol:by,background:class extends Ha{constructor(f){super(f,rG)}},raster:class extends Ha{constructor(f){super(f,iG)}}};class sG{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 PM=63710088e-1;class oi{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 oi(x(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,S=l.lat*h,R=Math.sin(y)*Math.sin(S)+Math.cos(y)*Math.cos(S)*Math.cos((l.lng-this.lng)*h);return PM*Math.acos(Math.min(R,1))}toBounds(l=0){const h=360*l/40075017,y=h/Math.cos(Math.PI/180*this.lat);return new dd(new oi(this.lng-y,this.lat-h),new oi(this.lng+y,this.lat+h))}static convert(l){if(l instanceof oi)return l;if(Array.isArray(l)&&(l.length===2||l.length===3))return new oi(Number(l[0]),Number(l[1]));if(!Array.isArray(l)&&typeof l=="object"&&l!==null)return new oi(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 dd{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 oi?new oi(l.lng,l.lat):oi.convert(l),this}setSouthWest(l){return this._sw=l instanceof oi?new oi(l.lng,l.lat):oi.convert(l),this}extend(l){const h=this._sw,y=this._ne;let S,R;if(l instanceof oi)S=l,R=l;else{if(!(l instanceof dd))return Array.isArray(l)?l.length===4||l.every(Array.isArray)?this.extend(dd.convert(l)):this.extend(oi.convert(l)):this;if(S=l._sw,R=l._ne,!S||!R)return this}return h||y?(h.lng=Math.min(S.lng,h.lng),h.lat=Math.min(S.lat,h.lat),y.lng=Math.max(R.lng,y.lng),y.lat=Math.max(R.lat,y.lat)):(this._sw=new oi(S.lng,S.lat),this._ne=new oi(R.lng,R.lat)),this}getCenter(){return new oi((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 oi(this.getWest(),this.getNorth())}getSouthEast(){return new oi(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}=oi.convert(l);let S=this._sw.lng<=h&&h<=this._ne.lng;return this._sw.lng>this._ne.lng&&(S=this._sw.lng>=h&&h>=this._ne.lng),this._sw.lat<=y&&y<=this._ne.lat&&S}static convert(l){return l instanceof dd?l:l&&new dd(l)}}const IM=2*Math.PI*PM;function TM(f){return IM*Math.cos(f*Math.PI/180)}function kM(f){return(180+f)/360}function MM(f){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f*Math.PI/360)))/360}function RM(f,l){return f/TM(l)}function w4(f){return 360/Math.PI*Math.atan(Math.exp((180-360*f)*Math.PI/180))-90}class _y{constructor(l,h,y=0){this.x=+l,this.y=+h,this.z=+y}static fromLngLat(l,h=0){const y=oi.convert(l);return new _y(kM(y.lng),MM(y.lat),RM(h,y.lat))}toLngLat(){return new oi(360*this.x-180,w4(this.y))}toAltitude(){return this.z*TM(w4(this.y))}meterInMercatorCoordinateUnits(){return 1/IM*(l=w4(this.y),1/Math.cos(l*Math.PI/180));var l}}function AM(f,l,h){var y=2*Math.PI*6378137/256/Math.pow(2,h);return[f*y-2*Math.PI*6378137/2,l*y-2*Math.PI*6378137/2]}class C4{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=wm(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 S=(D=this.y,$=this.z,U=AM(256*(R=this.x),256*(D=Math.pow(2,$)-D-1),$),W=AM(256*(R+1),256*(D+1),$),U[0]+","+U[1]+","+W[0]+","+W[1]);var R,D,$,U,W;const te=function(ae,de,ge){let ve,Fe="";for(let Ne=ae;Ne>0;Ne--)ve=1<<Ne-1,Fe+=(de&ve?1:0)+(ge&ve?2:0);return Fe}(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,te).replace(/{bbox-epsg-3857}/g,S)}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 ne((l.x*h-this.x)*Ei,(l.y*h-this.y)*Ei)}toString(){return`${this.z}/${this.x}/${this.y}`}}class DM{constructor(l,h){this.wrap=l,this.canonical=h,this.key=wm(l,h.z,h.z,h.x,h.y)}}class _a{constructor(l,h,y,S,R){if(l<y)throw new Error(`overscaledZ should be >= z; overscaledZ = ${l}; z = ${y}`);this.overscaledZ=l,this.wrap=h,this.canonical=new C4(y,+S,+R),this.key=wm(h,l,y,S,R)}clone(){return new _a(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 _a(l,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new _a(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?wm(this.wrap*+h,l,this.canonical.z,this.canonical.x,this.canonical.y):wm(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 _a(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,S=2*this.canonical.y;return[new _a(h,this.wrap,h,y,S),new _a(h,this.wrap,h,y+1,S),new _a(h,this.wrap,h,y,S+1),new _a(h,this.wrap,h,y+1,S+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 _a(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(l){return new _a(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 DM(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(l){return this.canonical.getTilePoint(new _y(l.x-this.wrap,l.y))}}function wm(f,l,h,y,S){(f*=2)<0&&(f=-1*f-1);const R=1<<h;return(R*R*f+R*S+y).toString(36)+h.toString(36)+l.toString(36)}yn("CanonicalTileID",C4),yn("OverscaledTileID",_a,{omit:["posMatrix"]});class OM{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 S=this.dim=h.height-2;this.data=new Uint32Array(h.data.buffer),this.encoding=y||"mapbox";for(let R=0;R<S;R++)this.data[this._idx(-1,R)]=this.data[this._idx(0,R)],this.data[this._idx(S,R)]=this.data[this._idx(S-1,R)],this.data[this._idx(R,-1)]=this.data[this._idx(R,0)],this.data[this._idx(R,S)]=this.data[this._idx(R,S-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(S,-1)]=this.data[this._idx(S-1,0)],this.data[this._idx(-1,S)]=this.data[this._idx(0,S-1)],this.data[this._idx(S,S)]=this.data[this._idx(S-1,S-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let R=0;R<S;R++)for(let D=0;D<S;D++){const $=this.get(R,D);$>this.max&&(this.max=$),$<this.min&&(this.min=$)}}get(l,h){const y=new Uint8Array(this.data.buffer),S=4*this._idx(l,h);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(y[S],y[S+1],y[S+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 ba({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 S=h*this.dim,R=h*this.dim+this.dim,D=y*this.dim,$=y*this.dim+this.dim;switch(h){case-1:S=R-1;break;case 1:R=S+1}switch(y){case-1:D=$-1;break;case 1:$=D+1}const U=-h*this.dim,W=-y*this.dim;for(let te=D;te<$;te++)for(let ae=S;ae<R;ae++)this.data[this._idx(ae,te)]=l.data[this._idx(ae+U,te+W)]}}yn("DEMData",OM);class NM{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 LM{constructor(l,h,y,S,R){this.type="Feature",this._vectorTileFeature=l,l._z=h,l._x=y,l._y=S,this.properties=l.properties,this.id=R}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 FM{constructor(l,h){this.tileID=l,this.x=l.canonical.x,this.y=l.canonical.y,this.z=l.canonical.z,this.grid=new rd(Ei,16,0),this.grid3D=new rd(Ei,16,0),this.featureIndexArray=new qn,this.promoteId=h}insert(l,h,y,S,R,D){const $=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(y,S,R);const U=D?this.grid3D:this.grid;for(let W=0;W<h.length;W++){const te=h[W],ae=[1/0,1/0,-1/0,-1/0];for(let de=0;de<te.length;de++){const ge=te[de];ae[0]=Math.min(ae[0],ge.x),ae[1]=Math.min(ae[1],ge.y),ae[2]=Math.max(ae[2],ge.x),ae[3]=Math.max(ae[3],ge.y)}ae[0]<Ei&&ae[1]<Ei&&ae[2]>=0&&ae[3]>=0&&U.insert($,ae[0],ae[1],ae[2],ae[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Fu.VectorTile(new c4(this.rawTileData)).layers,this.sourceLayerCoder=new NM(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(l,h,y,S){this.loadVTLayers();const R=l.params||{},D=Ei/l.tileSize/l.scale,$=Ff(R.filter),U=l.queryGeometry,W=l.queryPadding*D,te=$M(U),ae=this.grid.query(te.minX-W,te.minY-W,te.maxX+W,te.maxY+W),de=$M(l.cameraQueryGeometry),ge=this.grid3D.query(de.minX-W,de.minY-W,de.maxX+W,de.maxY+W,(Ne,it,yt,Ye)=>function(pt,Ot,At,gn,_n){for(const on of pt)if(Ot<=on.x&&At<=on.y&&gn>=on.x&&_n>=on.y)return!0;const cn=[new ne(Ot,At),new ne(Ot,_n),new ne(gn,_n),new ne(gn,At)];if(pt.length>2){for(const on of cn)if(Kf(pt,on))return!0}for(let on=0;on<pt.length-1;on++)if(NK(pt[on],pt[on+1],cn))return!0;return!1}(l.cameraQueryGeometry,Ne-W,it-W,yt+W,Ye+W));for(const Ne of ge)ae.push(Ne);ae.sort(lG);const ve={};let Fe;for(let Ne=0;Ne<ae.length;Ne++){const it=ae[Ne];if(it===Fe)continue;Fe=it;const yt=this.featureIndexArray.get(it);let Ye=null;this.loadMatchingFeature(ve,yt.bucketIndex,yt.sourceLayerIndex,yt.featureIndex,$,R.layers,R.availableImages,h,y,S,(pt,Ot,At)=>(Ye||(Ye=ld(pt)),Ot.queryIntersectsFeature(U,pt,At,Ye,this.z,l.transform,D,l.pixelPosMatrix)))}return ve}loadMatchingFeature(l,h,y,S,R,D,$,U,W,te,ae){const de=this.bucketLayerIDs[h];if(D&&!function(Ne,it){for(let yt=0;yt<Ne.length;yt++)if(it.indexOf(Ne[yt])>=0)return!0;return!1}(D,de))return;const ge=this.sourceLayerCoder.decode(y),ve=this.vtLayers[ge].feature(S);if(R.needGeometry){const Ne=ud(ve,!0);if(!R.filter(new Hr(this.tileID.overscaledZ),Ne,this.tileID.canonical))return}else if(!R.filter(new Hr(this.tileID.overscaledZ),ve))return;const Fe=this.getId(ve,ge);for(let Ne=0;Ne<de.length;Ne++){const it=de[Ne];if(D&&D.indexOf(it)<0)continue;const yt=U[it];if(!yt)continue;let Ye={};Fe&&te&&(Ye=te.getState(yt.sourceLayer||"_geojsonTileLayer",Fe));const pt=_({},W[it]);pt.paint=zM(pt.paint,yt.paint,ve,Ye,$),pt.layout=zM(pt.layout,yt.layout,ve,Ye,$);const Ot=!ae||ae(ve,yt,Ye);if(!Ot)continue;const At=new LM(ve,this.z,this.x,this.y,Fe);At.layer=pt;let gn=l[it];gn===void 0&&(gn=l[it]=[]),gn.push({featureIndex:S,feature:At,intersectionZ:Ot})}}lookupSymbolFeatures(l,h,y,S,R,D,$,U){const W={};this.loadVTLayers();const te=Ff(R);for(const ae of l)this.loadMatchingFeature(W,y,S,ae,te,D,$,U,h);return W}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 zM(f,l,h,y,S){return T(f,(R,D)=>{const $=l instanceof ad?l.get(D):null;return $&&$.evaluate?$.evaluate(h,y,S):$})}function $M(f){let l=1/0,h=1/0,y=-1/0,S=-1/0;for(const R of f)l=Math.min(l,R.x),h=Math.min(h,R.y),y=Math.max(y,R.x),S=Math.max(S,R.y);return{minX:l,minY:h,maxX:y,maxY:S}}function lG(f,l){return l-f}var S4;yn("FeatureIndex",FM,{omit:["rawTileData","sourceLayerCoder"]}),a.PerformanceMarkers=void 0,(S4=a.PerformanceMarkers||(a.PerformanceMarkers={})).create="create",S4.load="load",S4.fullLoad="fullLoad";let wy=null,Cm=[];const E4=1e3/30,uG={mark(f){performance.mark(f)},frame(f){const l=f;wy!=null&&Cm.push(l-wy),wy=l},clearMetrics(){wy=null,Cm=[],performance.clearMeasures("loadTime"),performance.clearMeasures("fullLoadTime");for(const f in a.PerformanceMarkers)performance.clearMarks(a.PerformanceMarkers[f])},getPerformanceMetrics(){performance.measure("loadTime",a.PerformanceMarkers.create,a.PerformanceMarkers.load),performance.measure("fullLoadTime",a.PerformanceMarkers.create,a.PerformanceMarkers.fullLoad);const f=performance.getEntriesByName("loadTime")[0].duration,l=performance.getEntriesByName("fullLoadTime")[0].duration,h=Cm.length,y=1/(Cm.reduce((R,D)=>R+D,0)/h/1e3),S=Cm.filter(R=>R>E4).reduce((R,D)=>R+(D-E4)/E4,0);return{loadTime:f,fullLoadTime:l,fps:y,percentDroppedFrames:S/(h+S)*100}}};a.AJAXError=We,a.ARRAY_TYPE=wo,a.Actor=class{constructor(f,l,h){this.target=f,this.parent=l,this.mapId=h,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},k(["receive","process"],this),this.invoker=new sG(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=B()?f:window}send(f,l,h,y,S=!1){const R=Math.round(1e18*Math.random()).toString(36).substring(0,10);h&&(this.callbacks[R]=h);const D=Z(this.globalScope)?void 0:[];return this.target.postMessage({id:R,type:f,hasCallback:!!h,targetMapId:y,mustQueue:S,sourceMapId:this.mapId,data:Ol(l,D)},D),{cancel:()=>{h&&delete this.callbacks[R],this.target.postMessage({id:R,type:"<cancel>",targetMapId:y,sourceMapId:this.mapId})}}}receive(f){const l=f.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 B()||l.mustQueue?(this.tasks[h]=l,this.taskQueue.push(h),this.invoker.trigger()):this.processTask(h,l)}process(){if(!this.taskQueue.length)return;const f=this.taskQueue.shift(),l=this.tasks[f];delete this.tasks[f],this.taskQueue.length&&this.invoker.trigger(),l&&this.processTask(f,l)}processTask(f,l){if(l.type==="<response>"){const h=this.callbacks[f];delete this.callbacks[f],h&&(l.error?h(Zs(l.error)):h(null,Zs(l.data)))}else{let h=!1;const y=Z(this.globalScope)?void 0:[],S=l.hasCallback?($,U)=>{h=!0,delete this.cancelCallbacks[f],this.target.postMessage({id:f,type:"<response>",sourceMapId:this.mapId,error:$?Ol($):null,data:Ol(U,y)},y)}:$=>{h=!0};let R=null;const D=Zs(l.data);if(this.parent[l.type])R=this.parent[l.type](l.sourceMapId,D,S);else if(this.parent.getWorkerSource){const $=l.type.split(".");R=this.parent.getWorkerSource(l.sourceMapId,$[0],D.source)[$[1]](D,S)}else S(new Error(`Could not find function ${l.type}`));!h&&R&&R.cancel&&(this.cancelCallbacks[f]=R.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},a.AlphaImage=hm,a.CanonicalTileID=C4,a.CollisionBoxArray=Et,a.CollisionCircleLayoutArray=class extends ie{},a.Color=ce,a.DEMData=OM,a.DataConstantProperty=wn,a.DictionaryCoder=NM,a.EXTENT=Ei,a.ErrorEvent=Nt,a.EvaluationParameters=Hr,a.Event=Dt,a.Evented=jt,a.FeatureIndex=FM,a.FillBucket=a4,a.FillExtrusionBucket=l4,a.GeoJSONFeature=LM,a.ImageAtlas=sM,a.ImagePosition=f4,a.LineBucket=u4,a.LineStripIndexArray=class extends Oe{},a.LngLat=oi,a.LngLatBounds=dd,a.MercatorCoordinate=_y,a.ONE_EM=Hi,a.OverscaledTileID=_a,a.PerformanceUtils=uG,a.PosArray=kn,a.Properties=ji,a.QuadTriangleArray=class extends me{},a.RGBAImage=ba,a.RasterBoundsArray=class extends C{},a.RequestPerformance=class{constructor(f){this._marks={start:[f.url,"start"].join("#"),end:[f.url,"end"].join("#"),measure:f.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let f=performance.getEntriesByName(this._marks.measure);return f.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),f=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),f}},a.ResourceType=St,a.SegmentVector=Jn,a.SymbolBucket=Qf,a.Transitionable=Y0,a.TriangleIndexArray=bo,a.Uniform1f=zl,a.Uniform1i=class extends Fl{constructor(f,l){super(f,l),this.current=0}set(f){this.current!==f&&(this.current=f,this.gl.uniform1i(this.location,f))}},a.Uniform2f=class extends Fl{constructor(f,l){super(f,l),this.current=[0,0]}set(f){f[0]===this.current[0]&&f[1]===this.current[1]||(this.current=f,this.gl.uniform2f(this.location,f[0],f[1]))}},a.Uniform3f=class extends Fl{constructor(f,l){super(f,l),this.current=[0,0,0]}set(f){f[0]===this.current[0]&&f[1]===this.current[1]&&f[2]===this.current[2]||(this.current=f,this.gl.uniform3f(this.location,f[0],f[1],f[2]))}},a.Uniform4f=jf,a.UniformColor=Ck,a.UniformMatrix4f=class extends Fl{constructor(f,l){super(f,l),this.current=MK}set(f){if(f[12]!==this.current[12]||f[0]!==this.current[0])return this.current=f,void this.gl.uniformMatrix4fv(this.location,!1,f);for(let l=1;l<16;l++)if(f[l]!==this.current[l]){this.current=f,this.gl.uniformMatrix4fv(this.location,!1,f);break}}},a.UnwrappedTileID=DM,a.ValidationError=Ze,a.ZoomHistory=Qp,a.add=function(f,l,h){return f[0]=l[0]+h[0],f[1]=l[1]+h[1],f[2]=l[2]+h[2],f},a.addDynamicAttributes=v4,a.asyncAll=function(f,l,h){if(!f.length)return h(null,[]);let y=f.length;const S=new Array(f.length);let R=null;f.forEach((D,$)=>{l(D,(U,W)=>{U&&(R=U),S[$]=W,--y==0&&h(R,S)})})},a.bezier=p,a.bindAll=k,a.cacheEntryPossiblyAdded=function(f){Ce++,Ce>Te&&(f.getActor().send("enforceCacheSizeLimit",xe),Ce=0)},a.clamp=v,a.clearTileCache=function(f){const l=caches.delete(he);f&&l.catch(f).then(()=>f())},a.clipLine=xM,a.clone=function(f){var l=new wo(16);return l[0]=f[0],l[1]=f[1],l[2]=f[2],l[3]=f[3],l[4]=f[4],l[5]=f[5],l[6]=f[6],l[7]=f[7],l[8]=f[8],l[9]=f[9],l[10]=f[10],l[11]=f[11],l[12]=f[12],l[13]=f[13],l[14]=f[14],l[15]=f[15],l},a.clone$1=O,a.clone$2=function(f){var l=new wo(3);return l[0]=f[0],l[1]=f[1],l[2]=f[2],l},a.collisionCircleLayout=IW,a.config=oe,a.copy=function(f,l){return f[0]=l[0],f[1]=l[1],f[2]=l[2],f[3]=l[3],f[4]=l[4],f[5]=l[5],f[6]=l[6],f[7]=l[7],f[8]=l[8],f[9]=l[9],f[10]=l[10],f[11]=l[11],f[12]=l[12],f[13]=l[13],f[14]=l[14],f[15]=l[15],f},a.create=function(){var f=new wo(16);return wo!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=0,f[12]=0,f[13]=0,f[14]=0),f[0]=1,f[5]=1,f[10]=1,f[15]=1,f},a.create$1=Rk,a.createExpression=Wc,a.createFilter=Ff,a.createLayout=gi,a.createStyleLayer=function(f){return f.type==="custom"?new oG(f):new aG[f.type](f)},a.cross=function(f,l,h){var y=l[0],S=l[1],R=l[2],D=h[0],$=h[1],U=h[2];return f[0]=S*U-R*$,f[1]=R*D-y*U,f[2]=y*$-S*D,f},a.dot=function(f,l){return f[0]*l[0]+f[1]*l[1]+f[2]*l[2]},a.dot$1=function(f,l){return f[0]*l[0]+f[1]*l[1]+f[2]*l[2]+f[3]*l[3]},a.ease=m,a.emitValidationErrors=$f,a.enforceCacheSizeLimit=function(f){Ee(),_e&&_e.then(l=>{l.keys().then(h=>{for(let y=0;y<h.length-f;y++)l.delete(h[y])})})},a.equals=function(f,l){var h=f[0],y=f[1],S=f[2],R=f[3],D=f[4],$=f[5],U=f[6],W=f[7],te=f[8],ae=f[9],de=f[10],ge=f[11],ve=f[12],Fe=f[13],Ne=f[14],it=f[15],yt=l[0],Ye=l[1],pt=l[2],Ot=l[3],At=l[4],gn=l[5],_n=l[6],cn=l[7],on=l[8],en=l[9],dn=l[10],an=l[11],Wt=l[12],Mn=l[13],Sn=l[14],Zn=l[15];return Math.abs(h-yt)<=_o*Math.max(1,Math.abs(h),Math.abs(yt))&&Math.abs(y-Ye)<=_o*Math.max(1,Math.abs(y),Math.abs(Ye))&&Math.abs(S-pt)<=_o*Math.max(1,Math.abs(S),Math.abs(pt))&&Math.abs(R-Ot)<=_o*Math.max(1,Math.abs(R),Math.abs(Ot))&&Math.abs(D-At)<=_o*Math.max(1,Math.abs(D),Math.abs(At))&&Math.abs($-gn)<=_o*Math.max(1,Math.abs($),Math.abs(gn))&&Math.abs(U-_n)<=_o*Math.max(1,Math.abs(U),Math.abs(_n))&&Math.abs(W-cn)<=_o*Math.max(1,Math.abs(W),Math.abs(cn))&&Math.abs(te-on)<=_o*Math.max(1,Math.abs(te),Math.abs(on))&&Math.abs(ae-en)<=_o*Math.max(1,Math.abs(ae),Math.abs(en))&&Math.abs(de-dn)<=_o*Math.max(1,Math.abs(de),Math.abs(dn))&&Math.abs(ge-an)<=_o*Math.max(1,Math.abs(ge),Math.abs(an))&&Math.abs(ve-Wt)<=_o*Math.max(1,Math.abs(ve),Math.abs(Wt))&&Math.abs(Fe-Mn)<=_o*Math.max(1,Math.abs(Fe),Math.abs(Mn))&&Math.abs(Ne-Sn)<=_o*Math.max(1,Math.abs(Ne),Math.abs(Sn))&&Math.abs(it-Zn)<=_o*Math.max(1,Math.abs(it),Math.abs(Zn))},a.evaluateSizeForFeature=function(f,{uSize:l,uSizeT:h},{lowerSize:y,upperSize:S}){return f.kind==="source"?y/Vl:f.kind==="composite"?Pr(y/Vl,S/Vl,h):l},a.evaluateSizeForZoom=function(f,l){let h=0,y=0;if(f.kind==="constant")y=f.layoutSize;else if(f.kind!=="source"){const{interpolationType:S,minZoom:R,maxZoom:D}=f,$=S?v(No.interpolationFactor(S,l,R,D),0,1):0;f.kind==="camera"?y=Pr(f.minSize,f.maxSize,$):h=$}return{uSizeT:h,uSize:y}},a.evaluateVariableOffset=wM,a.evented=om,a.exported=le,a.exported$1=ke,a.extend=_,a.filterObject=M,a.fromRotation=function(f,l){var h=Math.sin(l),y=Math.cos(l);return f[0]=y,f[1]=h,f[2]=0,f[3]=-h,f[4]=y,f[5]=0,f[6]=0,f[7]=0,f[8]=1,f},a.fromScaling=function(f,l){return f[0]=l[0],f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=l[1],f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=l[2],f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f},a.getAnchorAlignment=p4,a.getAnchorJustification=g4,a.getArrayBuffer=ct,a.getImage=qe,a.getJSON=function(f,l){return mt(_(f,{type:"json"}),l)},a.getOverlapMode=_4,a.getRTLTextPluginStatus=id,a.getReferrer=bt,a.getVideo=function(f,l){const h=window.document.createElement("video");h.muted=!0,h.onloadstart=function(){l(null,h)};for(let y=0;y<f.length;y++){const S=window.document.createElement("source");wt(f[y])||(h.crossOrigin="Anonymous"),S.src=f[y],h.appendChild(S)}return{cancel:()=>{}}},a.identity=Yw,a.invert=function(f,l){var h=l[0],y=l[1],S=l[2],R=l[3],D=l[4],$=l[5],U=l[6],W=l[7],te=l[8],ae=l[9],de=l[10],ge=l[11],ve=l[12],Fe=l[13],Ne=l[14],it=l[15],yt=h*$-y*D,Ye=h*U-S*D,pt=h*W-R*D,Ot=y*U-S*$,At=y*W-R*$,gn=S*W-R*U,_n=te*Fe-ae*ve,cn=te*Ne-de*ve,on=te*it-ge*ve,en=ae*Ne-de*Fe,dn=ae*it-ge*Fe,an=de*it-ge*Ne,Wt=yt*an-Ye*dn+pt*en+Ot*on-At*cn+gn*_n;return Wt?(f[0]=($*an-U*dn+W*en)*(Wt=1/Wt),f[1]=(S*dn-y*an-R*en)*Wt,f[2]=(Fe*gn-Ne*At+it*Ot)*Wt,f[3]=(de*At-ae*gn-ge*Ot)*Wt,f[4]=(U*on-D*an-W*cn)*Wt,f[5]=(h*an-S*on+R*cn)*Wt,f[6]=(Ne*pt-ve*gn-it*Ye)*Wt,f[7]=(te*gn-de*pt+ge*Ye)*Wt,f[8]=(D*dn-$*on+W*_n)*Wt,f[9]=(y*on-h*dn-R*_n)*Wt,f[10]=(ve*At-Fe*pt+it*yt)*Wt,f[11]=(ae*pt-te*At-ge*yt)*Wt,f[12]=($*cn-D*en-U*_n)*Wt,f[13]=(h*en-y*cn+S*_n)*Wt,f[14]=(Fe*Ye-ve*Ot-Ne*yt)*Wt,f[15]=(te*Ot-ae*Ye+de*yt)*Wt,f):null},a.isImageBitmap=Q,a.isSafari=Z,a.isWorker=B,a.keysDifference=function(f,l){const h=[];for(const y in f)y in l||h.push(y);return h},a.lazyLoadRTLTextPlugin=function(){ea.isLoading()||ea.isLoaded()||id()!=="deferred"||X0()},a.makeRequest=mt,a.mapObject=T,a.mercatorXfromLng=kM,a.mercatorYfromLat=MM,a.mercatorZfromAltitude=RM,a.mul=zK,a.mul$1=function(f,l,h){return f[0]=l[0]*h[0],f[1]=l[1]*h[1],f[2]=l[2]*h[2],f[3]=l[3]*h[3],f},a.multiply=Ak,a.nextPowerOfTwo=function(f){return f<=1?1:Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))},a.normalize=function(f,l){var h=l[0],y=l[1],S=l[2],R=h*h+y*y+S*S;return R>0&&(R=1/Math.sqrt(R)),f[0]=l[0]*R,f[1]=l[1]*R,f[2]=l[2]*R,f},a.number=Pr,a.ortho=function(f,l,h,y,S,R,D){var $=1/(l-h),U=1/(y-S),W=1/(R-D);return f[0]=-2*$,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=-2*U,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=2*W,f[11]=0,f[12]=(l+h)*$,f[13]=(S+y)*U,f[14]=(D+R)*W,f[15]=1,f},a.parseCacheControl=H,a.parseGlyphPbf=function(f){return new c4(f).readFields(zW,[])},a.pbf=c4,a.performSymbolLayout=function(f){f.bucket.createArrays(),f.bucket.tilePixelRatio=Ei/(512*f.bucket.overscaling),f.bucket.compareText={},f.bucket.iconsNeedLinear=!1;const l=f.bucket.layers[0].layout,h=f.bucket.layers[0]._unevaluatedLayout._values,y={layoutIconSize:h["icon-size"].possiblyEvaluate(new Hr(f.bucket.zoom+1),f.canonical),layoutTextSize:h["text-size"].possiblyEvaluate(new Hr(f.bucket.zoom+1),f.canonical),textMaxSize:h["text-size"].possiblyEvaluate(new Hr(18))};if(f.bucket.textSizeData.kind==="composite"){const{minZoom:U,maxZoom:W}=f.bucket.textSizeData;y.compositeTextSizes=[h["text-size"].possiblyEvaluate(new Hr(U),f.canonical),h["text-size"].possiblyEvaluate(new Hr(W),f.canonical)]}if(f.bucket.iconSizeData.kind==="composite"){const{minZoom:U,maxZoom:W}=f.bucket.iconSizeData;y.compositeIconSizes=[h["icon-size"].possiblyEvaluate(new Hr(U),f.canonical),h["icon-size"].possiblyEvaluate(new Hr(W),f.canonical)]}const S=l.get("text-line-height")*Hi,R=l.get("text-rotation-alignment")!=="viewport"&&l.get("symbol-placement")!=="point",D=l.get("text-keep-upright"),$=l.get("text-size");for(const U of f.bucket.features){const W=l.get("text-font").evaluate(U,{},f.canonical).join(","),te=$.evaluate(U,{},f.canonical),ae=y.layoutTextSize.evaluate(U,{},f.canonical),de=y.layoutIconSize.evaluate(U,{},f.canonical),ge={horizontal:{},vertical:void 0},ve=U.text;let Fe,Ne=[0,0];if(ve){const Ye=ve.toString(),pt=l.get("text-letter-spacing").evaluate(U,{},f.canonical)*Hi,Ot=jw(Ye)?pt:0,At=l.get("text-anchor").evaluate(U,{},f.canonical),gn=l.get("text-variable-anchor");if(!gn){const dn=l.get("text-radial-offset").evaluate(U,{},f.canonical);Ne=dn?wM(At,[dn*Hi,m4]):l.get("text-offset").evaluate(U,{},f.canonical).map(an=>an*Hi)}let _n=R?"center":l.get("text-justify").evaluate(U,{},f.canonical);const cn=l.get("symbol-placement"),on=cn==="point"?l.get("text-max-width").evaluate(U,{},f.canonical)*Hi:0,en=()=>{f.bucket.allowVerticalPlacement&&Bf(Ye)&&(ge.vertical=hy(ve,f.glyphMap,f.glyphPositions,f.imagePositions,W,on,S,At,"left",Ot,Ne,a.WritingMode.vertical,!0,cn,ae,te))};if(!R&&gn){const dn=_n==="auto"?gn.map(Wt=>g4(Wt)):[_n];let an=!1;for(let Wt=0;Wt<dn.length;Wt++){const Mn=dn[Wt];if(!ge.horizontal[Mn])if(an)ge.horizontal[Mn]=ge.horizontal[0];else{const Sn=hy(ve,f.glyphMap,f.glyphPositions,f.imagePositions,W,on,S,"center",Mn,Ot,Ne,a.WritingMode.horizontal,!1,cn,ae,te);Sn&&(ge.horizontal[Mn]=Sn,an=Sn.positionedLines.length===1)}}en()}else{_n==="auto"&&(_n=g4(At));const dn=hy(ve,f.glyphMap,f.glyphPositions,f.imagePositions,W,on,S,At,_n,Ot,Ne,a.WritingMode.horizontal,!1,cn,ae,te);dn&&(ge.horizontal[_n]=dn),en(),Bf(Ye)&&R&&D&&(ge.vertical=hy(ve,f.glyphMap,f.glyphPositions,f.imagePositions,W,on,S,At,_n,Ot,Ne,a.WritingMode.vertical,!1,cn,ae,te))}}let it=!1;if(U.icon&&U.icon.name){const Ye=f.imageMap[U.icon.name];Ye&&(Fe=HW(f.imagePositions[U.icon.name],l.get("icon-offset").evaluate(U,{},f.canonical),l.get("icon-anchor").evaluate(U,{},f.canonical)),it=!!Ye.sdf,f.bucket.sdfIcons===void 0?f.bucket.sdfIcons=it:f.bucket.sdfIcons!==it&&L("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Ye.pixelRatio!==f.bucket.pixelRatio||l.get("icon-rotate").constantOr(1)!==0)&&(f.bucket.iconsNeedLinear=!0))}const yt=SM(ge.horizontal)||ge.vertical;f.bucket.iconsInText=!!yt&&yt.iconsInText,(yt||Fe)&&YW(f.bucket,U,ge,Fe,f.imageMap,y,ae,de,Ne,it,f.canonical)}f.showCollisionBoxes&&f.bucket.generateCollisionDebugBuffers()},a.perspective=function(f,l,h,y,S){var R,D=1/Math.tan(l/2);return f[0]=D/h,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=D,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=-1,f[12]=0,f[13]=0,f[15]=0,S!=null&&S!==1/0?(f[10]=(S+y)*(R=1/(y-S)),f[14]=2*S*y*R):(f[10]=-1,f[14]=-2*y),f},a.pick=function(f,l){const h={};for(let y=0;y<l.length;y++){const S=l[y];S in f&&(h[S]=f[S])}return h},a.plugin=ea,a.pointGeometry=ne,a.polygonIntersectsPolygon=Ik,a.potpack=aM,a.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],a.register=yn,a.registerForPluginStateChange=function(f){return f({pluginStatus:xo,pluginURL:Xs}),om.on("pluginStateChange",f),f},a.renderColorRamp=$k,a.rotateX=function(f,l,h){var y=Math.sin(h),S=Math.cos(h),R=l[4],D=l[5],$=l[6],U=l[7],W=l[8],te=l[9],ae=l[10],de=l[11];return l!==f&&(f[0]=l[0],f[1]=l[1],f[2]=l[2],f[3]=l[3],f[12]=l[12],f[13]=l[13],f[14]=l[14],f[15]=l[15]),f[4]=R*S+W*y,f[5]=D*S+te*y,f[6]=$*S+ae*y,f[7]=U*S+de*y,f[8]=W*S-R*y,f[9]=te*S-D*y,f[10]=ae*S-$*y,f[11]=de*S-U*y,f},a.rotateZ=function(f,l,h){var y=Math.sin(h),S=Math.cos(h),R=l[0],D=l[1],$=l[2],U=l[3],W=l[4],te=l[5],ae=l[6],de=l[7];return l!==f&&(f[8]=l[8],f[9]=l[9],f[10]=l[10],f[11]=l[11],f[12]=l[12],f[13]=l[13],f[14]=l[14],f[15]=l[15]),f[0]=R*S+W*y,f[1]=D*S+te*y,f[2]=$*S+ae*y,f[3]=U*S+de*y,f[4]=W*S-R*y,f[5]=te*S-D*y,f[6]=ae*S-$*y,f[7]=de*S-U*y,f},a.scale=function(f,l,h){var y=h[0],S=h[1],R=h[2];return f[0]=l[0]*y,f[1]=l[1]*y,f[2]=l[2]*y,f[3]=l[3]*y,f[4]=l[4]*S,f[5]=l[5]*S,f[6]=l[6]*S,f[7]=l[7]*S,f[8]=l[8]*R,f[9]=l[9]*R,f[10]=l[10]*R,f[11]=l[11]*R,f[12]=l[12],f[13]=l[13],f[14]=l[14],f[15]=l[15],f},a.scale$1=function(f,l,h){return f[0]=l[0]*h,f[1]=l[1]*h,f[2]=l[2]*h,f},a.setCacheLimits=function(f,l){xe=f,Te=l},a.setRTLTextPlugin=function(f,l,h=!1){if(xo===tm||xo===nm||xo===rm)throw new Error("setRTLTextPlugin cannot be called multiple times.");Xs=le.resolveURL(f),xo=tm,im=l,Du(),h||X0()},a.spec=Ve,a.sphericalToCartesian=function([f,l,h]){return l+=90,l*=Math.PI/180,h*=Math.PI/180,{x:f*Math.cos(l)*Math.sin(h),y:f*Math.sin(l)*Math.sin(h),z:f*Math.cos(h)}},a.sqrLen=function(f){var l=f[0],h=f[1];return l*l+h*h},a.sub=function(f,l,h){return f[0]=l[0]-h[0],f[1]=l[1]-h[1],f[2]=l[2]-h[2],f},a.toEvaluationFeature=ud,a.transformMat3=function(f,l,h){var y=l[0],S=l[1],R=l[2];return f[0]=y*h[0]+S*h[3]+R*h[6],f[1]=y*h[1]+S*h[4]+R*h[7],f[2]=y*h[2]+S*h[5]+R*h[8],f},a.transformMat4=oy,a.transformMat4$1=function(f,l,h){var y=l[0],S=l[1];return f[0]=h[0]*y+h[4]*S+h[12],f[1]=h[1]*y+h[5]*S+h[13],f},a.translate=function(f,l,h){var y,S,R,D,$,U,W,te,ae,de,ge,ve,Fe=h[0],Ne=h[1],it=h[2];return l===f?(f[12]=l[0]*Fe+l[4]*Ne+l[8]*it+l[12],f[13]=l[1]*Fe+l[5]*Ne+l[9]*it+l[13],f[14]=l[2]*Fe+l[6]*Ne+l[10]*it+l[14],f[15]=l[3]*Fe+l[7]*Ne+l[11]*it+l[15]):(S=l[1],R=l[2],D=l[3],$=l[4],U=l[5],W=l[6],te=l[7],ae=l[8],de=l[9],ge=l[10],ve=l[11],f[0]=y=l[0],f[1]=S,f[2]=R,f[3]=D,f[4]=$,f[5]=U,f[6]=W,f[7]=te,f[8]=ae,f[9]=de,f[10]=ge,f[11]=ve,f[12]=y*Fe+$*Ne+ae*it+l[12],f[13]=S*Fe+U*Ne+de*it+l[13],f[14]=R*Fe+W*Ne+ge*it+l[14],f[15]=D*Fe+te*Ne+ve*it+l[15]),f},a.triggerPluginCompletionEvent=Z0,a.unicodeBlockLookup=un,a.uniqueId=function(){return P++},a.validateCustomStyleLayer=function(f){const l=[],h=f.id;return h===void 0&&l.push({message:`layers.${h}: missing required property "id"`}),f.render===void 0&&l.push({message:`layers.${h}: missing required method "render"`}),f.renderingMode&&f.renderingMode!=="2d"&&f.renderingMode!=="3d"&&l.push({message:`layers.${h}: property "renderingMode" must be either "2d" or "3d"`}),l},a.validateLight=Yp,a.validateStyle=nd,a.vectorTile=Fu,a.warnOnce=L,a.wrap=x}),o(["./shared"],function(a){function u(ye){const q=typeof ye;if(q==="number"||q==="boolean"||q==="string"||ye==null)return JSON.stringify(ye);if(Array.isArray(ye)){let ce="[";for(const we of ye)ce+=`${u(we)},`;return`${ce}]`}const J=Object.keys(ye).sort();let pe="{";for(let ce=0;ce<J.length;ce++)pe+=`${JSON.stringify(J[ce])}:${u(ye[J[ce]])},`;return`${pe}}`}function d(ye){let q="";for(const J of a.refProperties)q+=`/${u(ye[J])}`;return q}class p{constructor(q){this.keyCache={},q&&this.replace(q)}replace(q){this._layerConfigs={},this._layers={},this.update(q,[])}update(q,J){for(const ce of q){this._layerConfigs[ce.id]=ce;const we=this._layers[ce.id]=a.createStyleLayer(ce);we._featureFilter=a.createFilter(we.filter),this.keyCache[ce.id]&&delete this.keyCache[ce.id]}for(const ce of J)delete this.keyCache[ce],delete this._layerConfigs[ce],delete this._layers[ce];this.familiesBySource={};const pe=function(ce,we){const Ae={};for(let Me=0;Me<ce.length;Me++){const Be=we&&we[ce[Me].id]||d(ce[Me]);we&&(we[ce[Me].id]=Be);let Je=Ae[Be];Je||(Je=Ae[Be]=[]),Je.push(ce[Me])}const Pe=[];for(const Me in Ae)Pe.push(Ae[Me]);return Pe}(Object.values(this._layerConfigs),this.keyCache);for(const ce of pe){const we=ce.map(et=>this._layers[et.id]),Ae=we[0];if(Ae.visibility==="none")continue;const Pe=Ae.source||"";let Me=this.familiesBySource[Pe];Me||(Me=this.familiesBySource[Pe]={});const Be=Ae.sourceLayer||"_geojsonTileLayer";let Je=Me[Be];Je||(Je=Me[Be]=[]),Je.push(we)}}}class m{constructor(q){const J={},pe=[];for(const Pe in q){const Me=q[Pe],Be=J[Pe]={};for(const Je in Me){const et=Me[+Je];if(!et||et.bitmap.width===0||et.bitmap.height===0)continue;const Ge={x:0,y:0,w:et.bitmap.width+2,h:et.bitmap.height+2};pe.push(Ge),Be[Je]={rect:Ge,metrics:et.metrics}}}const{w:ce,h:we}=a.potpack(pe),Ae=new a.AlphaImage({width:ce||1,height:we||1});for(const Pe in q){const Me=q[Pe];for(const Be in Me){const Je=Me[+Be];if(!Je||Je.bitmap.width===0||Je.bitmap.height===0)continue;const et=J[Pe][Be].rect;a.AlphaImage.copy(Je.bitmap,Ae,{x:0,y:0},{x:et.x+1,y:et.y+1},Je.bitmap)}}this.image=Ae,this.positions=J}}a.register("GlyphAtlas",m);class v{constructor(q){this.tileID=new a.OverscaledTileID(q.tileID.overscaledZ,q.tileID.wrap,q.tileID.canonical.z,q.tileID.canonical.x,q.tileID.canonical.y),this.uid=q.uid,this.zoom=q.zoom,this.pixelRatio=q.pixelRatio,this.tileSize=q.tileSize,this.source=q.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=q.showCollisionBoxes,this.collectResourceTiming=!!q.collectResourceTiming,this.returnDependencies=!!q.returnDependencies,this.promoteId=q.promoteId}parse(q,J,pe,ce,we){this.status="parsing",this.data=q,this.collisionBoxArray=new a.CollisionBoxArray;const Ae=new a.DictionaryCoder(Object.keys(q.layers).sort()),Pe=new a.FeatureIndex(this.tileID,this.promoteId);Pe.bucketLayerIDs=[];const Me={},Be={featureIndex:Pe,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:pe},Je=J.familiesBySource[this.source];for(const hn in Je){const Pn=q.layers[hn];if(!Pn)continue;Pn.version===1&&a.warnOnce(`Vector tile source "${this.source}" layer "${hn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Gn=Ae.encode(hn),lr=[];for(let Zr=0;Zr<Pn.length;Zr++){const hr=Pn.feature(Zr),Vr=Pe.getId(hr,hn);lr.push({feature:hr,id:Vr,index:Zr,sourceLayerIndex:Gn})}for(const Zr of Je[hn]){const hr=Zr[0];hr.source!==this.source&&a.warnOnce(`layer.source = ${hr.source} does not equal this.source = ${this.source}`),hr.minzoom&&this.zoom<Math.floor(hr.minzoom)||hr.maxzoom&&this.zoom>=hr.maxzoom||hr.visibility!=="none"&&(x(Zr,this.zoom,pe),(Me[hr.id]=hr.createBucket({index:Pe.bucketLayerIDs.length,layers:Zr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Gn,sourceID:this.source})).populate(lr,Be,this.tileID.canonical),Pe.bucketLayerIDs.push(Zr.map(Vr=>Vr.id)))}}let et,Ge,Ut,Mt;const at=a.mapObject(Be.glyphDependencies,hn=>Object.keys(hn).map(Number));Object.keys(at).length?ce.send("getGlyphs",{uid:this.uid,stacks:at},(hn,Pn)=>{et||(et=hn,Ge=Pn,En.call(this))}):Ge={};const $t=Object.keys(Be.iconDependencies);$t.length?ce.send("getImages",{icons:$t,source:this.source,tileID:this.tileID,type:"icons"},(hn,Pn)=>{et||(et=hn,Ut=Pn,En.call(this))}):Ut={};const Xt=Object.keys(Be.patternDependencies);function En(){if(et)return we(et);if(Ge&&Ut&&Mt){const hn=new m(Ge),Pn=new a.ImageAtlas(Ut,Mt);for(const Gn in Me){const lr=Me[Gn];lr instanceof a.SymbolBucket?(x(lr.layers,this.zoom,pe),a.performSymbolLayout({bucket:lr,glyphMap:Ge,glyphPositions:hn.positions,imageMap:Ut,imagePositions:Pn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):lr.hasPattern&&(lr instanceof a.LineBucket||lr instanceof a.FillBucket||lr instanceof a.FillExtrusionBucket)&&(x(lr.layers,this.zoom,pe),lr.addFeatures(Be,this.tileID.canonical,Pn.patternPositions))}this.status="done",we(null,{buckets:Object.values(Me).filter(Gn=>!Gn.isEmpty()),featureIndex:Pe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:hn.image,imageAtlas:Pn,glyphMap:this.returnDependencies?Ge:null,iconMap:this.returnDependencies?Ut:null,glyphPositions:this.returnDependencies?hn.positions:null})}}Xt.length?ce.send("getImages",{icons:Xt,source:this.source,tileID:this.tileID,type:"patterns"},(hn,Pn)=>{et||(et=hn,Mt=Pn,En.call(this))}):Mt={},En.call(this)}}function x(ye,q,J){const pe=new a.EvaluationParameters(q);for(const ce of ye)ce.recalculate(pe,J)}function _(ye,q){const J=a.getArrayBuffer(ye.request,(pe,ce,we,Ae)=>{pe?q(pe):ce&&q(null,{vectorTile:new a.vectorTile.VectorTile(new a.pbf(ce)),rawData:ce,cacheControl:we,expires:Ae})});return()=>{J.cancel(),q()}}class P{constructor(q,J,pe,ce){this.actor=q,this.layerIndex=J,this.availableImages=pe,this.loadVectorData=ce||_,this.loading={},this.loaded={}}loadTile(q,J){const pe=q.uid;this.loading||(this.loading={});const ce=!!(q&&q.request&&q.request.collectResourceTiming)&&new a.RequestPerformance(q.request),we=this.loading[pe]=new v(q);we.abort=this.loadVectorData(q,(Ae,Pe)=>{if(delete this.loading[pe],Ae||!Pe)return we.status="done",this.loaded[pe]=we,J(Ae);const Me=Pe.rawData,Be={};Pe.expires&&(Be.expires=Pe.expires),Pe.cacheControl&&(Be.cacheControl=Pe.cacheControl);const Je={};if(ce){const et=ce.finish();et&&(Je.resourceTiming=JSON.parse(JSON.stringify(et)))}we.vectorTile=Pe.vectorTile,we.parse(Pe.vectorTile,this.layerIndex,this.availableImages,this.actor,(et,Ge)=>{if(et||!Ge)return J(et);J(null,a.extend({rawTileData:Me.slice(0)},Ge,Be,Je))}),this.loaded=this.loaded||{},this.loaded[pe]=we})}reloadTile(q,J){const pe=this.loaded,ce=q.uid,we=this;if(pe&&pe[ce]){const Ae=pe[ce];Ae.showCollisionBoxes=q.showCollisionBoxes;const Pe=(Me,Be)=>{const Je=Ae.reloadCallback;Je&&(delete Ae.reloadCallback,Ae.parse(Ae.vectorTile,we.layerIndex,this.availableImages,we.actor,Je)),J(Me,Be)};Ae.status==="parsing"?Ae.reloadCallback=Pe:Ae.status==="done"&&(Ae.vectorTile?Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor,Pe):Pe())}}abortTile(q,J){const pe=this.loading,ce=q.uid;pe&&pe[ce]&&pe[ce].abort&&(pe[ce].abort(),delete pe[ce]),J()}removeTile(q,J){const pe=this.loaded,ce=q.uid;pe&&pe[ce]&&delete pe[ce],J()}}class k{constructor(){this.loaded={}}loadTile(q,J){const{uid:pe,encoding:ce,rawImageData:we}=q,Ae=a.isImageBitmap(we)?this.getImageData(we):we,Pe=new a.DEMData(pe,Ae,ce);this.loaded=this.loaded||{},this.loaded[pe]=Pe,J(null,Pe)}getImageData(q){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(q.width,q.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=q.width,this.offscreenCanvas.height=q.height,this.offscreenCanvasContext.drawImage(q,0,0,q.width,q.height);const J=this.offscreenCanvasContext.getImageData(-1,-1,q.width+2,q.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new a.RGBAImage({width:J.width,height:J.height},J.data)}removeTile(q){const J=this.loaded,pe=q.uid;J&&J[pe]&&delete J[pe]}}var T=function ye(q,J){var pe,ce=q&&q.type;if(ce==="FeatureCollection")for(pe=0;pe<q.features.length;pe++)ye(q.features[pe],J);else if(ce==="GeometryCollection")for(pe=0;pe<q.geometries.length;pe++)ye(q.geometries[pe],J);else if(ce==="Feature")ye(q.geometry,J);else if(ce==="Polygon")M(q.coordinates,J);else if(ce==="MultiPolygon")for(pe=0;pe<q.coordinates.length;pe++)M(q.coordinates[pe],J);return q};function M(ye,q){if(ye.length!==0){O(ye[0],q);for(var J=1;J<ye.length;J++)O(ye[J],!q)}}function O(ye,q){for(var J=0,pe=0,ce=0,we=ye.length,Ae=we-1;ce<we;Ae=ce++){var Pe=(ye[ce][0]-ye[Ae][0])*(ye[Ae][1]+ye[ce][1]),Me=J+Pe;pe+=Math.abs(J)>=Math.abs(Pe)?J-Me+Pe:Pe-Me+J,J=Me}J+pe>=0!=!!q&&ye.reverse()}const N=a.vectorTile.VectorTileFeature.prototype.toGeoJSON;class L{constructor(q){this._feature=q,this.extent=a.EXTENT,this.type=q.type,this.properties=q.tags,"id"in q&&!isNaN(q.id)&&(this.id=parseInt(q.id,10))}loadGeometry(){if(this._feature.type===1){const q=[];for(const J of this._feature.geometry)q.push([new a.pointGeometry(J[0],J[1])]);return q}{const q=[];for(const J of this._feature.geometry){const pe=[];for(const ce of J)pe.push(new a.pointGeometry(ce[0],ce[1]));q.push(pe)}return q}}toGeoJSON(q,J,pe){return N.call(this,q,J,pe)}}class F{constructor(q){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=a.EXTENT,this.length=q.length,this._features=q}feature(q){return new L(this._features[q])}}var V={exports:{}},B=a.pointGeometry,H=a.vectorTile.VectorTileFeature,G=ee;function ee(ye,q){this.options=q||{},this.features=ye,this.length=ye.length}function X(ye,q){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=q||4096}ee.prototype.feature=function(ye){return new X(this.features[ye],this.options.extent)},X.prototype.loadGeometry=function(){var ye=this.rawGeometry;this.geometry=[];for(var q=0;q<ye.length;q++){for(var J=ye[q],pe=[],ce=0;ce<J.length;ce++)pe.push(new B(J[ce][0],J[ce][1]));this.geometry.push(pe)}return this.geometry},X.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var ye=this.geometry,q=1/0,J=-1/0,pe=1/0,ce=-1/0,we=0;we<ye.length;we++)for(var Ae=ye[we],Pe=0;Pe<Ae.length;Pe++){var Me=Ae[Pe];q=Math.min(q,Me.x),J=Math.max(J,Me.x),pe=Math.min(pe,Me.y),ce=Math.max(ce,Me.y)}return[q,pe,J,ce]},X.prototype.toGeoJSON=H.prototype.toGeoJSON;var Z=a.pbf,Q=G;function le(ye){var q=new Z;return function(J,pe){for(var ce in J.layers)pe.writeMessage(3,ne,J.layers[ce])}(ye,q),q.finish()}function ne(ye,q){var J;q.writeVarintField(15,ye.version||1),q.writeStringField(1,ye.name||""),q.writeVarintField(5,ye.extent||4096);var pe={keys:[],values:[],keycache:{},valuecache:{}};for(J=0;J<ye.length;J++)pe.feature=ye.feature(J),q.writeMessage(2,se,pe);var ce=pe.keys;for(J=0;J<ce.length;J++)q.writeStringField(3,ce[J]);var we=pe.values;for(J=0;J<we.length;J++)q.writeMessage(4,xe,we[J])}function se(ye,q){var J=ye.feature;J.id!==void 0&&q.writeVarintField(1,J.id),q.writeMessage(2,oe,ye),q.writeVarintField(3,J.type),q.writeMessage(4,be,J)}function oe(ye,q){var J=ye.feature,pe=ye.keys,ce=ye.values,we=ye.keycache,Ae=ye.valuecache;for(var Pe in J.properties){var Me=J.properties[Pe],Be=we[Pe];if(Me!==null){Be===void 0&&(pe.push(Pe),we[Pe]=Be=pe.length-1),q.writeVarint(Be);var Je=typeof Me;Je!=="string"&&Je!=="boolean"&&Je!=="number"&&(Me=JSON.stringify(Me));var et=Je+":"+Me,Ge=Ae[et];Ge===void 0&&(ce.push(Me),Ae[et]=Ge=ce.length-1),q.writeVarint(Ge)}}}function he(ye,q){return(q<<3)+(7&ye)}function _e(ye){return ye<<1^ye>>31}function be(ye,q){for(var J=ye.loadGeometry(),pe=ye.type,ce=0,we=0,Ae=J.length,Pe=0;Pe<Ae;Pe++){var Me=J[Pe],Be=1;pe===1&&(Be=Me.length),q.writeVarint(he(1,Be));for(var Je=pe===3?Me.length-1:Me.length,et=0;et<Je;et++){et===1&&pe!==1&&q.writeVarint(he(2,Je-1));var Ge=Me[et].x-ce,Ut=Me[et].y-we;q.writeVarint(_e(Ge)),q.writeVarint(_e(Ut)),ce+=Ge,we+=Ut}pe===3&&q.writeVarint(he(7,1))}}function xe(ye,q){var J=typeof ye;J==="string"?q.writeStringField(1,ye):J==="boolean"?q.writeBooleanField(7,ye):J==="number"&&(ye%1!=0?q.writeDoubleField(3,ye):ye<0?q.writeSVarintField(6,ye):q.writeVarintField(5,ye))}function Te(ye,q,J,pe,ce,we){if(ce-pe<=J)return;const Ae=pe+ce>>1;Ee(ye,q,Ae,pe,ce,we%2),Te(ye,q,J,pe,Ae-1,we+1),Te(ye,q,J,Ae+1,ce,we+1)}function Ee(ye,q,J,pe,ce,we){for(;ce>pe;){if(ce-pe>600){const Be=ce-pe+1,Je=J-pe+1,et=Math.log(Be),Ge=.5*Math.exp(2*et/3),Ut=.5*Math.sqrt(et*Ge*(Be-Ge)/Be)*(Je-Be/2<0?-1:1);Ee(ye,q,J,Math.max(pe,Math.floor(J-Je*Ge/Be+Ut)),Math.min(ce,Math.floor(J+(Be-Je)*Ge/Be+Ut)),we)}const Ae=q[2*J+we];let Pe=pe,Me=ce;for(Ce(ye,q,pe,J),q[2*ce+we]>Ae&&Ce(ye,q,pe,ce);Pe<Me;){for(Ce(ye,q,Pe,Me),Pe++,Me--;q[2*Pe+we]<Ae;)Pe++;for(;q[2*Me+we]>Ae;)Me--}q[2*pe+we]===Ae?Ce(ye,q,pe,Me):(Me++,Ce(ye,q,Me,ce)),Me<=J&&(pe=Me+1),J<=Me&&(ce=Me-1)}}function Ce(ye,q,J,pe){ke(ye,J,pe),ke(q,2*J,2*pe),ke(q,2*J+1,2*pe+1)}function ke(ye,q,J){const pe=ye[q];ye[q]=ye[J],ye[J]=pe}function De(ye,q,J,pe){const ce=ye-J,we=q-pe;return ce*ce+we*we}V.exports=le,V.exports.fromVectorTileJs=le,V.exports.fromGeojsonVt=function(ye,q){q=q||{};var J={};for(var pe in ye)J[pe]=new Q(ye[pe].features,q),J[pe].name=pe,J[pe].version=q.version,J[pe].extent=q.extent;return le({layers:J})},V.exports.GeoJSONWrapper=Q;const Ke=ye=>ye[0],Ue=ye=>ye[1];class tt{constructor(q,J=Ke,pe=Ue,ce=64,we=Float64Array){this.nodeSize=ce,this.points=q;const Ae=q.length<65536?Uint16Array:Uint32Array,Pe=this.ids=new Ae(q.length),Me=this.coords=new we(2*q.length);for(let Be=0;Be<q.length;Be++)Pe[Be]=Be,Me[2*Be]=J(q[Be]),Me[2*Be+1]=pe(q[Be]);Te(Pe,Me,ce,0,Pe.length-1,0)}range(q,J,pe,ce){return function(we,Ae,Pe,Me,Be,Je,et){const Ge=[0,we.length-1,0],Ut=[];let Mt,at;for(;Ge.length;){const $t=Ge.pop(),Xt=Ge.pop(),En=Ge.pop();if(Xt-En<=et){for(let Gn=En;Gn<=Xt;Gn++)Mt=Ae[2*Gn],at=Ae[2*Gn+1],Mt>=Pe&&Mt<=Be&&at>=Me&&at<=Je&&Ut.push(we[Gn]);continue}const hn=Math.floor((En+Xt)/2);Mt=Ae[2*hn],at=Ae[2*hn+1],Mt>=Pe&&Mt<=Be&&at>=Me&&at<=Je&&Ut.push(we[hn]);const Pn=($t+1)%2;($t===0?Pe<=Mt:Me<=at)&&(Ge.push(En),Ge.push(hn-1),Ge.push(Pn)),($t===0?Be>=Mt:Je>=at)&&(Ge.push(hn+1),Ge.push(Xt),Ge.push(Pn))}return Ut}(this.ids,this.coords,q,J,pe,ce,this.nodeSize)}within(q,J,pe){return function(ce,we,Ae,Pe,Me,Be){const Je=[0,ce.length-1,0],et=[],Ge=Me*Me;for(;Je.length;){const Ut=Je.pop(),Mt=Je.pop(),at=Je.pop();if(Mt-at<=Be){for(let Pn=at;Pn<=Mt;Pn++)De(we[2*Pn],we[2*Pn+1],Ae,Pe)<=Ge&&et.push(ce[Pn]);continue}const $t=Math.floor((at+Mt)/2),Xt=we[2*$t],En=we[2*$t+1];De(Xt,En,Ae,Pe)<=Ge&&et.push(ce[$t]);const hn=(Ut+1)%2;(Ut===0?Ae-Me<=Xt:Pe-Me<=En)&&(Je.push(at),Je.push($t-1),Je.push(hn)),(Ut===0?Ae+Me>=Xt:Pe+Me>=En)&&(Je.push($t+1),Je.push(Mt),Je.push(hn))}return et}(this.ids,this.coords,q,J,pe,this.nodeSize)}}const lt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:ye=>ye},St=Math.fround||(We=new Float32Array(1),ye=>(We[0]=+ye,We[0]));var We;class bt{constructor(q){this.options=qe(Object.create(lt),q),this.trees=new Array(this.options.maxZoom+1)}load(q){const{log:J,minZoom:pe,maxZoom:ce,nodeSize:we}=this.options;J&&console.time("total time");const Ae=`prepare ${q.length} points`;J&&console.time(Ae),this.points=q;let Pe=[];for(let Me=0;Me<q.length;Me++)q[Me].geometry&&Pe.push(mt(q[Me],Me));this.trees[ce+1]=new tt(Pe,dt,_t,we,Float32Array),J&&console.timeEnd(Ae);for(let Me=ce;Me>=pe;Me--){const Be=+Date.now();Pe=this._cluster(Pe,Me),this.trees[Me]=new tt(Pe,dt,_t,we,Float32Array),J&&console.log("z%d: %d clusters in %dms",Me,Pe.length,+Date.now()-Be)}return J&&console.timeEnd("total time"),this}getClusters(q,J){let pe=((q[0]+180)%360+360)%360-180;const ce=Math.max(-90,Math.min(90,q[1]));let we=q[2]===180?180:((q[2]+180)%360+360)%360-180;const Ae=Math.max(-90,Math.min(90,q[3]));if(q[2]-q[0]>=360)pe=-180,we=180;else if(pe>we){const Je=this.getClusters([pe,ce,180,Ae],J),et=this.getClusters([-180,ce,we,Ae],J);return Je.concat(et)}const Pe=this.trees[this._limitZoom(J)],Me=Pe.range(rt(pe),ut(Ae),rt(we),ut(ce)),Be=[];for(const Je of Me){const et=Pe.points[Je];Be.push(et.numPoints?ct(et):this.points[et.index])}return Be}getChildren(q){const J=this._getOriginId(q),pe=this._getOriginZoom(q),ce="No cluster with the specified id.",we=this.trees[pe];if(!we)throw new Error(ce);const Ae=we.points[J];if(!Ae)throw new Error(ce);const Pe=this.options.radius/(this.options.extent*Math.pow(2,pe-1)),Me=we.within(Ae.x,Ae.y,Pe),Be=[];for(const Je of Me){const et=we.points[Je];et.parentId===q&&Be.push(et.numPoints?ct(et):this.points[et.index])}if(Be.length===0)throw new Error(ce);return Be}getLeaves(q,J,pe){const ce=[];return this._appendLeaves(ce,q,J=J||10,pe=pe||0,0),ce}getTile(q,J,pe){const ce=this.trees[this._limitZoom(q)],we=Math.pow(2,q),{extent:Ae,radius:Pe}=this.options,Me=Pe/Ae,Be=(pe-Me)/we,Je=(pe+1+Me)/we,et={features:[]};return this._addTileFeatures(ce.range((J-Me)/we,Be,(J+1+Me)/we,Je),ce.points,J,pe,we,et),J===0&&this._addTileFeatures(ce.range(1-Me/we,Be,1,Je),ce.points,we,pe,we,et),J===we-1&&this._addTileFeatures(ce.range(0,Be,Me/we,Je),ce.points,-1,pe,we,et),et.features.length?et:null}getClusterExpansionZoom(q){let J=this._getOriginZoom(q)-1;for(;J<=this.options.maxZoom;){const pe=this.getChildren(q);if(J++,pe.length!==1)break;q=pe[0].properties.cluster_id}return J}_appendLeaves(q,J,pe,ce,we){const Ae=this.getChildren(J);for(const Pe of Ae){const Me=Pe.properties;if(Me&&Me.cluster?we+Me.point_count<=ce?we+=Me.point_count:we=this._appendLeaves(q,Me.cluster_id,pe,ce,we):we<ce?we++:q.push(Pe),q.length===pe)break}return we}_addTileFeatures(q,J,pe,ce,we,Ae){for(const Pe of q){const Me=J[Pe],Be=Me.numPoints;let Je,et,Ge;if(Be)Je=wt(Me),et=Me.x,Ge=Me.y;else{const at=this.points[Me.index];Je=at.properties,et=rt(at.geometry.coordinates[0]),Ge=ut(at.geometry.coordinates[1])}const Ut={type:1,geometry:[[Math.round(this.options.extent*(et*we-pe)),Math.round(this.options.extent*(Ge*we-ce))]],tags:Je};let Mt;Be?Mt=Me.id:this.options.generateId?Mt=Me.index:this.points[Me.index].id&&(Mt=this.points[Me.index].id),Mt!==void 0&&(Ut.id=Mt),Ae.features.push(Ut)}}_limitZoom(q){return Math.max(this.options.minZoom,Math.min(Math.floor(+q),this.options.maxZoom+1))}_cluster(q,J){const pe=[],{radius:ce,extent:we,reduce:Ae,minPoints:Pe}=this.options,Me=ce/(we*Math.pow(2,J));for(let Be=0;Be<q.length;Be++){const Je=q[Be];if(Je.zoom<=J)continue;Je.zoom=J;const et=this.trees[J+1],Ge=et.within(Je.x,Je.y,Me),Ut=Je.numPoints||1;let Mt=Ut;for(const at of Ge){const $t=et.points[at];$t.zoom>J&&(Mt+=$t.numPoints||1)}if(Mt>Ut&&Mt>=Pe){let at=Je.x*Ut,$t=Je.y*Ut,Xt=Ae&&Ut>1?this._map(Je,!0):null;const En=(Be<<5)+(J+1)+this.points.length;for(const hn of Ge){const Pn=et.points[hn];if(Pn.zoom<=J)continue;Pn.zoom=J;const Gn=Pn.numPoints||1;at+=Pn.x*Gn,$t+=Pn.y*Gn,Pn.parentId=En,Ae&&(Xt||(Xt=this._map(Je,!0)),Ae(Xt,this._map(Pn)))}Je.parentId=En,pe.push(Qe(at/Mt,$t/Mt,En,Mt,Xt))}else if(pe.push(Je),Mt>1)for(const at of Ge){const $t=et.points[at];$t.zoom<=J||($t.zoom=J,pe.push($t))}}return pe}_getOriginId(q){return q-this.points.length>>5}_getOriginZoom(q){return(q-this.points.length)%32}_map(q,J){if(q.numPoints)return J?qe({},q.properties):q.properties;const pe=this.points[q.index].properties,ce=this.options.map(pe);return J&&ce===pe?qe({},ce):ce}}function Qe(ye,q,J,pe,ce){return{x:St(ye),y:St(q),zoom:1/0,id:J,parentId:-1,numPoints:pe,properties:ce}}function mt(ye,q){const[J,pe]=ye.geometry.coordinates;return{x:St(rt(J)),y:St(ut(pe)),zoom:1/0,index:q,parentId:-1}}function ct(ye){return{type:"Feature",id:ye.id,properties:wt(ye),geometry:{type:"Point",coordinates:[(q=ye.x,360*(q-.5)),nt(ye.y)]}};var q}function wt(ye){const q=ye.numPoints,J=q>=1e4?`${Math.round(q/1e3)}k`:q>=1e3?Math.round(q/100)/10+"k":q;return qe(qe({},ye.properties),{cluster:!0,cluster_id:ye.id,point_count:q,point_count_abbreviated:J})}function rt(ye){return ye/360+.5}function ut(ye){const q=Math.sin(ye*Math.PI/180),J=.5-.25*Math.log((1+q)/(1-q))/Math.PI;return J<0?0:J>1?1:J}function nt(ye){const q=(180-360*ye)*Math.PI/180;return 360*Math.atan(Math.exp(q))/Math.PI-90}function qe(ye,q){for(const J in q)ye[J]=q[J];return ye}function dt(ye){return ye.x}function _t(ye){return ye.y}function Dt(ye,q,J,pe){for(var ce,we=pe,Ae=J-q>>1,Pe=J-q,Me=ye[q],Be=ye[q+1],Je=ye[J],et=ye[J+1],Ge=q+3;Ge<J;Ge+=3){var Ut=Nt(ye[Ge],ye[Ge+1],Me,Be,Je,et);if(Ut>we)ce=Ge,we=Ut;else if(Ut===we){var Mt=Math.abs(Ge-Ae);Mt<Pe&&(ce=Ge,Pe=Mt)}}we>pe&&(ce-q>3&&Dt(ye,q,ce,pe),ye[ce+2]=we,J-ce>3&&Dt(ye,ce,J,pe))}function Nt(ye,q,J,pe,ce,we){var Ae=ce-J,Pe=we-pe;if(Ae!==0||Pe!==0){var Me=((ye-J)*Ae+(q-pe)*Pe)/(Ae*Ae+Pe*Pe);Me>1?(J=ce,pe=we):Me>0&&(J+=Ae*Me,pe+=Pe*Me)}return(Ae=ye-J)*Ae+(Pe=q-pe)*Pe}function jt(ye,q,J,pe){var ce={id:ye===void 0?null:ye,type:q,geometry:J,tags:pe,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(we){var Ae=we.geometry,Pe=we.type;if(Pe==="Point"||Pe==="MultiPoint"||Pe==="LineString")Ve(we,Ae);else if(Pe==="Polygon"||Pe==="MultiLineString")for(var Me=0;Me<Ae.length;Me++)Ve(we,Ae[Me]);else if(Pe==="MultiPolygon")for(Me=0;Me<Ae.length;Me++)for(var Be=0;Be<Ae[Me].length;Be++)Ve(we,Ae[Me][Be])}(ce),ce}function Ve(ye,q){for(var J=0;J<q.length;J+=3)ye.minX=Math.min(ye.minX,q[J]),ye.minY=Math.min(ye.minY,q[J+1]),ye.maxX=Math.max(ye.maxX,q[J]),ye.maxY=Math.max(ye.maxY,q[J+1])}function Ze(ye,q,J,pe){if(q.geometry){var ce=q.geometry.coordinates,we=q.geometry.type,Ae=Math.pow(J.tolerance/((1<<J.maxZoom)*J.extent),2),Pe=[],Me=q.id;if(J.promoteId?Me=q.properties[J.promoteId]:J.generateId&&(Me=pe||0),we==="Point")Yt(ce,Pe);else if(we==="MultiPoint")for(var Be=0;Be<ce.length;Be++)Yt(ce[Be],Pe);else if(we==="LineString")sn(ce,Pe,Ae,!1);else if(we==="MultiLineString"){if(J.lineMetrics){for(Be=0;Be<ce.length;Be++)sn(ce[Be],Pe=[],Ae,!1),ye.push(jt(Me,"LineString",Pe,q.properties));return}Gt(ce,Pe,Ae,!1)}else if(we==="Polygon")Gt(ce,Pe,Ae,!0);else{if(we!=="MultiPolygon"){if(we==="GeometryCollection"){for(Be=0;Be<q.geometry.geometries.length;Be++)Ze(ye,{id:Me,geometry:q.geometry.geometries[Be],properties:q.properties},J,pe);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Be=0;Be<ce.length;Be++){var Je=[];Gt(ce[Be],Je,Ae,!0),Pe.push(Je)}}ye.push(jt(Me,we,Pe,q.properties))}}function Yt(ye,q){q.push(zt(ye[0])),q.push(Rt(ye[1])),q.push(0)}function sn(ye,q,J,pe){for(var ce,we,Ae=0,Pe=0;Pe<ye.length;Pe++){var Me=zt(ye[Pe][0]),Be=Rt(ye[Pe][1]);q.push(Me),q.push(Be),q.push(0),Pe>0&&(Ae+=pe?(ce*Be-Me*we)/2:Math.sqrt(Math.pow(Me-ce,2)+Math.pow(Be-we,2))),ce=Me,we=Be}var Je=q.length-3;q[2]=1,Dt(q,0,Je,J),q[Je+2]=1,q.size=Math.abs(Ae),q.start=0,q.end=q.size}function Gt(ye,q,J,pe){for(var ce=0;ce<ye.length;ce++){var we=[];sn(ye[ce],we,J,pe),q.push(we)}}function zt(ye){return ye/360+.5}function Rt(ye){var q=Math.sin(ye*Math.PI/180),J=.5-.25*Math.log((1+q)/(1-q))/Math.PI;return J<0?0:J>1?1:J}function Qt(ye,q,J,pe,ce,we,Ae,Pe){if(pe/=q,we>=(J/=q)&&Ae<pe)return ye;if(Ae<J||we>=pe)return null;for(var Me=[],Be=0;Be<ye.length;Be++){var Je=ye[Be],et=Je.geometry,Ge=Je.type,Ut=ce===0?Je.minX:Je.minY,Mt=ce===0?Je.maxX:Je.maxY;if(Ut>=J&&Mt<pe)Me.push(Je);else if(!(Mt<J||Ut>=pe)){var at=[];if(Ge==="Point"||Ge==="MultiPoint")pn(et,at,J,pe,ce);else if(Ge==="LineString")ot(et,at,J,pe,ce,!1,Pe.lineMetrics);else if(Ge==="MultiLineString")Tt(et,at,J,pe,ce,!1);else if(Ge==="Polygon")Tt(et,at,J,pe,ce,!0);else if(Ge==="MultiPolygon")for(var $t=0;$t<et.length;$t++){var Xt=[];Tt(et[$t],Xt,J,pe,ce,!0),Xt.length&&at.push(Xt)}if(at.length){if(Pe.lineMetrics&&Ge==="LineString"){for($t=0;$t<at.length;$t++)Me.push(jt(Je.id,Ge,at[$t],Je.tags));continue}Ge!=="LineString"&&Ge!=="MultiLineString"||(at.length===1?(Ge="LineString",at=at[0]):Ge="MultiLineString"),Ge!=="Point"&&Ge!=="MultiPoint"||(Ge=at.length===3?"Point":"MultiPoint"),Me.push(jt(Je.id,Ge,at,Je.tags))}}}return Me.length?Me:null}function pn(ye,q,J,pe,ce){for(var we=0;we<ye.length;we+=3){var Ae=ye[we+ce];Ae>=J&&Ae<=pe&&(q.push(ye[we]),q.push(ye[we+1]),q.push(ye[we+2]))}}function ot(ye,q,J,pe,ce,we,Ae){for(var Pe,Me,Be=Lt(ye),Je=ce===0?Zt:ht,et=ye.start,Ge=0;Ge<ye.length-3;Ge+=3){var Ut=ye[Ge],Mt=ye[Ge+1],at=ye[Ge+2],$t=ye[Ge+3],Xt=ye[Ge+4],En=ce===0?Ut:Mt,hn=ce===0?$t:Xt,Pn=!1;Ae&&(Pe=Math.sqrt(Math.pow(Ut-$t,2)+Math.pow(Mt-Xt,2))),En<J?hn>J&&(Me=Je(Be,Ut,Mt,$t,Xt,J),Ae&&(Be.start=et+Pe*Me)):En>pe?hn<pe&&(Me=Je(Be,Ut,Mt,$t,Xt,pe),Ae&&(Be.start=et+Pe*Me)):Kt(Be,Ut,Mt,at),hn<J&&En>=J&&(Me=Je(Be,Ut,Mt,$t,Xt,J),Pn=!0),hn>pe&&En<=pe&&(Me=Je(Be,Ut,Mt,$t,Xt,pe),Pn=!0),!we&&Pn&&(Ae&&(Be.end=et+Pe*Me),q.push(Be),Be=Lt(ye)),Ae&&(et+=Pe)}var Gn=ye.length-3;Ut=ye[Gn],Mt=ye[Gn+1],at=ye[Gn+2],(En=ce===0?Ut:Mt)>=J&&En<=pe&&Kt(Be,Ut,Mt,at),Gn=Be.length-3,we&&Gn>=3&&(Be[Gn]!==Be[0]||Be[Gn+1]!==Be[1])&&Kt(Be,Be[0],Be[1],Be[2]),Be.length&&q.push(Be)}function Lt(ye){var q=[];return q.size=ye.size,q.start=ye.start,q.end=ye.end,q}function Tt(ye,q,J,pe,ce,we){for(var Ae=0;Ae<ye.length;Ae++)ot(ye[Ae],q,J,pe,ce,we,!1)}function Kt(ye,q,J,pe){ye.push(q),ye.push(J),ye.push(pe)}function Zt(ye,q,J,pe,ce,we){var Ae=(we-q)/(pe-q);return ye.push(we),ye.push(J+(ce-J)*Ae),ye.push(1),Ae}function ht(ye,q,J,pe,ce,we){var Ae=(we-J)/(ce-J);return ye.push(q+(pe-q)*Ae),ye.push(we),ye.push(1),Ae}function xn(ye,q){for(var J=[],pe=0;pe<ye.length;pe++){var ce,we=ye[pe],Ae=we.type;if(Ae==="Point"||Ae==="MultiPoint"||Ae==="LineString")ce=bn(we.geometry,q);else if(Ae==="MultiLineString"||Ae==="Polygon"){ce=[];for(var Pe=0;Pe<we.geometry.length;Pe++)ce.push(bn(we.geometry[Pe],q))}else if(Ae==="MultiPolygon")for(ce=[],Pe=0;Pe<we.geometry.length;Pe++){for(var Me=[],Be=0;Be<we.geometry[Pe].length;Be++)Me.push(bn(we.geometry[Pe][Be],q));ce.push(Me)}J.push(jt(we.id,Ae,ce,we.tags))}return J}function bn(ye,q){var J=[];J.size=ye.size,ye.start!==void 0&&(J.start=ye.start,J.end=ye.end);for(var pe=0;pe<ye.length;pe+=3)J.push(ye[pe]+q,ye[pe+1],ye[pe+2]);return J}function tn(ye,q){if(ye.transformed)return ye;var J,pe,ce,we=1<<ye.z,Ae=ye.x,Pe=ye.y;for(J=0;J<ye.features.length;J++){var Me=ye.features[J],Be=Me.geometry,Je=Me.type;if(Me.geometry=[],Je===1)for(pe=0;pe<Be.length;pe+=2)Me.geometry.push(Bt(Be[pe],Be[pe+1],q,we,Ae,Pe));else for(pe=0;pe<Be.length;pe++){var et=[];for(ce=0;ce<Be[pe].length;ce+=2)et.push(Bt(Be[pe][ce],Be[pe][ce+1],q,we,Ae,Pe));Me.geometry.push(et)}}return ye.transformed=!0,ye}function Bt(ye,q,J,pe,ce,we){return[Math.round(J*(ye*pe-ce)),Math.round(J*(q*pe-we))]}function gt(ye,q,J,pe,ce){for(var we=q===ce.maxZoom?0:ce.tolerance/((1<<q)*ce.extent),Ae={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:J,y:pe,z:q,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Pe=0;Pe<ye.length;Pe++){Ae.numFeatures++,xt(Ae,ye[Pe],we,ce);var Me=ye[Pe].minX,Be=ye[Pe].minY,Je=ye[Pe].maxX,et=ye[Pe].maxY;Me<Ae.minX&&(Ae.minX=Me),Be<Ae.minY&&(Ae.minY=Be),Je>Ae.maxX&&(Ae.maxX=Je),et>Ae.maxY&&(Ae.maxY=et)}return Ae}function xt(ye,q,J,pe){var ce=q.geometry,we=q.type,Ae=[];if(we==="Point"||we==="MultiPoint")for(var Pe=0;Pe<ce.length;Pe+=3)Ae.push(ce[Pe]),Ae.push(ce[Pe+1]),ye.numPoints++,ye.numSimplified++;else if(we==="LineString")Vt(Ae,ce,ye,J,!1,!1);else if(we==="MultiLineString"||we==="Polygon")for(Pe=0;Pe<ce.length;Pe++)Vt(Ae,ce[Pe],ye,J,we==="Polygon",Pe===0);else if(we==="MultiPolygon")for(var Me=0;Me<ce.length;Me++){var Be=ce[Me];for(Pe=0;Pe<Be.length;Pe++)Vt(Ae,Be[Pe],ye,J,!0,Pe===0)}if(Ae.length){var Je=q.tags||null;if(we==="LineString"&&pe.lineMetrics){for(var et in Je={},q.tags)Je[et]=q.tags[et];Je.mapbox_clip_start=ce.start/ce.size,Je.mapbox_clip_end=ce.end/ce.size}var Ge={geometry:Ae,type:we==="Polygon"||we==="MultiPolygon"?3:we==="LineString"||we==="MultiLineString"?2:1,tags:Je};q.id!==null&&(Ge.id=q.id),ye.features.push(Ge)}}function Vt(ye,q,J,pe,ce,we){var Ae=pe*pe;if(pe>0&&q.size<(ce?Ae:pe))J.numPoints+=q.length/3;else{for(var Pe=[],Me=0;Me<q.length;Me+=3)(pe===0||q[Me+2]>Ae)&&(J.numSimplified++,Pe.push(q[Me]),Pe.push(q[Me+1])),J.numPoints++;ce&&function(Be,Je){for(var et=0,Ge=0,Ut=Be.length,Mt=Ut-2;Ge<Ut;Mt=Ge,Ge+=2)et+=(Be[Ge]-Be[Mt])*(Be[Ge+1]+Be[Mt+1]);if(et>0===Je)for(Ge=0,Ut=Be.length;Ge<Ut/2;Ge+=2){var at=Be[Ge],$t=Be[Ge+1];Be[Ge]=Be[Ut-2-Ge],Be[Ge+1]=Be[Ut-1-Ge],Be[Ut-2-Ge]=at,Be[Ut-1-Ge]=$t}}(Pe,we),ye.push(Pe)}}function qt(ye,q){var J=(q=this.options=function(ce,we){for(var Ae in we)ce[Ae]=we[Ae];return ce}(Object.create(this.options),q)).debug;if(J&&console.time("preprocess data"),q.maxZoom<0||q.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(q.promoteId&&q.generateId)throw new Error("promoteId and generateId cannot be used together.");var pe=function(ce,we){var Ae=[];if(ce.type==="FeatureCollection")for(var Pe=0;Pe<ce.features.length;Pe++)Ze(Ae,ce.features[Pe],we,Pe);else Ze(Ae,ce.type==="Feature"?ce:{geometry:ce},we);return Ae}(ye,q);this.tiles={},this.tileCoords=[],J&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",q.indexMaxZoom,q.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),pe=function(ce,we){var Ae=we.buffer/we.extent,Pe=ce,Me=Qt(ce,1,-1-Ae,Ae,0,-1,2,we),Be=Qt(ce,1,1-Ae,2+Ae,0,-1,2,we);return(Me||Be)&&(Pe=Qt(ce,1,-Ae,1+Ae,0,-1,2,we)||[],Me&&(Pe=xn(Me,1).concat(Pe)),Be&&(Pe=Pe.concat(xn(Be,-1)))),Pe}(pe,q),pe.length&&this.splitTile(pe,0,0,0),J&&(pe.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 vn(ye,q,J){return 32*((1<<ye)*J+q)+ye}function Fn(ye,q){const J=ye.tileID.canonical;if(!this._geoJSONIndex)return q(null,null);const pe=this._geoJSONIndex.getTile(J.z,J.x,J.y);if(!pe)return q(null,null);const ce=new F(pe.features);let we=V.exports(ce);we.byteOffset===0&&we.byteLength===we.buffer.byteLength||(we=new Uint8Array(we)),q(null,{vectorTile:ce,rawData:we.buffer})}qt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},qt.prototype.splitTile=function(ye,q,J,pe,ce,we,Ae){for(var Pe=[ye,q,J,pe],Me=this.options,Be=Me.debug;Pe.length;){pe=Pe.pop(),J=Pe.pop(),q=Pe.pop(),ye=Pe.pop();var Je=1<<q,et=vn(q,J,pe),Ge=this.tiles[et];if(!Ge&&(Be>1&&console.time("creation"),Ge=this.tiles[et]=gt(ye,q,J,pe,Me),this.tileCoords.push({z:q,x:J,y:pe}),Be)){Be>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",q,J,pe,Ge.numFeatures,Ge.numPoints,Ge.numSimplified),console.timeEnd("creation"));var Ut="z"+q;this.stats[Ut]=(this.stats[Ut]||0)+1,this.total++}if(Ge.source=ye,ce){if(q===Me.maxZoom||q===ce)continue;var Mt=1<<ce-q;if(J!==Math.floor(we/Mt)||pe!==Math.floor(Ae/Mt))continue}else if(q===Me.indexMaxZoom||Ge.numPoints<=Me.indexMaxPoints)continue;if(Ge.source=null,ye.length!==0){Be>1&&console.time("clipping");var at,$t,Xt,En,hn,Pn,Gn=.5*Me.buffer/Me.extent,lr=.5-Gn,Zr=.5+Gn,hr=1+Gn;at=$t=Xt=En=null,hn=Qt(ye,Je,J-Gn,J+Zr,0,Ge.minX,Ge.maxX,Me),Pn=Qt(ye,Je,J+lr,J+hr,0,Ge.minX,Ge.maxX,Me),ye=null,hn&&(at=Qt(hn,Je,pe-Gn,pe+Zr,1,Ge.minY,Ge.maxY,Me),$t=Qt(hn,Je,pe+lr,pe+hr,1,Ge.minY,Ge.maxY,Me),hn=null),Pn&&(Xt=Qt(Pn,Je,pe-Gn,pe+Zr,1,Ge.minY,Ge.maxY,Me),En=Qt(Pn,Je,pe+lr,pe+hr,1,Ge.minY,Ge.maxY,Me),Pn=null),Be>1&&console.timeEnd("clipping"),Pe.push(at||[],q+1,2*J,2*pe),Pe.push($t||[],q+1,2*J,2*pe+1),Pe.push(Xt||[],q+1,2*J+1,2*pe),Pe.push(En||[],q+1,2*J+1,2*pe+1)}}},qt.prototype.getTile=function(ye,q,J){var pe=this.options,ce=pe.extent,we=pe.debug;if(ye<0||ye>24)return null;var Ae=1<<ye,Pe=vn(ye,q=(q%Ae+Ae)%Ae,J);if(this.tiles[Pe])return tn(this.tiles[Pe],ce);we>1&&console.log("drilling down to z%d-%d-%d",ye,q,J);for(var Me,Be=ye,Je=q,et=J;!Me&&Be>0;)Be--,Je=Math.floor(Je/2),et=Math.floor(et/2),Me=this.tiles[vn(Be,Je,et)];return Me&&Me.source?(we>1&&console.log("found parent tile z%d-%d-%d",Be,Je,et),we>1&&console.time("drilling down"),this.splitTile(Me.source,Be,Je,et,ye,q,J),we>1&&console.timeEnd("drilling down"),this.tiles[Pe]?tn(this.tiles[Pe],ce):null):null};class tr extends P{constructor(q,J,pe,ce){super(q,J,pe,Fn),ce&&(this.loadGeoJSON=ce)}loadData(q,J){var pe;(pe=this._pendingRequest)===null||pe===void 0||pe.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const ce=!!(q&&q.request&&q.request.collectResourceTiming)&&new a.RequestPerformance(q.request);this._pendingCallback=J,this._pendingRequest=this.loadGeoJSON(q,(we,Ae)=>{if(delete this._pendingCallback,delete this._pendingRequest,we||!Ae)return J(we);if(typeof Ae!="object")return J(new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`));{T(Ae,!0);try{if(q.filter){const Me=a.createExpression(q.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Me.result==="error")throw new Error(Me.value.map(Je=>`${Je.key}: ${Je.message}`).join(", "));Ae={type:"FeatureCollection",features:Ae.features.filter(Je=>Me.value.evaluate({zoom:0},Je))}}this._geoJSONIndex=q.cluster?new bt(function({superclusterOptions:Me,clusterProperties:Be}){if(!Be||!Me)return Me;const Je={},et={},Ge={accumulated:null,zoom:0},Ut={properties:null},Mt=Object.keys(Be);for(const at of Mt){const[$t,Xt]=Be[at],En=a.createExpression(Xt),hn=a.createExpression(typeof $t=="string"?[$t,["accumulated"],["get",at]]:$t);Je[at]=En.value,et[at]=hn.value}return Me.map=at=>{Ut.properties=at;const $t={};for(const Xt of Mt)$t[Xt]=Je[Xt].evaluate(Ge,Ut);return $t},Me.reduce=(at,$t)=>{Ut.properties=$t;for(const Xt of Mt)Ge.accumulated=at[Xt],at[Xt]=et[Xt].evaluate(Ge,Ut)},Me}(q)).load(Ae.features):function(Me,Be){return new qt(Me,Be)}(Ae,q.geojsonVtOptions)}catch(Me){return J(Me)}this.loaded={};const Pe={};if(ce){const Me=ce.finish();Me&&(Pe.resourceTiming={},Pe.resourceTiming[q.source]=JSON.parse(JSON.stringify(Me)))}J(null,Pe)}})}reloadTile(q,J){const pe=this.loaded;return pe&&pe[q.uid]?super.reloadTile(q,J):this.loadTile(q,J)}loadGeoJSON(q,J){if(q.request)return a.getJSON(q.request,J);if(typeof q.data=="string")try{J(null,JSON.parse(q.data))}catch{J(new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`))}else J(new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}}removeSource(q,J){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),J()}getClusterExpansionZoom(q,J){try{J(null,this._geoJSONIndex.getClusterExpansionZoom(q.clusterId))}catch(pe){J(pe)}}getClusterChildren(q,J){try{J(null,this._geoJSONIndex.getChildren(q.clusterId))}catch(pe){J(pe)}}getClusterLeaves(q,J){try{J(null,this._geoJSONIndex.getLeaves(q.clusterId,q.limit,q.offset))}catch(pe){J(pe)}}}class nr{constructor(q){this.self=q,this.actor=new a.Actor(q,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:P,geojson:tr},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(J,pe)=>{if(this.workerSourceTypes[J])throw new Error(`Worker source with name "${J}" already registered.`);this.workerSourceTypes[J]=pe},this.self.registerRTLTextPlugin=J=>{if(a.plugin.isParsed())throw new Error("RTL text plugin already registered.");a.plugin.applyArabicShaping=J.applyArabicShaping,a.plugin.processBidirectionalText=J.processBidirectionalText,a.plugin.processStyledBidirectionalText=J.processStyledBidirectionalText}}setReferrer(q,J){this.referrer=J}setImages(q,J,pe){this.availableImages[q]=J;for(const ce in this.workerSources[q]){const we=this.workerSources[q][ce];for(const Ae in we)we[Ae].availableImages=J}pe()}setLayers(q,J,pe){this.getLayerIndex(q).replace(J),pe()}updateLayers(q,J,pe){this.getLayerIndex(q).update(J.layers,J.removedIds),pe()}loadTile(q,J,pe){this.getWorkerSource(q,J.type,J.source).loadTile(J,pe)}loadDEMTile(q,J,pe){this.getDEMWorkerSource(q,J.source).loadTile(J,pe)}reloadTile(q,J,pe){this.getWorkerSource(q,J.type,J.source).reloadTile(J,pe)}abortTile(q,J,pe){this.getWorkerSource(q,J.type,J.source).abortTile(J,pe)}removeTile(q,J,pe){this.getWorkerSource(q,J.type,J.source).removeTile(J,pe)}removeDEMTile(q,J){this.getDEMWorkerSource(q,J.source).removeTile(J)}removeSource(q,J,pe){if(!this.workerSources[q]||!this.workerSources[q][J.type]||!this.workerSources[q][J.type][J.source])return;const ce=this.workerSources[q][J.type][J.source];delete this.workerSources[q][J.type][J.source],ce.removeSource!==void 0?ce.removeSource(J,pe):pe()}loadWorkerSource(q,J,pe){try{this.self.importScripts(J.url),pe()}catch(ce){pe(ce.toString())}}syncRTLPluginState(q,J,pe){try{a.plugin.setState(J);const ce=a.plugin.getPluginURL();if(a.plugin.isLoaded()&&!a.plugin.isParsed()&&ce!=null){this.self.importScripts(ce);const we=a.plugin.isParsed();pe(we?void 0:new Error(`RTL Text Plugin failed to import scripts from ${ce}`),we)}}catch(ce){pe(ce.toString())}}getAvailableImages(q){let J=this.availableImages[q];return J||(J=[]),J}getLayerIndex(q){let J=this.layerIndexes[q];return J||(J=this.layerIndexes[q]=new p),J}getWorkerSource(q,J,pe){if(this.workerSources[q]||(this.workerSources[q]={}),this.workerSources[q][J]||(this.workerSources[q][J]={}),!this.workerSources[q][J][pe]){const ce={send:(we,Ae,Pe)=>{this.actor.send(we,Ae,Pe,q)}};this.workerSources[q][J][pe]=new this.workerSourceTypes[J](ce,this.getLayerIndex(q),this.getAvailableImages(q))}return this.workerSources[q][J][pe]}getDEMWorkerSource(q,J){return this.demWorkerSources[q]||(this.demWorkerSources[q]={}),this.demWorkerSources[q][J]||(this.demWorkerSources[q][J]=new k),this.demWorkerSources[q][J]}enforceCacheSizeLimit(q,J){a.enforceCacheSizeLimit(J)}}return a.isWorker()&&(self.worker=new nr(self)),nr}),o(["./shared"],function(a){var u=d;function d(C){return!function(c){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 b,E,A=new Blob([""],{type:"text/javascript"}),z=URL.createObjectURL(A);try{E=new Worker(z),b=!0}catch{b=!1}return E&&E.terminate(),URL.revokeObjectURL(z),b}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var b=document.createElement("canvas");b.width=b.height=1;var E=b.getContext("2d");if(!E)return!1;var A=E.getImageData(0,0,1,1);return A&&A.width===b.width}()?(p[g=c&&c.failIfMajorPerformanceCaveat]===void 0&&(p[g]=function(b){var E,A=function(z){var j=document.createElement("canvas"),K=Object.create(d.webGLContextAttributes);return K.failIfMajorPerformanceCaveat=z,j.getContext("webgl",K)||j.getContext("experimental-webgl",K)}(b);if(!A)return!1;try{E=A.createShader(A.VERTEX_SHADER)}catch{return!1}return!(!E||A.isContextLost())&&(A.shaderSource(E,"void main() {}"),A.compileShader(E),A.getShaderParameter(E,A.COMPILE_STATUS)===!0)}(g)),p[g]?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 g}(C)}var p={};function m(C,c){if(Array.isArray(C)){if(!Array.isArray(c)||C.length!==c.length)return!1;for(let g=0;g<C.length;g++)if(!m(C[g],c[g]))return!1;return!0}if(typeof C=="object"&&C!==null&&c!==null){if(typeof c!="object"||Object.keys(C).length!==Object.keys(c).length)return!1;for(const g in C)if(!m(C[g],c[g]))return!1;return!0}return C===c}d.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};class v{static testProp(c){if(!v.docStyle)return c[0];for(let g=0;g<c.length;g++)if(c[g]in v.docStyle)return c[g];return c[0]}static create(c,g,b){const E=window.document.createElement(c);return g!==void 0&&(E.className=g),b&&b.appendChild(E),E}static createNS(c,g){return window.document.createElementNS(c,g)}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(c,g){c.style[v.transformProp]=g}static addEventListener(c,g,b,E={}){c.addEventListener(g,b,"passive"in E?E:E.capture)}static removeEventListener(c,g,b,E={}){c.removeEventListener(g,b,"passive"in E?E:E.capture)}static suppressClickInternal(c){c.preventDefault(),c.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(c,g){const b=c.getBoundingClientRect();return new a.pointGeometry(g.clientX-b.left-c.clientLeft,g.clientY-b.top-c.clientTop)}static touchPos(c,g){const b=c.getBoundingClientRect(),E=[];for(let A=0;A<g.length;A++)E.push(new a.pointGeometry(g[A].clientX-b.left-c.clientLeft,g[A].clientY-b.top-c.clientTop));return E}static mouseButton(c){return c.button}static remove(c){c.parentNode&&c.parentNode.removeChild(c)}}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 x{constructor(c){this._transformRequestFn=c}transformRequest(c,g){return this._transformRequestFn&&this._transformRequestFn(c,g)||{url:c}}normalizeSpriteURL(c,g,b){const E=function(A){const z=A.match(_);if(!z)throw new Error(`Unable to parse URL "${A}"`);return{protocol:z[1],authority:z[2],path:z[3]||"/",params:z[4]?z[4].split("&"):[]}}(c);return E.path+=`${g}${b}`,function(A){const z=A.params.length?`?${A.params.join("&")}`:"";return`${A.protocol}://${A.authority}${A.path}${z}`}(E)}setTransformRequest(c){this._transformRequestFn=c}}const _=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;class P{constructor(c,g,b,E){this.context=c,this.format=b,this.texture=c.gl.createTexture(),this.update(g,E)}update(c,g,b){const{width:E,height:A}=c,z=!(this.size&&this.size[0]===E&&this.size[1]===A||b),{context:j}=this,{gl:K}=j;if(this.useMipmap=Boolean(g&&g.useMipmap),K.bindTexture(K.TEXTURE_2D,this.texture),j.pixelStoreUnpackFlipY.set(!1),j.pixelStoreUnpack.set(1),j.pixelStoreUnpackPremultiplyAlpha.set(this.format===K.RGBA&&(!g||g.premultiply!==!1)),z)this.size=[E,A],c instanceof HTMLImageElement||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement||c instanceof ImageData||a.isImageBitmap(c)?K.texImage2D(K.TEXTURE_2D,0,this.format,this.format,K.UNSIGNED_BYTE,c):K.texImage2D(K.TEXTURE_2D,0,this.format,E,A,0,this.format,K.UNSIGNED_BYTE,c.data);else{const{x:Y,y:ie}=b||{x:0,y:0};c instanceof HTMLImageElement||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement||c instanceof ImageData||a.isImageBitmap(c)?K.texSubImage2D(K.TEXTURE_2D,0,Y,ie,K.RGBA,K.UNSIGNED_BYTE,c):K.texSubImage2D(K.TEXTURE_2D,0,Y,ie,E,A,K.RGBA,K.UNSIGNED_BYTE,c.data)}this.useMipmap&&this.isSizePowerOfTwo()&&K.generateMipmap(K.TEXTURE_2D)}bind(c,g,b){const{context:E}=this,{gl:A}=E;A.bindTexture(A.TEXTURE_2D,this.texture),b!==A.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(b=A.LINEAR),c!==this.filter&&(A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,c),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,b||c),this.filter=c),g!==this.wrap&&(A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,g),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,g),this.wrap=g)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:c}=this.context;c.deleteTexture(this.texture),this.texture=null}}function k(C){const{userImage:c}=C;return!!(c&&c.render&&c.render())&&(C.data.replace(new Uint8Array(c.data.buffer)),!0)}class T extends a.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(c){if(this.loaded!==c&&(this.loaded=c,c)){for(const{ids:g,callback:b}of this.requestors)this._notify(g,b);this.requestors=[]}}getImage(c){return this.images[c]}addImage(c,g){if(this.images[c])throw new Error(`Image id ${c} already exist, use updateImage instead`);this._validate(c,g)&&(this.images[c]=g)}_validate(c,g){let b=!0;return this._validateStretch(g.stretchX,g.data&&g.data.width)||(this.fire(new a.ErrorEvent(new Error(`Image "${c}" has invalid "stretchX" value`))),b=!1),this._validateStretch(g.stretchY,g.data&&g.data.height)||(this.fire(new a.ErrorEvent(new Error(`Image "${c}" has invalid "stretchY" value`))),b=!1),this._validateContent(g.content,g)||(this.fire(new a.ErrorEvent(new Error(`Image "${c}" has invalid "content" value`))),b=!1),b}_validateStretch(c,g){if(!c)return!0;let b=0;for(const E of c){if(E[0]<b||E[1]<E[0]||g<E[1])return!1;b=E[1]}return!0}_validateContent(c,g){return!(c&&(c.length!==4||c[0]<0||g.data.width<c[0]||c[1]<0||g.data.height<c[1]||c[2]<0||g.data.width<c[2]||c[3]<0||g.data.height<c[3]||c[2]<c[0]||c[3]<c[1]))}updateImage(c,g){const b=this.images[c];if(b.data.width!==g.data.width||b.data.height!==g.data.height)throw new Error(`size mismatch between old image (${b.data.width}x${b.data.height}) and new image (${g.data.width}x${g.data.height}).`);g.version=b.version+1,this.images[c]=g,this.updatedImages[c]=!0}removeImage(c){const g=this.images[c];delete this.images[c],delete this.patterns[c],g.userImage&&g.userImage.onRemove&&g.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(c,g){let b=!0;if(!this.isLoaded())for(const E of c)this.images[E]||(b=!1);this.isLoaded()||b?this._notify(c,g):this.requestors.push({ids:c,callback:g})}_notify(c,g){const b={};for(const E of c){this.images[E]||this.fire(new a.Event("styleimagemissing",{id:E}));const A=this.images[E];A?b[E]={data:A.data.clone(),pixelRatio:A.pixelRatio,sdf:A.sdf,version:A.version,stretchX:A.stretchX,stretchY:A.stretchY,content:A.content,hasRenderCallback:Boolean(A.userImage&&A.userImage.render)}:a.warnOnce(`Image "${E}" 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.`)}g(null,b)}getPixelSize(){const{width:c,height:g}=this.atlasImage;return{width:c,height:g}}getPattern(c){const g=this.patterns[c],b=this.getImage(c);if(!b)return null;if(g&&g.position.version===b.version)return g.position;if(g)g.position.version=b.version;else{const E={w:b.data.width+2,h:b.data.height+2,x:0,y:0},A=new a.ImagePosition(E,b);this.patterns[c]={bin:E,position:A}}return this._updatePatternAtlas(),this.patterns[c].position}bind(c){const g=c.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new P(c,this.atlasImage,g.RGBA),this.atlasTexture.bind(g.LINEAR,g.CLAMP_TO_EDGE)}_updatePatternAtlas(){const c=[];for(const A in this.patterns)c.push(this.patterns[A].bin);const{w:g,h:b}=a.potpack(c),E=this.atlasImage;E.resize({width:g||1,height:b||1});for(const A in this.patterns){const{bin:z}=this.patterns[A],j=z.x+1,K=z.y+1,Y=this.images[A].data,ie=Y.width,ue=Y.height;a.RGBAImage.copy(Y,E,{x:0,y:0},{x:j,y:K},{width:ie,height:ue}),a.RGBAImage.copy(Y,E,{x:0,y:ue-1},{x:j,y:K-1},{width:ie,height:1}),a.RGBAImage.copy(Y,E,{x:0,y:0},{x:j,y:K+ue},{width:ie,height:1}),a.RGBAImage.copy(Y,E,{x:ie-1,y:0},{x:j-1,y:K},{width:1,height:ue}),a.RGBAImage.copy(Y,E,{x:0,y:0},{x:j+ie,y:K},{width:1,height:ue})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(c){for(const g of c){if(this.callbackDispatchedThisFrame[g])continue;this.callbackDispatchedThisFrame[g]=!0;const b=this.images[g];b||a.warnOnce(`Image with ID: "${g}" was not found`),k(b)&&this.updateImage(g,b)}}}const M=1e20;function O(C,c,g,b,E,A,z,j,K){for(let Y=c;Y<c+b;Y++)N(C,g*A+Y,A,E,z,j,K);for(let Y=g;Y<g+E;Y++)N(C,Y*A+c,1,b,z,j,K)}function N(C,c,g,b,E,A,z){A[0]=0,z[0]=-M,z[1]=M,E[0]=C[c];for(let j=1,K=0,Y=0;j<b;j++){E[j]=C[c+j*g];const ie=j*j;do{const ue=A[K];Y=(E[j]-E[ue]+ie-ue*ue)/(j-ue)/2}while(Y<=z[K]&&--K>-1);K++,A[K]=j,z[K]=Y,z[K+1]=M}for(let j=0,K=0;j<b;j++){for(;z[K+1]<j;)K++;const Y=A[K],ie=j-Y;C[c+j*g]=E[Y]+ie*ie}}class L{constructor(c,g){this.requestManager=c,this.localIdeographFontFamily=g,this.entries={}}setURL(c){this.url=c}getGlyphs(c,g){const b=[];for(const E in c)for(const A of c[E])b.push({stack:E,id:A});a.asyncAll(b,({stack:E,id:A},z)=>{let j=this.entries[E];j||(j=this.entries[E]={glyphs:{},requests:{},ranges:{}});let K=j.glyphs[A];if(K!==void 0)return void z(null,{stack:E,id:A,glyph:K});if(K=this._tinySDF(j,E,A),K)return j.glyphs[A]=K,void z(null,{stack:E,id:A,glyph:K});const Y=Math.floor(A/256);if(256*Y>65535)return void z(new Error("glyphs > 65535 not supported"));if(j.ranges[Y])return void z(null,{stack:E,id:A,glyph:K});let ie=j.requests[Y];ie||(ie=j.requests[Y]=[],L.loadGlyphRange(E,Y,this.url,this.requestManager,(ue,me)=>{if(me){for(const Re in me)this._doesCharSupportLocalGlyph(+Re)||(j.glyphs[+Re]=me[+Re]);j.ranges[Y]=!0}for(const Re of ie)Re(ue,me);delete j.requests[Y]})),ie.push((ue,me)=>{ue?z(ue):me&&z(null,{stack:E,id:A,glyph:me[A]||null})})},(E,A)=>{if(E)g(E);else if(A){const z={};for(const{stack:j,id:K,glyph:Y}of A)(z[j]||(z[j]={}))[K]=Y&&{id:Y.id,bitmap:Y.bitmap.clone(),metrics:Y.metrics};g(null,z)}})}_doesCharSupportLocalGlyph(c){return!!this.localIdeographFontFamily&&(a.unicodeBlockLookup["CJK Unified Ideographs"](c)||a.unicodeBlockLookup["Hangul Syllables"](c)||a.unicodeBlockLookup.Hiragana(c)||a.unicodeBlockLookup.Katakana(c))}_tinySDF(c,g,b){const E=this.localIdeographFontFamily;if(!E||!this._doesCharSupportLocalGlyph(b))return;let A=c.tinySDF;if(!A){let j="400";/bold/i.test(g)?j="900":/medium/i.test(g)?j="500":/light/i.test(g)&&(j="200"),A=c.tinySDF=new L.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:E,fontWeight:j})}const z=A.draw(String.fromCharCode(b));return{id:b,bitmap:new a.AlphaImage({width:z.width||30,height:z.height||30},z.data),metrics:{width:z.glyphWidth||24,height:z.glyphHeight||24,left:z.glyphLeft||0,top:z.glyphTop-27||-8,advance:z.glyphAdvance||24}}}}L.loadGlyphRange=function(C,c,g,b,E){const A=256*c,z=A+255,j=b.transformRequest(g.replace("{fontstack}",C).replace("{range}",`${A}-${z}`),a.ResourceType.Glyphs);a.getArrayBuffer(j,(K,Y)=>{if(K)E(K);else if(Y){const ie={};for(const ue of a.parseGlyphPbf(Y))ie[ue.id]=ue;E(null,ie)}})},L.TinySDF=class{constructor({fontSize:C=24,buffer:c=3,radius:g=8,cutoff:b=.25,fontFamily:E="sans-serif",fontWeight:A="normal",fontStyle:z="normal"}={}){this.buffer=c,this.cutoff=b,this.radius=g;const j=this.size=C+4*c,K=this._createCanvas(j),Y=this.ctx=K.getContext("2d",{willReadFrequently:!0});Y.font=`${z} ${A} ${C}px ${E}`,Y.textBaseline="alphabetic",Y.textAlign="left",Y.fillStyle="black",this.gridOuter=new Float64Array(j*j),this.gridInner=new Float64Array(j*j),this.f=new Float64Array(j),this.z=new Float64Array(j+1),this.v=new Uint16Array(j)}_createCanvas(C){const c=document.createElement("canvas");return c.width=c.height=C,c}draw(C){const{width:c,actualBoundingBoxAscent:g,actualBoundingBoxDescent:b,actualBoundingBoxLeft:E,actualBoundingBoxRight:A}=this.ctx.measureText(C),z=Math.ceil(g),j=Math.min(this.size-this.buffer,Math.ceil(A-E)),K=Math.min(this.size-this.buffer,z+Math.ceil(b)),Y=j+2*this.buffer,ie=K+2*this.buffer,ue=Math.max(Y*ie,0),me=new Uint8ClampedArray(ue),Re={data:me,width:Y,height:ie,glyphWidth:j,glyphHeight:K,glyphTop:z,glyphLeft:0,glyphAdvance:c};if(j===0||K===0)return Re;const{ctx:Se,buffer:Ie,gridInner:je,gridOuter:Xe}=this;Se.clearRect(Ie,Ie,j,K),Se.fillText(C,Ie,Ie+z);const st=Se.getImageData(Ie,Ie,j,K);Xe.fill(M,0,ue),je.fill(0,0,ue);for(let Oe=0;Oe<K;Oe++)for(let vt=0;vt<j;vt++){const ft=st.data[4*(Oe*j+vt)+3]/255;if(ft===0)continue;const Et=(Oe+Ie)*Y+vt+Ie;if(ft===1)Xe[Et]=0,je[Et]=M;else{const It=.5-ft;Xe[Et]=It>0?It*It:0,je[Et]=It<0?It*It:0}}O(Xe,0,0,Y,ie,Y,this.f,this.v,this.z),O(je,Ie,Ie,j,K,Y,this.f,this.v,this.z);for(let Oe=0;Oe<ue;Oe++){const vt=Math.sqrt(Xe[Oe])-Math.sqrt(je[Oe]);me[Oe]=Math.round(255-255*(vt/this.radius+this.cutoff))}return Re}};const F=new a.Properties({anchor:new a.DataConstantProperty(a.spec.light.anchor),position:new class{constructor(){this.specification=a.spec.light.position}possiblyEvaluate(C,c){return a.sphericalToCartesian(C.expression.evaluate(c))}interpolate(C,c,g){return{x:a.number(C.x,c.x,g),y:a.number(C.y,c.y,g),z:a.number(C.z,c.z,g)}}},color:new a.DataConstantProperty(a.spec.light.color),intensity:new a.DataConstantProperty(a.spec.light.intensity)}),V="-transition";class B extends a.Evented{constructor(c){super(),this._transitionable=new a.Transitionable(F),this.setLight(c),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(c,g={}){if(!this._validate(a.validateLight,c,g))for(const b in c){const E=c[b];b.endsWith(V)?this._transitionable.setTransition(b.slice(0,-V.length),E):this._transitionable.setValue(b,E)}}updateTransitions(c){this._transitioning=this._transitionable.transitioned(c,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(c){this.properties=this._transitioning.possiblyEvaluate(c)}_validate(c,g,b){return(!b||b.validate!==!1)&&a.emitValidationErrors(this,c.call(a.validateStyle,a.extend({value:g,style:{glyphs:!0,sprite:!0},styleSpec:a.spec})))}}class H{constructor(c,g){this.width=c,this.height=g,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(c,g){const b=c.join(",")+String(g);return this.dashEntry[b]||(this.dashEntry[b]=this.addDash(c,g)),this.dashEntry[b]}getDashRanges(c,g,b){const E=[];let A=c.length%2==1?-c[c.length-1]*b:0,z=c[0]*b,j=!0;E.push({left:A,right:z,isDash:j,zeroLength:c[0]===0});let K=c[0];for(let Y=1;Y<c.length;Y++){j=!j;const ie=c[Y];A=K*b,K+=ie,z=K*b,E.push({left:A,right:z,isDash:j,zeroLength:ie===0})}return E}addRoundDash(c,g,b){const E=g/2;for(let A=-b;A<=b;A++){const z=this.width*(this.nextRow+b+A);let j=0,K=c[j];for(let Y=0;Y<this.width;Y++){Y/K.right>1&&(K=c[++j]);const ie=Math.abs(Y-K.left),ue=Math.abs(Y-K.right),me=Math.min(ie,ue);let Re;const Se=A/b*(E+1);if(K.isDash){const Ie=E-Math.abs(Se);Re=Math.sqrt(me*me+Ie*Ie)}else Re=E-Math.sqrt(me*me+Se*Se);this.data[z+Y]=Math.max(0,Math.min(255,Re+128))}}}addRegularDash(c){for(let j=c.length-1;j>=0;--j){const K=c[j],Y=c[j+1];K.zeroLength?c.splice(j,1):Y&&Y.isDash===K.isDash&&(Y.left=K.left,c.splice(j,1))}const g=c[0],b=c[c.length-1];g.isDash===b.isDash&&(g.left=b.left-this.width,b.right=g.right+this.width);const E=this.width*this.nextRow;let A=0,z=c[A];for(let j=0;j<this.width;j++){j/z.right>1&&(z=c[++A]);const K=Math.abs(j-z.left),Y=Math.abs(j-z.right),ie=Math.min(K,Y);this.data[E+j]=Math.max(0,Math.min(255,(z.isDash?ie:-ie)+128))}}addDash(c,g){const b=g?7:0,E=2*b+1;if(this.nextRow+E>this.height)return a.warnOnce("LineAtlas out of space"),null;let A=0;for(let j=0;j<c.length;j++)A+=c[j];if(A!==0){const j=this.width/A,K=this.getDashRanges(c,this.width,j);g?this.addRoundDash(K,j,b):this.addRegularDash(K)}const z={y:(this.nextRow+b+.5)/this.height,height:2*b/this.height,width:A};return this.nextRow+=E,this.dirty=!0,z}bind(c){const g=c.gl;this.texture?(g.bindTexture(g.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,g.texSubImage2D(g.TEXTURE_2D,0,0,0,this.width,this.height,g.ALPHA,g.UNSIGNED_BYTE,this.data))):(this.texture=g.createTexture(),g.bindTexture(g.TEXTURE_2D,this.texture),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.REPEAT),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.REPEAT),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),g.texImage2D(g.TEXTURE_2D,0,g.ALPHA,this.width,this.height,0,g.ALPHA,g.UNSIGNED_BYTE,this.data))}}class G{constructor(c,g){this.workerPool=c,this.actors=[],this.currentActor=0,this.id=a.uniqueId();const b=this.workerPool.acquire(this.id);for(let E=0;E<b.length;E++){const A=new G.Actor(b[E],g,this.id);A.name=`Worker ${E}`,this.actors.push(A)}if(!this.actors.length)throw new Error("No actors found")}broadcast(c,g,b){a.asyncAll(this.actors,(E,A)=>{E.send(c,g,A)},b=b||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(c=>{c.remove()}),this.actors=[],this.workerPool.release(this.id)}}function ee(C,c,g){const b=function(E,A){if(E)return g(E);if(A){const z=a.pick(a.extend(A,C),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);A.vector_layers&&(z.vectorLayers=A.vector_layers,z.vectorLayerIds=z.vectorLayers.map(j=>j.id)),g(null,z)}};return C.url?a.getJSON(c.transformRequest(C.url,a.ResourceType.Source),b):a.exported.frame(()=>b(null,C))}G.Actor=a.Actor;class X{constructor(c,g,b){this.bounds=a.LngLatBounds.convert(this.validateBounds(c)),this.minzoom=g||0,this.maxzoom=b||24}validateBounds(c){return Array.isArray(c)&&c.length===4?[Math.max(-180,c[0]),Math.max(-90,c[1]),Math.min(180,c[2]),Math.min(90,c[3])]:[-180,-90,180,90]}contains(c){const g=Math.pow(2,c.z),b=Math.floor(a.mercatorXfromLng(this.bounds.getWest())*g),E=Math.floor(a.mercatorYfromLat(this.bounds.getNorth())*g),A=Math.ceil(a.mercatorXfromLng(this.bounds.getEast())*g),z=Math.ceil(a.mercatorYfromLat(this.bounds.getSouth())*g);return c.x>=b&&c.x<A&&c.y>=E&&c.y<z}}class Z extends a.Evented{constructor(c,g,b,E){if(super(),this.id=c,this.dispatcher=b,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.extend(this,a.pick(g,["url","scheme","tileSize","promoteId"])),this._options=a.extend({type:"vector"},g),this._collectResourceTiming=g.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(E)}load(){this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=ee(this._options,this.map._requestManager,(c,g)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),c?this.fire(new a.ErrorEvent(c)):g&&(a.extend(this,g),g.bounds&&(this.tileBounds=new X(g.bounds,this.minzoom,this.maxzoom)),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}hasTile(c){return!this.tileBounds||this.tileBounds.contains(c.canonical)}onAdd(c){this.map=c,this.load()}setSourceProperty(c){this._tileJSONRequest&&this._tileJSONRequest.cancel(),c(),this.load()}setTiles(c){return this.setSourceProperty(()=>{this._options.tiles=c}),this}setUrl(c){return this.setSourceProperty(()=>{this.url=c,this._options.url=c}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return a.extend({},this._options)}loadTile(c,g){const b=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),E={request:this.map._requestManager.transformRequest(b,a.ResourceType.Tile),uid:c.uid,tileID:c.tileID,zoom:c.tileID.overscaledZ,tileSize:this.tileSize*c.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function A(z,j){return delete c.request,c.aborted?g(null):z&&z.status!==404?g(z):(j&&j.resourceTiming&&(c.resourceTiming=j.resourceTiming),this.map._refreshExpiredTiles&&j&&c.setExpiryData(j),c.loadVectorData(j,this.map.painter),a.cacheEntryPossiblyAdded(this.dispatcher),g(null),void(c.reloadCallback&&(this.loadTile(c,c.reloadCallback),c.reloadCallback=null)))}E.request.collectResourceTiming=this._collectResourceTiming,c.actor&&c.state!=="expired"?c.state==="loading"?c.reloadCallback=g:c.request=c.actor.send("reloadTile",E,A.bind(this)):(c.actor=this.dispatcher.getActor(),c.request=c.actor.send("loadTile",E,A.bind(this)))}abortTile(c){c.request&&(c.request.cancel(),delete c.request),c.actor&&c.actor.send("abortTile",{uid:c.uid,type:this.type,source:this.id},void 0)}unloadTile(c){c.unloadVectorData(),c.actor&&c.actor.send("removeTile",{uid:c.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class Q extends a.Evented{constructor(c,g,b,E){super(),this.id=c,this.dispatcher=b,this.setEventedParent(E),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.extend({type:"raster"},g),a.extend(this,a.pick(g,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=ee(this._options,this.map._requestManager,(c,g)=>{this._tileJSONRequest=null,this._loaded=!0,c?this.fire(new a.ErrorEvent(c)):g&&(a.extend(this,g),g.bounds&&(this.tileBounds=new X(g.bounds,this.minzoom,this.maxzoom)),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(c){this.map=c,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return a.extend({},this._options)}hasTile(c){return!this.tileBounds||this.tileBounds.contains(c.canonical)}loadTile(c,g){const b=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);c.request=a.getImage(this.map._requestManager.transformRequest(b,a.ResourceType.Tile),(E,A,z)=>{if(delete c.request,c.aborted)c.state="unloaded",g(null);else if(E)c.state="errored",g(E);else if(A){this.map._refreshExpiredTiles&&c.setExpiryData(z);const j=this.map.painter.context,K=j.gl;c.texture=this.map.painter.getTileTexture(A.width),c.texture?c.texture.update(A,{useMipmap:!0}):(c.texture=new P(j,A,K.RGBA,{useMipmap:!0}),c.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE,K.LINEAR_MIPMAP_NEAREST),j.extTextureFilterAnisotropic&&K.texParameterf(K.TEXTURE_2D,j.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,j.extTextureFilterAnisotropicMax)),c.state="loaded",a.cacheEntryPossiblyAdded(this.dispatcher),g(null)}})}abortTile(c,g){c.request&&(c.request.cancel(),delete c.request),g()}unloadTile(c,g){c.texture&&this.map.painter.saveTileTexture(c.texture),g()}hasTransition(){return!1}}let le;class ne extends Q{constructor(c,g,b,E){super(c,g,b,E),this.type="raster-dem",this.maxzoom=22,this._options=a.extend({type:"raster-dem"},g),this.encoding=g.encoding||"mapbox"}serialize(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}}loadTile(c,g){const b=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function E(A,z){A&&(c.state="errored",g(A)),z&&(c.dem=z,c.needsHillshadePrepare=!0,c.needsTerrainPrepare=!0,c.state="loaded",g(null))}c.request=a.getImage(this.map._requestManager.transformRequest(b,a.ResourceType.Tile),function(A,z){if(delete c.request,c.aborted)c.state="unloaded",g(null);else if(A)c.state="errored",g(A);else if(z){this.map._refreshExpiredTiles&&c.setExpiryData(z),delete z.cacheControl,delete z.expires;const j=a.isImageBitmap(z)&&(le==null&&(le=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),le)?z:a.exported.getImageData(z,1),K={uid:c.uid,coord:c.tileID,source:this.id,rawImageData:j,encoding:this.encoding};c.actor&&c.state!=="expired"||(c.actor=this.dispatcher.getActor(),c.actor.send("loadDEMTile",K,E.bind(this)))}}.bind(this)),c.neighboringTiles=this._getNeighboringTiles(c.tileID)}_getNeighboringTiles(c){const g=c.canonical,b=Math.pow(2,g.z),E=(g.x-1+b)%b,A=g.x===0?c.wrap-1:c.wrap,z=(g.x+1+b)%b,j=g.x+1===b?c.wrap+1:c.wrap,K={};return K[new a.OverscaledTileID(c.overscaledZ,A,g.z,E,g.y).key]={backfilled:!1},K[new a.OverscaledTileID(c.overscaledZ,j,g.z,z,g.y).key]={backfilled:!1},g.y>0&&(K[new a.OverscaledTileID(c.overscaledZ,A,g.z,E,g.y-1).key]={backfilled:!1},K[new a.OverscaledTileID(c.overscaledZ,c.wrap,g.z,g.x,g.y-1).key]={backfilled:!1},K[new a.OverscaledTileID(c.overscaledZ,j,g.z,z,g.y-1).key]={backfilled:!1}),g.y+1<b&&(K[new a.OverscaledTileID(c.overscaledZ,A,g.z,E,g.y+1).key]={backfilled:!1},K[new a.OverscaledTileID(c.overscaledZ,c.wrap,g.z,g.x,g.y+1).key]={backfilled:!1},K[new a.OverscaledTileID(c.overscaledZ,j,g.z,z,g.y+1).key]={backfilled:!1}),K}unloadTile(c){c.demTexture&&this.map.painter.saveTileTexture(c.demTexture),c.fbo&&(c.fbo.destroy(),delete c.fbo),c.dem&&delete c.dem,delete c.neighboringTiles,c.state="unloaded",c.actor&&c.actor.send("removeDEMTile",{uid:c.uid,source:this.id})}}class se extends a.Evented{constructor(c,g,b,E){super(),this.id=c,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=b.getActor(),this.setEventedParent(E),this._data=g.data,this._options=a.extend({},g),this._collectResourceTiming=g.collectResourceTiming,g.maxzoom!==void 0&&(this.maxzoom=g.maxzoom),g.type&&(this.type=g.type),g.attribution&&(this.attribution=g.attribution),this.promoteId=g.promoteId;const A=a.EXTENT/this.tileSize;this.workerOptions=a.extend({source:this.id,cluster:g.cluster||!1,geojsonVtOptions:{buffer:(g.buffer!==void 0?g.buffer:128)*A,tolerance:(g.tolerance!==void 0?g.tolerance:.375)*A,extent:a.EXTENT,maxZoom:this.maxzoom,lineMetrics:g.lineMetrics||!1,generateId:g.generateId||!1},superclusterOptions:{maxZoom:g.clusterMaxZoom!==void 0?g.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,g.clusterMinPoints||2),extent:a.EXTENT,radius:(g.clusterRadius||50)*A,log:!1,generateId:g.generateId||!1},clusterProperties:g.clusterProperties,filter:g.filter},g.workerOptions)}load(){this._updateWorkerData("metadata")}onAdd(c){this.map=c,this.load()}setData(c){return this._data=c,this._updateWorkerData("content"),this}getClusterExpansionZoom(c,g){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:c,source:this.id},g),this}getClusterChildren(c,g){return this.actor.send("geojson.getClusterChildren",{clusterId:c,source:this.id},g),this}getClusterLeaves(c,g,b,E){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:c,limit:g,offset:b},E),this}_updateWorkerData(c){const g=a.extend({},this.workerOptions),b=this._data;typeof b=="string"?(g.request=this.map._requestManager.transformRequest(a.exported.resolveURL(b),a.ResourceType.Source),g.request.collectResourceTiming=this._collectResourceTiming):g.data=JSON.stringify(b),this._pendingLoads++,this.fire(new a.Event("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,g,(E,A)=>{if(this._pendingLoads--,this._removed||A&&A.abandoned)return void this.fire(new a.Event("dataabort",{dataType:"source",sourceDataType:c}));let z=null;if(A&&A.resourceTiming&&A.resourceTiming[this.id]&&(z=A.resourceTiming[this.id].slice(0)),E)return void this.fire(new a.ErrorEvent(E));const j={dataType:"source",sourceDataType:c};this._collectResourceTiming&&z&&z.length>0&&a.extend(j,{resourceTiming:z}),this.fire(new a.Event("data",j))})}loaded(){return this._pendingLoads===0}loadTile(c,g){const b=c.actor?"reloadTile":"loadTile";c.actor=this.actor;const E={type:this.type,uid:c.uid,tileID:c.tileID,zoom:c.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};c.request=this.actor.send(b,E,(A,z)=>(delete c.request,c.unloadVectorData(),c.aborted?g(null):A?g(A):(c.loadVectorData(z,this.map.painter,b==="reloadTile"),g(null))))}abortTile(c){c.request&&(c.request.cancel(),delete c.request),c.aborted=!0}unloadTile(c){c.unloadVectorData(),this.actor.send("removeTile",{uid:c.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}serialize(){return a.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var oe=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class he extends a.Evented{constructor(c,g,b,E){super(),this.id=c,this.dispatcher=b,this.coordinates=g.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(E),this.options=g}load(c,g){this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this.url=this.options.url,a.getImage(this.map._requestManager.transformRequest(this.url,a.ResourceType.Image),(b,E)=>{this._loaded=!0,b?this.fire(new a.ErrorEvent(b)):E&&(this.image=E,c&&(this.coordinates=c),g&&g(),this._finishLoading())})}loaded(){return this._loaded}updateImage(c){return this.image&&c.url?(this.options.url=c.url,this.load(c.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(c){this.map=c,this.load()}setCoordinates(c){this.coordinates=c;const g=c.map(a.MercatorCoordinate.fromLngLat);this.tileID=function(E){let A=1/0,z=1/0,j=-1/0,K=-1/0;for(const me of E)A=Math.min(A,me.x),z=Math.min(z,me.y),j=Math.max(j,me.x),K=Math.max(K,me.y);const Y=Math.max(j-A,K-z),ie=Math.max(0,Math.floor(-Math.log(Y)/Math.LN2)),ue=Math.pow(2,ie);return new a.CanonicalTileID(ie,Math.floor((A+j)/2*ue),Math.floor((z+K)/2*ue))}(g),this.minzoom=this.maxzoom=this.tileID.z;const b=g.map(E=>this.tileID.getTilePoint(E)._round());return this._boundsArray=new a.RasterBoundsArray,this._boundsArray.emplaceBack(b[0].x,b[0].y,0,0),this._boundsArray.emplaceBack(b[1].x,b[1].y,a.EXTENT,0),this._boundsArray.emplaceBack(b[3].x,b[3].y,0,a.EXTENT),this._boundsArray.emplaceBack(b[2].x,b[2].y,a.EXTENT,a.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const c=this.map.painter.context,g=c.gl;this.boundsBuffer||(this.boundsBuffer=c.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new P(c,this.image,g.RGBA),this.texture.bind(g.LINEAR,g.CLAMP_TO_EDGE));for(const b in this.tiles){const E=this.tiles[b];E.state!=="loaded"&&(E.state="loaded",E.texture=this.texture)}}loadTile(c,g){this.tileID&&this.tileID.equals(c.tileID.canonical)?(this.tiles[String(c.tileID.wrap)]=c,c.buckets={},g(null)):(c.state="errored",g(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class _e extends he{constructor(c,g,b,E){super(c,g,b,E),this.roundZoom=!0,this.type="video",this.options=g}load(){this._loaded=!1;const c=this.options;this.urls=[];for(const g of c.urls)this.urls.push(this.map._requestManager.transformRequest(g,a.ResourceType.Source).url);a.getVideo(this.urls,(g,b)=>{this._loaded=!0,g?this.fire(new a.ErrorEvent(g)):b&&(this.video=b,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(c){if(this.video){const g=this.video.seekable;c<g.start(0)||c>g.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${g.start(0)} and ${g.end(0)}-second mark.`))):this.video.currentTime=c}}getVideo(){return this.video}onAdd(c){this.map||(this.map=c,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 c=this.map.painter.context,g=c.gl;this.boundsBuffer||(this.boundsBuffer=c.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(g.LINEAR,g.CLAMP_TO_EDGE),g.texSubImage2D(g.TEXTURE_2D,0,0,0,g.RGBA,g.UNSIGNED_BYTE,this.video)):(this.texture=new P(c,this.video,g.RGBA),this.texture.bind(g.LINEAR,g.CLAMP_TO_EDGE));for(const b in this.tiles){const E=this.tiles[b];E.state!=="loaded"&&(E.state="loaded",E.texture=this.texture)}}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class be extends he{constructor(c,g,b,E){super(c,g,b,E),g.coordinates?Array.isArray(g.coordinates)&&g.coordinates.length===4&&!g.coordinates.some(A=>!Array.isArray(A)||A.length!==2||A.some(z=>typeof z!="number"))||this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'missing required property "coordinates"'))),g.animate&&typeof g.animate!="boolean"&&this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'optional "animate" property must be a boolean value'))),g.canvas?typeof g.canvas=="string"||g.canvas instanceof HTMLCanvasElement||this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,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 a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'missing required property "canvas"'))),this.options=g,this.animate=g.animate===void 0||g.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 a.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(c){this.map=c,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let c=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,c=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,c=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const g=this.map.painter.context,b=g.gl;this.boundsBuffer||(this.boundsBuffer=g.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(c||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new P(g,this.canvas,b.RGBA,{premultiply:!0});for(const E in this.tiles){const A=this.tiles[E];A.state!=="loaded"&&(A.state="loaded",A.texture=this.texture)}}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const c of[this.canvas.width,this.canvas.height])if(isNaN(c)||c<=0)return!0;return!1}}const xe={vector:Z,raster:Q,"raster-dem":ne,geojson:se,video:_e,image:he,canvas:be};function Te(C,c){const g=a.create();return a.translate(g,g,[1,1,0]),a.scale(g,g,[.5*C.width,.5*C.height,1]),a.multiply(g,g,C.calculatePosMatrix(c.toUnwrapped()))}function Ee(C,c,g,b,E,A){const z=function(ue,me,Re){if(ue)for(const Se of ue){const Ie=me[Se];if(Ie&&Ie.source===Re&&Ie.type==="fill-extrusion")return!0}else for(const Se in me){const Ie=me[Se];if(Ie.source===Re&&Ie.type==="fill-extrusion")return!0}return!1}(E&&E.layers,c,C.id),j=A.maxPitchScaleFactor(),K=C.tilesIn(b,j,z);K.sort(Ce);const Y=[];for(const ue of K)Y.push({wrappedTileID:ue.tileID.wrapped().key,queryResults:ue.tile.queryRenderedFeatures(c,g,C._state,ue.queryGeometry,ue.cameraQueryGeometry,ue.scale,E,A,j,Te(C.transform,ue.tileID))});const ie=function(ue){const me={},Re={};for(const Se of ue){const Ie=Se.queryResults,je=Se.wrappedTileID,Xe=Re[je]=Re[je]||{};for(const st in Ie){const Oe=Ie[st],vt=Xe[st]=Xe[st]||{},ft=me[st]=me[st]||[];for(const Et of Oe)vt[Et.featureIndex]||(vt[Et.featureIndex]=!0,ft.push(Et))}}return me}(Y);for(const ue in ie)ie[ue].forEach(me=>{const Re=me.feature,Se=C.getFeatureState(Re.layer["source-layer"],Re.id);Re.source=Re.layer.source,Re.layer["source-layer"]&&(Re.sourceLayer=Re.layer["source-layer"]),Re.state=Se});return ie}function Ce(C,c){const g=C.tileID,b=c.tileID;return g.overscaledZ-b.overscaledZ||g.canonical.y-b.canonical.y||g.wrap-b.wrap||g.canonical.x-b.canonical.x}class ke{constructor(c,g){this.tileID=c,this.uid=a.uniqueId(),this.uses=0,this.tileSize=g,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(c){const g=c+this.timeAdded;g<a.exported.now()||this.fadeEndTime&&g<this.fadeEndTime||(this.fadeEndTime=g)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(c){this.demTexture&&c.saveTileTexture(this.demTexture),this.textures.forEach(g=>c.saveTileTexture(g)),this.demTexture=null,this.textures=[],this.textureCoords={}}loadVectorData(c,g,b){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",c){c.featureIndex&&(this.latestFeatureIndex=c.featureIndex,c.rawTileData?(this.latestRawTileData=c.rawTileData,this.latestFeatureIndex.rawTileData=c.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=c.collisionBoxArray,this.buckets=function(E,A){const z={};if(!A)return z;for(const j of E){const K=j.layerIds.map(Y=>A.getLayer(Y)).filter(Boolean);if(K.length!==0){j.layers=K,j.stateDependentLayerIds&&(j.stateDependentLayers=j.stateDependentLayerIds.map(Y=>K.filter(ie=>ie.id===Y)[0]));for(const Y of K)z[Y.id]=j}}return z}(c.buckets,g.style),this.hasSymbolBuckets=!1;for(const E in this.buckets){const A=this.buckets[E];if(A instanceof a.SymbolBucket){if(this.hasSymbolBuckets=!0,!b)break;A.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const E in this.buckets){const A=this.buckets[E];if(A instanceof a.SymbolBucket&&A.hasRTLText){this.hasRTLText=!0,a.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const E in this.buckets){const A=this.buckets[E];this.queryPadding=Math.max(this.queryPadding,g.style.getLayer(E).queryRadius(A))}c.imageAtlas&&(this.imageAtlas=c.imageAtlas),c.glyphAtlasImage&&(this.glyphAtlasImage=c.glyphAtlasImage)}else this.collisionBoxArray=new a.CollisionBoxArray}unloadVectorData(){for(const c in this.buckets)this.buckets[c].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(c){return this.buckets[c.id]}upload(c){for(const b in this.buckets){const E=this.buckets[b];E.uploadPending()&&E.upload(c)}const g=c.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new P(c,this.imageAtlas.image,g.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new P(c,this.glyphAtlasImage,g.ALPHA),this.glyphAtlasImage=null)}prepare(c){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(c,this.imageAtlasTexture)}queryRenderedFeatures(c,g,b,E,A,z,j,K,Y,ie){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:E,cameraQueryGeometry:A,scale:z,tileSize:this.tileSize,pixelPosMatrix:ie,transform:K,params:j,queryPadding:this.queryPadding*Y},c,g,b):{}}querySourceFeatures(c,g){const b=this.latestFeatureIndex;if(!b||!b.rawTileData)return;const E=b.loadVTLayers(),A=g?g.sourceLayer:"",z=E._geojsonTileLayer||E[A];if(!z)return;const j=a.createFilter(g&&g.filter),{z:K,x:Y,y:ie}=this.tileID.canonical,ue={z:K,x:Y,y:ie};for(let me=0;me<z.length;me++){const Re=z.feature(me);if(j.needGeometry){const je=a.toEvaluationFeature(Re,!0);if(!j.filter(new a.EvaluationParameters(this.tileID.overscaledZ),je,this.tileID.canonical))continue}else if(!j.filter(new a.EvaluationParameters(this.tileID.overscaledZ),Re))continue;const Se=b.getId(Re,A),Ie=new a.GeoJSONFeature(Re,K,Y,ie,Se);Ie.tile=ue,c.push(Ie)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(c){const g=this.expirationTime;if(c.cacheControl){const b=a.parseCacheControl(c.cacheControl);b["max-age"]&&(this.expirationTime=Date.now()+1e3*b["max-age"])}else c.expires&&(this.expirationTime=new Date(c.expires).getTime());if(this.expirationTime){const b=Date.now();let E=!1;if(this.expirationTime>b)E=!1;else if(g)if(this.expirationTime<g)E=!0;else{const A=this.expirationTime-g;A?this.expirationTime=b+Math.max(A,3e4):E=!0}else E=!0;E?(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(c,g){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(c).length===0)return;const b=this.latestFeatureIndex.loadVTLayers();for(const E in this.buckets){if(!g.style.hasLayer(E))continue;const A=this.buckets[E],z=A.layers[0].sourceLayer||"_geojsonTileLayer",j=b[z],K=c[z];if(!j||!K||Object.keys(K).length===0)continue;A.update(K,j,this.imageAtlas&&this.imageAtlas.patternPositions||{});const Y=g&&g.style&&g.style.getLayer(E);Y&&(this.queryPadding=Math.max(this.queryPadding,Y.queryRadius(A)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<a.exported.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(c){this.symbolFadeHoldUntil=a.exported.now()+c}setDependencies(c,g){const b={};for(const E of g)b[E]=!0;this.dependencies[c]=b}hasDependency(c,g){for(const b of c){const E=this.dependencies[b];if(E){for(const A of g)if(E[A])return!0}}return!1}}class De{constructor(c,g){this.max=c,this.onRemove=g,this.reset()}reset(){for(const c in this.data)for(const g of this.data[c])g.timeout&&clearTimeout(g.timeout),this.onRemove(g.value);return this.data={},this.order=[],this}add(c,g,b){const E=c.wrapped().key;this.data[E]===void 0&&(this.data[E]=[]);const A={value:g,timeout:void 0};if(b!==void 0&&(A.timeout=setTimeout(()=>{this.remove(c,A)},b)),this.data[E].push(A),this.order.push(E),this.order.length>this.max){const z=this._getAndRemoveByKey(this.order[0]);z&&this.onRemove(z)}return this}has(c){return c.wrapped().key in this.data}getAndRemove(c){return this.has(c)?this._getAndRemoveByKey(c.wrapped().key):null}_getAndRemoveByKey(c){const g=this.data[c].shift();return g.timeout&&clearTimeout(g.timeout),this.data[c].length===0&&delete this.data[c],this.order.splice(this.order.indexOf(c),1),g.value}getByKey(c){const g=this.data[c];return g?g[0].value:null}get(c){return this.has(c)?this.data[c.wrapped().key][0].value:null}remove(c,g){if(!this.has(c))return this;const b=c.wrapped().key,E=g===void 0?0:this.data[b].indexOf(g),A=this.data[b][E];return this.data[b].splice(E,1),A.timeout&&clearTimeout(A.timeout),this.data[b].length===0&&delete this.data[b],this.onRemove(A.value),this.order.splice(this.order.indexOf(b),1),this}setMaxSize(c){for(this.max=c;this.order.length>this.max;){const g=this._getAndRemoveByKey(this.order[0]);g&&this.onRemove(g)}return this}filter(c){const g=[];for(const b in this.data)for(const E of this.data[b])c(E.value)||g.push(E);for(const b of g)this.remove(b.value.tileID,b)}}class Ke{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(c,g,b){const E=String(g);if(this.stateChanges[c]=this.stateChanges[c]||{},this.stateChanges[c][E]=this.stateChanges[c][E]||{},a.extend(this.stateChanges[c][E],b),this.deletedStates[c]===null){this.deletedStates[c]={};for(const A in this.state[c])A!==E&&(this.deletedStates[c][A]=null)}else if(this.deletedStates[c]&&this.deletedStates[c][E]===null){this.deletedStates[c][E]={};for(const A in this.state[c][E])b[A]||(this.deletedStates[c][E][A]=null)}else for(const A in b)this.deletedStates[c]&&this.deletedStates[c][E]&&this.deletedStates[c][E][A]===null&&delete this.deletedStates[c][E][A]}removeFeatureState(c,g,b){if(this.deletedStates[c]===null)return;const E=String(g);if(this.deletedStates[c]=this.deletedStates[c]||{},b&&g!==void 0)this.deletedStates[c][E]!==null&&(this.deletedStates[c][E]=this.deletedStates[c][E]||{},this.deletedStates[c][E][b]=null);else if(g!==void 0)if(this.stateChanges[c]&&this.stateChanges[c][E])for(b in this.deletedStates[c][E]={},this.stateChanges[c][E])this.deletedStates[c][E][b]=null;else this.deletedStates[c][E]=null;else this.deletedStates[c]=null}getState(c,g){const b=String(g),E=a.extend({},(this.state[c]||{})[b],(this.stateChanges[c]||{})[b]);if(this.deletedStates[c]===null)return{};if(this.deletedStates[c]){const A=this.deletedStates[c][g];if(A===null)return{};for(const z in A)delete E[z]}return E}initializeTileState(c,g){c.setFeatureState(this.state,g)}coalesceChanges(c,g){const b={};for(const E in this.stateChanges){this.state[E]=this.state[E]||{};const A={};for(const z in this.stateChanges[E])this.state[E][z]||(this.state[E][z]={}),a.extend(this.state[E][z],this.stateChanges[E][z]),A[z]=this.state[E][z];b[E]=A}for(const E in this.deletedStates){this.state[E]=this.state[E]||{};const A={};if(this.deletedStates[E]===null)for(const z in this.state[E])A[z]={},this.state[E][z]={};else for(const z in this.deletedStates[E]){if(this.deletedStates[E][z]===null)this.state[E][z]={};else for(const j of Object.keys(this.deletedStates[E][z]))delete this.state[E][z][j];A[z]=this.state[E][z]}b[E]=b[E]||{},a.extend(b[E],A)}if(this.stateChanges={},this.deletedStates={},Object.keys(b).length!==0)for(const E in c)c[E].setFeatureState(b,g)}}class Ue extends a.Evented{constructor(c,g,b){super(),this.id=c,this.dispatcher=b,this.on("data",E=>{E.dataType==="source"&&E.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&E.dataType==="source"&&E.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(E,A,z,j){const K=new xe[A.type](E,A,z,j);if(K.id!==E)throw new Error(`Expected Source id to be ${E} instead of ${K.id}`);return a.bindAll(["load","abort","unload","serialize","prepare"],K),K}(c,g,b,this),this._tiles={},this._cache=new De(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Ke}onAdd(c){this.map=c,this._maxTileCacheSize=c?c._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(c)}onRemove(c){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(c)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(const c in this._tiles){const g=this._tiles[c];if(g.state!=="loaded"&&g.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const c=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,c&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(c,g){return this._source.loadTile(c,g)}_unloadTile(c){if(this._source.unloadTile)return this._source.unloadTile(c,()=>{})}_abortTile(c){this._source.abortTile&&this._source.abortTile(c,()=>{}),this._source.fire(new a.Event("dataabort",{tile:c,coord:c.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(c){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const g in this._tiles){const b=this._tiles[g];b.upload(c),b.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(c=>c.tileID).sort(tt).map(c=>c.key)}getRenderableIds(c){const g=[];for(const b in this._tiles)this._isIdRenderable(b,c)&&g.push(this._tiles[b]);return c?g.sort((b,E)=>{const A=b.tileID,z=E.tileID,j=new a.pointGeometry(A.canonical.x,A.canonical.y)._rotate(this.transform.angle),K=new a.pointGeometry(z.canonical.x,z.canonical.y)._rotate(this.transform.angle);return A.overscaledZ-z.overscaledZ||K.y-j.y||K.x-j.x}).map(b=>b.tileID.key):g.map(b=>b.tileID).sort(tt).map(b=>b.key)}hasRenderableParent(c){const g=this.findLoadedParent(c,0);return!!g&&this._isIdRenderable(g.tileID.key)}_isIdRenderable(c,g){return this._tiles[c]&&this._tiles[c].hasData()&&!this._coveredTiles[c]&&(g||!this._tiles[c].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const c in this._tiles)this._tiles[c].state!=="errored"&&this._reloadTile(c,"reloading")}}_reloadTile(c,g){const b=this._tiles[c];b&&(b.state!=="loading"&&(b.state=g),this._loadTile(b,this._tileLoaded.bind(this,b,c,g)))}_tileLoaded(c,g,b,E){if(E)return c.state="errored",void(E.status!==404?this._source.fire(new a.ErrorEvent(E,{tile:c})):this.update(this.transform,this.terrain));c.timeAdded=a.exported.now(),b==="expired"&&(c.refreshedUponExpiration=!0),this._setTileReloadTimer(g,c),this.getSource().type==="raster-dem"&&c.dem&&this._backfillDEM(c),this._state.initializeTileState(c,this.map?this.map.painter:null),c.aborted||this._source.fire(new a.Event("data",{dataType:"source",tile:c,coord:c.tileID}))}_backfillDEM(c){const g=this.getRenderableIds();for(let E=0;E<g.length;E++){const A=g[E];if(c.neighboringTiles&&c.neighboringTiles[A]){const z=this.getTileByID(A);b(c,z),b(z,c)}}function b(E,A){E.needsHillshadePrepare=!0,E.needsTerrainPrepare=!0;let z=A.tileID.canonical.x-E.tileID.canonical.x;const j=A.tileID.canonical.y-E.tileID.canonical.y,K=Math.pow(2,E.tileID.canonical.z),Y=A.tileID.key;z===0&&j===0||Math.abs(j)>1||(Math.abs(z)>1&&(Math.abs(z+K)===1?z+=K:Math.abs(z-K)===1&&(z-=K)),A.dem&&E.dem&&(E.dem.backfillBorder(A.dem,z,j),E.neighboringTiles&&E.neighboringTiles[Y]&&(E.neighboringTiles[Y].backfilled=!0)))}}getTile(c){return this.getTileByID(c.key)}getTileByID(c){return this._tiles[c]}_retainLoadedChildren(c,g,b,E){for(const A in this._tiles){let z=this._tiles[A];if(E[A]||!z.hasData()||z.tileID.overscaledZ<=g||z.tileID.overscaledZ>b)continue;let j=z.tileID;for(;z&&z.tileID.overscaledZ>g+1;){const Y=z.tileID.scaledTo(z.tileID.overscaledZ-1);z=this._tiles[Y.key],z&&z.hasData()&&(j=Y)}let K=j;for(;K.overscaledZ>g;)if(K=K.scaledTo(K.overscaledZ-1),c[K.key]){E[j.key]=j;break}}}findLoadedParent(c,g){if(c.key in this._loadedParentTiles){const b=this._loadedParentTiles[c.key];return b&&b.tileID.overscaledZ>=g?b:null}for(let b=c.overscaledZ-1;b>=g;b--){const E=c.scaledTo(b),A=this._getLoadedTile(E);if(A)return A}}_getLoadedTile(c){const g=this._tiles[c.key];return g&&g.hasData()?g:this._cache.getByKey(c.wrapped().key)}updateCacheSize(c){const g=Math.ceil(c.width/this._source.tileSize)+1,b=Math.ceil(c.height/this._source.tileSize)+1,E=Math.floor(g*b*5),A=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,E):E;this._cache.setMaxSize(A)}handleWrapJump(c){const g=Math.round((c-(this._prevLng===void 0?c:this._prevLng))/360);if(this._prevLng=c,g){const b={};for(const E in this._tiles){const A=this._tiles[E];A.tileID=A.tileID.unwrapTo(A.tileID.wrap+g),b[A.tileID.key]=A}this._tiles=b;for(const E in this._timers)clearTimeout(this._timers[E]),delete this._timers[E];for(const E in this._tiles)this._setTileReloadTimer(E,this._tiles[E])}}update(c,g){if(this.transform=c,this.terrain=g,!this._sourceLoaded||this._paused)return;let b;this.updateCacheSize(c),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?b=c.getVisibleUnwrappedCoordinates(this._source.tileID).map(Y=>new a.OverscaledTileID(Y.canonical.z,Y.wrap,Y.canonical.z,Y.canonical.x,Y.canonical.y)):(b=c.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:g}),this._source.hasTile&&(b=b.filter(Y=>this._source.hasTile(Y)))):b=[];const E=c.coveringZoomLevel(this._source),A=Math.max(E-Ue.maxOverzooming,this._source.minzoom),z=Math.max(E+Ue.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const Y={};for(const ie of b)if(ie.canonical.z>this._source.minzoom){const ue=ie.scaledTo(ie.canonical.z-1);Y[ue.key]=ue;const me=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));Y[me.key]=me}b=b.concat(Object.values(Y))}const j=this._updateRetainedTiles(b,E);if(lt(this._source.type)){const Y={},ie={},ue=Object.keys(j);for(const me of ue){const Re=j[me],Se=this._tiles[me];if(!Se||Se.fadeEndTime&&Se.fadeEndTime<=a.exported.now())continue;const Ie=this.findLoadedParent(Re,A);Ie&&(this._addTile(Ie.tileID),Y[Ie.tileID.key]=Ie.tileID),ie[me]=Re}this._retainLoadedChildren(ie,E,z,j);for(const me in Y)j[me]||(this._coveredTiles[me]=!0,j[me]=Y[me]);if(g){const me={},Re={};for(const Se of b)this._tiles[Se.key].hasData()?me[Se.key]=Se:Re[Se.key]=Se;for(const Se in Re){const Ie=Re[Se].children(this._source.maxzoom);this._tiles[Ie[0].key]&&this._tiles[Ie[1].key]&&this._tiles[Ie[2].key]&&this._tiles[Ie[3].key]&&(me[Ie[0].key]=j[Ie[0].key]=Ie[0],me[Ie[1].key]=j[Ie[1].key]=Ie[1],me[Ie[2].key]=j[Ie[2].key]=Ie[2],me[Ie[3].key]=j[Ie[3].key]=Ie[3],delete Re[Se])}for(const Se in Re){const Ie=this.findLoadedParent(Re[Se],this._source.minzoom);if(Ie){me[Ie.tileID.key]=j[Ie.tileID.key]=Ie.tileID;for(const je in me)me[je].isChildOf(Ie.tileID)&&delete me[je]}}for(const Se in this._tiles)me[Se]||(this._coveredTiles[Se]=!0)}}for(const Y in j)this._tiles[Y].clearFadeHold();const K=a.keysDifference(this._tiles,j);for(const Y of K){const ie=this._tiles[Y];ie.hasSymbolBuckets&&!ie.holdingForFade()?ie.setHoldDuration(this.map._fadeDuration):ie.hasSymbolBuckets&&!ie.symbolFadeFinished()||this._removeTile(Y)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const c in this._tiles)this._tiles[c].holdingForFade()&&this._removeTile(c)}_updateRetainedTiles(c,g){const b={},E={},A=Math.max(g-Ue.maxOverzooming,this._source.minzoom),z=Math.max(g+Ue.maxUnderzooming,this._source.minzoom),j={};for(const K of c){const Y=this._addTile(K);b[K.key]=K,Y.hasData()||g<this._source.maxzoom&&(j[K.key]=K)}this._retainLoadedChildren(j,g,z,b);for(const K of c){let Y=this._tiles[K.key];if(Y.hasData())continue;if(g+1>this._source.maxzoom){const ue=K.children(this._source.maxzoom)[0],me=this.getTile(ue);if(me&&me.hasData()){b[ue.key]=ue;continue}}else{const ue=K.children(this._source.maxzoom);if(b[ue[0].key]&&b[ue[1].key]&&b[ue[2].key]&&b[ue[3].key])continue}let ie=Y.wasRequested();for(let ue=K.overscaledZ-1;ue>=A;--ue){const me=K.scaledTo(ue);if(E[me.key]||(E[me.key]=!0,Y=this.getTile(me),!Y&&ie&&(Y=this._addTile(me)),Y&&(b[me.key]=me,ie=Y.wasRequested(),Y.hasData())))break}}return b}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const c in this._tiles){const g=[];let b,E=this._tiles[c].tileID;for(;E.overscaledZ>0;){if(E.key in this._loadedParentTiles){b=this._loadedParentTiles[E.key];break}g.push(E.key);const A=E.scaledTo(E.overscaledZ-1);if(b=this._getLoadedTile(A),b)break;E=A}for(const A of g)this._loadedParentTiles[A]=b}}_addTile(c){let g=this._tiles[c.key];if(g)return g;g=this._cache.getAndRemove(c),g&&(this._setTileReloadTimer(c.key,g),g.tileID=c,this._state.initializeTileState(g,this.map?this.map.painter:null),this._cacheTimers[c.key]&&(clearTimeout(this._cacheTimers[c.key]),delete this._cacheTimers[c.key],this._setTileReloadTimer(c.key,g)));const b=g;return g||(g=new ke(c,this._source.tileSize*c.overscaleFactor()),this._loadTile(g,this._tileLoaded.bind(this,g,c.key,g.state))),g.uses++,this._tiles[c.key]=g,b||this._source.fire(new a.Event("dataloading",{tile:g,coord:g.tileID,dataType:"source"})),g}_setTileReloadTimer(c,g){c in this._timers&&(clearTimeout(this._timers[c]),delete this._timers[c]);const b=g.getExpiryTimeout();b&&(this._timers[c]=setTimeout(()=>{this._reloadTile(c,"expired"),delete this._timers[c]},b))}_removeTile(c){const g=this._tiles[c];g&&(g.uses--,delete this._tiles[c],this._timers[c]&&(clearTimeout(this._timers[c]),delete this._timers[c]),g.uses>0||(g.hasData()&&g.state!=="reloading"?this._cache.add(g.tileID,g,g.getExpiryTimeout()):(g.aborted=!0,this._abortTile(g),this._unloadTile(g))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const c in this._tiles)this._removeTile(c);this._cache.reset()}tilesIn(c,g,b){const E=[],A=this.transform;if(!A)return E;const z=b?A.getCameraQueryGeometry(c):c,j=c.map(Se=>A.pointCoordinate(Se,this.terrain)),K=z.map(Se=>A.pointCoordinate(Se,this.terrain)),Y=this.getIds();let ie=1/0,ue=1/0,me=-1/0,Re=-1/0;for(const Se of K)ie=Math.min(ie,Se.x),ue=Math.min(ue,Se.y),me=Math.max(me,Se.x),Re=Math.max(Re,Se.y);for(let Se=0;Se<Y.length;Se++){const Ie=this._tiles[Y[Se]];if(Ie.holdingForFade())continue;const je=Ie.tileID,Xe=Math.pow(2,A.zoom-Ie.tileID.overscaledZ),st=g*Ie.queryPadding*a.EXTENT/Ie.tileSize/Xe,Oe=[je.getTilePoint(new a.MercatorCoordinate(ie,ue)),je.getTilePoint(new a.MercatorCoordinate(me,Re))];if(Oe[0].x-st<a.EXTENT&&Oe[0].y-st<a.EXTENT&&Oe[1].x+st>=0&&Oe[1].y+st>=0){const vt=j.map(Et=>je.getTilePoint(Et)),ft=K.map(Et=>je.getTilePoint(Et));E.push({tile:Ie,tileID:je,queryGeometry:vt,cameraQueryGeometry:ft,scale:Xe})}}return E}getVisibleCoordinates(c){const g=this.getRenderableIds(c).map(b=>this._tiles[b].tileID);for(const b of g)b.posMatrix=this.transform.calculatePosMatrix(b.toUnwrapped());return g}hasTransition(){if(this._source.hasTransition())return!0;if(lt(this._source.type))for(const c in this._tiles){const g=this._tiles[c];if(g.fadeEndTime!==void 0&&g.fadeEndTime>=a.exported.now())return!0}return!1}setFeatureState(c,g,b){this._state.updateState(c=c||"_geojsonTileLayer",g,b)}removeFeatureState(c,g,b){this._state.removeFeatureState(c=c||"_geojsonTileLayer",g,b)}getFeatureState(c,g){return this._state.getState(c=c||"_geojsonTileLayer",g)}setDependencies(c,g,b){const E=this._tiles[c];E&&E.setDependencies(g,b)}reloadTilesForDependencies(c,g){for(const b in this._tiles)this._tiles[b].hasDependency(c,g)&&this._reloadTile(b,"reloading");this._cache.filter(b=>!b.hasDependency(c,g))}}function tt(C,c){const g=Math.abs(2*C.wrap)-+(C.wrap<0),b=Math.abs(2*c.wrap)-+(c.wrap<0);return C.overscaledZ-c.overscaledZ||b-g||c.canonical.y-C.canonical.y||c.canonical.x-C.canonical.x}function lt(C){return C==="raster"||C==="image"||C==="video"}Ue.maxOverzooming=10,Ue.maxUnderzooming=3;const St="mapboxgl_preloaded_worker_pool";class We{constructor(){this.active={}}acquire(c){if(!this.workers)for(this.workers=[];this.workers.length<We.workerCount;)this.workers.push(new Worker(Nl.workerUrl));return this.active[c]=!0,this.workers.slice()}release(c){delete this.active[c],this.numActive()===0&&(this.workers.forEach(g=>{g.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[St]}numActive(){return Object.keys(this.active).length}}const bt=Math.floor(a.exported.hardwareConcurrency/2);let Qe;function mt(){return Qe||(Qe=new We),Qe}function ct(C,c){const g={};for(const b in C)b!=="ref"&&(g[b]=C[b]);return a.refProperties.forEach(b=>{b in c&&(g[b]=c[b])}),g}function wt(C){C=C.slice();const c=Object.create(null);for(let g=0;g<C.length;g++)c[C[g].id]=C[g];for(let g=0;g<C.length;g++)"ref"in C[g]&&(C[g]=ct(C[g],c[C[g].ref]));return C}We.workerCount=Math.max(Math.min(bt,6),1);const rt={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(C,c,g){g.push({command:rt.addSource,args:[C,c[C]]})}function nt(C,c,g){c.push({command:rt.removeSource,args:[C]}),g[C]=!0}function qe(C,c,g,b){nt(C,g,b),ut(C,c,g)}function dt(C,c,g){let b;for(b in C[g])if(Object.prototype.hasOwnProperty.call(C[g],b)&&b!=="data"&&!m(C[g][b],c[g][b]))return!1;for(b in c[g])if(Object.prototype.hasOwnProperty.call(c[g],b)&&b!=="data"&&!m(C[g][b],c[g][b]))return!1;return!0}function _t(C,c,g,b,E,A){let z;for(z in c=c||{},C=C||{})Object.prototype.hasOwnProperty.call(C,z)&&(m(C[z],c[z])||g.push({command:A,args:[b,z,c[z],E]}));for(z in c)Object.prototype.hasOwnProperty.call(c,z)&&!Object.prototype.hasOwnProperty.call(C,z)&&(m(C[z],c[z])||g.push({command:A,args:[b,z,c[z],E]}))}function Dt(C){return C.id}function Nt(C,c){return C[c.id]=c,C}class jt{constructor(c,g){this.reset(c,g)}reset(c,g){this.points=c||[],this._distances=[0];for(let b=1;b<this.points.length;b++)this._distances[b]=this._distances[b-1]+this.points[b].dist(this.points[b-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(g||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(c){if(this.points.length===1)return this.points[0];c=a.clamp(c,0,1);let g=1,b=this._distances[g];const E=c*this.paddedLength+this.padding;for(;b<E&&g<this._distances.length;)b=this._distances[++g];const A=g-1,z=this._distances[A],j=b-z,K=j>0?(E-z)/j:0;return this.points[A].mult(1-K).add(this.points[g].mult(K))}}function Ve(C,c){let g=!0;return C==="always"||C!=="never"&&c!=="never"||(g=!1),g}class Ze{constructor(c,g,b){const E=this.boxCells=[],A=this.circleCells=[];this.xCellCount=Math.ceil(c/b),this.yCellCount=Math.ceil(g/b);for(let z=0;z<this.xCellCount*this.yCellCount;z++)E.push([]),A.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=c,this.height=g,this.xScale=this.xCellCount/c,this.yScale=this.yCellCount/g,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(c,g,b,E,A){this._forEachCell(g,b,E,A,this._insertBoxCell,this.boxUid++),this.boxKeys.push(c),this.bboxes.push(g),this.bboxes.push(b),this.bboxes.push(E),this.bboxes.push(A)}insertCircle(c,g,b,E){this._forEachCell(g-E,b-E,g+E,b+E,this._insertCircleCell,this.circleUid++),this.circleKeys.push(c),this.circles.push(g),this.circles.push(b),this.circles.push(E)}_insertBoxCell(c,g,b,E,A,z){this.boxCells[A].push(z)}_insertCircleCell(c,g,b,E,A,z){this.circleCells[A].push(z)}_query(c,g,b,E,A,z,j){if(b<0||c>this.width||E<0||g>this.height)return[];const K=[];if(c<=0&&g<=0&&this.width<=b&&this.height<=E){if(A)return[{key:null,x1:c,y1:g,x2:b,y2:E}];for(let Y=0;Y<this.boxKeys.length;Y++)K.push({key:this.boxKeys[Y],x1:this.bboxes[4*Y],y1:this.bboxes[4*Y+1],x2:this.bboxes[4*Y+2],y2:this.bboxes[4*Y+3]});for(let Y=0;Y<this.circleKeys.length;Y++){const ie=this.circles[3*Y],ue=this.circles[3*Y+1],me=this.circles[3*Y+2];K.push({key:this.circleKeys[Y],x1:ie-me,y1:ue-me,x2:ie+me,y2:ue+me})}}else this._forEachCell(c,g,b,E,this._queryCell,K,{hitTest:A,overlapMode:z,seenUids:{box:{},circle:{}}},j);return K}query(c,g,b,E){return this._query(c,g,b,E,!1,null)}hitTest(c,g,b,E,A,z){return this._query(c,g,b,E,!0,A,z).length>0}hitTestCircle(c,g,b,E,A){const z=c-b,j=c+b,K=g-b,Y=g+b;if(j<0||z>this.width||Y<0||K>this.height)return!1;const ie=[];return this._forEachCell(z,K,j,Y,this._queryCellCircle,ie,{hitTest:!0,overlapMode:E,circle:{x:c,y:g,radius:b},seenUids:{box:{},circle:{}}},A),ie.length>0}_queryCell(c,g,b,E,A,z,j,K){const{seenUids:Y,hitTest:ie,overlapMode:ue}=j,me=this.boxCells[A];if(me!==null){const Se=this.bboxes;for(const Ie of me)if(!Y.box[Ie]){Y.box[Ie]=!0;const je=4*Ie,Xe=this.boxKeys[Ie];if(c<=Se[je+2]&&g<=Se[je+3]&&b>=Se[je+0]&&E>=Se[je+1]&&(!K||K(Xe))&&(!ie||!Ve(ue,Xe.overlapMode))&&(z.push({key:Xe,x1:Se[je],y1:Se[je+1],x2:Se[je+2],y2:Se[je+3]}),ie))return!0}}const Re=this.circleCells[A];if(Re!==null){const Se=this.circles;for(const Ie of Re)if(!Y.circle[Ie]){Y.circle[Ie]=!0;const je=3*Ie,Xe=this.circleKeys[Ie];if(this._circleAndRectCollide(Se[je],Se[je+1],Se[je+2],c,g,b,E)&&(!K||K(Xe))&&(!ie||!Ve(ue,Xe.overlapMode))){const st=Se[je],Oe=Se[je+1],vt=Se[je+2];if(z.push({key:Xe,x1:st-vt,y1:Oe-vt,x2:st+vt,y2:Oe+vt}),ie)return!0}}}return!1}_queryCellCircle(c,g,b,E,A,z,j,K){const{circle:Y,seenUids:ie,overlapMode:ue}=j,me=this.boxCells[A];if(me!==null){const Se=this.bboxes;for(const Ie of me)if(!ie.box[Ie]){ie.box[Ie]=!0;const je=4*Ie,Xe=this.boxKeys[Ie];if(this._circleAndRectCollide(Y.x,Y.y,Y.radius,Se[je+0],Se[je+1],Se[je+2],Se[je+3])&&(!K||K(Xe))&&!Ve(ue,Xe.overlapMode))return z.push(!0),!0}}const Re=this.circleCells[A];if(Re!==null){const Se=this.circles;for(const Ie of Re)if(!ie.circle[Ie]){ie.circle[Ie]=!0;const je=3*Ie,Xe=this.circleKeys[Ie];if(this._circlesCollide(Se[je],Se[je+1],Se[je+2],Y.x,Y.y,Y.radius)&&(!K||K(Xe))&&!Ve(ue,Xe.overlapMode))return z.push(!0),!0}}}_forEachCell(c,g,b,E,A,z,j,K){const Y=this._convertToXCellCoord(c),ie=this._convertToYCellCoord(g),ue=this._convertToXCellCoord(b),me=this._convertToYCellCoord(E);for(let Re=Y;Re<=ue;Re++)for(let Se=ie;Se<=me;Se++)if(A.call(this,c,g,b,E,this.xCellCount*Se+Re,z,j,K))return}_convertToXCellCoord(c){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(c*this.xScale)))}_convertToYCellCoord(c){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(c*this.yScale)))}_circlesCollide(c,g,b,E,A,z){const j=E-c,K=A-g,Y=b+z;return Y*Y>j*j+K*K}_circleAndRectCollide(c,g,b,E,A,z,j){const K=(z-E)/2,Y=Math.abs(c-(E+K));if(Y>K+b)return!1;const ie=(j-A)/2,ue=Math.abs(g-(A+ie));if(ue>ie+b)return!1;if(Y<=K||ue<=ie)return!0;const me=Y-K,Re=ue-ie;return me*me+Re*Re<=b*b}}function Yt(C,c,g,b,E){const A=a.create();return c?(a.scale(A,A,[1/E,1/E,1]),g||a.rotateZ(A,A,b.angle)):a.multiply(A,b.labelPlaneMatrix,C),A}function sn(C,c,g,b,E){if(c){const A=a.clone(C);return a.scale(A,A,[E,E,1]),g||a.rotateZ(A,A,-b.angle),A}return b.glCoordMatrix}function Gt(C,c,g){let b;g?(b=[C.x,C.y,g(C.x,C.y),1],a.transformMat4(b,b,c)):(b=[C.x,C.y,0,1],xn(b,b,c));const E=b[3];return{point:new a.pointGeometry(b[0]/E,b[1]/E),signedDistanceFromCamera:E}}function zt(C,c){return .5+C/c*.5}function Rt(C,c){const g=C[0]/C[3],b=C[1]/C[3];return g>=-c[0]&&g<=c[0]&&b>=-c[1]&&b<=c[1]}function Qt(C,c,g,b,E,A,z,j,K,Y){const ie=b?C.textSizeData:C.iconSizeData,ue=a.evaluateSizeForZoom(ie,g.transform.zoom),me=[256/g.width*2+1,256/g.height*2+1],Re=b?C.text.dynamicLayoutVertexArray:C.icon.dynamicLayoutVertexArray;Re.clear();const Se=C.lineVertexArray,Ie=b?C.text.placedSymbolArray:C.icon.placedSymbolArray,je=g.transform.width/g.transform.height;let Xe=!1;for(let st=0;st<Ie.length;st++){const Oe=Ie.get(st);if(Oe.hidden||Oe.writingMode===a.WritingMode.vertical&&!Xe){ht(Oe.numGlyphs,Re);continue}let vt;if(Xe=!1,Y?(vt=[Oe.anchorX,Oe.anchorY,Y(Oe.anchorX,Oe.anchorY),1],a.transformMat4(vt,vt,c)):(vt=[Oe.anchorX,Oe.anchorY,0,1],xn(vt,vt,c)),!Rt(vt,me)){ht(Oe.numGlyphs,Re);continue}const ft=zt(g.transform.cameraToCenterDistance,vt[3]),Et=a.evaluateSizeForFeature(ie,ue,Oe),It=z?Et/ft:Et*ft,Ht=new a.pointGeometry(Oe.anchorX,Oe.anchorY),Ct=Gt(Ht,E,Y).point,fn={},rn=Lt(Oe,It,!1,j,c,E,A,C.glyphOffsetArray,Se,Re,Ct,Ht,fn,je,K,Y);Xe=rn.useVertical,(rn.notEnoughRoom||Xe||rn.needsFlipping&&Lt(Oe,It,!0,j,c,E,A,C.glyphOffsetArray,Se,Re,Ct,Ht,fn,je,K,Y).notEnoughRoom)&&ht(Oe.numGlyphs,Re)}b?C.text.dynamicLayoutVertexBuffer.updateData(Re):C.icon.dynamicLayoutVertexBuffer.updateData(Re)}function pn(C,c,g,b,E,A,z,j,K,Y,ie,ue,me){const Re=j.glyphStartIndex+j.numGlyphs,Se=j.lineStartIndex,Ie=j.lineStartIndex+j.lineLength,je=c.getoffsetX(j.glyphStartIndex),Xe=c.getoffsetX(Re-1),st=Kt(C*je,g,b,E,A,z,j.segment,Se,Ie,K,Y,ie,ue,me);if(!st)return null;const Oe=Kt(C*Xe,g,b,E,A,z,j.segment,Se,Ie,K,Y,ie,ue,me);return Oe?{first:st,last:Oe}:null}function ot(C,c,g,b){return C===a.WritingMode.horizontal&&Math.abs(g.y-c.y)>Math.abs(g.x-c.x)*b?{useVertical:!0}:(C===a.WritingMode.vertical?c.y<g.y:c.x>g.x)?{needsFlipping:!0}:null}function Lt(C,c,g,b,E,A,z,j,K,Y,ie,ue,me,Re,Se,Ie){const je=c/24,Xe=C.lineOffsetX*je,st=C.lineOffsetY*je;let Oe;if(C.numGlyphs>1){const vt=C.glyphStartIndex+C.numGlyphs,ft=C.lineStartIndex,Et=C.lineStartIndex+C.lineLength,It=pn(je,j,Xe,st,g,ie,ue,C,K,A,me,Se,Ie);if(!It)return{notEnoughRoom:!0};const Ht=Gt(It.first.point,z,Ie).point,Ct=Gt(It.last.point,z,Ie).point;if(b&&!g){const fn=ot(C.writingMode,Ht,Ct,Re);if(fn)return fn}Oe=[It.first];for(let fn=C.glyphStartIndex+1;fn<vt-1;fn++)Oe.push(Kt(je*j.getoffsetX(fn),Xe,st,g,ie,ue,C.segment,ft,Et,K,A,me,Se,Ie));Oe.push(It.last)}else{if(b&&!g){const ft=Gt(ue,E,Ie).point,Et=C.lineStartIndex+C.segment+1,It=new a.pointGeometry(K.getx(Et),K.gety(Et)),Ht=Gt(It,E,Ie),Ct=Ht.signedDistanceFromCamera>0?Ht.point:Tt(ue,It,ft,1,E,Ie),fn=ot(C.writingMode,ft,Ct,Re);if(fn)return fn}const vt=Kt(je*j.getoffsetX(C.glyphStartIndex),Xe,st,g,ie,ue,C.segment,C.lineStartIndex,C.lineStartIndex+C.lineLength,K,A,me,Se,Ie);if(!vt)return{notEnoughRoom:!0};Oe=[vt]}for(const vt of Oe)a.addDynamicAttributes(Y,vt.point,vt.angle);return{}}function Tt(C,c,g,b,E,A){const z=Gt(C.add(C.sub(c)._unit()),E,A).point,j=g.sub(z);return g.add(j._mult(b/j.mag()))}function Kt(C,c,g,b,E,A,z,j,K,Y,ie,ue,me,Re){const Se=b?C-c:C+c;let Ie=Se>0?1:-1,je=0;b&&(Ie*=-1,je=Math.PI),Ie<0&&(je+=Math.PI);let Xe=Ie>0?j+z:j+z+1,st=E,Oe=E,vt=0,ft=0;const Et=Math.abs(Se),It=[];for(;vt+ft<=Et;){if(Xe+=Ie,Xe<j||Xe>=K)return null;if(Oe=st,It.push(st),st=ue[Xe],st===void 0){const mn=new a.pointGeometry(Y.getx(Xe),Y.gety(Xe)),Hn=Gt(mn,ie,Re);if(Hn.signedDistanceFromCamera>0)st=ue[Xe]=Hn.point;else{const qn=Xe-Ie;st=Tt(vt===0?A:new a.pointGeometry(Y.getx(qn),Y.gety(qn)),mn,Oe,Et-vt+1,ie,Re)}}vt+=ft,ft=Oe.dist(st)}const Ht=(Et-vt)/ft,Ct=st.sub(Oe),fn=Ct.mult(Ht)._add(Oe);fn._add(Ct._unit()._perp()._mult(g*Ie));const rn=je+Math.atan2(st.y-Oe.y,st.x-Oe.x);return It.push(fn),{point:fn,angle:me?rn:0,path:It}}const Zt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ht(C,c){for(let g=0;g<C;g++){const b=c.length;c.resize(b+4),c.float32.set(Zt,3*b)}}function xn(C,c,g){const b=c[0],E=c[1];return C[0]=g[0]*b+g[4]*E+g[12],C[1]=g[1]*b+g[5]*E+g[13],C[3]=g[3]*b+g[7]*E+g[15],C}const bn=100;class tn{constructor(c,g=new Ze(c.width+200,c.height+200,25),b=new Ze(c.width+200,c.height+200,25)){this.transform=c,this.grid=g,this.ignoredGrid=b,this.pitchfactor=Math.cos(c._pitch)*c.cameraToCenterDistance,this.screenRightBoundary=c.width+bn,this.screenBottomBoundary=c.height+bn,this.gridRightBoundary=c.width+200,this.gridBottomBoundary=c.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(c,g,b,E,A,z){const j=this.projectAndGetPerspectiveRatio(E,c.anchorPointX,c.anchorPointY,z),K=b*j.perspectiveRatio,Y=c.x1*K+j.point.x,ie=c.y1*K+j.point.y,ue=c.x2*K+j.point.x,me=c.y2*K+j.point.y;return!this.isInsideGrid(Y,ie,ue,me)||g!=="always"&&this.grid.hitTest(Y,ie,ue,me,g,A)||j.perspectiveRatio<this.perspectiveRatioCutoff?{box:[],offscreen:!1}:{box:[Y,ie,ue,me],offscreen:this.isOffscreen(Y,ie,ue,me)}}placeCollisionCircles(c,g,b,E,A,z,j,K,Y,ie,ue,me,Re,Se){const Ie=[],je=new a.pointGeometry(g.anchorX,g.anchorY),Xe=Gt(je,z,Se),st=zt(this.transform.cameraToCenterDistance,Xe.signedDistanceFromCamera),Oe=(ie?A/st:A*st)/a.ONE_EM,vt=Gt(je,j,Se).point,ft=pn(Oe,E,g.lineOffsetX*Oe,g.lineOffsetY*Oe,!1,vt,je,g,b,j,{},!1,Se);let Et=!1,It=!1,Ht=!0;if(ft){const Ct=.5*me*st+Re,fn=new a.pointGeometry(-100,-100),rn=new a.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),mn=new jt,Hn=ft.first,qn=ft.last;let kn=[];for(let sr=Hn.path.length-1;sr>=1;sr--)kn.push(Hn.path[sr]);for(let sr=1;sr<qn.path.length;sr++)kn.push(qn.path[sr]);const vr=2.5*Ct;if(K){const sr=kn.map(ur=>Gt(ur,K,Se));kn=sr.some(ur=>ur.signedDistanceFromCamera<=0)?[]:sr.map(ur=>ur.point)}let yr=[];if(kn.length>0){const sr=kn[0].clone(),ur=kn[0].clone();for(let Cr=1;Cr<kn.length;Cr++)sr.x=Math.min(sr.x,kn[Cr].x),sr.y=Math.min(sr.y,kn[Cr].y),ur.x=Math.max(ur.x,kn[Cr].x),ur.y=Math.max(ur.y,kn[Cr].y);yr=sr.x>=fn.x&&ur.x<=rn.x&&sr.y>=fn.y&&ur.y<=rn.y?[kn]:ur.x<fn.x||sr.x>rn.x||ur.y<fn.y||sr.y>rn.y?[]:a.clipLine([kn],fn.x,fn.y,rn.x,rn.y)}for(const sr of yr){mn.reset(sr,.25*Ct);let ur=0;ur=mn.length<=.5*Ct?1:Math.ceil(mn.paddedLength/vr)+1;for(let Cr=0;Cr<ur;Cr++){const Ri=Cr/Math.max(ur-1,1),Ka=mn.lerp(Ri),xa=Ka.x+bn,Wa=Ka.y+bn;Ie.push(xa,Wa,Ct,0);const el=xa-Ct,ta=Wa-Ct,bo=xa+Ct,Ss=Wa+Ct;if(Ht=Ht&&this.isOffscreen(el,ta,bo,Ss),It=It||this.isInsideGrid(el,ta,bo,Ss),c!=="always"&&this.grid.hitTestCircle(xa,Wa,Ct,c,ue)&&(Et=!0,!Y))return{circles:[],offscreen:!1,collisionDetected:Et}}}}return{circles:!Y&&Et||!It||st<this.perspectiveRatioCutoff?[]:Ie,offscreen:Ht,collisionDetected:Et}}queryRenderedSymbols(c){if(c.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const g=[];let b=1/0,E=1/0,A=-1/0,z=-1/0;for(const ie of c){const ue=new a.pointGeometry(ie.x+bn,ie.y+bn);b=Math.min(b,ue.x),E=Math.min(E,ue.y),A=Math.max(A,ue.x),z=Math.max(z,ue.y),g.push(ue)}const j=this.grid.query(b,E,A,z).concat(this.ignoredGrid.query(b,E,A,z)),K={},Y={};for(const ie of j){const ue=ie.key;if(K[ue.bucketInstanceId]===void 0&&(K[ue.bucketInstanceId]={}),K[ue.bucketInstanceId][ue.featureIndex])continue;const me=[new a.pointGeometry(ie.x1,ie.y1),new a.pointGeometry(ie.x2,ie.y1),new a.pointGeometry(ie.x2,ie.y2),new a.pointGeometry(ie.x1,ie.y2)];a.polygonIntersectsPolygon(g,me)&&(K[ue.bucketInstanceId][ue.featureIndex]=!0,Y[ue.bucketInstanceId]===void 0&&(Y[ue.bucketInstanceId]=[]),Y[ue.bucketInstanceId].push(ue.featureIndex))}return Y}insertCollisionBox(c,g,b,E,A,z){(b?this.ignoredGrid:this.grid).insert({bucketInstanceId:E,featureIndex:A,collisionGroupID:z,overlapMode:g},c[0],c[1],c[2],c[3])}insertCollisionCircles(c,g,b,E,A,z){const j=b?this.ignoredGrid:this.grid,K={bucketInstanceId:E,featureIndex:A,collisionGroupID:z,overlapMode:g};for(let Y=0;Y<c.length;Y+=4)j.insertCircle(K,c[Y],c[Y+1],c[Y+2])}projectAndGetPerspectiveRatio(c,g,b,E){let A;return E?(A=[g,b,E(g,b),1],a.transformMat4(A,A,c)):(A=[g,b,0,1],xn(A,A,c)),{point:new a.pointGeometry((A[0]/A[3]+1)/2*this.transform.width+bn,(-A[1]/A[3]+1)/2*this.transform.height+bn),perspectiveRatio:.5+this.transform.cameraToCenterDistance/A[3]*.5}}isOffscreen(c,g,b,E){return b<bn||c>=this.screenRightBoundary||E<bn||g>this.screenBottomBoundary}isInsideGrid(c,g,b,E){return b>=0&&c<this.gridRightBoundary&&E>=0&&g<this.gridBottomBoundary}getViewportMatrix(){const c=a.identity([]);return a.translate(c,c,[-100,-100,0]),c}}function Bt(C,c,g){return c*(a.EXTENT/(C.tileSize*Math.pow(2,g-C.tileID.overscaledZ)))}class gt{constructor(c,g,b,E){this.opacity=c?Math.max(0,Math.min(1,c.opacity+(c.placed?g:-g))):E&&b?1:0,this.placed=b}isHidden(){return this.opacity===0&&!this.placed}}class xt{constructor(c,g,b,E,A){this.text=new gt(c?c.text:null,g,b,A),this.icon=new gt(c?c.icon:null,g,E,A)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Vt{constructor(c,g,b){this.text=c,this.icon=g,this.skipFade=b}}class qt{constructor(){this.invProjMatrix=a.create(),this.viewportMatrix=a.create(),this.circles=[]}}class vn{constructor(c,g,b,E,A){this.bucketInstanceId=c,this.featureIndex=g,this.sourceLayerIndex=b,this.bucketIndex=E,this.tileID=A}}class Fn{constructor(c){this.crossSourceCollisions=c,this.maxGroupID=0,this.collisionGroups={}}get(c){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[c]){const g=++this.maxGroupID;this.collisionGroups[c]={ID:g,predicate:b=>b.collisionGroupID===g}}return this.collisionGroups[c]}}function tr(C,c,g,b,E){const{horizontalAlign:A,verticalAlign:z}=a.getAnchorAlignment(C),j=-(A-.5)*c,K=-(z-.5)*g,Y=a.evaluateVariableOffset(C,b);return new a.pointGeometry(j+Y[0]*E,K+Y[1]*E)}function nr(C,c,g,b,E,A){const{x1:z,x2:j,y1:K,y2:Y,anchorPointX:ie,anchorPointY:ue}=C,me=new a.pointGeometry(c,g);return b&&me._rotate(E?A:-A),{x1:z+me.x,y1:K+me.y,x2:j+me.x,y2:Y+me.y,anchorPointX:ie,anchorPointY:ue}}class ye{constructor(c,g,b,E,A){this.transform=c.clone(),this.terrain=g,this.collisionIndex=new tn(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=b,this.retainedQueryData={},this.collisionGroups=new Fn(E),this.collisionCircleArrays={},this.prevPlacement=A,A&&(A.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(c,g,b,E){const A=b.getBucket(g),z=b.latestFeatureIndex;if(!A||!z||g.id!==A.layerIds[0])return;const j=b.collisionBoxArray,K=A.layers[0].layout,Y=Math.pow(2,this.transform.zoom-b.tileID.overscaledZ),ie=b.tileSize/a.EXTENT,ue=this.transform.calculatePosMatrix(b.tileID.toUnwrapped()),me=K.get("text-pitch-alignment")==="map",Re=K.get("text-rotation-alignment")==="map",Se=Bt(b,1,this.transform.zoom),Ie=Yt(ue,me,Re,this.transform,Se);let je=null;if(me){const st=sn(ue,me,Re,this.transform,Se);je=a.multiply([],this.transform.labelPlaneMatrix,st)}this.retainedQueryData[A.bucketInstanceId]=new vn(A.bucketInstanceId,z,A.sourceLayerIndex,A.index,b.tileID);const Xe={bucket:A,layout:K,posMatrix:ue,textLabelPlaneMatrix:Ie,labelToScreenMatrix:je,scale:Y,textPixelRatio:ie,holdingForFade:b.holdingForFade(),collisionBoxArray:j,partiallyEvaluatedTextSize:a.evaluateSizeForZoom(A.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(A.sourceID)};if(E)for(const st of A.sortKeyRanges){const{sortKey:Oe,symbolInstanceStart:vt,symbolInstanceEnd:ft}=st;c.push({sortKey:Oe,symbolInstanceStart:vt,symbolInstanceEnd:ft,parameters:Xe})}else c.push({symbolInstanceStart:0,symbolInstanceEnd:A.symbolInstances.length,parameters:Xe})}attemptAnchorPlacement(c,g,b,E,A,z,j,K,Y,ie,ue,me,Re,Se,Ie,je){const Xe=[me.textOffset0,me.textOffset1],st=tr(c,b,E,Xe,A),Oe=this.collisionIndex.placeCollisionBox(nr(g,st.x,st.y,z,j,this.transform.angle),ue,K,Y,ie.predicate,je);if((!Ie||this.collisionIndex.placeCollisionBox(nr(Ie,st.x,st.y,z,j,this.transform.angle),ue,K,Y,ie.predicate,je).box.length!==0)&&Oe.box.length>0){let vt;if(this.prevPlacement&&this.prevPlacement.variableOffsets[me.crossTileID]&&this.prevPlacement.placements[me.crossTileID]&&this.prevPlacement.placements[me.crossTileID].text&&(vt=this.prevPlacement.variableOffsets[me.crossTileID].anchor),me.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[me.crossTileID]={textOffset:Xe,width:b,height:E,anchor:c,textBoxScale:A,prevAnchor:vt},this.markUsedJustification(Re,c,me,Se),Re.allowVerticalPlacement&&(this.markUsedOrientation(Re,Se,me),this.placedOrientations[me.crossTileID]=Se),{shift:st,placedGlyphBoxes:Oe}}}placeLayerBucketPart(c,g,b){const{bucket:E,layout:A,posMatrix:z,textLabelPlaneMatrix:j,labelToScreenMatrix:K,textPixelRatio:Y,holdingForFade:ie,collisionBoxArray:ue,partiallyEvaluatedTextSize:me,collisionGroup:Re}=c.parameters,Se=A.get("text-optional"),Ie=A.get("icon-optional"),je=a.getOverlapMode(A,"text-overlap","text-allow-overlap"),Xe=je==="always",st=a.getOverlapMode(A,"icon-overlap","icon-allow-overlap"),Oe=st==="always",vt=A.get("text-rotation-alignment")==="map",ft=A.get("text-pitch-alignment")==="map",Et=A.get("icon-text-fit")!=="none",It=A.get("symbol-z-order")==="viewport-y",Ht=Xe&&(Oe||!E.hasIconData()||Ie),Ct=Oe&&(Xe||!E.hasTextData()||Se);!E.collisionArrays&&ue&&E.deserializeCollisionBoxes(ue);const fn=(rn,mn)=>{if(g[rn.crossTileID])return;if(ie)return void(this.placements[rn.crossTileID]=new Vt(!1,!1,!1));let Hn=!1,qn=!1,kn=!0,vr=null,yr={box:null,offscreen:null},sr={box:null,offscreen:null},ur=null,Cr=null,Ri=null,Ka=0,xa=0,Wa=0;mn.textFeatureIndex?Ka=mn.textFeatureIndex:rn.useRuntimeCollisionCircles&&(Ka=rn.featureIndex),mn.verticalTextFeatureIndex&&(xa=mn.verticalTextFeatureIndex);const el=this.retainedQueryData[E.bucketInstanceId].tileID,ta=this.terrain?(Si,Jn)=>this.terrain.getElevation(el,Si,Jn):null;for(const Si of["textBox","verticalTextBox","iconBox","verticalIconBox"]){const Jn=mn[Si];Jn&&(Jn.elevation=ta?ta(Jn.anchorPointX,Jn.anchorPointY):0)}const bo=mn.textBox;if(bo){const Si=gr=>{let Ai=a.WritingMode.horizontal;if(E.allowVerticalPlacement&&!gr&&this.prevPlacement){const Di=this.prevPlacement.placedOrientations[rn.crossTileID];Di&&(this.placedOrientations[rn.crossTileID]=Di,Ai=Di,this.markUsedOrientation(E,Ai,rn))}return Ai},Jn=(gr,Ai)=>{if(E.allowVerticalPlacement&&rn.numVerticalGlyphVertices>0&&mn.verticalTextBox){for(const Di of E.writingModes)if(Di===a.WritingMode.vertical?(yr=Ai(),sr=yr):yr=gr(),yr&&yr.box&&yr.box.length)break}else yr=gr()};if(A.get("text-variable-anchor")){let gr=A.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[rn.crossTileID]){const Kr=this.prevPlacement.variableOffsets[rn.crossTileID];gr.indexOf(Kr.anchor)>0&&(gr=gr.filter(na=>na!==Kr.anchor),gr.unshift(Kr.anchor))}const Ai=(Kr,na,Ll)=>{const lm=Kr.x2-Kr.x1,Nu=Kr.y2-Kr.y1,ty=rn.textBoxScale,um=Et&&st==="never"?na:null;let tl={box:[],offscreen:!1};const Fl=je!=="never"?2*gr.length:gr.length;for(let zl=0;zl<Fl;++zl){const jf=this.attemptAnchorPlacement(gr[zl%gr.length],Kr,lm,Nu,ty,vt,ft,Y,z,Re,zl>=gr.length?je:"never",rn,E,Ll,um,ta);if(jf&&(tl=jf.placedGlyphBoxes,tl&&tl.box&&tl.box.length)){Hn=!0,vr=jf.shift;break}}return tl};Jn(()=>Ai(bo,mn.iconBox,a.WritingMode.horizontal),()=>{const Kr=mn.verticalTextBox;return E.allowVerticalPlacement&&!(yr&&yr.box&&yr.box.length)&&rn.numVerticalGlyphVertices>0&&Kr?Ai(Kr,mn.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}}),yr&&(Hn=yr.box,kn=yr.offscreen);const Di=Si(yr&&yr.box);if(!Hn&&this.prevPlacement){const Kr=this.prevPlacement.variableOffsets[rn.crossTileID];Kr&&(this.variableOffsets[rn.crossTileID]=Kr,this.markUsedJustification(E,Kr.anchor,rn,Di))}}else{const gr=(Ai,Di)=>{const Kr=this.collisionIndex.placeCollisionBox(Ai,je,Y,z,Re.predicate,ta);return Kr&&Kr.box&&Kr.box.length&&(this.markUsedOrientation(E,Di,rn),this.placedOrientations[rn.crossTileID]=Di),Kr};Jn(()=>gr(bo,a.WritingMode.horizontal),()=>{const Ai=mn.verticalTextBox;return E.allowVerticalPlacement&&rn.numVerticalGlyphVertices>0&&Ai?gr(Ai,a.WritingMode.vertical):{box:null,offscreen:null}}),Si(yr&&yr.box&&yr.box.length)}}if(ur=yr,Hn=ur&&ur.box&&ur.box.length>0,kn=ur&&ur.offscreen,rn.useRuntimeCollisionCircles){const Si=E.text.placedSymbolArray.get(rn.centerJustifiedTextSymbolIndex),Jn=a.evaluateSizeForFeature(E.textSizeData,me,Si),gr=A.get("text-padding");Cr=this.collisionIndex.placeCollisionCircles(je,Si,E.lineVertexArray,E.glyphOffsetArray,Jn,z,j,K,b,ft,Re.predicate,rn.collisionCircleDiameter,gr,ta),Cr.circles.length&&Cr.collisionDetected&&!b&&a.warnOnce("Collisions detected, but collision boxes are not shown"),Hn=Xe||Cr.circles.length>0&&!Cr.collisionDetected,kn=kn&&Cr.offscreen}if(mn.iconFeatureIndex&&(Wa=mn.iconFeatureIndex),mn.iconBox){const Si=Jn=>{const gr=Et&&vr?nr(Jn,vr.x,vr.y,vt,ft,this.transform.angle):Jn;return this.collisionIndex.placeCollisionBox(gr,st,Y,z,Re.predicate,ta)};sr&&sr.box&&sr.box.length&&mn.verticalIconBox?(Ri=Si(mn.verticalIconBox),qn=Ri.box.length>0):(Ri=Si(mn.iconBox),qn=Ri.box.length>0),kn=kn&&Ri.offscreen}const Ss=Se||rn.numHorizontalGlyphVertices===0&&rn.numVerticalGlyphVertices===0,Uf=Ie||rn.numIconVertices===0;if(Ss||Uf?Uf?Ss||(qn=qn&&Hn):Hn=qn&&Hn:qn=Hn=qn&&Hn,Hn&&ur&&ur.box&&this.collisionIndex.insertCollisionBox(ur.box,je,A.get("text-ignore-placement"),E.bucketInstanceId,sr&&sr.box&&xa?xa:Ka,Re.ID),qn&&Ri&&this.collisionIndex.insertCollisionBox(Ri.box,st,A.get("icon-ignore-placement"),E.bucketInstanceId,Wa,Re.ID),Cr&&(Hn&&this.collisionIndex.insertCollisionCircles(Cr.circles,je,A.get("text-ignore-placement"),E.bucketInstanceId,Ka,Re.ID),b)){const Si=E.bucketInstanceId;let Jn=this.collisionCircleArrays[Si];Jn===void 0&&(Jn=this.collisionCircleArrays[Si]=new qt);for(let gr=0;gr<Cr.circles.length;gr+=4)Jn.circles.push(Cr.circles[gr+0]),Jn.circles.push(Cr.circles[gr+1]),Jn.circles.push(Cr.circles[gr+2]),Jn.circles.push(Cr.collisionDetected?1:0)}if(rn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(E.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[rn.crossTileID]=new Vt(Hn||Ht,qn||Ct,kn||E.justReloaded),g[rn.crossTileID]=!0};if(It){if(c.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const rn=E.getSortedSymbolIndexes(this.transform.angle);for(let mn=rn.length-1;mn>=0;--mn){const Hn=rn[mn];fn(E.symbolInstances.get(Hn),E.collisionArrays[Hn])}}else for(let rn=c.symbolInstanceStart;rn<c.symbolInstanceEnd;rn++)fn(E.symbolInstances.get(rn),E.collisionArrays[rn]);if(b&&E.bucketInstanceId in this.collisionCircleArrays){const rn=this.collisionCircleArrays[E.bucketInstanceId];a.invert(rn.invProjMatrix,z),rn.viewportMatrix=this.collisionIndex.getViewportMatrix()}E.justReloaded=!1}markUsedJustification(c,g,b,E){let A;A=E===a.WritingMode.vertical?b.verticalPlacedTextSymbolIndex:{left:b.leftJustifiedTextSymbolIndex,center:b.centerJustifiedTextSymbolIndex,right:b.rightJustifiedTextSymbolIndex}[a.getAnchorJustification(g)];const z=[b.leftJustifiedTextSymbolIndex,b.centerJustifiedTextSymbolIndex,b.rightJustifiedTextSymbolIndex,b.verticalPlacedTextSymbolIndex];for(const j of z)j>=0&&(c.text.placedSymbolArray.get(j).crossTileID=A>=0&&j!==A?0:b.crossTileID)}markUsedOrientation(c,g,b){const E=g===a.WritingMode.horizontal||g===a.WritingMode.horizontalOnly?g:0,A=g===a.WritingMode.vertical?g:0,z=[b.leftJustifiedTextSymbolIndex,b.centerJustifiedTextSymbolIndex,b.rightJustifiedTextSymbolIndex];for(const j of z)c.text.placedSymbolArray.get(j).placedOrientation=E;b.verticalPlacedTextSymbolIndex&&(c.text.placedSymbolArray.get(b.verticalPlacedTextSymbolIndex).placedOrientation=A)}commit(c){this.commitTime=c,this.zoomAtLastRecencyCheck=this.transform.zoom;const g=this.prevPlacement;let b=!1;this.prevZoomAdjustment=g?g.zoomAdjustment(this.transform.zoom):0;const E=g?g.symbolFadeChange(c):1,A=g?g.opacities:{},z=g?g.variableOffsets:{},j=g?g.placedOrientations:{};for(const K in this.placements){const Y=this.placements[K],ie=A[K];ie?(this.opacities[K]=new xt(ie,E,Y.text,Y.icon),b=b||Y.text!==ie.text.placed||Y.icon!==ie.icon.placed):(this.opacities[K]=new xt(null,E,Y.text,Y.icon,Y.skipFade),b=b||Y.text||Y.icon)}for(const K in A){const Y=A[K];if(!this.opacities[K]){const ie=new xt(Y,E,!1,!1);ie.isHidden()||(this.opacities[K]=ie,b=b||Y.text.placed||Y.icon.placed)}}for(const K in z)this.variableOffsets[K]||!this.opacities[K]||this.opacities[K].isHidden()||(this.variableOffsets[K]=z[K]);for(const K in j)this.placedOrientations[K]||!this.opacities[K]||this.opacities[K].isHidden()||(this.placedOrientations[K]=j[K]);if(g&&g.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");b?this.lastPlacementChangeTime=c:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=g?g.lastPlacementChangeTime:c)}updateLayerOpacities(c,g){const b={};for(const E of g){const A=E.getBucket(c);A&&E.latestFeatureIndex&&c.id===A.layerIds[0]&&this.updateBucketOpacities(A,b,E.collisionBoxArray)}}updateBucketOpacities(c,g,b){c.hasTextData()&&c.text.opacityVertexArray.clear(),c.hasIconData()&&c.icon.opacityVertexArray.clear(),c.hasIconCollisionBoxData()&&c.iconCollisionBox.collisionVertexArray.clear(),c.hasTextCollisionBoxData()&&c.textCollisionBox.collisionVertexArray.clear();const E=c.layers[0].layout,A=new xt(null,0,!1,!1,!0),z=E.get("text-allow-overlap"),j=E.get("icon-allow-overlap"),K=E.get("text-variable-anchor"),Y=E.get("text-rotation-alignment")==="map",ie=E.get("text-pitch-alignment")==="map",ue=E.get("icon-text-fit")!=="none",me=new xt(null,0,z&&(j||!c.hasIconData()||E.get("icon-optional")),j&&(z||!c.hasTextData()||E.get("text-optional")),!0);!c.collisionArrays&&b&&(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData())&&c.deserializeCollisionBoxes(b);const Re=(Se,Ie,je)=>{for(let Xe=0;Xe<Ie/4;Xe++)Se.opacityVertexArray.emplaceBack(je)};for(let Se=0;Se<c.symbolInstances.length;Se++){const Ie=c.symbolInstances.get(Se),{numHorizontalGlyphVertices:je,numVerticalGlyphVertices:Xe,crossTileID:st}=Ie;let Oe=this.opacities[st];g[st]?Oe=A:Oe||(Oe=me,this.opacities[st]=Oe),g[st]=!0;const vt=Ie.numIconVertices>0,ft=this.placedOrientations[Ie.crossTileID],Et=ft===a.WritingMode.vertical,It=ft===a.WritingMode.horizontal||ft===a.WritingMode.horizontalOnly;if(je>0||Xe>0){const Ht=Be(Oe.text);Re(c.text,je,Et?Je:Ht),Re(c.text,Xe,It?Je:Ht);const Ct=Oe.text.isHidden();[Ie.rightJustifiedTextSymbolIndex,Ie.centerJustifiedTextSymbolIndex,Ie.leftJustifiedTextSymbolIndex].forEach(mn=>{mn>=0&&(c.text.placedSymbolArray.get(mn).hidden=Ct||Et?1:0)}),Ie.verticalPlacedTextSymbolIndex>=0&&(c.text.placedSymbolArray.get(Ie.verticalPlacedTextSymbolIndex).hidden=Ct||It?1:0);const fn=this.variableOffsets[Ie.crossTileID];fn&&this.markUsedJustification(c,fn.anchor,Ie,ft);const rn=this.placedOrientations[Ie.crossTileID];rn&&(this.markUsedJustification(c,"left",Ie,rn),this.markUsedOrientation(c,rn,Ie))}if(vt){const Ht=Be(Oe.icon),Ct=!(ue&&Ie.verticalPlacedIconSymbolIndex&&Et);Ie.placedIconSymbolIndex>=0&&(Re(c.icon,Ie.numIconVertices,Ct?Ht:Je),c.icon.placedSymbolArray.get(Ie.placedIconSymbolIndex).hidden=Oe.icon.isHidden()),Ie.verticalPlacedIconSymbolIndex>=0&&(Re(c.icon,Ie.numVerticalIconVertices,Ct?Je:Ht),c.icon.placedSymbolArray.get(Ie.verticalPlacedIconSymbolIndex).hidden=Oe.icon.isHidden())}if(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData()){const Ht=c.collisionArrays[Se];if(Ht){let Ct=new a.pointGeometry(0,0);if(Ht.textBox||Ht.verticalTextBox){let rn=!0;if(K){const mn=this.variableOffsets[st];mn?(Ct=tr(mn.anchor,mn.width,mn.height,mn.textOffset,mn.textBoxScale),Y&&Ct._rotate(ie?this.transform.angle:-this.transform.angle)):rn=!1}Ht.textBox&&q(c.textCollisionBox.collisionVertexArray,Oe.text.placed,!rn||Et,Ct.x,Ct.y),Ht.verticalTextBox&&q(c.textCollisionBox.collisionVertexArray,Oe.text.placed,!rn||It,Ct.x,Ct.y)}const fn=Boolean(!It&&Ht.verticalIconBox);Ht.iconBox&&q(c.iconCollisionBox.collisionVertexArray,Oe.icon.placed,fn,ue?Ct.x:0,ue?Ct.y:0),Ht.verticalIconBox&&q(c.iconCollisionBox.collisionVertexArray,Oe.icon.placed,!fn,ue?Ct.x:0,ue?Ct.y:0)}}}if(c.sortFeatures(this.transform.angle),this.retainedQueryData[c.bucketInstanceId]&&(this.retainedQueryData[c.bucketInstanceId].featureSortOrder=c.featureSortOrder),c.hasTextData()&&c.text.opacityVertexBuffer&&c.text.opacityVertexBuffer.updateData(c.text.opacityVertexArray),c.hasIconData()&&c.icon.opacityVertexBuffer&&c.icon.opacityVertexBuffer.updateData(c.icon.opacityVertexArray),c.hasIconCollisionBoxData()&&c.iconCollisionBox.collisionVertexBuffer&&c.iconCollisionBox.collisionVertexBuffer.updateData(c.iconCollisionBox.collisionVertexArray),c.hasTextCollisionBoxData()&&c.textCollisionBox.collisionVertexBuffer&&c.textCollisionBox.collisionVertexBuffer.updateData(c.textCollisionBox.collisionVertexArray),c.text.opacityVertexArray.length!==c.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${c.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${c.text.layoutVertexArray.length}) / 4`);if(c.icon.opacityVertexArray.length!==c.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${c.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${c.icon.layoutVertexArray.length}) / 4`);if(c.bucketInstanceId in this.collisionCircleArrays){const Se=this.collisionCircleArrays[c.bucketInstanceId];c.placementInvProjMatrix=Se.invProjMatrix,c.placementViewportMatrix=Se.viewportMatrix,c.collisionCircleArray=Se.circles,delete this.collisionCircleArrays[c.bucketInstanceId]}}symbolFadeChange(c){return this.fadeDuration===0?1:(c-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(c){return Math.max(0,(this.transform.zoom-c)/1.5)}hasTransitions(c){return this.stale||c-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(c,g){const b=this.zoomAtLastRecencyCheck===g?1-this.zoomAdjustment(g):1;return this.zoomAtLastRecencyCheck=g,this.commitTime+this.fadeDuration*b>c}setStale(){this.stale=!0}}function q(C,c,g,b,E){C.emplaceBack(c?1:0,g?1:0,b||0,E||0),C.emplaceBack(c?1:0,g?1:0,b||0,E||0),C.emplaceBack(c?1:0,g?1:0,b||0,E||0),C.emplaceBack(c?1:0,g?1:0,b||0,E||0)}const J=Math.pow(2,25),pe=Math.pow(2,24),ce=Math.pow(2,17),we=Math.pow(2,16),Ae=Math.pow(2,9),Pe=Math.pow(2,8),Me=Math.pow(2,1);function Be(C){if(C.opacity===0&&!C.placed)return 0;if(C.opacity===1&&C.placed)return 4294967295;const c=C.placed?1:0,g=Math.floor(127*C.opacity);return g*J+c*pe+g*ce+c*we+g*Ae+c*Pe+g*Me+c}const Je=0;class et{constructor(c){this._sortAcrossTiles=c.layout.get("symbol-z-order")!=="viewport-y"&&!c.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(c,g,b,E,A){const z=this._bucketParts;for(;this._currentTileIndex<c.length;)if(g.getBucketParts(z,E,c[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,A())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,z.sort((j,K)=>j.sortKey-K.sortKey));this._currentPartIndex<z.length;)if(g.placeLayerBucketPart(z[this._currentPartIndex],this._seenCrossTileIDs,b),this._currentPartIndex++,A())return!0;return!1}}class Ge{constructor(c,g,b,E,A,z,j,K){this.placement=new ye(c,g,z,j,K),this._currentPlacementIndex=b.length-1,this._forceFullPlacement=E,this._showCollisionBoxes=A,this._done=!1}isDone(){return this._done}continuePlacement(c,g,b){const E=a.exported.now(),A=()=>{const z=a.exported.now()-E;return!this._forceFullPlacement&&z>2};for(;this._currentPlacementIndex>=0;){const z=g[c[this._currentPlacementIndex]],j=this.placement.collisionIndex.transform.zoom;if(z.type==="symbol"&&(!z.minzoom||z.minzoom<=j)&&(!z.maxzoom||z.maxzoom>j)){if(this._inProgressLayer||(this._inProgressLayer=new et(z)),this._inProgressLayer.continuePlacement(b[z.source],this.placement,this._showCollisionBoxes,z,A))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(c){return this.placement.commit(c),this.placement}}const Ut=512/a.EXTENT/2;class Mt{constructor(c,g,b){this.tileID=c,this.indexedSymbolInstances={},this.bucketInstanceId=b;for(let E=0;E<g.length;E++){const A=g.get(E),z=A.key;this.indexedSymbolInstances[z]||(this.indexedSymbolInstances[z]=[]),this.indexedSymbolInstances[z].push({crossTileID:A.crossTileID,coord:this.getScaledCoordinates(A,c)})}}getScaledCoordinates(c,g){const b=Ut/Math.pow(2,g.canonical.z-this.tileID.canonical.z);return{x:Math.floor((g.canonical.x*a.EXTENT+c.anchorX)*b),y:Math.floor((g.canonical.y*a.EXTENT+c.anchorY)*b)}}findMatches(c,g,b){const E=this.tileID.canonical.z<g.canonical.z?1:Math.pow(2,this.tileID.canonical.z-g.canonical.z);for(let A=0;A<c.length;A++){const z=c.get(A);if(z.crossTileID)continue;const j=this.indexedSymbolInstances[z.key];if(!j)continue;const K=this.getScaledCoordinates(z,g);for(const Y of j)if(Math.abs(Y.coord.x-K.x)<=E&&Math.abs(Y.coord.y-K.y)<=E&&!b[Y.crossTileID]){b[Y.crossTileID]=!0,z.crossTileID=Y.crossTileID;break}}}}class at{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class $t{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(c){const g=Math.round((c-this.lng)/360);if(g!==0)for(const b in this.indexes){const E=this.indexes[b],A={};for(const z in E){const j=E[z];j.tileID=j.tileID.unwrapTo(j.tileID.wrap+g),A[j.tileID.key]=j}this.indexes[b]=A}this.lng=c}addBucket(c,g,b){if(this.indexes[c.overscaledZ]&&this.indexes[c.overscaledZ][c.key]){if(this.indexes[c.overscaledZ][c.key].bucketInstanceId===g.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(c.overscaledZ,this.indexes[c.overscaledZ][c.key])}for(let A=0;A<g.symbolInstances.length;A++)g.symbolInstances.get(A).crossTileID=0;this.usedCrossTileIDs[c.overscaledZ]||(this.usedCrossTileIDs[c.overscaledZ]={});const E=this.usedCrossTileIDs[c.overscaledZ];for(const A in this.indexes){const z=this.indexes[A];if(Number(A)>c.overscaledZ)for(const j in z){const K=z[j];K.tileID.isChildOf(c)&&K.findMatches(g.symbolInstances,c,E)}else{const j=z[c.scaledTo(Number(A)).key];j&&j.findMatches(g.symbolInstances,c,E)}}for(let A=0;A<g.symbolInstances.length;A++){const z=g.symbolInstances.get(A);z.crossTileID||(z.crossTileID=b.generate(),E[z.crossTileID]=!0)}return this.indexes[c.overscaledZ]===void 0&&(this.indexes[c.overscaledZ]={}),this.indexes[c.overscaledZ][c.key]=new Mt(c,g.symbolInstances,g.bucketInstanceId),!0}removeBucketCrossTileIDs(c,g){for(const b in g.indexedSymbolInstances)for(const E of g.indexedSymbolInstances[b])delete this.usedCrossTileIDs[c][E.crossTileID]}removeStaleBuckets(c){let g=!1;for(const b in this.indexes){const E=this.indexes[b];for(const A in E)c[E[A].bucketInstanceId]||(this.removeBucketCrossTileIDs(b,E[A]),delete E[A],g=!0)}return g}}class Xt{constructor(){this.layerIndexes={},this.crossTileIDs=new at,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(c,g,b){let E=this.layerIndexes[c.id];E===void 0&&(E=this.layerIndexes[c.id]=new $t);let A=!1;const z={};E.handleWrapJump(b);for(const j of g){const K=j.getBucket(c);K&&c.id===K.layerIds[0]&&(K.bucketInstanceId||(K.bucketInstanceId=++this.maxBucketInstanceId),E.addBucket(j.tileID,K,this.crossTileIDs)&&(A=!0),z[K.bucketInstanceId]=!0)}return E.removeStaleBuckets(z)&&(A=!0),A}pruneUnusedLayers(c){const g={};c.forEach(b=>{g[b]=!0});for(const b in this.layerIndexes)g[b]||delete this.layerIndexes[b]}}var En=a.createLayout([{name:"a_pos",type:"Int16",components:2}]);class hn extends a.Evented{constructor(c){super(),this.sourceCache=c,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.renderHistory=[],this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,this.renderHistorySize=c._cache.max,c.usedForTerrain=!0,c.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null;for(const c in this._tiles){const g=this._tiles[c];g.textures.forEach(b=>b.destroy()),g.textures=[]}}update(c,g){this.sourceCache.update(c,g),this._renderableTilesKeys=[];for(const b of c.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:g}))this._renderableTilesKeys.push(b.key),this._tiles[b.key]||(b.posMatrix=new Float64Array(16),a.ortho(b.posMatrix,0,a.EXTENT,0,a.EXTENT,0,1),this._tiles[b.key]=new ke(b,this.tileSize))}removeOutdated(c){const g={};this.renderHistory=this.renderHistory.filter((b,E)=>this.renderHistory.indexOf(b)===E).slice(0,this.renderHistorySize);for(const b of this._renderableTilesKeys)g[b]=!0;for(const b of this.renderHistory)g[b]=!0;for(const b in this._tiles)g[b]||(this._tiles[b].clearTextures(c),delete this._tiles[b])}getRenderableTiles(){return this._renderableTilesKeys.map(c=>this.getTileByID(c))}getTileByID(c){return this._tiles[c]}getTerrainCoords(c){const g={};for(const b of this._renderableTilesKeys){const E=this._tiles[b].tileID;if(E.canonical.equals(c.canonical)){const A=c.clone();A.posMatrix=new Float64Array(16),a.ortho(A.posMatrix,0,a.EXTENT,0,a.EXTENT,0,1),g[b]=A}else if(E.canonical.isChildOf(c.canonical)){const A=c.clone();A.posMatrix=new Float64Array(16);const z=E.canonical.z-c.canonical.z,j=E.canonical.x-(E.canonical.x>>z<<z),K=E.canonical.y-(E.canonical.y>>z<<z),Y=a.EXTENT>>z;a.ortho(A.posMatrix,0,Y,0,Y,0,1),a.translate(A.posMatrix,A.posMatrix,[-j*Y,-K*Y,0]),g[b]=A}else if(c.canonical.isChildOf(E.canonical)){const A=c.clone();A.posMatrix=new Float64Array(16);const z=c.canonical.z-E.canonical.z,j=c.canonical.x-(c.canonical.x>>z<<z),K=c.canonical.y-(c.canonical.y>>z<<z),Y=a.EXTENT>>z;a.ortho(A.posMatrix,0,a.EXTENT,0,a.EXTENT,0,1),a.translate(A.posMatrix,A.posMatrix,[j*Y,K*Y,0]),a.scale(A.posMatrix,A.posMatrix,[1/2**z,1/2**z,0]),g[b]=A}}return g}getSourceTile(c,g){const b=this.sourceCache._source;let E=c.overscaledZ-this.deltaZoom;if(E>b.maxzoom&&(E=b.maxzoom),E<b.minzoom)return null;this._sourceTileCache[c.key]||(this._sourceTileCache[c.key]=c.scaledTo(E).key);let A=this.sourceCache.getTileByID(this._sourceTileCache[c.key]);if((!A||!A.dem)&&g)for(;E>=b.minzoom&&(!A||!A.dem);)A=this.sourceCache.getTileByID(c.scaledTo(E--).key);return A}tilesAfterTime(c=Date.now()){return Object.values(this._tiles).filter(g=>g.timeLoaded>=c)}}class Pn{constructor(c,g,b){this.style=c,this.sourceCache=new hn(g),this.options=b,this.exaggeration=typeof b.exaggeration=="number"?b.exaggeration:1,this.elevationOffset=typeof b.elevationOffset=="number"?b.elevationOffset:450,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024,this.clearRerenderCache()}getDEMElevation(c,g,b,E=a.EXTENT){if(!(g>=0&&g<E&&b>=0&&b<E))return this.elevationOffset;let A=0;const z=this.getTerrainData(c);if(z.tile&&z.tile.dem){const j=a.transformMat4$1([],[g/E*a.EXTENT,b/E*a.EXTENT],z.u_terrain_matrix),K=[j[0]*z.tile.dem.dim,j[1]*z.tile.dem.dim],Y=[Math.floor(K[0]),Math.floor(K[1])],ie=z.tile.dem.get(Y[0],Y[1]),ue=z.tile.dem.get(Y[0],Y[1]+1),me=z.tile.dem.get(Y[0]+1,Y[1]),Re=z.tile.dem.get(Y[0]+1,Y[1]+1);A=a.number(a.number(ie,ue,K[0]-Y[0]),a.number(me,Re,K[0]-Y[0]),K[1]-Y[1])}return A}rememberForRerender(c,g){for(const b in this.sourceCache._tiles){const E=this.sourceCache._tiles[b];(E.tileID.equals(g)||E.tileID.isChildOf(g))&&(c===this.sourceCache.sourceCache.id&&(E.timeLoaded=Date.now()),this._rerender[c]=this._rerender[c]||{},this._rerender[c][E.tileID.key]=!0)}}needsRerender(c,g){return this._rerender[c]&&this._rerender[c][g.key]}clearRerenderCache(){this._rerender={}}getElevation(c,g,b,E=a.EXTENT){return(this.getDEMElevation(c,g,b,E)+this.elevationOffset)*this.exaggeration}getTerrainData(c){if(!this._emptyDemTexture){const E=this.style.map.painter.context,A=new a.RGBAImage({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new P(E,A,E.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new P(E,new a.RGBAImage({width:1,height:1}),E.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(E.gl.NEAREST,E.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.identity([])}const g=this.sourceCache.getSourceTile(c,!0);if(g&&g.dem&&(!g.demTexture||g.needsTerrainPrepare)){const E=this.style.map.painter.context;g.demTexture=this.style.map.painter.getTileTexture(g.dem.stride),g.demTexture?g.demTexture.update(g.dem.getPixels(),{premultiply:!1}):g.demTexture=new P(E,g.dem.getPixels(),E.gl.RGBA,{premultiply:!1}),g.demTexture.bind(E.gl.NEAREST,E.gl.CLAMP_TO_EDGE),g.needsTerrainPrepare=!1}const b=g&&g+g.tileID.key+c.key;if(b&&!this._demMatrixCache[b]){const E=this.sourceCache.sourceCache._source.maxzoom;let A=c.canonical.z-g.tileID.canonical.z;c.overscaledZ>c.canonical.z&&(c.canonical.z>=E?A=c.canonical.z-E:a.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const z=c.canonical.x-(c.canonical.x>>A<<A),j=c.canonical.y-(c.canonical.y>>A<<A),K=a.fromScaling(new Float64Array(16),[1/(a.EXTENT<<A),1/(a.EXTENT<<A),0]);a.translate(K,K,[z*a.EXTENT,j*a.EXTENT,0]),this._demMatrixCache[c.key]={matrix:K,coord:c}}return{u_depth:2,u_terrain:3,u_terrain_dim:g&&g.dem&&g.dem.dim||1,u_terrain_matrix:b?this._demMatrixCache[c.key].matrix:this._emptyDemMatrix,u_terrain_unpack:g&&g.dem&&g.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_offset:this.elevationOffset,u_terrain_exaggeration:this.exaggeration,texture:(g&&g.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:g}}getRTTFramebuffer(){const c=this.style.map.painter;if(!this._rttFramebuffer){const g=this.sourceCache.tileSize*this.qualityFactor;this._rttFramebuffer=c.context.createFramebuffer(g,g,!0),this._rttFramebuffer.depthAttachment.set(c.context.createRenderbuffer(c.context.gl.DEPTH_COMPONENT16,g,g))}return this._rttFramebuffer}getFramebuffer(c){const g=this.style.map.painter,b=g.width/devicePixelRatio,E=g.height/devicePixelRatio;return!this._fbo||this._fbo.width===b&&this._fbo.height===E||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new P(g.context,{width:b,height:E,data:null},g.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(g.context.gl.NEAREST,g.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new P(g.context,{width:b,height:E,data:null},g.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(g.context.gl.NEAREST,g.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=g.context.createFramebuffer(b,E,!0),this._fbo.depthAttachment.set(g.context.createRenderbuffer(g.context.gl.DEPTH_COMPONENT16,b,E))),this._fbo.colorAttachment.set(c==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const c=this.style.map.painter.context;if(this._coordsTexture)return this._coordsTexture;const g=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let A=0,z=0;A<this._coordsTextureSize;A++)for(let j=0;j<this._coordsTextureSize;j++,z+=4)g[z+0]=255&j,g[z+1]=255&A,g[z+2]=j>>8<<4|A>>8,g[z+3]=0;const b=new a.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(g.buffer)),E=new P(c,b,c.gl.RGBA,{premultiply:!1});return E.bind(c.gl.NEAREST,c.gl.CLAMP_TO_EDGE),this._coordsTexture=E,E}pointCoordinate(c){const g=new Uint8Array(4),b=this.style.map.painter,E=b.context,A=E.gl;E.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),A.readPixels(c.x,b.height/devicePixelRatio-c.y-1,1,1,A.RGBA,A.UNSIGNED_BYTE,g),E.bindFramebuffer.set(null);const z=g[0]+(g[2]>>4<<8),j=g[1]+((15&g[2])<<8),K=this.coordsIndex[255-g[3]],Y=K&&this.sourceCache.getTileByID(K);if(!Y)return null;const ie=this._coordsTextureSize,ue=(1<<Y.tileID.canonical.z)*ie;return new a.MercatorCoordinate((Y.tileID.canonical.x*ie+z)/ue,(Y.tileID.canonical.y*ie+j)/ue,this.getElevation(Y.tileID,z,j,ie))}getTerrainMesh(){if(this._mesh)return this._mesh;const c=this.style.map.painter.context,g=new a.PosArray,b=new a.TriangleIndexArray,E=this.meshSize,A=a.EXTENT/E,z=E*E;for(let j=0;j<=E;j++)for(let K=0;K<=E;K++)g.emplaceBack(K*A,j*A);for(let j=0;j<z;j+=E+1)for(let K=0;K<E;K++)b.emplaceBack(K+j,E+K+j+1,E+K+j+2),b.emplaceBack(K+j,E+K+j+2,K+j+1);return this._mesh={indexBuffer:c.createIndexBuffer(b),vertexBuffer:c.createVertexBuffer(g,En.members),segments:a.SegmentVector.simpleSegment(0,0,g.length,b.length)},this._mesh}getMinMaxElevation(c){const g=this.getTerrainData(c).tile,b={minElevation:null,maxElevation:null};return g&&g.dem&&(b.minElevation=(g.dem.min+this.elevationOffset)*this.exaggeration,b.maxElevation=(g.dem.max+this.elevationOffset)*this.exaggeration),b}}const Gn=(C,c)=>a.emitValidationErrors(C,c&&c.filter(g=>g.identifier!=="source.canvas")),lr=a.pick(rt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Zr=a.pick(rt,["setCenter","setZoom","setBearing","setPitch"]),hr=function(){const C={},c=a.spec.$version;for(const g in a.spec.$root){const b=a.spec.$root[g];if(b.required){let E=null;E=g==="version"?c:b.type==="array"?[]:{},E!=null&&(C[g]=E)}}return C}();class Vr extends a.Evented{constructor(c,g={}){super(),this.map=c,this.dispatcher=new G(mt(),this),this.imageManager=new T,this.imageManager.setEventedParent(this),this.glyphManager=new L(c._requestManager,g.localIdeographFontFamily),this.lineAtlas=new H(256,512),this.crossTileSymbolIndex=new Xt,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",a.getReferrer());const b=this;this._rtlTextPluginCallback=Vr.registerForPluginStateChange(E=>{b.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:E.pluginStatus,pluginURL:E.pluginURL},(A,z)=>{if(a.triggerPluginCompletionEvent(A),z&&z.every(j=>j))for(const j in b.sourceCaches)b.sourceCaches[j].reload()})}),this.on("data",E=>{if(E.dataType!=="source"||E.sourceDataType!=="metadata")return;const A=this.sourceCaches[E.sourceId];if(!A)return;const z=A.getSource();if(z&&z.vectorLayerIds)for(const j in this._layers){const K=this._layers[j];K.source===z.id&&this._validateLayer(K)}})}loadURL(c,g={}){this.fire(new a.Event("dataloading",{dataType:"style"}));const b=typeof g.validate!="boolean"||g.validate,E=this.map._requestManager.transformRequest(c,a.ResourceType.Style);this._request=a.getJSON(E,(A,z)=>{this._request=null,A?this.fire(new a.ErrorEvent(A)):z&&this._load(z,b)})}loadJSON(c,g={}){this.fire(new a.Event("dataloading",{dataType:"style"})),this._request=a.exported.frame(()=>{this._request=null,this._load(c,g.validate!==!1)})}loadEmpty(){this.fire(new a.Event("dataloading",{dataType:"style"})),this._load(hr,!1)}_load(c,g){if(g&&Gn(this,a.validateStyle(c)))return;this._loaded=!0,this.stylesheet=c;for(const E in c.sources)this.addSource(E,c.sources[E],{validate:!1});c.sprite?this._loadSprite(c.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(c.glyphs);const b=wt(this.stylesheet.layers);this._order=b.map(E=>E.id),this._layers={},this._serializedLayers={};for(let E of b)E=a.createStyleLayer(E),E.setEventedParent(this,{layer:{id:E.id}}),this._layers[E.id]=E,this._serializedLayers[E.id]=E.serialize();this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new B(this.stylesheet.light),this.setTerrain(this.stylesheet.terrain),this.fire(new a.Event("data",{dataType:"style"})),this.fire(new a.Event("style.load"))}_loadSprite(c){this._spriteRequest=function(g,b,E,A){let z,j,K;const Y=E>1?"@2x":"";let ie=a.getJSON(b.transformRequest(b.normalizeSpriteURL(g,Y,".json"),a.ResourceType.SpriteJSON),(Re,Se)=>{ie=null,K||(K=Re,z=Se,me())}),ue=a.getImage(b.transformRequest(b.normalizeSpriteURL(g,Y,".png"),a.ResourceType.SpriteImage),(Re,Se)=>{ue=null,K||(K=Re,j=Se,me())});function me(){if(K)A(K);else if(z&&j){const Re=a.exported.getImageData(j),Se={};for(const Ie in z){const{width:je,height:Xe,x:st,y:Oe,sdf:vt,pixelRatio:ft,stretchX:Et,stretchY:It,content:Ht}=z[Ie],Ct=new a.RGBAImage({width:je,height:Xe});a.RGBAImage.copy(Re,Ct,{x:st,y:Oe},{x:0,y:0},{width:je,height:Xe}),Se[Ie]={data:Ct,pixelRatio:ft,sdf:vt,stretchX:Et,stretchY:It,content:Ht}}A(null,Se)}}return{cancel(){ie&&(ie.cancel(),ie=null),ue&&(ue.cancel(),ue=null)}}}(c,this.map._requestManager,this.map.getPixelRatio(),(g,b)=>{if(this._spriteRequest=null,g)this.fire(new a.ErrorEvent(g));else if(b)for(const E in b)this.imageManager.addImage(E,b[E]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))})}_validateLayer(c){const g=this.sourceCaches[c.source];if(!g)return;const b=c.sourceLayer;if(!b)return;const E=g.getSource();(E.type==="geojson"||E.vectorLayerIds&&E.vectorLayerIds.indexOf(b)===-1)&&this.fire(new a.ErrorEvent(new Error(`Source layer "${b}" does not exist on source "${E.id}" as specified by style layer "${c.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const c in this.sourceCaches)if(!this.sourceCaches[c].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(c){const g=[];for(const b of c){const E=this._layers[b];E.type!=="custom"&&g.push(E.serialize())}return g}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const c in this.sourceCaches)if(this.sourceCaches[c].hasTransition())return!0;for(const c in this._layers)if(this._layers[c].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(c){if(!this._loaded)return;const g=this._changed;if(this._changed){const E=Object.keys(this._updatedLayers),A=Object.keys(this._removedLayers);(E.length||A.length)&&this._updateWorkerLayers(E,A);for(const z in this._updatedSources){const j=this._updatedSources[z];if(j==="reload")this._reloadSource(z);else{if(j!=="clear")throw new Error(`Invalid action ${j}`);this._clearSource(z)}}this._updateTilesForChangedImages();for(const z in this._updatedPaintProps)this._layers[z].updateTransitions(c);this.light.updateTransitions(c),this._resetUpdates()}const b={};for(const E in this.sourceCaches){const A=this.sourceCaches[E];b[E]=A.used,A.used=!1}for(const E of this._order){const A=this._layers[E];A.recalculate(c,this._availableImages),!A.isHidden(c.zoom)&&A.source&&(this.sourceCaches[A.source].used=!0)}for(const E in b){const A=this.sourceCaches[E];b[E]!==A.used&&A.fire(new a.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:E}))}this.light.recalculate(c),this.z=c.zoom,g&&this.fire(new a.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const c=Object.keys(this._changedImages);if(c.length){for(const g in this.sourceCaches)this.sourceCaches[g].reloadTilesForDependencies(["icons","patterns"],c);this._changedImages={}}}_updateWorkerLayers(c,g){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(c),removedIds:g})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setTerrain(c){if(this._checkLoaded(),this._terrainDataCallback&&this.off("data",this._terrainDataCallback),this._terrainfreezeElevationCallback&&this.map.off("freezeElevation",this._terrainfreezeElevationCallback),c){const g=this.sourceCaches[c.source];if(!g)throw new Error(`cannot load terrain, because there exists no source with ID: ${c.source}`);this.terrain=new Pn(this,g,c),this.map.transform.updateElevation(this.terrain),this._terrainfreezeElevationCallback=b=>{b.freeze?this.map.transform.freezeElevation=!0:(this.map.transform.freezeElevation=!1,this.map.transform.recalculateZoom(this.terrain))},this._terrainDataCallback=b=>{b.tile&&(b.sourceId===c.source?(this.map.transform.updateElevation(this.terrain),this.terrain.rememberForRerender(b.sourceId,b.tile.tileID)):b.source.type==="geojson"&&this.terrain.rememberForRerender(b.sourceId,b.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 a.Event("terrain",{terrain:c}))}setState(c){if(this._checkLoaded(),Gn(this,a.validateStyle(c)))return!1;(c=a.clone$1(c)).layers=wt(c.layers);const g=function(E,A){if(!E)return[{command:rt.setStyle,args:[A]}];let z=[];try{if(!m(E.version,A.version))return[{command:rt.setStyle,args:[A]}];m(E.center,A.center)||z.push({command:rt.setCenter,args:[A.center]}),m(E.zoom,A.zoom)||z.push({command:rt.setZoom,args:[A.zoom]}),m(E.bearing,A.bearing)||z.push({command:rt.setBearing,args:[A.bearing]}),m(E.pitch,A.pitch)||z.push({command:rt.setPitch,args:[A.pitch]}),m(E.sprite,A.sprite)||z.push({command:rt.setSprite,args:[A.sprite]}),m(E.glyphs,A.glyphs)||z.push({command:rt.setGlyphs,args:[A.glyphs]}),m(E.transition,A.transition)||z.push({command:rt.setTransition,args:[A.transition]}),m(E.light,A.light)||z.push({command:rt.setLight,args:[A.light]});const j={},K=[];(function(ie,ue,me,Re){let Se;for(Se in ue=ue||{},ie=ie||{})Object.prototype.hasOwnProperty.call(ie,Se)&&(Object.prototype.hasOwnProperty.call(ue,Se)||nt(Se,me,Re));for(Se in ue)Object.prototype.hasOwnProperty.call(ue,Se)&&(Object.prototype.hasOwnProperty.call(ie,Se)?m(ie[Se],ue[Se])||(ie[Se].type==="geojson"&&ue[Se].type==="geojson"&&dt(ie,ue,Se)?me.push({command:rt.setGeoJSONSourceData,args:[Se,ue[Se].data]}):qe(Se,ue,me,Re)):ut(Se,ue,me))})(E.sources,A.sources,K,j);const Y=[];E.layers&&E.layers.forEach(ie=>{j[ie.source]?z.push({command:rt.removeLayer,args:[ie.id]}):Y.push(ie)}),z=z.concat(K),function(ie,ue,me){ue=ue||[];const Re=(ie=ie||[]).map(Dt),Se=ue.map(Dt),Ie=ie.reduce(Nt,{}),je=ue.reduce(Nt,{}),Xe=Re.slice(),st=Object.create(null);let Oe,vt,ft,Et,It,Ht,Ct;for(Oe=0,vt=0;Oe<Re.length;Oe++)ft=Re[Oe],Object.prototype.hasOwnProperty.call(je,ft)?vt++:(me.push({command:rt.removeLayer,args:[ft]}),Xe.splice(Xe.indexOf(ft,vt),1));for(Oe=0,vt=0;Oe<Se.length;Oe++)ft=Se[Se.length-1-Oe],Xe[Xe.length-1-Oe]!==ft&&(Object.prototype.hasOwnProperty.call(Ie,ft)?(me.push({command:rt.removeLayer,args:[ft]}),Xe.splice(Xe.lastIndexOf(ft,Xe.length-vt),1)):vt++,Ht=Xe[Xe.length-Oe],me.push({command:rt.addLayer,args:[je[ft],Ht]}),Xe.splice(Xe.length-Oe,0,ft),st[ft]=!0);for(Oe=0;Oe<Se.length;Oe++)if(ft=Se[Oe],Et=Ie[ft],It=je[ft],!st[ft]&&!m(Et,It))if(m(Et.source,It.source)&&m(Et["source-layer"],It["source-layer"])&&m(Et.type,It.type)){for(Ct in _t(Et.layout,It.layout,me,ft,null,rt.setLayoutProperty),_t(Et.paint,It.paint,me,ft,null,rt.setPaintProperty),m(Et.filter,It.filter)||me.push({command:rt.setFilter,args:[ft,It.filter]}),m(Et.minzoom,It.minzoom)&&m(Et.maxzoom,It.maxzoom)||me.push({command:rt.setLayerZoomRange,args:[ft,It.minzoom,It.maxzoom]}),Et)Object.prototype.hasOwnProperty.call(Et,Ct)&&Ct!=="layout"&&Ct!=="paint"&&Ct!=="filter"&&Ct!=="metadata"&&Ct!=="minzoom"&&Ct!=="maxzoom"&&(Ct.indexOf("paint.")===0?_t(Et[Ct],It[Ct],me,ft,Ct.slice(6),rt.setPaintProperty):m(Et[Ct],It[Ct])||me.push({command:rt.setLayerProperty,args:[ft,Ct,It[Ct]]}));for(Ct in It)Object.prototype.hasOwnProperty.call(It,Ct)&&!Object.prototype.hasOwnProperty.call(Et,Ct)&&Ct!=="layout"&&Ct!=="paint"&&Ct!=="filter"&&Ct!=="metadata"&&Ct!=="minzoom"&&Ct!=="maxzoom"&&(Ct.indexOf("paint.")===0?_t(Et[Ct],It[Ct],me,ft,Ct.slice(6),rt.setPaintProperty):m(Et[Ct],It[Ct])||me.push({command:rt.setLayerProperty,args:[ft,Ct,It[Ct]]}))}else me.push({command:rt.removeLayer,args:[ft]}),Ht=Xe[Xe.lastIndexOf(ft)+1],me.push({command:rt.addLayer,args:[It,Ht]})}(Y,A.layers,z)}catch(j){console.warn("Unable to compute style diff:",j),z=[{command:rt.setStyle,args:[A]}]}return z}(this.serialize(),c).filter(E=>!(E.command in Zr));if(g.length===0)return!1;const b=g.filter(E=>!(E.command in lr));if(b.length>0)throw new Error(`Unimplemented: ${b.map(E=>E.command).join(", ")}.`);return g.forEach(E=>{E.command!=="setTransition"&&this[E.command].apply(this,E.args)}),this.stylesheet=c,!0}addImage(c,g){if(this.getImage(c))return this.fire(new a.ErrorEvent(new Error(`An image named "${c}" already exists.`)));this.imageManager.addImage(c,g),this._afterImageUpdated(c)}updateImage(c,g){this.imageManager.updateImage(c,g)}getImage(c){return this.imageManager.getImage(c)}removeImage(c){if(!this.getImage(c))return this.fire(new a.ErrorEvent(new Error(`An image named "${c}" does not exist.`)));this.imageManager.removeImage(c),this._afterImageUpdated(c)}_afterImageUpdated(c){this._availableImages=this.imageManager.listImages(),this._changedImages[c]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(c,g,b={}){if(this._checkLoaded(),this.sourceCaches[c]!==void 0)throw new Error(`Source "${c}" already exists.`);if(!g.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(g).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(g.type)>=0&&this._validate(a.validateStyle.source,`sources.${c}`,g,null,b))return;this.map&&this.map._collectResourceTiming&&(g.collectResourceTiming=!0);const E=this.sourceCaches[c]=new Ue(c,g,this.dispatcher);E.style=this,E.setEventedParent(this,()=>({isSourceLoaded:this.loaded(),source:E.serialize(),sourceId:c})),E.onAdd(this.map),this._changed=!0}removeSource(c){if(this._checkLoaded(),this.sourceCaches[c]===void 0)throw new Error("There is no source with this ID");for(const b in this._layers)if(this._layers[b].source===c)return this.fire(new a.ErrorEvent(new Error(`Source "${c}" cannot be removed while layer "${b}" is using it.`)));const g=this.sourceCaches[c];delete this.sourceCaches[c],delete this._updatedSources[c],g.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:c})),g.setEventedParent(null),g.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(c,g){if(this._checkLoaded(),this.sourceCaches[c]===void 0)throw new Error(`There is no source with this ID=${c}`);const b=this.sourceCaches[c].getSource();if(b.type!=="geojson")throw new Error(`geojsonSource.type is ${b.type}, which is !== 'geojson`);b.setData(g),this._changed=!0}getSource(c){return this.sourceCaches[c]&&this.sourceCaches[c].getSource()}addLayer(c,g,b={}){this._checkLoaded();const E=c.id;if(this.getLayer(E))return void this.fire(new a.ErrorEvent(new Error(`Layer "${E}" already exists on this map.`)));let A;if(c.type==="custom"){if(Gn(this,a.validateCustomStyleLayer(c)))return;A=a.createStyleLayer(c)}else{if(typeof c.source=="object"&&(this.addSource(E,c.source),c=a.clone$1(c),c=a.extend(c,{source:E})),this._validate(a.validateStyle.layer,`layers.${E}`,c,{arrayIndex:-1},b))return;A=a.createStyleLayer(c),this._validateLayer(A),A.setEventedParent(this,{layer:{id:E}}),this._serializedLayers[A.id]=A.serialize()}const z=g?this._order.indexOf(g):this._order.length;if(g&&z===-1)this.fire(new a.ErrorEvent(new Error(`Cannot add layer "${E}" before non-existing layer "${g}".`)));else{if(this._order.splice(z,0,E),this._layerOrderChanged=!0,this._layers[E]=A,this._removedLayers[E]&&A.source&&A.type!=="custom"){const j=this._removedLayers[E];delete this._removedLayers[E],j.type!==A.type?this._updatedSources[A.source]="clear":(this._updatedSources[A.source]="reload",this.sourceCaches[A.source].pause())}this._updateLayer(A),A.onAdd&&A.onAdd(this.map)}}moveLayer(c,g){if(this._checkLoaded(),this._changed=!0,!this._layers[c])return void this.fire(new a.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style and cannot be moved.`)));if(c===g)return;const b=this._order.indexOf(c);this._order.splice(b,1);const E=g?this._order.indexOf(g):this._order.length;g&&E===-1?this.fire(new a.ErrorEvent(new Error(`Cannot move layer "${c}" before non-existing layer "${g}".`))):(this._order.splice(E,0,c),this._layerOrderChanged=!0)}removeLayer(c){this._checkLoaded();const g=this._layers[c];if(!g)return void this.fire(new a.ErrorEvent(new Error(`Cannot remove non-existing layer "${c}".`)));g.setEventedParent(null);const b=this._order.indexOf(c);this._order.splice(b,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[c]=g,delete this._layers[c],delete this._serializedLayers[c],delete this._updatedLayers[c],delete this._updatedPaintProps[c],g.onRemove&&g.onRemove(this.map)}getLayer(c){return this._layers[c]}hasLayer(c){return c in this._layers}setLayerZoomRange(c,g,b){this._checkLoaded();const E=this.getLayer(c);E?E.minzoom===g&&E.maxzoom===b||(g!=null&&(E.minzoom=g),b!=null&&(E.maxzoom=b),this._updateLayer(E)):this.fire(new a.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${c}".`)))}setFilter(c,g,b={}){this._checkLoaded();const E=this.getLayer(c);if(E){if(!m(E.filter,g))return g==null?(E.filter=void 0,void this._updateLayer(E)):void(this._validate(a.validateStyle.filter,`layers.${E.id}.filter`,g,null,b)||(E.filter=a.clone$1(g),this._updateLayer(E)))}else this.fire(new a.ErrorEvent(new Error(`Cannot filter non-existing layer "${c}".`)))}getFilter(c){return a.clone$1(this.getLayer(c).filter)}setLayoutProperty(c,g,b,E={}){this._checkLoaded();const A=this.getLayer(c);A?m(A.getLayoutProperty(g),b)||(A.setLayoutProperty(g,b,E),this._updateLayer(A)):this.fire(new a.ErrorEvent(new Error(`Cannot style non-existing layer "${c}".`)))}getLayoutProperty(c,g){const b=this.getLayer(c);if(b)return b.getLayoutProperty(g);this.fire(new a.ErrorEvent(new Error(`Cannot get style of non-existing layer "${c}".`)))}setPaintProperty(c,g,b,E={}){this._checkLoaded();const A=this.getLayer(c);A?m(A.getPaintProperty(g),b)||(A.setPaintProperty(g,b,E)&&this._updateLayer(A),this._changed=!0,this._updatedPaintProps[c]=!0):this.fire(new a.ErrorEvent(new Error(`Cannot style non-existing layer "${c}".`)))}getPaintProperty(c,g){return this.getLayer(c).getPaintProperty(g)}setFeatureState(c,g){this._checkLoaded();const b=c.source,E=c.sourceLayer,A=this.sourceCaches[b];if(A===void 0)return void this.fire(new a.ErrorEvent(new Error(`The source '${b}' does not exist in the map's style.`)));const z=A.getSource().type;z==="geojson"&&E?this.fire(new a.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):z!=="vector"||E?(c.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),A.setFeatureState(E,c.id,g)):this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(c,g){this._checkLoaded();const b=c.source,E=this.sourceCaches[b];if(E===void 0)return void this.fire(new a.ErrorEvent(new Error(`The source '${b}' does not exist in the map's style.`)));const A=E.getSource().type,z=A==="vector"?c.sourceLayer:void 0;A!=="vector"||z?g&&typeof c.id!="string"&&typeof c.id!="number"?this.fire(new a.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):E.removeFeatureState(z,c.id,g):this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(c){this._checkLoaded();const g=c.source,b=c.sourceLayer,E=this.sourceCaches[g];if(E!==void 0)return E.getSource().type!=="vector"||b?(c.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),E.getFeatureState(b,c.id)):void this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.ErrorEvent(new Error(`The source '${g}' does not exist in the map's style.`)))}getTransition(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){return a.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:a.mapObject(this.sourceCaches,c=>c.serialize()),layers:this._serializeLayers(this._order)},c=>c!==void 0)}_updateLayer(c){this._updatedLayers[c.id]=!0,c.source&&!this._updatedSources[c.source]&&this.sourceCaches[c.source].getSource().type!=="raster"&&(this._updatedSources[c.source]="reload",this.sourceCaches[c.source].pause()),this._changed=!0}_flattenAndSortRenderedFeatures(c){const g=z=>this._layers[z].type==="fill-extrusion",b={},E=[];for(let z=this._order.length-1;z>=0;z--){const j=this._order[z];if(g(j)){b[j]=z;for(const K of c){const Y=K[j];if(Y)for(const ie of Y)E.push(ie)}}}E.sort((z,j)=>j.intersectionZ-z.intersectionZ);const A=[];for(let z=this._order.length-1;z>=0;z--){const j=this._order[z];if(g(j))for(let K=E.length-1;K>=0;K--){const Y=E[K].feature;if(b[Y.layer.id]<z)break;A.push(Y),E.pop()}else for(const K of c){const Y=K[j];if(Y)for(const ie of Y)A.push(ie.feature)}}return A}queryRenderedFeatures(c,g,b){g&&g.filter&&this._validate(a.validateStyle.filter,"queryRenderedFeatures.filter",g.filter,null,g);const E={};if(g&&g.layers){if(!Array.isArray(g.layers))return this.fire(new a.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const z of g.layers){const j=this._layers[z];if(!j)return this.fire(new a.ErrorEvent(new Error(`The layer '${z}' does not exist in the map's style and cannot be queried for features.`))),[];E[j.source]=!0}}const A=[];g.availableImages=this._availableImages;for(const z in this.sourceCaches)g.layers&&!E[z]||A.push(Ee(this.sourceCaches[z],this._layers,this._serializedLayers,c,g,b));return this.placement&&A.push(function(z,j,K,Y,ie,ue,me){const Re={},Se=ue.queryRenderedSymbols(Y),Ie=[];for(const je of Object.keys(Se).map(Number))Ie.push(me[je]);Ie.sort(Ce);for(const je of Ie){const Xe=je.featureIndex.lookupSymbolFeatures(Se[je.bucketInstanceId],j,je.bucketIndex,je.sourceLayerIndex,ie.filter,ie.layers,ie.availableImages,z);for(const st in Xe){const Oe=Re[st]=Re[st]||[],vt=Xe[st];vt.sort((ft,Et)=>{const It=je.featureSortOrder;if(It){const Ht=It.indexOf(ft.featureIndex);return It.indexOf(Et.featureIndex)-Ht}return Et.featureIndex-ft.featureIndex});for(const ft of vt)Oe.push(ft)}}for(const je in Re)Re[je].forEach(Xe=>{const st=Xe.feature,Oe=K[z[je].source].getFeatureState(st.layer["source-layer"],st.id);st.source=st.layer.source,st.layer["source-layer"]&&(st.sourceLayer=st.layer["source-layer"]),st.state=Oe});return Re}(this._layers,this._serializedLayers,this.sourceCaches,c,g,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(A)}querySourceFeatures(c,g){g&&g.filter&&this._validate(a.validateStyle.filter,"querySourceFeatures.filter",g.filter,null,g);const b=this.sourceCaches[c];return b?function(E,A){const z=E.getRenderableIds().map(Y=>E.getTileByID(Y)),j=[],K={};for(let Y=0;Y<z.length;Y++){const ie=z[Y],ue=ie.tileID.canonical.key;K[ue]||(K[ue]=!0,ie.querySourceFeatures(j,A))}return j}(b,g):[]}addSourceType(c,g,b){return Vr.getSourceType(c)?b(new Error(`A source type called "${c}" already exists.`)):(Vr.setSourceType(c,g),g.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:c,url:g.workerSourceURL},b):b(null,null))}getLight(){return this.light.getLight()}setLight(c,g={}){this._checkLoaded();const b=this.light.getLight();let E=!1;for(const z in c)if(!m(c[z],b[z])){E=!0;break}if(!E)return;const A={now:a.exported.now(),transition:a.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(c,g),this.light.updateTransitions(A)}_validate(c,g,b,E,A={}){return(!A||A.validate!==!1)&&Gn(this,c.call(a.validateStyle,a.extend({key:g,style:this.serialize(),value:b,styleSpec:a.spec},E)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),a.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const c in this._layers)this._layers[c].setEventedParent(null);for(const c in this.sourceCaches){const g=this.sourceCaches[c];g.setEventedParent(null),g.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(c){this.sourceCaches[c].clearTiles()}_reloadSource(c){this.sourceCaches[c].resume(),this.sourceCaches[c].reload()}_updateSources(c){for(const g in this.sourceCaches)this.sourceCaches[g].update(c,this.terrain)}_generateCollisionBoxes(){for(const c in this.sourceCaches)this._reloadSource(c)}_updatePlacement(c,g,b,E,A=!1){let z=!1,j=!1;const K={};for(const Y of this._order){const ie=this._layers[Y];if(ie.type!=="symbol")continue;if(!K[ie.source]){const me=this.sourceCaches[ie.source];K[ie.source]=me.getRenderableIds(!0).map(Re=>me.getTileByID(Re)).sort((Re,Se)=>Se.tileID.overscaledZ-Re.tileID.overscaledZ||(Re.tileID.isLessThan(Se.tileID)?-1:1))}const ue=this.crossTileSymbolIndex.addLayer(ie,K[ie.source],c.center.lng);z=z||ue}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((A=A||this._layerOrderChanged||b===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.exported.now(),c.zoom))&&(this.pauseablePlacement=new Ge(c,this.terrain,this._order,A,g,b,E,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,K),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(a.exported.now()),j=!0),z&&this.pauseablePlacement.placement.setStale()),j||z)for(const Y of this._order){const ie=this._layers[Y];ie.type==="symbol"&&this.placement.updateLayerOpacities(ie,K[ie.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.exported.now())}_releaseSymbolFadeTiles(){for(const c in this.sourceCaches)this.sourceCaches[c].releaseSymbolFadeTiles()}getImages(c,g,b){this.imageManager.getImages(g.icons,b),this._updateTilesForChangedImages();const E=this.sourceCaches[g.source];E&&E.setDependencies(g.tileID.key,g.type,g.icons)}getGlyphs(c,g,b){this.glyphManager.getGlyphs(g.stacks,b)}getResource(c,g,b){return a.makeRequest(g,b)}}Vr.getSourceType=function(C){return xe[C]},Vr.setSourceType=function(C,c){xe[C]=c},Vr.registerForPluginStateChange=a.registerForPluginStateChange;var Nn="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 An={prelude:zn(`#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:zn(`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:zn(`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:zn(`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:zn("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:zn(`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:zn(`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:zn("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:zn("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:zn("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:zn(`#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:zn(`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:zn(`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:zn(`#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:zn(`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:zn(`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:zn(`#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:zn(`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:zn(`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:zn(`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:zn(`#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:zn(`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:zn(`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:zn(`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:zn(`#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:zn(`#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:zn("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",Nn),terrainDepth:zn("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);}",Nn),terrainCoords:zn("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);}",Nn)};function zn(C,c){const g=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,b=c.match(/attribute ([\w]+) ([\w]+)/g),E=C.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),A=c.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),z=A?A.concat(E):E,j={};return{fragmentSource:C=C.replace(g,(K,Y,ie,ue,me)=>(j[me]=!0,Y==="define"?`
|
|
|
#ifndef HAS_UNIFORM_u_${me}
|
|
|
varying ${ie} ${ue} ${me};
|
|
|
#else
|
|
|
uniform ${ie} ${ue} u_${me};
|
|
|
#endif
|
|
|
`:`
|
|
|
#ifdef HAS_UNIFORM_u_${me}
|
|
|
${ie} ${ue} ${me} = u_${me};
|
|
|
#endif
|
|
|
`)),vertexSource:c=c.replace(g,(K,Y,ie,ue,me)=>{const Re=ue==="float"?"vec2":"vec4",Se=me.match(/color/)?"color":Re;return j[me]?Y==="define"?`
|
|
|
#ifndef HAS_UNIFORM_u_${me}
|
|
|
uniform lowp float u_${me}_t;
|
|
|
attribute ${ie} ${Re} a_${me};
|
|
|
varying ${ie} ${ue} ${me};
|
|
|
#else
|
|
|
uniform ${ie} ${ue} u_${me};
|
|
|
#endif
|
|
|
`:Se==="vec4"?`
|
|
|
#ifndef HAS_UNIFORM_u_${me}
|
|
|
${me} = a_${me};
|
|
|
#else
|
|
|
${ie} ${ue} ${me} = u_${me};
|
|
|
#endif
|
|
|
`:`
|
|
|
#ifndef HAS_UNIFORM_u_${me}
|
|
|
${me} = unpack_mix_${Se}(a_${me}, u_${me}_t);
|
|
|
#else
|
|
|
${ie} ${ue} ${me} = u_${me};
|
|
|
#endif
|
|
|
`:Y==="define"?`
|
|
|
#ifndef HAS_UNIFORM_u_${me}
|
|
|
uniform lowp float u_${me}_t;
|
|
|
attribute ${ie} ${Re} a_${me};
|
|
|
#else
|
|
|
uniform ${ie} ${ue} u_${me};
|
|
|
#endif
|
|
|
`:Se==="vec4"?`
|
|
|
#ifndef HAS_UNIFORM_u_${me}
|
|
|
${ie} ${ue} ${me} = a_${me};
|
|
|
#else
|
|
|
${ie} ${ue} ${me} = u_${me};
|
|
|
#endif
|
|
|
`:`
|
|
|
#ifndef HAS_UNIFORM_u_${me}
|
|
|
${ie} ${ue} ${me} = unpack_mix_${Se}(a_${me}, u_${me}_t);
|
|
|
#else
|
|
|
${ie} ${ue} ${me} = u_${me};
|
|
|
#endif
|
|
|
`}),staticAttributes:b,staticUniforms:z}}class ri{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(c,g,b,E,A,z,j,K,Y){this.context=c;let ie=this.boundPaintVertexBuffers.length!==E.length;for(let ue=0;!ie&&ue<E.length;ue++)this.boundPaintVertexBuffers[ue]!==E[ue]&&(ie=!0);c.extVertexArrayObject&&this.vao&&this.boundProgram===g&&this.boundLayoutVertexBuffer===b&&!ie&&this.boundIndexBuffer===A&&this.boundVertexOffset===z&&this.boundDynamicVertexBuffer===j&&this.boundDynamicVertexBuffer2===K&&this.boundDynamicVertexBuffer3===Y?(c.bindVertexArrayOES.set(this.vao),j&&j.bind(),A&&A.dynamicDraw&&A.bind(),K&&K.bind(),Y&&Y.bind()):this.freshBind(g,b,E,A,z,j,K,Y)}freshBind(c,g,b,E,A,z,j,K){let Y;const ie=c.numAttributes,ue=this.context,me=ue.gl;if(ue.extVertexArrayObject)this.vao&&this.destroy(),this.vao=ue.extVertexArrayObject.createVertexArrayOES(),ue.bindVertexArrayOES.set(this.vao),Y=0,this.boundProgram=c,this.boundLayoutVertexBuffer=g,this.boundPaintVertexBuffers=b,this.boundIndexBuffer=E,this.boundVertexOffset=A,this.boundDynamicVertexBuffer=z,this.boundDynamicVertexBuffer2=j,this.boundDynamicVertexBuffer3=K;else{Y=ue.currentNumAttributes||0;for(let Re=ie;Re<Y;Re++)me.disableVertexAttribArray(Re)}g.enableAttributes(me,c);for(const Re of b)Re.enableAttributes(me,c);z&&z.enableAttributes(me,c),j&&j.enableAttributes(me,c),K&&K.enableAttributes(me,c),g.bind(),g.setVertexAttribPointers(me,c,A);for(const Re of b)Re.bind(),Re.setVertexAttribPointers(me,c,A);z&&(z.bind(),z.setVertexAttribPointers(me,c,A)),E&&E.bind(),j&&(j.bind(),j.setVertexAttribPointers(me,c,A)),K&&(K.bind(),K.setVertexAttribPointers(me,c,A)),ue.currentNumAttributes=ie}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function Er(C){const c=[];for(let g=0;g<C.length;g++){if(C[g]===null)continue;const b=C[g].split(" ");c.push(b.pop())}return c}class Xn{constructor(c,g,b,E,A,z,j){const K=c.gl;this.program=K.createProgram();const Y=Er(b.staticAttributes),ie=E?E.getBinderAttributes():[],ue=Y.concat(ie),me=An.prelude.staticUniforms?Er(An.prelude.staticUniforms):[],Re=b.staticUniforms?Er(b.staticUniforms):[],Se=E?E.getBinderUniforms():[],Ie=me.concat(Re).concat(Se),je=[];for(const It of Ie)je.indexOf(It)<0&&je.push(It);const Xe=E?E.defines():[];z&&Xe.push("#define OVERDRAW_INSPECTOR;"),j&&Xe.push("#define TERRAIN3D;");const st=Xe.concat(An.prelude.fragmentSource,b.fragmentSource).join(`
|
|
|
`),Oe=Xe.concat(An.prelude.vertexSource,b.vertexSource).join(`
|
|
|
`),vt=K.createShader(K.FRAGMENT_SHADER);if(K.isContextLost())return void(this.failedToCreate=!0);K.shaderSource(vt,st),K.compileShader(vt),K.attachShader(this.program,vt);const ft=K.createShader(K.VERTEX_SHADER);if(K.isContextLost())return void(this.failedToCreate=!0);K.shaderSource(ft,Oe),K.compileShader(ft),K.attachShader(this.program,ft),this.attributes={};const Et={};this.numAttributes=ue.length;for(let It=0;It<this.numAttributes;It++)ue[It]&&(K.bindAttribLocation(this.program,It,ue[It]),this.attributes[ue[It]]=It);K.linkProgram(this.program),K.deleteShader(ft),K.deleteShader(vt);for(let It=0;It<je.length;It++){const Ht=je[It];if(Ht&&!Et[Ht]){const Ct=K.getUniformLocation(this.program,Ht);Ct&&(Et[Ht]=Ct)}}this.fixedUniforms=A(c,Et),this.terrainUniforms=((It,Ht)=>({u_depth:new a.Uniform1i(It,Ht.u_depth),u_terrain:new a.Uniform1i(It,Ht.u_terrain),u_terrain_dim:new a.Uniform1f(It,Ht.u_terrain_dim),u_terrain_matrix:new a.UniformMatrix4f(It,Ht.u_terrain_matrix),u_terrain_unpack:new a.Uniform4f(It,Ht.u_terrain_unpack),u_terrain_offset:new a.Uniform1f(It,Ht.u_terrain_offset),u_terrain_exaggeration:new a.Uniform1f(It,Ht.u_terrain_exaggeration)}))(c,Et),this.binderUniforms=E?E.getUniforms(c,Et):[]}draw(c,g,b,E,A,z,j,K,Y,ie,ue,me,Re,Se,Ie,je,Xe,st){const Oe=c.gl;if(this.failedToCreate)return;if(c.program.set(this.program),c.setDepthMode(b),c.setStencilMode(E),c.setColorMode(A),c.setCullFace(z),K){c.activeTexture.set(Oe.TEXTURE2),Oe.bindTexture(Oe.TEXTURE_2D,K.depthTexture),c.activeTexture.set(Oe.TEXTURE3),Oe.bindTexture(Oe.TEXTURE_2D,K.texture);for(const ft in this.terrainUniforms)this.terrainUniforms[ft].set(K[ft])}for(const ft in this.fixedUniforms)this.fixedUniforms[ft].set(j[ft]);Ie&&Ie.setUniforms(c,this.binderUniforms,Re,{zoom:Se});let vt=0;switch(g){case Oe.LINES:vt=2;break;case Oe.TRIANGLES:vt=3;break;case Oe.LINE_STRIP:vt=1}for(const ft of me.get()){const Et=ft.vaos||(ft.vaos={});(Et[Y]||(Et[Y]=new ri)).bind(c,this,ie,Ie?Ie.getPaintVertexBuffers():[],ue,ft.vertexOffset,je,Xe,st),Oe.drawElements(g,ft.primitiveLength*vt,Oe.UNSIGNED_SHORT,ft.primitiveOffset*vt*2)}}}function Kn(C,c,g){const b=1/Bt(g,1,c.transform.tileZoom),E=Math.pow(2,g.tileID.overscaledZ),A=g.tileSize*Math.pow(2,c.transform.tileZoom)/E,z=A*(g.tileID.canonical.x+g.tileID.wrap*E),j=A*g.tileID.canonical.y;return{u_image:0,u_texsize:g.imageAtlasTexture.size,u_scale:[b,C.fromScale,C.toScale],u_fade:C.t,u_pixel_coord_upper:[z>>16,j>>16],u_pixel_coord_lower:[65535&z,65535&j]}}const or=(C,c,g,b)=>{const E=c.style.light,A=E.properties.get("position"),z=[A.x,A.y,A.z],j=a.create$1();E.properties.get("anchor")==="viewport"&&a.fromRotation(j,-c.transform.angle),a.transformMat3(z,z,j);const K=E.properties.get("color");return{u_matrix:C,u_lightpos:z,u_lightintensity:E.properties.get("intensity"),u_lightcolor:[K.r,K.g,K.b],u_vertical_gradient:+g,u_opacity:b}},Tr=(C,c,g,b,E,A,z)=>a.extend(or(C,c,g,b),Kn(A,c,z),{u_height_factor:-Math.pow(2,E.overscaledZ)/z.tileSize/8}),Mr=C=>({u_matrix:C}),Xr=(C,c,g,b)=>a.extend(Mr(C),Kn(g,c,b)),Oo=(C,c)=>({u_matrix:C,u_world:c}),Eu=(C,c,g,b,E)=>a.extend(Xr(C,c,g,b),{u_world:E}),Pf=(C,c,g,b)=>{const E=C.transform;let A,z;if(b.paint.get("circle-pitch-alignment")==="map"){const j=Bt(g,1,E.zoom);A=!0,z=[j,j]}else A=!1,z=E.pixelsToGLUnits;return{u_camera_to_center_distance:E.cameraToCenterDistance,u_scale_with_map:+(b.paint.get("circle-pitch-scale")==="map"),u_matrix:C.translatePosMatrix(c.posMatrix,g,b.paint.get("circle-translate"),b.paint.get("circle-translate-anchor")),u_pitch_with_map:+A,u_device_pixel_ratio:C.pixelRatio,u_extrude_scale:z}},xs=(C,c,g)=>{const b=Bt(g,1,c.zoom),E=Math.pow(2,c.zoom-g.tileID.overscaledZ),A=g.tileID.overscaleFactor();return{u_matrix:C,u_camera_to_center_distance:c.cameraToCenterDistance,u_pixels_to_tile_units:b,u_extrude_scale:[c.pixelsToGLUnits[0]/(b*E),c.pixelsToGLUnits[1]/(b*E)],u_overscale_factor:A}},Wn=(C,c,g=1)=>({u_matrix:C,u_color:c,u_overlay:0,u_overlay_scale:g}),rr=C=>({u_matrix:C}),Ur=(C,c,g,b)=>({u_matrix:C,u_extrude_scale:Bt(c,1,g),u_intensity:b});function Ui(C,c){const g=Math.pow(2,c.canonical.z),b=c.canonical.y;return[new a.MercatorCoordinate(0,b/g).toLngLat().lat,new a.MercatorCoordinate(0,(b+1)/g).toLngLat().lat]}const Gs=(C,c,g,b)=>{const E=C.transform;return{u_matrix:_s(C,c,g,b),u_ratio:1/Bt(c,1,E.zoom),u_device_pixel_ratio:C.pixelRatio,u_units_to_pixels:[1/E.pixelsToGLUnits[0],1/E.pixelsToGLUnits[1]]}},Jo=(C,c,g,b,E)=>a.extend(Gs(C,c,g,E),{u_image:0,u_image_height:b}),Rl=(C,c,g,b,E)=>{const A=C.transform,z=Pr(c,A);return{u_matrix:_s(C,c,g,E),u_texsize:c.imageAtlasTexture.size,u_ratio:1/Bt(c,1,A.zoom),u_device_pixel_ratio:C.pixelRatio,u_image:0,u_scale:[z,b.fromScale,b.toScale],u_fade:b.t,u_units_to_pixels:[1/A.pixelsToGLUnits[0],1/A.pixelsToGLUnits[1]]}},bs=(C,c,g,b,E,A)=>{const z=C.lineAtlas,j=Pr(c,C.transform),K=g.layout.get("line-cap")==="round",Y=z.getDash(b.from,K),ie=z.getDash(b.to,K),ue=Y.width*E.fromScale,me=ie.width*E.toScale;return a.extend(Gs(C,c,g,A),{u_patternscale_a:[j/ue,-Y.height/2],u_patternscale_b:[j/me,-ie.height/2],u_sdfgamma:z.width/(256*Math.min(ue,me)*C.pixelRatio)/2,u_image:0,u_tex_y_a:Y.y,u_tex_y_b:ie.y,u_mix:E.t})};function Pr(C,c){return 1/Bt(C,1,c.tileZoom)}function _s(C,c,g,b){return C.translatePosMatrix(b?b.posMatrix:c.tileID.posMatrix,c,g.paint.get("line-translate"),g.paint.get("line-translate-anchor"))}const w0=(C,c,g,b,E)=>{return{u_matrix:C,u_tl_parent:c,u_scale_parent:g,u_buffer_scale:1,u_fade_t:b.mix,u_opacity:b.opacity*E.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:E.paint.get("raster-brightness-min"),u_brightness_high:E.paint.get("raster-brightness-max"),u_saturation_factor:(z=E.paint.get("raster-saturation"),z>0?1-1/(1.001-z):-z),u_contrast_factor:(A=E.paint.get("raster-contrast"),A>0?1/(1-A):1+A),u_spin_weights:C0(E.paint.get("raster-hue-rotate"))};var A,z};function C0(C){C*=Math.PI/180;const c=Math.sin(C),g=Math.cos(C);return[(2*g+1)/3,(-Math.sqrt(3)*c-g+1)/3,(Math.sqrt(3)*c-g+1)/3]}const Np=(C,c,g,b,E,A,z,j,K,Y)=>{const ie=E.transform;return{u_is_size_zoom_constant:+(C==="constant"||C==="source"),u_is_size_feature_constant:+(C==="constant"||C==="camera"),u_size_t:c?c.uSizeT:0,u_size:c?c.uSize:0,u_camera_to_center_distance:ie.cameraToCenterDistance,u_pitch:ie.pitch/360*2*Math.PI,u_rotate_symbol:+g,u_aspect_ratio:ie.width/ie.height,u_fade_change:E.options.fadeDuration?E.symbolFadeChange:1,u_matrix:A,u_label_plane_matrix:z,u_coord_matrix:j,u_is_text:+K,u_pitch_with_map:+b,u_texsize:Y,u_texture:0}},If=(C,c,g,b,E,A,z,j,K,Y,ie)=>{const ue=E.transform;return a.extend(Np(C,c,g,b,E,A,z,j,K,Y),{u_gamma_scale:b?Math.cos(ue._pitch)*ue.cameraToCenterDistance:1,u_device_pixel_ratio:E.pixelRatio,u_is_halo:+ie})},S0=(C,c,g,b,E,A,z,j,K,Y)=>a.extend(If(C,c,g,b,E,A,z,j,!0,K,!0),{u_texsize_icon:Y,u_texture_icon:1}),Iw=(C,c,g)=>({u_matrix:C,u_opacity:c,u_color:g}),Tw=(C,c,g,b,E,A)=>a.extend(function(z,j,K,Y){const ie=K.imageManager.getPattern(z.from.toString()),ue=K.imageManager.getPattern(z.to.toString()),{width:me,height:Re}=K.imageManager.getPixelSize(),Se=Math.pow(2,Y.tileID.overscaledZ),Ie=Y.tileSize*Math.pow(2,K.transform.tileZoom)/Se,je=Ie*(Y.tileID.canonical.x+Y.tileID.wrap*Se),Xe=Ie*Y.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ie.tl,u_pattern_br_a:ie.br,u_pattern_tl_b:ue.tl,u_pattern_br_b:ue.br,u_texsize:[me,Re],u_mix:j.t,u_pattern_size_a:ie.displaySize,u_pattern_size_b:ue.displaySize,u_scale_a:j.fromScale,u_scale_b:j.toScale,u_tile_units_to_pixels:1/Bt(Y,1,K.transform.tileZoom),u_pixel_coord_upper:[je>>16,Xe>>16],u_pixel_coord_lower:[65535&je,65535&Xe]}}(b,A,g,E),{u_matrix:C,u_opacity:c}),Lp={fillExtrusion:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_lightpos:new a.Uniform3f(C,c.u_lightpos),u_lightintensity:new a.Uniform1f(C,c.u_lightintensity),u_lightcolor:new a.Uniform3f(C,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(C,c.u_vertical_gradient),u_opacity:new a.Uniform1f(C,c.u_opacity)}),fillExtrusionPattern:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_lightpos:new a.Uniform3f(C,c.u_lightpos),u_lightintensity:new a.Uniform1f(C,c.u_lightintensity),u_lightcolor:new a.Uniform3f(C,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(C,c.u_vertical_gradient),u_height_factor:new a.Uniform1f(C,c.u_height_factor),u_image:new a.Uniform1i(C,c.u_image),u_texsize:new a.Uniform2f(C,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(C,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(C,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(C,c.u_scale),u_fade:new a.Uniform1f(C,c.u_fade),u_opacity:new a.Uniform1f(C,c.u_opacity)}),fill:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix)}),fillPattern:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_image:new a.Uniform1i(C,c.u_image),u_texsize:new a.Uniform2f(C,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(C,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(C,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(C,c.u_scale),u_fade:new a.Uniform1f(C,c.u_fade)}),fillOutline:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_world:new a.Uniform2f(C,c.u_world)}),fillOutlinePattern:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_world:new a.Uniform2f(C,c.u_world),u_image:new a.Uniform1i(C,c.u_image),u_texsize:new a.Uniform2f(C,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(C,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(C,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(C,c.u_scale),u_fade:new a.Uniform1f(C,c.u_fade)}),circle:(C,c)=>({u_camera_to_center_distance:new a.Uniform1f(C,c.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(C,c.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(C,c.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(C,c.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(C,c.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(C,c.u_matrix)}),collisionBox:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_camera_to_center_distance:new a.Uniform1f(C,c.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(C,c.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(C,c.u_extrude_scale),u_overscale_factor:new a.Uniform1f(C,c.u_overscale_factor)}),collisionCircle:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_inv_matrix:new a.UniformMatrix4f(C,c.u_inv_matrix),u_camera_to_center_distance:new a.Uniform1f(C,c.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(C,c.u_viewport_size)}),debug:(C,c)=>({u_color:new a.UniformColor(C,c.u_color),u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_overlay:new a.Uniform1i(C,c.u_overlay),u_overlay_scale:new a.Uniform1f(C,c.u_overlay_scale)}),clippingMask:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix)}),heatmap:(C,c)=>({u_extrude_scale:new a.Uniform1f(C,c.u_extrude_scale),u_intensity:new a.Uniform1f(C,c.u_intensity),u_matrix:new a.UniformMatrix4f(C,c.u_matrix)}),heatmapTexture:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_world:new a.Uniform2f(C,c.u_world),u_image:new a.Uniform1i(C,c.u_image),u_color_ramp:new a.Uniform1i(C,c.u_color_ramp),u_opacity:new a.Uniform1f(C,c.u_opacity)}),hillshade:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_image:new a.Uniform1i(C,c.u_image),u_latrange:new a.Uniform2f(C,c.u_latrange),u_light:new a.Uniform2f(C,c.u_light),u_shadow:new a.UniformColor(C,c.u_shadow),u_highlight:new a.UniformColor(C,c.u_highlight),u_accent:new a.UniformColor(C,c.u_accent)}),hillshadePrepare:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_image:new a.Uniform1i(C,c.u_image),u_dimension:new a.Uniform2f(C,c.u_dimension),u_zoom:new a.Uniform1f(C,c.u_zoom),u_unpack:new a.Uniform4f(C,c.u_unpack)}),line:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_ratio:new a.Uniform1f(C,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(C,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(C,c.u_units_to_pixels)}),lineGradient:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_ratio:new a.Uniform1f(C,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(C,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(C,c.u_units_to_pixels),u_image:new a.Uniform1i(C,c.u_image),u_image_height:new a.Uniform1f(C,c.u_image_height)}),linePattern:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_texsize:new a.Uniform2f(C,c.u_texsize),u_ratio:new a.Uniform1f(C,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(C,c.u_device_pixel_ratio),u_image:new a.Uniform1i(C,c.u_image),u_units_to_pixels:new a.Uniform2f(C,c.u_units_to_pixels),u_scale:new a.Uniform3f(C,c.u_scale),u_fade:new a.Uniform1f(C,c.u_fade)}),lineSDF:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_ratio:new a.Uniform1f(C,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(C,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(C,c.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(C,c.u_patternscale_a),u_patternscale_b:new a.Uniform2f(C,c.u_patternscale_b),u_sdfgamma:new a.Uniform1f(C,c.u_sdfgamma),u_image:new a.Uniform1i(C,c.u_image),u_tex_y_a:new a.Uniform1f(C,c.u_tex_y_a),u_tex_y_b:new a.Uniform1f(C,c.u_tex_y_b),u_mix:new a.Uniform1f(C,c.u_mix)}),raster:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_tl_parent:new a.Uniform2f(C,c.u_tl_parent),u_scale_parent:new a.Uniform1f(C,c.u_scale_parent),u_buffer_scale:new a.Uniform1f(C,c.u_buffer_scale),u_fade_t:new a.Uniform1f(C,c.u_fade_t),u_opacity:new a.Uniform1f(C,c.u_opacity),u_image0:new a.Uniform1i(C,c.u_image0),u_image1:new a.Uniform1i(C,c.u_image1),u_brightness_low:new a.Uniform1f(C,c.u_brightness_low),u_brightness_high:new a.Uniform1f(C,c.u_brightness_high),u_saturation_factor:new a.Uniform1f(C,c.u_saturation_factor),u_contrast_factor:new a.Uniform1f(C,c.u_contrast_factor),u_spin_weights:new a.Uniform3f(C,c.u_spin_weights)}),symbolIcon:(C,c)=>({u_is_size_zoom_constant:new a.Uniform1i(C,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(C,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(C,c.u_size_t),u_size:new a.Uniform1f(C,c.u_size),u_camera_to_center_distance:new a.Uniform1f(C,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(C,c.u_pitch),u_rotate_symbol:new a.Uniform1i(C,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(C,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(C,c.u_fade_change),u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(C,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(C,c.u_coord_matrix),u_is_text:new a.Uniform1i(C,c.u_is_text),u_pitch_with_map:new a.Uniform1i(C,c.u_pitch_with_map),u_texsize:new a.Uniform2f(C,c.u_texsize),u_texture:new a.Uniform1i(C,c.u_texture)}),symbolSDF:(C,c)=>({u_is_size_zoom_constant:new a.Uniform1i(C,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(C,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(C,c.u_size_t),u_size:new a.Uniform1f(C,c.u_size),u_camera_to_center_distance:new a.Uniform1f(C,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(C,c.u_pitch),u_rotate_symbol:new a.Uniform1i(C,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(C,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(C,c.u_fade_change),u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(C,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(C,c.u_coord_matrix),u_is_text:new a.Uniform1i(C,c.u_is_text),u_pitch_with_map:new a.Uniform1i(C,c.u_pitch_with_map),u_texsize:new a.Uniform2f(C,c.u_texsize),u_texture:new a.Uniform1i(C,c.u_texture),u_gamma_scale:new a.Uniform1f(C,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(C,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(C,c.u_is_halo)}),symbolTextAndIcon:(C,c)=>({u_is_size_zoom_constant:new a.Uniform1i(C,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(C,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(C,c.u_size_t),u_size:new a.Uniform1f(C,c.u_size),u_camera_to_center_distance:new a.Uniform1f(C,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(C,c.u_pitch),u_rotate_symbol:new a.Uniform1i(C,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(C,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(C,c.u_fade_change),u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(C,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(C,c.u_coord_matrix),u_is_text:new a.Uniform1i(C,c.u_is_text),u_pitch_with_map:new a.Uniform1i(C,c.u_pitch_with_map),u_texsize:new a.Uniform2f(C,c.u_texsize),u_texsize_icon:new a.Uniform2f(C,c.u_texsize_icon),u_texture:new a.Uniform1i(C,c.u_texture),u_texture_icon:new a.Uniform1i(C,c.u_texture_icon),u_gamma_scale:new a.Uniform1f(C,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(C,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(C,c.u_is_halo)}),background:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_opacity:new a.Uniform1f(C,c.u_opacity),u_color:new a.UniformColor(C,c.u_color)}),backgroundPattern:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_opacity:new a.Uniform1f(C,c.u_opacity),u_image:new a.Uniform1i(C,c.u_image),u_pattern_tl_a:new a.Uniform2f(C,c.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(C,c.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(C,c.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(C,c.u_pattern_br_b),u_texsize:new a.Uniform2f(C,c.u_texsize),u_mix:new a.Uniform1f(C,c.u_mix),u_pattern_size_a:new a.Uniform2f(C,c.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(C,c.u_pattern_size_b),u_scale_a:new a.Uniform1f(C,c.u_scale_a),u_scale_b:new a.Uniform1f(C,c.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(C,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(C,c.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(C,c.u_tile_units_to_pixels)}),terrain:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_texture:new a.Uniform1i(C,c.u_texture)}),terrainDepth:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix)}),terrainCoords:(C,c)=>({u_matrix:new a.UniformMatrix4f(C,c.u_matrix),u_texture:new a.Uniform1i(C,c.u_texture),u_terrain_coords_id:new a.Uniform1f(C,c.u_terrain_coords_id)})};class Fp{constructor(c,g,b){this.context=c;const E=c.gl;this.buffer=E.createBuffer(),this.dynamicDraw=Boolean(b),this.context.unbindVAO(),c.bindElementBuffer.set(this.buffer),E.bufferData(E.ELEMENT_ARRAY_BUFFER,g.arrayBuffer,this.dynamicDraw?E.DYNAMIC_DRAW:E.STATIC_DRAW),this.dynamicDraw||delete g.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(c){const g=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,0,c.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const zp={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class $p{constructor(c,g,b,E){this.length=g.length,this.attributes=b,this.itemSize=g.bytesPerElement,this.dynamicDraw=E,this.context=c;const A=c.gl;this.buffer=A.createBuffer(),c.bindVertexBuffer.set(this.buffer),A.bufferData(A.ARRAY_BUFFER,g.arrayBuffer,this.dynamicDraw?A.DYNAMIC_DRAW:A.STATIC_DRAW),this.dynamicDraw||delete g.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(c){if(c.length!==this.length)throw new Error(`Length of new data is ${c.length}, which doesn't match current length of ${this.length}`);const g=this.context.gl;this.bind(),g.bufferSubData(g.ARRAY_BUFFER,0,c.arrayBuffer)}enableAttributes(c,g){for(let b=0;b<this.attributes.length;b++){const E=g.attributes[this.attributes[b].name];E!==void 0&&c.enableVertexAttribArray(E)}}setVertexAttribPointers(c,g,b){for(let E=0;E<this.attributes.length;E++){const A=this.attributes[E],z=g.attributes[A.name];z!==void 0&&c.vertexAttribPointer(z,A.components,c[zp[A.type]],!1,this.itemSize,A.offset+this.itemSize*(b||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class pr{constructor(c){this.gl=c.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(c){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class E0 extends pr{getDefault(){return a.Color.transparent}set(c){const g=this.current;(c.r!==g.r||c.g!==g.g||c.b!==g.b||c.a!==g.a||this.dirty)&&(this.gl.clearColor(c.r,c.g,c.b,c.a),this.current=c,this.dirty=!1)}}class kw extends pr{getDefault(){return 1}set(c){(c!==this.current||this.dirty)&&(this.gl.clearDepth(c),this.current=c,this.dirty=!1)}}class Uc extends pr{getDefault(){return 0}set(c){(c!==this.current||this.dirty)&&(this.gl.clearStencil(c),this.current=c,this.dirty=!1)}}class jc extends pr{getDefault(){return[!0,!0,!0,!0]}set(c){const g=this.current;(c[0]!==g[0]||c[1]!==g[1]||c[2]!==g[2]||c[3]!==g[3]||this.dirty)&&(this.gl.colorMask(c[0],c[1],c[2],c[3]),this.current=c,this.dirty=!1)}}class P0 extends pr{getDefault(){return!0}set(c){(c!==this.current||this.dirty)&&(this.gl.depthMask(c),this.current=c,this.dirty=!1)}}class No extends pr{getDefault(){return 255}set(c){(c!==this.current||this.dirty)&&(this.gl.stencilMask(c),this.current=c,this.dirty=!1)}}class Bp extends pr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(c){const g=this.current;(c.func!==g.func||c.ref!==g.ref||c.mask!==g.mask||this.dirty)&&(this.gl.stencilFunc(c.func,c.ref,c.mask),this.current=c,this.dirty=!1)}}class Tf extends pr{getDefault(){const c=this.gl;return[c.KEEP,c.KEEP,c.KEEP]}set(c){const g=this.current;(c[0]!==g[0]||c[1]!==g[1]||c[2]!==g[2]||this.dirty)&&(this.gl.stencilOp(c[0],c[1],c[2]),this.current=c,this.dirty=!1)}}class kf extends pr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;c?g.enable(g.STENCIL_TEST):g.disable(g.STENCIL_TEST),this.current=c,this.dirty=!1}}class Vp extends pr{getDefault(){return[0,1]}set(c){const g=this.current;(c[0]!==g[0]||c[1]!==g[1]||this.dirty)&&(this.gl.depthRange(c[0],c[1]),this.current=c,this.dirty=!1)}}class Up extends pr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;c?g.enable(g.DEPTH_TEST):g.disable(g.DEPTH_TEST),this.current=c,this.dirty=!1}}class Mf extends pr{getDefault(){return this.gl.LESS}set(c){(c!==this.current||this.dirty)&&(this.gl.depthFunc(c),this.current=c,this.dirty=!1)}}class jp extends pr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;c?g.enable(g.BLEND):g.disable(g.BLEND),this.current=c,this.dirty=!1}}class Hp extends pr{getDefault(){const c=this.gl;return[c.ONE,c.ZERO]}set(c){const g=this.current;(c[0]!==g[0]||c[1]!==g[1]||this.dirty)&&(this.gl.blendFunc(c[0],c[1]),this.current=c,this.dirty=!1)}}class Rf extends pr{getDefault(){return a.Color.transparent}set(c){const g=this.current;(c.r!==g.r||c.g!==g.g||c.b!==g.b||c.a!==g.a||this.dirty)&&(this.gl.blendColor(c.r,c.g,c.b,c.a),this.current=c,this.dirty=!1)}}class I0 extends pr{getDefault(){return this.gl.FUNC_ADD}set(c){(c!==this.current||this.dirty)&&(this.gl.blendEquation(c),this.current=c,this.dirty=!1)}}class T0 extends pr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;c?g.enable(g.CULL_FACE):g.disable(g.CULL_FACE),this.current=c,this.dirty=!1}}class Pu extends pr{getDefault(){return this.gl.BACK}set(c){(c!==this.current||this.dirty)&&(this.gl.cullFace(c),this.current=c,this.dirty=!1)}}class Mw extends pr{getDefault(){return this.gl.CCW}set(c){(c!==this.current||this.dirty)&&(this.gl.frontFace(c),this.current=c,this.dirty=!1)}}class Rw extends pr{getDefault(){return null}set(c){(c!==this.current||this.dirty)&&(this.gl.useProgram(c),this.current=c,this.dirty=!1)}}class Aw extends pr{getDefault(){return this.gl.TEXTURE0}set(c){(c!==this.current||this.dirty)&&(this.gl.activeTexture(c),this.current=c,this.dirty=!1)}}class Dw extends pr{getDefault(){const c=this.gl;return[0,0,c.drawingBufferWidth,c.drawingBufferHeight]}set(c){const g=this.current;(c[0]!==g[0]||c[1]!==g[1]||c[2]!==g[2]||c[3]!==g[3]||this.dirty)&&(this.gl.viewport(c[0],c[1],c[2],c[3]),this.current=c,this.dirty=!1)}}class Ow extends pr{getDefault(){return null}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;g.bindFramebuffer(g.FRAMEBUFFER,c),this.current=c,this.dirty=!1}}class Nw extends pr{getDefault(){return null}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;g.bindRenderbuffer(g.RENDERBUFFER,c),this.current=c,this.dirty=!1}}class Kp extends pr{getDefault(){return null}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;g.bindTexture(g.TEXTURE_2D,c),this.current=c,this.dirty=!1}}class Af extends pr{getDefault(){return null}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;g.bindBuffer(g.ARRAY_BUFFER,c),this.current=c,this.dirty=!1}}class Wp extends pr{getDefault(){return null}set(c){const g=this.gl;g.bindBuffer(g.ELEMENT_ARRAY_BUFFER,c),this.current=c,this.dirty=!1}}class Gp extends pr{constructor(c){super(c),this.vao=c.extVertexArrayObject}getDefault(){return null}set(c){this.vao&&(c!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(c),this.current=c,this.dirty=!1)}}class Iu extends pr{getDefault(){return 4}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;g.pixelStorei(g.UNPACK_ALIGNMENT,c),this.current=c,this.dirty=!1}}class k0 extends pr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,c),this.current=c,this.dirty=!1}}class M0 extends pr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const g=this.gl;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,c),this.current=c,this.dirty=!1}}class Df extends pr{constructor(c,g){super(c),this.context=c,this.parent=g}getDefault(){return null}}class Al extends Df{setDirty(){this.dirty=!0}set(c){if(c===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const g=this.gl;g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,c,0),this.current=c,this.dirty=!1}}class R0 extends Df{set(c){if(c===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const g=this.gl;g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_ATTACHMENT,g.RENDERBUFFER,c),this.current=c,this.dirty=!1}}class Tu{constructor(c,g,b,E){this.context=c,this.width=g,this.height=b;const A=c.gl,z=this.framebuffer=A.createFramebuffer();if(this.colorAttachment=new Al(c,z),E&&(this.depthAttachment=new R0(c,z)),A.checkFramebufferStatus(A.FRAMEBUFFER)!==A.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const c=this.context.gl,g=this.colorAttachment.get();if(g&&c.deleteTexture(g),this.depthAttachment){const b=this.depthAttachment.get();b&&c.deleteRenderbuffer(b)}c.deleteFramebuffer(this.framebuffer)}}class zr{constructor(c,g,b){this.blendFunction=c,this.blendColor=g,this.mask=b}}zr.Replace=[1,0],zr.disabled=new zr(zr.Replace,a.Color.transparent,[!1,!1,!1,!1]),zr.unblended=new zr(zr.Replace,a.Color.transparent,[!0,!0,!0,!0]),zr.alphaBlended=new zr([1,771],a.Color.transparent,[!0,!0,!0,!0]);class A0{constructor(c){this.gl=c,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new E0(this),this.clearDepth=new kw(this),this.clearStencil=new Uc(this),this.colorMask=new jc(this),this.depthMask=new P0(this),this.stencilMask=new No(this),this.stencilFunc=new Bp(this),this.stencilOp=new Tf(this),this.stencilTest=new kf(this),this.depthRange=new Vp(this),this.depthTest=new Up(this),this.depthFunc=new Mf(this),this.blend=new jp(this),this.blendFunc=new Hp(this),this.blendColor=new Rf(this),this.blendEquation=new I0(this),this.cullFace=new T0(this),this.cullFaceSide=new Pu(this),this.frontFace=new Mw(this),this.program=new Rw(this),this.activeTexture=new Aw(this),this.viewport=new Dw(this),this.bindFramebuffer=new Ow(this),this.bindRenderbuffer=new Nw(this),this.bindTexture=new Kp(this),this.bindVertexBuffer=new Af(this),this.bindElementBuffer=new Wp(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Gp(this),this.pixelStoreUnpack=new Iu(this),this.pixelStoreUnpackPremultiplyAlpha=new k0(this),this.pixelStoreUnpackFlipY=new M0(this),this.extTextureFilterAnisotropic=c.getExtension("EXT_texture_filter_anisotropic")||c.getExtension("MOZ_EXT_texture_filter_anisotropic")||c.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=c.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=c.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(c.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=c.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=c.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=c.getParameter(c.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(c,g){return new Fp(this,c,g)}createVertexBuffer(c,g,b){return new $p(this,c,g,b)}createRenderbuffer(c,g,b){const E=this.gl,A=E.createRenderbuffer();return this.bindRenderbuffer.set(A),E.renderbufferStorage(E.RENDERBUFFER,c,g,b),this.bindRenderbuffer.set(null),A}createFramebuffer(c,g,b){return new Tu(this,c,g,b)}clear({color:c,depth:g}){const b=this.gl;let E=0;c&&(E|=b.COLOR_BUFFER_BIT,this.clearColor.set(c),this.colorMask.set([!0,!0,!0,!0])),g!==void 0&&(E|=b.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(g),this.depthMask.set(!0)),b.clear(E)}setCullFace(c){c.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(c.mode),this.frontFace.set(c.frontFace))}setDepthMode(c){c.func!==this.gl.ALWAYS||c.mask?(this.depthTest.set(!0),this.depthFunc.set(c.func),this.depthMask.set(c.mask),this.depthRange.set(c.range)):this.depthTest.set(!1)}setStencilMode(c){c.test.func!==this.gl.ALWAYS||c.mask?(this.stencilTest.set(!0),this.stencilMask.set(c.mask),this.stencilOp.set([c.fail,c.depthFail,c.pass]),this.stencilFunc.set({func:c.test.func,ref:c.ref,mask:c.test.mask})):this.stencilTest.set(!1)}setColorMode(c){m(c.blendFunction,zr.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(c.blendFunction),this.blendColor.set(c.blendColor)),this.colorMask.set(c.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class ir{constructor(c,g,b){this.func=c,this.mask=g,this.range=b}}ir.ReadOnly=!1,ir.ReadWrite=!0,ir.disabled=new ir(519,ir.ReadOnly,[0,1]);const mr=7680;class Rr{constructor(c,g,b,E,A,z){this.test=c,this.ref=g,this.mask=b,this.fail=E,this.depthFail=A,this.pass=z}}Rr.disabled=new Rr({func:519,mask:0},0,0,mr,mr,mr);class jr{constructor(c,g,b){this.enable=c,this.mode=g,this.frontFace=b}}let Hc;function ku(C,c,g,b,E,A,z){const j=C.context,K=j.gl,Y=C.useProgram("collisionBox"),ie=[];let ue=0,me=0;for(let Oe=0;Oe<b.length;Oe++){const vt=b[Oe],ft=c.getTile(vt),Et=ft.getBucket(g);if(!Et)continue;let It=vt.posMatrix;E[0]===0&&E[1]===0||(It=C.translatePosMatrix(vt.posMatrix,ft,E,A));const Ht=z?Et.textCollisionBox:Et.iconCollisionBox,Ct=Et.collisionCircleArray;if(Ct.length>0){const fn=a.create(),rn=It;a.mul(fn,Et.placementInvProjMatrix,C.transform.glCoordMatrix),a.mul(fn,fn,Et.placementViewportMatrix),ie.push({circleArray:Ct,circleOffset:me,transform:rn,invTransform:fn,coord:vt}),ue+=Ct.length/4,me=ue}Ht&&Y.draw(j,K.LINES,ir.disabled,Rr.disabled,C.colorModeForRenderPass(),jr.disabled,xs(It,C.transform,ft),C.style.terrain&&C.style.terrain.getTerrainData(vt),g.id,Ht.layoutVertexBuffer,Ht.indexBuffer,Ht.segments,null,C.transform.zoom,null,null,Ht.collisionVertexBuffer)}if(!z||!ie.length)return;const Re=C.useProgram("collisionCircle"),Se=new a.CollisionCircleLayoutArray;Se.resize(4*ue),Se._trim();let Ie=0;for(const Oe of ie)for(let vt=0;vt<Oe.circleArray.length/4;vt++){const ft=4*vt,Et=Oe.circleArray[ft+0],It=Oe.circleArray[ft+1],Ht=Oe.circleArray[ft+2],Ct=Oe.circleArray[ft+3];Se.emplace(Ie++,Et,It,Ht,Ct,0),Se.emplace(Ie++,Et,It,Ht,Ct,1),Se.emplace(Ie++,Et,It,Ht,Ct,2),Se.emplace(Ie++,Et,It,Ht,Ct,3)}(!Hc||Hc.length<2*ue)&&(Hc=function(Oe){const vt=2*Oe,ft=new a.QuadTriangleArray;ft.resize(vt),ft._trim();for(let Et=0;Et<vt;Et++){const It=6*Et;ft.uint16[It+0]=4*Et+0,ft.uint16[It+1]=4*Et+1,ft.uint16[It+2]=4*Et+2,ft.uint16[It+3]=4*Et+2,ft.uint16[It+4]=4*Et+3,ft.uint16[It+5]=4*Et+0}return ft}(ue));const je=j.createIndexBuffer(Hc,!0),Xe=j.createVertexBuffer(Se,a.collisionCircleLayout.members,!0);for(const Oe of ie){const vt={u_matrix:Oe.transform,u_inv_matrix:Oe.invTransform,u_camera_to_center_distance:(st=C.transform).cameraToCenterDistance,u_viewport_size:[st.width,st.height]};Re.draw(j,K.TRIANGLES,ir.disabled,Rr.disabled,C.colorModeForRenderPass(),jr.disabled,vt,C.style.terrain&&C.style.terrain.getTerrainData(Oe.coord),g.id,Xe,je,a.SegmentVector.simpleSegment(0,2*Oe.circleOffset,Oe.circleArray.length,Oe.circleArray.length/2),null,C.transform.zoom,null,null,null)}var st;Xe.destroy(),je.destroy()}jr.disabled=new jr(!1,1029,2305),jr.backCCW=new jr(!0,1029,2305);const Lw=a.identity(new Float32Array(16));function Fw(C,c,g,b,E,A){const{horizontalAlign:z,verticalAlign:j}=a.getAnchorAlignment(C),K=-(z-.5)*c,Y=-(j-.5)*g,ie=a.evaluateVariableOffset(C,b);return new a.pointGeometry((K/E+ie[0])*A,(Y/E+ie[1])*A)}function D0(C,c,g,b,E,A,z,j,K,Y,ie){const ue=C.text.placedSymbolArray,me=C.text.dynamicLayoutVertexArray,Re=C.icon.dynamicLayoutVertexArray,Se={};me.clear();for(let Ie=0;Ie<ue.length;Ie++){const je=ue.get(Ie),Xe=C.allowVerticalPlacement&&!je.placedOrientation,st=je.hidden||!je.crossTileID||Xe?null:b[je.crossTileID];if(st){const Oe=new a.pointGeometry(je.anchorX,je.anchorY),vt=Gt(Oe,g?z:A,ie),ft=zt(E.cameraToCenterDistance,vt.signedDistanceFromCamera);let Et=a.evaluateSizeForFeature(C.textSizeData,K,je)*ft/a.ONE_EM;g&&(Et*=C.tilePixelRatio/j);const{width:It,height:Ht,anchor:Ct,textOffset:fn,textBoxScale:rn}=st,mn=Fw(Ct,It,Ht,fn,rn,Et),Hn=g?Gt(Oe.add(mn),A,ie).point:vt.point.add(c?mn.rotate(-E.angle):mn),qn=C.allowVerticalPlacement&&je.placedOrientation===a.WritingMode.vertical?Math.PI/2:0;for(let kn=0;kn<je.numGlyphs;kn++)a.addDynamicAttributes(me,Hn,qn);Y&&je.associatedIconIndex>=0&&(Se[je.associatedIconIndex]={shiftedAnchor:Hn,angle:qn})}else ht(je.numGlyphs,me)}if(Y){Re.clear();const Ie=C.icon.placedSymbolArray;for(let je=0;je<Ie.length;je++){const Xe=Ie.get(je);if(Xe.hidden)ht(Xe.numGlyphs,Re);else{const st=Se[je];if(st)for(let Oe=0;Oe<Xe.numGlyphs;Oe++)a.addDynamicAttributes(Re,st.shiftedAnchor,st.angle);else ht(Xe.numGlyphs,Re)}}C.icon.dynamicLayoutVertexBuffer.updateData(Re)}C.text.dynamicLayoutVertexBuffer.updateData(me)}function zw(C,c,g){return g.iconsInText&&c?"symbolTextAndIcon":C?"symbolSDF":"symbolIcon"}function Of(C,c,g,b,E,A,z,j,K,Y,ie,ue){const me=C.context,Re=me.gl,Se=C.transform,Ie=j==="map",je=K==="map",Xe=j!=="viewport"&&g.layout.get("symbol-placement")!=="point",st=Ie&&!je&&!Xe,Oe=!g.layout.get("symbol-sort-key").isConstant();let vt=!1;const ft=C.depthModeForSublayer(0,ir.ReadOnly),Et=g.layout.get("text-variable-anchor"),It=[];for(const Ht of b){const Ct=c.getTile(Ht),fn=Ct.getBucket(g);if(!fn)continue;const rn=E?fn.text:fn.icon;if(!rn||!rn.segments.get().length)continue;const mn=rn.programConfigurations.get(g.id),Hn=E||fn.sdfIcons,qn=E?fn.textSizeData:fn.iconSizeData,kn=je||Se.pitch!==0,vr=C.useProgram(zw(Hn,E,fn),mn),yr=a.evaluateSizeForZoom(qn,Se.zoom),sr=C.style.terrain&&C.style.terrain.getTerrainData(Ht);let ur,Cr,Ri,Ka,xa=[0,0],Wa=null;if(E){if(Cr=Ct.glyphAtlasTexture,Ri=Re.LINEAR,ur=Ct.glyphAtlasTexture.size,fn.iconsInText){xa=Ct.imageAtlasTexture.size,Wa=Ct.imageAtlasTexture;const na=qn.kind==="composite"||qn.kind==="camera";Ka=kn||C.options.rotating||C.options.zooming||na?Re.LINEAR:Re.NEAREST}}else{const na=g.layout.get("icon-size").constantOr(0)!==1||fn.iconsNeedLinear;Cr=Ct.imageAtlasTexture,Ri=Hn||C.options.rotating||C.options.zooming||na||kn?Re.LINEAR:Re.NEAREST,ur=Ct.imageAtlasTexture.size}const el=Bt(Ct,1,C.transform.zoom),ta=Yt(Ht.posMatrix,je,Ie,C.transform,el),bo=sn(Ht.posMatrix,je,Ie,C.transform,el),Ss=Et&&fn.hasTextData(),Uf=g.layout.get("icon-text-fit")!=="none"&&Ss&&fn.hasIconData();if(Xe){const na=C.style.terrain?(lm,Nu)=>C.style.terrain.getElevation(Ht,lm,Nu):null,Ll=g.layout.get("text-rotation-alignment")==="map";Qt(fn,Ht.posMatrix,C,E,ta,bo,je,Y,Ll,na)}const Si=C.translatePosMatrix(Ht.posMatrix,Ct,A,z),Jn=Xe||E&&Et||Uf?Lw:ta,gr=C.translatePosMatrix(bo,Ct,A,z,!0),Ai=Hn&&g.paint.get(E?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Di;Di=Hn?fn.iconsInText?S0(qn.kind,yr,st,je,C,Si,Jn,gr,ur,xa):If(qn.kind,yr,st,je,C,Si,Jn,gr,E,ur,!0):Np(qn.kind,yr,st,je,C,Si,Jn,gr,E,ur);const Kr={program:vr,buffers:rn,uniformValues:Di,atlasTexture:Cr,atlasTextureIcon:Wa,atlasInterpolation:Ri,atlasInterpolationIcon:Ka,isSDF:Hn,hasHalo:Ai};if(Oe&&fn.canOverlap){vt=!0;const na=rn.segments.get();for(const Ll of na)It.push({segments:new a.SegmentVector([Ll]),sortKey:Ll.sortKey,state:Kr,terrainData:sr})}else It.push({segments:rn.segments,sortKey:0,state:Kr,terrainData:sr})}vt&&It.sort((Ht,Ct)=>Ht.sortKey-Ct.sortKey);for(const Ht of It){const Ct=Ht.state;if(me.activeTexture.set(Re.TEXTURE0),Ct.atlasTexture.bind(Ct.atlasInterpolation,Re.CLAMP_TO_EDGE),Ct.atlasTextureIcon&&(me.activeTexture.set(Re.TEXTURE1),Ct.atlasTextureIcon&&Ct.atlasTextureIcon.bind(Ct.atlasInterpolationIcon,Re.CLAMP_TO_EDGE)),Ct.isSDF){const fn=Ct.uniformValues;Ct.hasHalo&&(fn.u_is_halo=1,Kc(Ct.buffers,Ht.segments,g,C,Ct.program,ft,ie,ue,fn,Ht.terrainData)),fn.u_is_halo=0}Kc(Ct.buffers,Ht.segments,g,C,Ct.program,ft,ie,ue,Ct.uniformValues,Ht.terrainData)}}function Kc(C,c,g,b,E,A,z,j,K,Y){const ie=b.context;E.draw(ie,ie.gl.TRIANGLES,A,z,j,jr.disabled,K,Y,g.id,C.layoutVertexBuffer,C.indexBuffer,c,g.paint,b.transform.zoom,C.programConfigurations.get(g.id),C.dynamicLayoutVertexBuffer,C.opacityVertexBuffer)}function Wc(C,c,g,b,E,A,z){const j=C.context.gl,K=g.paint.get("fill-pattern"),Y=K&&K.constantOr(1),ie=g.getCrossfadeParameters();let ue,me,Re,Se,Ie;z?(me=Y&&!g.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ue=j.LINES):(me=Y?"fillPattern":"fill",ue=j.TRIANGLES);for(const je of b){const Xe=c.getTile(je);if(Y&&!Xe.patternsLoaded())continue;const st=Xe.getBucket(g);if(!st)continue;const Oe=st.programConfigurations.get(g.id),vt=C.useProgram(me,Oe),ft=C.style.terrain&&C.style.terrain.getTerrainData(je);Y&&(C.context.activeTexture.set(j.TEXTURE0),Xe.imageAtlasTexture.bind(j.LINEAR,j.CLAMP_TO_EDGE),Oe.updatePaintBuffers(ie));const Et=K.constantOr(null);if(Et&&Xe.imageAtlas){const Ct=Xe.imageAtlas,fn=Ct.patternPositions[Et.to.toString()],rn=Ct.patternPositions[Et.from.toString()];fn&&rn&&Oe.setConstantPatternPositions(fn,rn)}const It=ft?je:null,Ht=C.translatePosMatrix(It?It.posMatrix:je.posMatrix,Xe,g.paint.get("fill-translate"),g.paint.get("fill-translate-anchor"));if(z){Se=st.indexBuffer2,Ie=st.segments2;const Ct=[j.drawingBufferWidth,j.drawingBufferHeight];Re=me==="fillOutlinePattern"&&Y?Eu(Ht,C,ie,Xe,Ct):Oo(Ht,Ct)}else Se=st.indexBuffer,Ie=st.segments,Re=Y?Xr(Ht,C,ie,Xe):Mr(Ht);vt.draw(C.context,ue,E,C.stencilModeForClipping(je),A,jr.disabled,Re,ft,g.id,st.layoutVertexBuffer,Se,Ie,g.paint,C.transform.zoom,Oe)}}function Gc(C,c,g,b,E,A,z){const j=C.context,K=j.gl,Y=g.paint.get("fill-extrusion-pattern"),ie=Y.constantOr(1),ue=g.getCrossfadeParameters(),me=g.paint.get("fill-extrusion-opacity");for(const Re of b){const Se=c.getTile(Re),Ie=Se.getBucket(g);if(!Ie)continue;const je=C.style.terrain&&C.style.terrain.getTerrainData(Re),Xe=Ie.programConfigurations.get(g.id),st=C.useProgram(ie?"fillExtrusionPattern":"fillExtrusion",Xe);ie&&(C.context.activeTexture.set(K.TEXTURE0),Se.imageAtlasTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE),Xe.updatePaintBuffers(ue));const Oe=Y.constantOr(null);if(Oe&&Se.imageAtlas){const It=Se.imageAtlas,Ht=It.patternPositions[Oe.to.toString()],Ct=It.patternPositions[Oe.from.toString()];Ht&&Ct&&Xe.setConstantPatternPositions(Ht,Ct)}const vt=C.translatePosMatrix(Re.posMatrix,Se,g.paint.get("fill-extrusion-translate"),g.paint.get("fill-extrusion-translate-anchor")),ft=g.paint.get("fill-extrusion-vertical-gradient"),Et=ie?Tr(vt,C,ft,me,Re,ue,Se):or(vt,C,ft,me);st.draw(j,j.gl.TRIANGLES,E,A,z,jr.backCCW,Et,je,g.id,Ie.layoutVertexBuffer,Ie.indexBuffer,Ie.segments,g.paint,C.transform.zoom,Xe,C.style.terrain&&Ie.centroidVertexBuffer)}}function qp(C,c,g,b,E,A,z){const j=C.context,K=j.gl,Y=g.fbo;if(!Y)return;const ie=C.useProgram("hillshade"),ue=C.style.terrain&&C.style.terrain.getTerrainData(c);j.activeTexture.set(K.TEXTURE0),K.bindTexture(K.TEXTURE_2D,Y.colorAttachment.get()),ie.draw(j,K.TRIANGLES,E,A,z,jr.disabled,((me,Re,Se,Ie)=>{const je=Se.paint.get("hillshade-shadow-color"),Xe=Se.paint.get("hillshade-highlight-color"),st=Se.paint.get("hillshade-accent-color");let Oe=Se.paint.get("hillshade-illumination-direction")*(Math.PI/180);Se.paint.get("hillshade-illumination-anchor")==="viewport"&&(Oe-=me.transform.angle);const vt=!me.options.moving;return{u_matrix:Ie?Ie.posMatrix:me.transform.calculatePosMatrix(Re.tileID.toUnwrapped(),vt),u_image:0,u_latrange:Ui(0,Re.tileID),u_light:[Se.paint.get("hillshade-exaggeration"),Oe],u_shadow:je,u_highlight:Xe,u_accent:st}})(C,g,b,ue?c:null),ue,b.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments)}function O0(C,c,g,b,E,A){const z=C.context,j=z.gl,K=c.dem;if(K&&K.data){const Y=K.dim,ie=K.stride,ue=K.getPixels();if(z.activeTexture.set(j.TEXTURE1),z.pixelStoreUnpackPremultiplyAlpha.set(!1),c.demTexture=c.demTexture||C.getTileTexture(ie),c.demTexture){const Re=c.demTexture;Re.update(ue,{premultiply:!1}),Re.bind(j.NEAREST,j.CLAMP_TO_EDGE)}else c.demTexture=new P(z,ue,j.RGBA,{premultiply:!1}),c.demTexture.bind(j.NEAREST,j.CLAMP_TO_EDGE);z.activeTexture.set(j.TEXTURE0);let me=c.fbo;if(!me){const Re=new P(z,{width:Y,height:Y,data:null},j.RGBA);Re.bind(j.LINEAR,j.CLAMP_TO_EDGE),me=c.fbo=z.createFramebuffer(Y,Y,!0),me.colorAttachment.set(Re.texture)}z.bindFramebuffer.set(me.framebuffer),z.viewport.set([0,0,Y,Y]),C.useProgram("hillshadePrepare").draw(z,j.TRIANGLES,b,E,A,jr.disabled,((Re,Se)=>{const Ie=Se.stride,je=a.create();return a.ortho(je,0,a.EXTENT,-a.EXTENT,0,0,1),a.translate(je,je,[0,-a.EXTENT,0]),{u_matrix:je,u_image:1,u_dimension:[Ie,Ie],u_zoom:Re.overscaledZ,u_unpack:Se.getUnpackVector()}})(c.tileID,K),null,g.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments),c.needsHillshadePrepare=!1}}function Nf(C,c,g,b,E,A){const z=b.paint.get("raster-fade-duration");if(!A&&z>0){const j=a.exported.now(),K=(j-C.timeAdded)/z,Y=c?(j-c.timeAdded)/z:-1,ie=g.getSource(),ue=E.coveringZoomLevel({tileSize:ie.tileSize,roundZoom:ie.roundZoom}),me=!c||Math.abs(c.tileID.overscaledZ-ue)>Math.abs(C.tileID.overscaledZ-ue),Re=me&&C.refreshedUponExpiration?1:a.clamp(me?K:1-Y,0,1);return C.refreshedUponExpiration&&K>=1&&(C.refreshedUponExpiration=!1),c?{opacity:1,mix:1-Re}:{opacity:Re,mix:0}}return{opacity:1,mix:0}}const Lf=new a.Color(1,0,0,1),ya=new a.Color(0,1,0,1),N0=new a.Color(0,0,1,1),Zp=new a.Color(1,0,1,1),L0=new a.Color(0,1,1,1);function Dl(C,c,g,b){Mu(C,0,c+g/2,C.transform.width,g,b)}function qc(C,c,g,b){Mu(C,c-g/2,0,g,C.transform.height,b)}function Mu(C,c,g,b,E,A){const z=C.context,j=z.gl;j.enable(j.SCISSOR_TEST),j.scissor(c*C.pixelRatio,g*C.pixelRatio,b*C.pixelRatio,E*C.pixelRatio),z.clear({color:A}),j.disable(j.SCISSOR_TEST)}function $w(C,c,g){const b=C.context,E=b.gl,A=g.posMatrix,z=C.useProgram("debug"),j=ir.disabled,K=Rr.disabled,Y=C.colorModeForRenderPass(),ie="$debug",ue=C.style.terrain&&C.style.terrain.getTerrainData(g);b.activeTexture.set(E.TEXTURE0),C.emptyTexture.bind(E.LINEAR,E.CLAMP_TO_EDGE);const me=c.getTileByID(g.key).latestRawTileData,Re=Math.floor((me&&me.byteLength||0)/1024),Se=c.getTile(g).tileSize,Ie=512/Math.min(Se,512)*(g.overscaledZ/C.transform.zoom)*.5;let je=g.canonical.toString();g.overscaledZ!==g.canonical.z&&(je+=` => ${g.overscaledZ}`),function(Xe,st){Xe.initDebugOverlayCanvas();const Oe=Xe.debugOverlayCanvas,vt=Xe.context.gl,ft=Xe.debugOverlayCanvas.getContext("2d");ft.clearRect(0,0,Oe.width,Oe.height),ft.shadowColor="white",ft.shadowBlur=2,ft.lineWidth=1.5,ft.strokeStyle="white",ft.textBaseline="top",ft.font="bold 36px Open Sans, sans-serif",ft.fillText(st,5,5),ft.strokeText(st,5,5),Xe.debugOverlayTexture.update(Oe),Xe.debugOverlayTexture.bind(vt.LINEAR,vt.CLAMP_TO_EDGE)}(C,`${je} ${Re}kB`),z.draw(b,E.TRIANGLES,j,K,zr.alphaBlended,jr.disabled,Wn(A,a.Color.transparent,Ie),null,ie,C.debugBuffer,C.quadTriangleIndexBuffer,C.debugSegments),z.draw(b,E.LINE_STRIP,j,K,Y,jr.disabled,Wn(A,a.Color.red),ue,ie,C.debugBuffer,C.tileBorderIndexBuffer,C.debugSegments)}function Ff(C,c,g){const b=C.context,E=b.gl,A=C.colorModeForRenderPass(),z=new ir(E.LEQUAL,ir.ReadWrite,C.depthRangeFor3D),j=C.useProgram("terrain"),K=c.getTerrainMesh(),Y=c.getTerrainData(g.tileID);b.bindFramebuffer.set(null),b.viewport.set([0,0,C.width,C.height]),b.activeTexture.set(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,c.getRTTFramebuffer().colorAttachment.get());const ie=C.transform.calculatePosMatrix(g.tileID.toUnwrapped());j.draw(b,E.TRIANGLES,z,Rr.disabled,A,jr.backCCW,{u_matrix:ie,u_texture:0},Y,"terrain",K.vertexBuffer,K.indexBuffer,K.segments)}function F0(C,c,g,b){const E=C.context,A=g.tileSize*c.qualityFactor;g.textures[b]||(g.textures[b]=C.getTileTexture(A)||new P(E,{width:A,height:A,data:null},E.gl.RGBA),g.textures[b].bind(E.gl.LINEAR,E.gl.CLAMP_TO_EDGE),b===0&&c.sourceCache.renderHistory.unshift(g.tileID.key));const z=c.getRTTFramebuffer();z.colorAttachment.set(g.textures[b].texture),E.bindFramebuffer.set(z.framebuffer),E.viewport.set([0,0,A,A])}class z0{constructor(c){this._coordsDescendingInv={},this._coordsDescendingInvStr={},this.painter=c,this._renderToTexture={background:!0,fill:!0,line:!0,raster:!0},this._coordsDescendingInv={},this._coordsDescendingInvStr={},this._stacks=[],this._prevType=null,this._rerender={},this._renderableTiles=c.style.terrain.sourceCache.getRenderableTiles(),this._init()}_init(){const c=this.painter.style,g=c.terrain;for(const b in c.sourceCaches){this._coordsDescendingInv[b]={};const E=c.sourceCaches[b].getVisibleCoordinates();for(const A of E){const z=g.sourceCache.getTerrainCoords(A);for(const j in z)this._coordsDescendingInv[b][j]||(this._coordsDescendingInv[b][j]=[]),this._coordsDescendingInv[b][j].push(z[j])}}for(const b of c._order){const E=c._layers[b],A=E.source;if(this._renderToTexture[E.type]&&!this._coordsDescendingInvStr[A]){this._coordsDescendingInvStr[A]={};for(const z in this._coordsDescendingInv[A])this._coordsDescendingInvStr[A][z]=this._coordsDescendingInv[A][z].map(j=>j.key).sort().join()}}return this._renderableTiles.forEach(b=>{for(const E in this._coordsDescendingInvStr){const A=this._coordsDescendingInvStr[E][b.tileID.key];A&&A!==b.textureCoords[E]&&b.clearTextures(this.painter),g.needsRerender(E,b.tileID)&&b.clearTextures(this.painter)}this._rerender[b.tileID.key]=!b.textures.length}),g.clearRerenderCache(),g.sourceCache.removeOutdated(this.painter),this}renderLayer(c){const g=c.type,b=this.painter,E=b.style._order,A=b.currentLayer,z=A+1===E.length;if(this._renderToTexture[g]&&(this._prevType&&this._renderToTexture[this._prevType]||this._stacks.push([]),this._prevType=g,this._stacks[this._stacks.length-1].push(E[A]),!z))return!0;if(this._renderToTexture[this._prevType]||g==="hillshade"||this._renderToTexture[g]&&z){this._prevType=g;const j=this._stacks.length-1,K=this._stacks[j]||[];for(const Y of this._renderableTiles){if(F0(b,b.style.terrain,Y,j),this._rerender[Y.tileID.key]){b.context.clear({color:a.Color.transparent});for(let ie=0;ie<K.length;ie++){const ue=b.style._layers[K[ie]],me=ue.source?this._coordsDescendingInv[ue.source][Y.tileID.key]:[Y.tileID];b._renderTileClippingMasks(ue,me),b.renderLayer(b,b.style.sourceCaches[ue.source],ue,me),ue.source&&(Y.textureCoords[ue.source]=this._coordsDescendingInvStr[ue.source][Y.tileID.key])}}Ff(b,b.style.terrain,Y)}if(g==="hillshade"){this._stacks.push([E[A]]);for(const Y of this._renderableTiles){const ie=this._coordsDescendingInv[c.source][Y.tileID.key];F0(b,b.style.terrain,Y,this._stacks.length-1),b.context.clear({color:a.Color.transparent}),b._renderTileClippingMasks(c,ie),b.renderLayer(b,b.style.sourceCaches[c.source],c,ie),Ff(b,b.style.terrain,Y)}return!0}return this._renderToTexture[g]}return!1}}const Zc={symbol:function(C,c,g,b,E){if(C.renderPass!=="translucent")return;const A=Rr.disabled,z=C.colorModeForRenderPass();g.layout.get("text-variable-anchor")&&function(j,K,Y,ie,ue,me,Re){const Se=K.transform,Ie=ue==="map",je=me==="map";for(const Xe of j){const st=ie.getTile(Xe),Oe=st.getBucket(Y);if(!Oe||!Oe.text||!Oe.text.segments.get().length)continue;const vt=a.evaluateSizeForZoom(Oe.textSizeData,Se.zoom),ft=Bt(st,1,K.transform.zoom),Et=Yt(Xe.posMatrix,je,Ie,K.transform,ft),It=Y.layout.get("icon-text-fit")!=="none"&&Oe.hasIconData();if(vt){const Ht=Math.pow(2,Se.zoom-st.tileID.overscaledZ);D0(Oe,Ie,je,Re,Se,Et,Xe.posMatrix,Ht,vt,It,K.style.terrain?(Ct,fn)=>K.style.terrain.getElevation(Xe,Ct,fn):null)}}}(b,C,g,c,g.layout.get("text-rotation-alignment"),g.layout.get("text-pitch-alignment"),E),g.paint.get("icon-opacity").constantOr(1)!==0&&Of(C,c,g,b,!1,g.paint.get("icon-translate"),g.paint.get("icon-translate-anchor"),g.layout.get("icon-rotation-alignment"),g.layout.get("icon-pitch-alignment"),g.layout.get("icon-keep-upright"),A,z),g.paint.get("text-opacity").constantOr(1)!==0&&Of(C,c,g,b,!0,g.paint.get("text-translate"),g.paint.get("text-translate-anchor"),g.layout.get("text-rotation-alignment"),g.layout.get("text-pitch-alignment"),g.layout.get("text-keep-upright"),A,z),c.map.showCollisionBoxes&&(ku(C,c,g,b,g.paint.get("text-translate"),g.paint.get("text-translate-anchor"),!0),ku(C,c,g,b,g.paint.get("icon-translate"),g.paint.get("icon-translate-anchor"),!1))},circle:function(C,c,g,b){if(C.renderPass!=="translucent")return;const E=g.paint.get("circle-opacity"),A=g.paint.get("circle-stroke-width"),z=g.paint.get("circle-stroke-opacity"),j=!g.layout.get("circle-sort-key").isConstant();if(E.constantOr(1)===0&&(A.constantOr(1)===0||z.constantOr(1)===0))return;const K=C.context,Y=K.gl,ie=C.depthModeForSublayer(0,ir.ReadOnly),ue=Rr.disabled,me=C.colorModeForRenderPass(),Re=[];for(let Se=0;Se<b.length;Se++){const Ie=b[Se],je=c.getTile(Ie),Xe=je.getBucket(g);if(!Xe)continue;const st=Xe.programConfigurations.get(g.id),Oe=C.useProgram("circle",st),vt=Xe.layoutVertexBuffer,ft=Xe.indexBuffer,Et=C.style.terrain&&C.style.terrain.getTerrainData(Ie),It={programConfiguration:st,program:Oe,layoutVertexBuffer:vt,indexBuffer:ft,uniformValues:Pf(C,Ie,je,g),terrainData:Et};if(j){const Ht=Xe.segments.get();for(const Ct of Ht)Re.push({segments:new a.SegmentVector([Ct]),sortKey:Ct.sortKey,state:It})}else Re.push({segments:Xe.segments,sortKey:0,state:It})}j&&Re.sort((Se,Ie)=>Se.sortKey-Ie.sortKey);for(const Se of Re){const{programConfiguration:Ie,program:je,layoutVertexBuffer:Xe,indexBuffer:st,uniformValues:Oe,terrainData:vt}=Se.state;je.draw(K,Y.TRIANGLES,ie,ue,me,jr.disabled,Oe,vt,g.id,Xe,st,Se.segments,g.paint,C.transform.zoom,Ie)}},heatmap:function(C,c,g,b){if(g.paint.get("heatmap-opacity")!==0)if(C.renderPass==="offscreen"){const E=C.context,A=E.gl,z=Rr.disabled,j=new zr([A.ONE,A.ONE],a.Color.transparent,[!0,!0,!0,!0]);(function(K,Y,ie){const ue=K.gl;K.activeTexture.set(ue.TEXTURE1),K.viewport.set([0,0,Y.width/4,Y.height/4]);let me=ie.heatmapFbo;if(me)ue.bindTexture(ue.TEXTURE_2D,me.colorAttachment.get()),K.bindFramebuffer.set(me.framebuffer);else{const Re=ue.createTexture();ue.bindTexture(ue.TEXTURE_2D,Re),ue.texParameteri(ue.TEXTURE_2D,ue.TEXTURE_WRAP_S,ue.CLAMP_TO_EDGE),ue.texParameteri(ue.TEXTURE_2D,ue.TEXTURE_WRAP_T,ue.CLAMP_TO_EDGE),ue.texParameteri(ue.TEXTURE_2D,ue.TEXTURE_MIN_FILTER,ue.LINEAR),ue.texParameteri(ue.TEXTURE_2D,ue.TEXTURE_MAG_FILTER,ue.LINEAR),me=ie.heatmapFbo=K.createFramebuffer(Y.width/4,Y.height/4,!1),function(Se,Ie,je,Xe){const st=Se.gl;st.texImage2D(st.TEXTURE_2D,0,st.RGBA,Ie.width/4,Ie.height/4,0,st.RGBA,Se.extRenderToTextureHalfFloat?Se.extTextureHalfFloat.HALF_FLOAT_OES:st.UNSIGNED_BYTE,null),Xe.colorAttachment.set(je)}(K,Y,Re,me)}})(E,C,g),E.clear({color:a.Color.transparent});for(let K=0;K<b.length;K++){const Y=b[K];if(c.hasRenderableParent(Y))continue;const ie=c.getTile(Y),ue=ie.getBucket(g);if(!ue)continue;const me=ue.programConfigurations.get(g.id),Re=C.useProgram("heatmap",me),{zoom:Se}=C.transform;Re.draw(E,A.TRIANGLES,ir.disabled,z,j,jr.disabled,Ur(Y.posMatrix,ie,Se,g.paint.get("heatmap-intensity")),null,g.id,ue.layoutVertexBuffer,ue.indexBuffer,ue.segments,g.paint,C.transform.zoom,me)}E.viewport.set([0,0,C.width,C.height])}else C.renderPass==="translucent"&&(C.context.setColorMode(C.colorModeForRenderPass()),function(E,A){const z=E.context,j=z.gl,K=A.heatmapFbo;if(!K)return;z.activeTexture.set(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,K.colorAttachment.get()),z.activeTexture.set(j.TEXTURE1);let Y=A.colorRampTexture;Y||(Y=A.colorRampTexture=new P(z,A.colorRamp,j.RGBA)),Y.bind(j.LINEAR,j.CLAMP_TO_EDGE),E.useProgram("heatmapTexture").draw(z,j.TRIANGLES,ir.disabled,Rr.disabled,E.colorModeForRenderPass(),jr.disabled,((ie,ue,me,Re)=>{const Se=a.create();a.ortho(Se,0,ie.width,ie.height,0,0,1);const Ie=ie.context.gl;return{u_matrix:Se,u_world:[Ie.drawingBufferWidth,Ie.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:ue.paint.get("heatmap-opacity")}})(E,A),null,A.id,E.viewportBuffer,E.quadTriangleIndexBuffer,E.viewportSegments,A.paint,E.transform.zoom)}(C,g))},line:function(C,c,g,b){if(C.renderPass!=="translucent")return;const E=g.paint.get("line-opacity"),A=g.paint.get("line-width");if(E.constantOr(1)===0||A.constantOr(1)===0)return;const z=C.depthModeForSublayer(0,ir.ReadOnly),j=C.colorModeForRenderPass(),K=g.paint.get("line-dasharray"),Y=g.paint.get("line-pattern"),ie=Y.constantOr(1),ue=g.paint.get("line-gradient"),me=g.getCrossfadeParameters(),Re=ie?"linePattern":K?"lineSDF":ue?"lineGradient":"line",Se=C.context,Ie=Se.gl;let je=!0;for(const Xe of b){const st=c.getTile(Xe);if(ie&&!st.patternsLoaded())continue;const Oe=st.getBucket(g);if(!Oe)continue;const vt=Oe.programConfigurations.get(g.id),ft=C.context.program.get(),Et=C.useProgram(Re,vt),It=je||Et.program!==ft,Ht=C.style.terrain&&C.style.terrain.getTerrainData(Xe),Ct=Y.constantOr(null);if(Ct&&st.imageAtlas){const mn=st.imageAtlas,Hn=mn.patternPositions[Ct.to.toString()],qn=mn.patternPositions[Ct.from.toString()];Hn&&qn&&vt.setConstantPatternPositions(Hn,qn)}const fn=Ht?Xe:null,rn=ie?Rl(C,st,g,me,fn):K?bs(C,st,g,K,me,fn):ue?Jo(C,st,g,Oe.lineClipsArray.length,fn):Gs(C,st,g,fn);if(ie)Se.activeTexture.set(Ie.TEXTURE0),st.imageAtlasTexture.bind(Ie.LINEAR,Ie.CLAMP_TO_EDGE),vt.updatePaintBuffers(me);else if(K&&(It||C.lineAtlas.dirty))Se.activeTexture.set(Ie.TEXTURE0),C.lineAtlas.bind(Se);else if(ue){const mn=Oe.gradients[g.id];let Hn=mn.texture;if(g.gradientVersion!==mn.version){let qn=256;if(g.stepInterpolant){const kn=c.getSource().maxzoom,vr=Xe.canonical.z===kn?Math.ceil(1<<C.transform.maxZoom-Xe.canonical.z):1;qn=a.clamp(a.nextPowerOfTwo(Oe.maxLineLength/a.EXTENT*1024*vr),256,Se.maxTextureSize)}mn.gradient=a.renderColorRamp({expression:g.gradientExpression(),evaluationKey:"lineProgress",resolution:qn,image:mn.gradient||void 0,clips:Oe.lineClipsArray}),mn.texture?mn.texture.update(mn.gradient):mn.texture=new P(Se,mn.gradient,Ie.RGBA),mn.version=g.gradientVersion,Hn=mn.texture}Se.activeTexture.set(Ie.TEXTURE0),Hn.bind(g.stepInterpolant?Ie.NEAREST:Ie.LINEAR,Ie.CLAMP_TO_EDGE)}Et.draw(Se,Ie.TRIANGLES,z,C.stencilModeForClipping(Xe),j,jr.disabled,rn,Ht,g.id,Oe.layoutVertexBuffer,Oe.indexBuffer,Oe.segments,g.paint,C.transform.zoom,vt,Oe.layoutVertexBuffer2),je=!1}},fill:function(C,c,g,b){const E=g.paint.get("fill-color"),A=g.paint.get("fill-opacity");if(A.constantOr(1)===0)return;const z=C.colorModeForRenderPass(),j=g.paint.get("fill-pattern"),K=C.opaquePassEnabledForLayer()&&!j.constantOr(1)&&E.constantOr(a.Color.transparent).a===1&&A.constantOr(0)===1?"opaque":"translucent";if(C.renderPass===K){const Y=C.depthModeForSublayer(1,C.renderPass==="opaque"?ir.ReadWrite:ir.ReadOnly);Wc(C,c,g,b,Y,z,!1)}if(C.renderPass==="translucent"&&g.paint.get("fill-antialias")){const Y=C.depthModeForSublayer(g.getPaintProperty("fill-outline-color")?2:0,ir.ReadOnly);Wc(C,c,g,b,Y,z,!0)}},"fill-extrusion":function(C,c,g,b){const E=g.paint.get("fill-extrusion-opacity");if(E!==0&&C.renderPass==="translucent"){const A=new ir(C.context.gl.LEQUAL,ir.ReadWrite,C.depthRangeFor3D);if(E!==1||g.paint.get("fill-extrusion-pattern").constantOr(1))Gc(C,c,g,b,A,Rr.disabled,zr.disabled),Gc(C,c,g,b,A,C.stencilModeFor3D(),C.colorModeForRenderPass());else{const z=C.colorModeForRenderPass();Gc(C,c,g,b,A,Rr.disabled,z)}}},hillshade:function(C,c,g,b){if(C.renderPass!=="offscreen"&&C.renderPass!=="translucent")return;const E=C.context,A=C.depthModeForSublayer(0,ir.ReadOnly),z=C.colorModeForRenderPass(),[j,K]=C.renderPass==="translucent"?C.stencilConfigForOverlap(b):[{},b];for(const Y of K){const ie=c.getTile(Y);ie.needsHillshadePrepare!==void 0&&ie.needsHillshadePrepare&&C.renderPass==="offscreen"?O0(C,ie,g,A,Rr.disabled,z):C.renderPass==="translucent"&&qp(C,Y,ie,g,A,j[Y.overscaledZ],z)}E.viewport.set([0,0,C.width,C.height])},raster:function(C,c,g,b){if(C.renderPass!=="translucent"||g.paint.get("raster-opacity")===0||!b.length)return;const E=C.context,A=E.gl,z=c.getSource(),j=C.useProgram("raster"),K=C.colorModeForRenderPass(),[Y,ie]=z instanceof he?[{},b]:C.stencilConfigForOverlap(b),ue=ie[ie.length-1].overscaledZ,me=!C.options.moving;for(const Re of ie){const Se=C.depthModeForSublayer(Re.overscaledZ-ue,g.paint.get("raster-opacity")===1?ir.ReadWrite:ir.ReadOnly,A.LESS),Ie=c.getTile(Re);Ie.registerFadeDuration(g.paint.get("raster-fade-duration"));const je=c.findLoadedParent(Re,0),Xe=Nf(Ie,je,c,g,C.transform,C.style.terrain);let st,Oe;const vt=g.paint.get("raster-resampling")==="nearest"?A.NEAREST:A.LINEAR;E.activeTexture.set(A.TEXTURE0),Ie.texture.bind(vt,A.CLAMP_TO_EDGE,A.LINEAR_MIPMAP_NEAREST),E.activeTexture.set(A.TEXTURE1),je?(je.texture.bind(vt,A.CLAMP_TO_EDGE,A.LINEAR_MIPMAP_NEAREST),st=Math.pow(2,je.tileID.overscaledZ-Ie.tileID.overscaledZ),Oe=[Ie.tileID.canonical.x*st%1,Ie.tileID.canonical.y*st%1]):Ie.texture.bind(vt,A.CLAMP_TO_EDGE,A.LINEAR_MIPMAP_NEAREST);const ft=C.style.terrain&&C.style.terrain.getTerrainData(Re),Et=ft?Re:null,It=Et?Et.posMatrix:C.transform.calculatePosMatrix(Re.toUnwrapped(),me),Ht=w0(It,Oe||[0,0],st||1,Xe,g);z instanceof he?j.draw(E,A.TRIANGLES,Se,Rr.disabled,K,jr.disabled,Ht,ft,g.id,z.boundsBuffer,C.quadTriangleIndexBuffer,z.boundsSegments):j.draw(E,A.TRIANGLES,Se,Y[Re.overscaledZ],K,jr.disabled,Ht,ft,g.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments)}},background:function(C,c,g,b){const E=g.paint.get("background-color"),A=g.paint.get("background-opacity");if(A===0)return;const z=C.context,j=z.gl,K=C.transform,Y=K.tileSize,ie=g.paint.get("background-pattern");if(C.isPatternMissing(ie))return;const ue=!ie&&E.a===1&&A===1&&C.opaquePassEnabledForLayer()?"opaque":"translucent";if(C.renderPass!==ue)return;const me=Rr.disabled,Re=C.depthModeForSublayer(0,ue==="opaque"?ir.ReadWrite:ir.ReadOnly),Se=C.colorModeForRenderPass(),Ie=C.useProgram(ie?"backgroundPattern":"background"),je=b||K.coveringTiles({tileSize:Y,terrain:C.style.terrain});ie&&(z.activeTexture.set(j.TEXTURE0),C.imageManager.bind(C.context));const Xe=g.getCrossfadeParameters();for(const st of je){const Oe=b?st.posMatrix:C.transform.calculatePosMatrix(st.toUnwrapped()),vt=ie?Tw(Oe,A,C,ie,{tileID:st,tileSize:Y},Xe):Iw(Oe,A,E),ft=C.style.terrain&&C.style.terrain.getTerrainData(st);Ie.draw(z,j.TRIANGLES,Re,me,Se,jr.disabled,vt,ft,g.id,C.tileExtentBuffer,C.quadTriangleIndexBuffer,C.tileExtentSegments)}},debug:function(C,c,g){for(let b=0;b<g.length;b++)$w(C,c,g[b])},custom:function(C,c,g){const b=C.context,E=g.implementation;if(C.renderPass==="offscreen"){const A=E.prerender;A&&(C.setCustomLayerDefaults(),b.setColorMode(C.colorModeForRenderPass()),A.call(E,b.gl,C.transform.customLayerMatrix()),b.setDirty(),C.setBaseState())}else if(C.renderPass==="translucent"){C.setCustomLayerDefaults(),b.setColorMode(C.colorModeForRenderPass()),b.setStencilMode(Rr.disabled);const A=E.renderingMode==="3d"?new ir(C.context.gl.LEQUAL,ir.ReadWrite,C.depthRangeFor3D):C.depthModeForSublayer(0,ir.ReadOnly);b.setDepthMode(A),E.render(b.gl,C.transform.customLayerMatrix()),b.setDirty(),C.setBaseState(),b.bindFramebuffer.set(null)}}};class Xp{constructor(c,g){this.context=new A0(c),this.transform=g,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.create(),renderTime:0},this.setup(),this.numSublayers=Ue.maxUnderzooming+Ue.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xt,this.gpuTimers={}}resize(c,g,b){if(this.width=c*b,this.height=g*b,this.pixelRatio=b,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const E of this.style._order)this.style._layers[E].resize()}setup(){const c=this.context,g=new a.PosArray;g.emplaceBack(0,0),g.emplaceBack(a.EXTENT,0),g.emplaceBack(0,a.EXTENT),g.emplaceBack(a.EXTENT,a.EXTENT),this.tileExtentBuffer=c.createVertexBuffer(g,En.members),this.tileExtentSegments=a.SegmentVector.simpleSegment(0,0,4,2);const b=new a.PosArray;b.emplaceBack(0,0),b.emplaceBack(a.EXTENT,0),b.emplaceBack(0,a.EXTENT),b.emplaceBack(a.EXTENT,a.EXTENT),this.debugBuffer=c.createVertexBuffer(b,En.members),this.debugSegments=a.SegmentVector.simpleSegment(0,0,4,5);const E=new a.RasterBoundsArray;E.emplaceBack(0,0,0,0),E.emplaceBack(a.EXTENT,0,a.EXTENT,0),E.emplaceBack(0,a.EXTENT,0,a.EXTENT),E.emplaceBack(a.EXTENT,a.EXTENT,a.EXTENT,a.EXTENT),this.rasterBoundsBuffer=c.createVertexBuffer(E,oe.members),this.rasterBoundsSegments=a.SegmentVector.simpleSegment(0,0,4,2);const A=new a.PosArray;A.emplaceBack(0,0),A.emplaceBack(1,0),A.emplaceBack(0,1),A.emplaceBack(1,1),this.viewportBuffer=c.createVertexBuffer(A,En.members),this.viewportSegments=a.SegmentVector.simpleSegment(0,0,4,2);const z=new a.LineStripIndexArray;z.emplaceBack(0),z.emplaceBack(1),z.emplaceBack(3),z.emplaceBack(2),z.emplaceBack(0),this.tileBorderIndexBuffer=c.createIndexBuffer(z);const j=new a.TriangleIndexArray;j.emplaceBack(0,1,2),j.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=c.createIndexBuffer(j),this.emptyTexture=new P(c,{width:1,height:1,data:new Uint8Array([0,0,0,0])},c.gl.RGBA);const K=this.context.gl;this.stencilClearMode=new Rr({func:K.ALWAYS,mask:0},0,255,K.ZERO,K.ZERO,K.ZERO)}clearStencil(){const c=this.context,g=c.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const b=a.create();a.ortho(b,0,this.width,this.height,0,0,1),a.scale(b,b,[g.drawingBufferWidth,g.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(c,g.TRIANGLES,ir.disabled,this.stencilClearMode,zr.disabled,jr.disabled,rr(b),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(c,g){if(this.currentStencilSource===c.source||!c.isTileClipped()||!g||!g.length)return;this.currentStencilSource=c.source;const b=this.context,E=b.gl;this.nextStencilID+g.length>256&&this.clearStencil(),b.setColorMode(zr.disabled),b.setDepthMode(ir.disabled);const A=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const z of g){const j=this._tileClippingMaskIDs[z.key]=this.nextStencilID++,K=this.style.terrain&&this.style.terrain.getTerrainData(z);A.draw(b,E.TRIANGLES,ir.disabled,new Rr({func:E.ALWAYS,mask:0},j,255,E.KEEP,E.KEEP,E.REPLACE),zr.disabled,jr.disabled,rr(z.posMatrix),K,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const c=this.nextStencilID++,g=this.context.gl;return new Rr({func:g.NOTEQUAL,mask:255},c,255,g.KEEP,g.KEEP,g.REPLACE)}stencilModeForClipping(c){const g=this.context.gl;return new Rr({func:g.EQUAL,mask:255},this._tileClippingMaskIDs[c.key],0,g.KEEP,g.KEEP,g.REPLACE)}stencilConfigForOverlap(c){const g=this.context.gl,b=c.sort((z,j)=>j.overscaledZ-z.overscaledZ),E=b[b.length-1].overscaledZ,A=b[0].overscaledZ-E+1;if(A>1){this.currentStencilSource=void 0,this.nextStencilID+A>256&&this.clearStencil();const z={};for(let j=0;j<A;j++)z[j+E]=new Rr({func:g.GEQUAL,mask:255},j+this.nextStencilID,255,g.KEEP,g.KEEP,g.REPLACE);return this.nextStencilID+=A,[z,b]}return[{[E]:Rr.disabled},b]}colorModeForRenderPass(){const c=this.context.gl;return this._showOverdrawInspector?new zr([c.CONSTANT_COLOR,c.ONE],new a.Color(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?zr.unblended:zr.alphaBlended}depthModeForSublayer(c,g,b){if(!this.opaquePassEnabledForLayer())return ir.disabled;const E=1-((1+this.currentLayer)*this.numSublayers+c)*this.depthEpsilon;return new ir(b||this.context.gl.LEQUAL,g,[E,E])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(c,g){this.style=c,this.options=g,this.lineAtlas=c.lineAtlas,this.imageManager=c.imageManager,this.glyphManager=c.glyphManager,this.symbolFadeChange=c.placement.symbolFadeChange(a.exported.now()),this.imageManager.beginFrame();const b=this.style._order,E=this.style.sourceCaches,A=this.style.terrain&&new z0(this);for(const Y in E){const ie=E[Y];ie.used&&ie.prepare(this.context)}const z={},j={},K={};for(const Y in E){const ie=E[Y];z[Y]=ie.getVisibleCoordinates(),j[Y]=z[Y].slice().reverse(),K[Y]=ie.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Y=0;Y<b.length;Y++)if(this.style._layers[b[Y]].is3D()){this.opaquePassCutoff=Y;break}if(A){this.opaquePassCutoff=0;const Y=this.style.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime);(this.terrainFacilitator.dirty||!a.equals(this.terrainFacilitator.matrix,this.transform.projMatrix)||Y.length)&&(a.copy(this.terrainFacilitator.matrix,this.transform.projMatrix),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(ie,ue){const me=ie.context,Re=me.gl,Se=zr.unblended,Ie=new ir(Re.LEQUAL,ir.ReadWrite,[0,1]),je=ue.getTerrainMesh(),Xe=ue.sourceCache.getRenderableTiles(),st=ie.useProgram("terrainDepth");me.bindFramebuffer.set(ue.getFramebuffer("depth").framebuffer),me.viewport.set([0,0,ie.width/devicePixelRatio,ie.height/devicePixelRatio]),me.clear({color:a.Color.transparent,depth:1});for(const Oe of Xe){const vt=ue.getTerrainData(Oe.tileID),ft=ie.transform.calculatePosMatrix(Oe.tileID.toUnwrapped());st.draw(me,Re.TRIANGLES,Ie,Rr.disabled,Se,jr.backCCW,{u_matrix:ft},vt,"terrain",je.vertexBuffer,je.indexBuffer,je.segments)}me.bindFramebuffer.set(null),me.viewport.set([0,0,ie.width,ie.height])}(this,this.style.terrain),function(ie,ue){const me=ie.context,Re=me.gl,Se=zr.unblended,Ie=new ir(Re.LEQUAL,ir.ReadWrite,[0,1]),je=ue.getTerrainMesh(),Xe=ue.getCoordsTexture(),st=ue.sourceCache.getRenderableTiles(),Oe=ie.useProgram("terrainCoords");me.bindFramebuffer.set(ue.getFramebuffer("coords").framebuffer),me.viewport.set([0,0,ie.width/devicePixelRatio,ie.height/devicePixelRatio]),me.clear({color:a.Color.transparent,depth:1}),ue.coordsIndex=[];for(const vt of st){const ft=ue.getTerrainData(vt.tileID);me.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,Xe.texture);const Et=ie.transform.calculatePosMatrix(vt.tileID.toUnwrapped());Oe.draw(me,Re.TRIANGLES,Ie,Rr.disabled,Se,jr.backCCW,{u_matrix:Et,u_terrain_coords_id:(255-ue.coordsIndex.length)/255,u_texture:0},ft,"terrain",je.vertexBuffer,je.indexBuffer,je.segments),ue.coordsIndex.push(vt.tileID.key)}me.bindFramebuffer.set(null),me.viewport.set([0,0,ie.width,ie.height])}(this,this.style.terrain))}this.renderPass="offscreen";for(const Y of b){const ie=this.style._layers[Y];if(!ie.hasOffscreenPass()||ie.isHidden(this.transform.zoom))continue;const ue=j[ie.source];(ie.type==="custom"||ue.length)&&this.renderLayer(this,E[ie.source],ie,ue)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:g.showOverdrawInspector?a.Color.black:a.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=g.showOverdrawInspector,this.depthRangeFor3D=[0,1-(c._order.length+2)*this.numSublayers*this.depthEpsilon],!A)for(this.renderPass="opaque",this.currentLayer=b.length-1;this.currentLayer>=0;this.currentLayer--){const Y=this.style._layers[b[this.currentLayer]],ie=E[Y.source],ue=z[Y.source];this._renderTileClippingMasks(Y,ue),this.renderLayer(this,ie,Y,ue)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<b.length;this.currentLayer++){const Y=this.style._layers[b[this.currentLayer]],ie=E[Y.source];if(A&&A.renderLayer(Y))continue;const ue=(Y.type==="symbol"?K:j)[Y.source];this._renderTileClippingMasks(Y,z[Y.source]),this.renderLayer(this,ie,Y,ue)}if(this.options.showTileBoundaries){let Y,ie;Object.values(this.style._layers).forEach(ue=>{ue.source&&!ue.isHidden(this.transform.zoom)&&(ue.source!==(ie&&ie.id)&&(ie=this.style.sourceCaches[ue.source]),(!Y||Y.getSource().maxzoom<ie.getSource().maxzoom)&&(Y=ie))}),Y&&Zc.debug(this,Y,Y.getVisibleCoordinates())}this.options.showPadding&&function(Y){const ie=Y.transform.padding;Dl(Y,Y.transform.height-(ie.top||0),3,Lf),Dl(Y,ie.bottom||0,3,ya),qc(Y,ie.left||0,3,N0),qc(Y,Y.transform.width-(ie.right||0),3,Zp);const ue=Y.transform.centerPoint;(function(me,Re,Se,Ie){Mu(me,Re-1,Se-10,2,20,Ie),Mu(me,Re-10,Se-1,20,2,Ie)})(Y,ue.x,Y.transform.height-ue.y,L0)}(this),this.context.setDefault()}renderLayer(c,g,b,E){b.isHidden(this.transform.zoom)||(b.type==="background"||b.type==="custom"||(E||[]).length)&&(this.id=b.id,this.gpuTimingStart(b),Zc[b.type](c,g,b,E,this.style.placement.variableOffsets),this.gpuTimingEnd())}gpuTimingStart(c){if(!this.options.gpuTiming)return;const g=this.context.extTimerQuery;let b=this.gpuTimers[c.id];b||(b=this.gpuTimers[c.id]={calls:0,cpuTime:0,query:g.createQueryEXT()}),b.calls++,g.beginQueryEXT(g.TIME_ELAPSED_EXT,b.query)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const c=this.context.extTimerQuery;c.endQueryEXT(c.TIME_ELAPSED_EXT)}collectGpuTimers(){const c=this.gpuTimers;return this.gpuTimers={},c}queryGpuTimers(c){const g={};for(const b in c){const E=c[b],A=this.context.extTimerQuery,z=A.getQueryObjectEXT(E.query,A.QUERY_RESULT_EXT)/1e6;A.deleteQueryEXT(E.query),g[b]=z}return g}translatePosMatrix(c,g,b,E,A){if(!b[0]&&!b[1])return c;const z=A?E==="map"?this.transform.angle:0:E==="viewport"?-this.transform.angle:0;if(z){const Y=Math.sin(z),ie=Math.cos(z);b=[b[0]*ie-b[1]*Y,b[0]*Y+b[1]*ie]}const j=[A?b[0]:Bt(g,b[0],this.transform.zoom),A?b[1]:Bt(g,b[1],this.transform.zoom),0],K=new Float32Array(16);return a.translate(K,c,j),K}saveTileTexture(c){const g=this._tileTextures[c.size[0]];g?g.push(c):this._tileTextures[c.size[0]]=[c]}getTileTexture(c){const g=this._tileTextures[c];return g&&g.length>0?g.pop():null}isPatternMissing(c){if(!c)return!1;if(!c.from||!c.to)return!0;const g=this.imageManager.getPattern(c.from.toString()),b=this.imageManager.getPattern(c.to.toString());return!g||!b}useProgram(c,g){this.cache=this.cache||{};const b=c+(g?g.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.terrain?"/terrain":"");return this.cache[b]||(this.cache[b]=new Xn(this.context,c,An[c],g,Lp[c],this._showOverdrawInspector,this.style.terrain)),this.cache[b]}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 c=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(c.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new P(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}}class zf{constructor(c,g){this.points=c,this.planes=g}static fromInvProjectionMatrix(c,g,b){const E=Math.pow(2,b),A=[[-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(j=>{const K=1/(j=a.transformMat4([],j,c))[3]/g*E;return a.mul$1(j,j,[K,K,1/j[3],K])}),z=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(j=>{const K=a.sub([],A[j[0]],A[j[1]]),Y=a.sub([],A[j[2]],A[j[1]]),ie=a.normalize([],a.cross([],K,Y)),ue=-a.dot(ie,A[j[1]]);return ie.concat(ue)});return new zf(A,z)}}class Xc{constructor(c,g){this.min=c,this.max=g,this.center=a.scale$1([],a.add([],this.min,this.max),.5)}quadrant(c){const g=[c%2==0,c<2],b=a.clone$2(this.min),E=a.clone$2(this.max);for(let A=0;A<g.length;A++)b[A]=g[A]?this.min[A]:this.center[A],E[A]=g[A]?this.center[A]:this.max[A];return E[2]=this.max[2],new Xc(b,E)}distanceX(c){return Math.max(Math.min(this.max[0],c[0]),this.min[0])-c[0]}distanceY(c){return Math.max(Math.min(this.max[1],c[1]),this.min[1])-c[1]}intersects(c){const g=[[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 b=!0;for(let E=0;E<c.planes.length;E++){const A=c.planes[E];let z=0;for(let j=0;j<g.length;j++)a.dot$1(A,g[j])>=0&&z++;if(z===0)return 0;z!==g.length&&(b=!1)}if(b)return 2;for(let E=0;E<3;E++){let A=Number.MAX_VALUE,z=-Number.MAX_VALUE;for(let j=0;j<c.points.length;j++){const K=c.points[j][E]-this.min[E];A=Math.min(A,K),z=Math.max(z,K)}if(z<0||A>this.max[E]-this.min[E])return 0}return 1}}class Ru{constructor(c=0,g=0,b=0,E=0){if(isNaN(c)||c<0||isNaN(g)||g<0||isNaN(b)||b<0||isNaN(E)||E<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=c,this.bottom=g,this.left=b,this.right=E}interpolate(c,g,b){return g.top!=null&&c.top!=null&&(this.top=a.number(c.top,g.top,b)),g.bottom!=null&&c.bottom!=null&&(this.bottom=a.number(c.bottom,g.bottom,b)),g.left!=null&&c.left!=null&&(this.left=a.number(c.left,g.left,b)),g.right!=null&&c.right!=null&&(this.right=a.number(c.right,g.right,b)),this}getCenter(c,g){const b=a.clamp((this.left+c-this.right)/2,0,c),E=a.clamp((this.top+g-this.bottom)/2,0,g);return new a.pointGeometry(b,E)}equals(c){return this.top===c.top&&this.bottom===c.bottom&&this.left===c.left&&this.right===c.right}clone(){return new Ru(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class Yc{constructor(c,g,b,E,A){this.tileSize=512,this.maxValidLatitude=85.051129,this.freezeElevation=!1,this._renderWorldCopies=A===void 0||!!A,this._minZoom=c||0,this._maxZoom=g||22,this._minPitch=b==null?0:b,this._maxPitch=E==null?60:E,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.LngLat(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ru,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const c=new Yc(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return c.tileSize=this.tileSize,c.latRange=this.latRange,c.width=this.width,c.height=this.height,c._center=this._center,c._elevation=this._elevation,c.zoom=this.zoom,c.angle=this.angle,c._fov=this._fov,c._pitch=this._pitch,c._unmodified=this._unmodified,c._edgeInsets=this._edgeInsets.clone(),c._calcMatrices(),c}get minZoom(){return this._minZoom}set minZoom(c){this._minZoom!==c&&(this._minZoom=c,this.zoom=Math.max(this.zoom,c))}get maxZoom(){return this._maxZoom}set maxZoom(c){this._maxZoom!==c&&(this._maxZoom=c,this.zoom=Math.min(this.zoom,c))}get minPitch(){return this._minPitch}set minPitch(c){this._minPitch!==c&&(this._minPitch=c,this.pitch=Math.max(this.pitch,c))}get maxPitch(){return this._maxPitch}set maxPitch(c){this._maxPitch!==c&&(this._maxPitch=c,this.pitch=Math.min(this.pitch,c))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(c){c===void 0?c=!0:c===null&&(c=!1),this._renderWorldCopies=c}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.pointGeometry(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(c){const g=-a.wrap(c,-180,180)*Math.PI/180;var b;this.angle!==g&&(this._unmodified=!1,this.angle=g,this._calcMatrices(),this.rotationMatrix=(b=new a.ARRAY_TYPE(4),a.ARRAY_TYPE!=Float32Array&&(b[1]=0,b[2]=0),b[0]=1,b[3]=1,b),function(E,A,z){var j=A[0],K=A[1],Y=A[2],ie=A[3],ue=Math.sin(z),me=Math.cos(z);E[0]=j*me+Y*ue,E[1]=K*me+ie*ue,E[2]=j*-ue+Y*me,E[3]=K*-ue+ie*me}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(c){const g=a.clamp(c,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==g&&(this._unmodified=!1,this._pitch=g,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(c){c=Math.max(.01,Math.min(60,c)),this._fov!==c&&(this._unmodified=!1,this._fov=c/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(c){const g=Math.min(Math.max(c,this.minZoom),this.maxZoom);this._zoom!==g&&(this._unmodified=!1,this._zoom=g,this.scale=this.zoomScale(g),this.tileZoom=Math.floor(g),this.zoomFraction=g-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(c){c.lat===this._center.lat&&c.lng===this._center.lng||(this._unmodified=!1,this._center=c,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(c){c!==this._elevation&&(this._elevation=c,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(c){this._edgeInsets.equals(c)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,c,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(c){return this._edgeInsets.equals(c)}interpolatePadding(c,g,b){this._unmodified=!1,this._edgeInsets.interpolate(c,g,b),this._constrain(),this._calcMatrices()}coveringZoomLevel(c){const g=(c.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/c.tileSize));return Math.max(0,g)}getVisibleUnwrappedCoordinates(c){const g=[new a.UnwrappedTileID(0,c)];if(this._renderWorldCopies){const b=this.pointCoordinate(new a.pointGeometry(0,0)),E=this.pointCoordinate(new a.pointGeometry(this.width,0)),A=this.pointCoordinate(new a.pointGeometry(this.width,this.height)),z=this.pointCoordinate(new a.pointGeometry(0,this.height)),j=Math.floor(Math.min(b.x,E.x,A.x,z.x)),K=Math.floor(Math.max(b.x,E.x,A.x,z.x)),Y=1;for(let ie=j-Y;ie<=K+Y;ie++)ie!==0&&g.push(new a.UnwrappedTileID(ie,c))}return g}coveringTiles(c){var g,b;let E=this.coveringZoomLevel(c);const A=E;if(c.minzoom!==void 0&&E<c.minzoom)return[];c.maxzoom!==void 0&&E>c.maxzoom&&(E=c.maxzoom);const z=this.pointCoordinate(this.getCameraPoint()),j=a.MercatorCoordinate.fromLngLat(this.center),K=Math.pow(2,E),Y=[K*z.x,K*z.y,0],ie=[K*j.x,K*j.y,0],ue=zf.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,E);let me=c.minzoom||0;!c.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(me=E);const Re=c.terrain?2/Math.min(this.tileSize,c.tileSize)*this.tileSize:3,Se=Oe=>({aabb:new Xc([Oe*K,0,0],[(Oe+1)*K,K,0]),zoom:0,x:0,y:0,wrap:Oe,fullyVisible:!1}),Ie=[],je=[],Xe=E,st=c.reparseOverscaled?A:E;if(this._renderWorldCopies)for(let Oe=1;Oe<=3;Oe++)Ie.push(Se(-Oe)),Ie.push(Se(Oe));for(Ie.push(Se(0));Ie.length>0;){const Oe=Ie.pop(),vt=Oe.x,ft=Oe.y;let Et=Oe.fullyVisible;if(!Et){const mn=Oe.aabb.intersects(ue);if(mn===0)continue;Et=mn===2}const It=c.terrain?Y:ie,Ht=Oe.aabb.distanceX(It),Ct=Oe.aabb.distanceY(It),fn=Math.max(Math.abs(Ht),Math.abs(Ct)),rn=Re+(1<<Xe-Oe.zoom)-2;if(Oe.zoom===Xe||fn>rn&&Oe.zoom>=me){const mn=Xe-Oe.zoom,Hn=Y[0]-.5-(vt<<mn),qn=Y[1]-.5-(ft<<mn);je.push({tileID:new a.OverscaledTileID(Oe.zoom===Xe?st:Oe.zoom,Oe.wrap,Oe.zoom,vt,ft),distanceSq:a.sqrLen([ie[0]-.5-vt,ie[1]-.5-ft]),tileDistanceToCamera:Math.sqrt(Hn*Hn+qn*qn)})}else for(let mn=0;mn<4;mn++){const Hn=(vt<<1)+mn%2,qn=(ft<<1)+(mn>>1),kn=Oe.zoom+1;let vr=Oe.aabb.quadrant(mn);if(c.terrain){const yr=new a.OverscaledTileID(kn,Oe.wrap,kn,Hn,qn),sr=c.terrain.getMinMaxElevation(yr),ur=(g=sr.minElevation)!==null&&g!==void 0?g:this.elevation,Cr=(b=sr.maxElevation)!==null&&b!==void 0?b:this.elevation;vr=new Xc([vr.min[0],vr.min[1],ur],[vr.max[0],vr.max[1],Cr])}Ie.push({aabb:vr,zoom:kn,x:Hn,y:qn,wrap:Oe.wrap,fullyVisible:Et})}}return je.sort((Oe,vt)=>Oe.distanceSq-vt.distanceSq).map(Oe=>Oe.tileID)}resize(c,g){this.width=c,this.height=g,this.pixelsToGLUnits=[2/c,-2/g],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(c){return Math.pow(2,c)}scaleZoom(c){return Math.log(c)/Math.LN2}project(c){const g=a.clamp(c.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.pointGeometry(a.mercatorXfromLng(c.lng)*this.worldSize,a.mercatorYfromLat(g)*this.worldSize)}unproject(c){return new a.MercatorCoordinate(c.x/this.worldSize,c.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}updateElevation(c){this.freezeElevation||(this.elevation=c?this.getElevation(this._center,c):0)}getElevation(c,g){const b=a.MercatorCoordinate.fromLngLat(c),E=(1<<this.tileZoom)*a.EXTENT,A=b.x*E,z=b.y*E,j=Math.floor(A/a.EXTENT),K=Math.floor(z/a.EXTENT),Y=new a.OverscaledTileID(this.tileZoom,0,this.tileZoom,j,K);return g.getElevation(Y,A%a.EXTENT,z%a.EXTENT,a.EXTENT)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(c){const g=this.pointLocation(this.centerPoint,c),b=this.getElevation(g,c);if(!(this.elevation-b))return;const E=this.getCameraPosition(),A=a.MercatorCoordinate.fromLngLat(E.lngLat,E.altitude),z=a.MercatorCoordinate.fromLngLat(g,b),j=A.x-z.x,K=A.y-z.y,Y=A.z-z.z,ie=Math.sqrt(j*j+K*K+Y*Y),ue=this.scaleZoom(this.cameraToCenterDistance/ie/this.tileSize);this._elevation=b,this._center=g,this.zoom=ue}setLocationAtPoint(c,g){const b=this.pointCoordinate(g),E=this.pointCoordinate(this.centerPoint),A=this.locationCoordinate(c),z=new a.MercatorCoordinate(A.x-(b.x-E.x),A.y-(b.y-E.y));this.center=this.coordinateLocation(z),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(c,g){return g?this.coordinatePoint(this.locationCoordinate(c),this.getElevation(c,g),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(c))}pointLocation(c,g){return this.coordinateLocation(this.pointCoordinate(c,g))}locationCoordinate(c){return a.MercatorCoordinate.fromLngLat(c)}coordinateLocation(c){return c&&c.toLngLat()}pointCoordinate(c,g){if(g){const me=g.pointCoordinate(c);if(me!=null)return me}const b=[c.x,c.y,0,1],E=[c.x,c.y,1,1];a.transformMat4(b,b,this.pixelMatrixInverse),a.transformMat4(E,E,this.pixelMatrixInverse);const A=b[3],z=E[3],j=b[1]/A,K=E[1]/z,Y=b[2]/A,ie=E[2]/z,ue=Y===ie?0:(0-Y)/(ie-Y);return new a.MercatorCoordinate(a.number(b[0]/A,E[0]/z,ue)/this.worldSize,a.number(j,K,ue)/this.worldSize)}coordinatePoint(c,g=0,b=this.pixelMatrix){const E=[c.x*this.worldSize,c.y*this.worldSize,g,1];return a.transformMat4(E,E,b),new a.pointGeometry(E[0]/E[3],E[1]/E[3])}getBounds(){const c=Math.max(0,this.height/2-this.getHorizon());return new a.LngLatBounds().extend(this.pointLocation(new a.pointGeometry(0,c))).extend(this.pointLocation(new a.pointGeometry(this.width,c))).extend(this.pointLocation(new a.pointGeometry(this.width,this.height))).extend(this.pointLocation(new a.pointGeometry(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new a.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(c){c?(this.lngRange=[c.getWest(),c.getEast()],this.latRange=[c.getSouth(),c.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(c,g=!1){const b=c.key,E=g?this._alignedPosMatrixCache:this._posMatrixCache;if(E[b])return E[b];const A=c.canonical,z=this.worldSize/this.zoomScale(A.z),j=A.x+Math.pow(2,A.z)*c.wrap,K=a.identity(new Float64Array(16));return a.translate(K,K,[j*z,A.y*z,0]),a.scale(K,K,[z/a.EXTENT,z/a.EXTENT,1]),a.multiply(K,g?this.alignedProjMatrix:this.projMatrix,K),E[b]=new Float32Array(K),E[b]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let c,g,b,E,A=-90,z=90,j=-180,K=180;const Y=this.size,ie=this._unmodified;if(this.latRange){const Re=this.latRange;A=a.mercatorYfromLat(Re[1])*this.worldSize,z=a.mercatorYfromLat(Re[0])*this.worldSize,c=z-A<Y.y?Y.y/(z-A):0}if(this.lngRange){const Re=this.lngRange;j=a.wrap(a.mercatorXfromLng(Re[0])*this.worldSize,0,this.worldSize),K=a.wrap(a.mercatorXfromLng(Re[1])*this.worldSize,0,this.worldSize),K<j&&(K+=this.worldSize),g=K-j<Y.x?Y.x/(K-j):0}const ue=this.point,me=Math.max(g||0,c||0);if(me)return this.center=this.unproject(new a.pointGeometry(g?(K+j)/2:ue.x,c?(z+A)/2:ue.y)),this.zoom+=this.scaleZoom(me),this._unmodified=ie,void(this._constraining=!1);if(this.latRange){const Re=ue.y,Se=Y.y/2;Re-Se<A&&(E=A+Se),Re+Se>z&&(E=z-Se)}if(this.lngRange){const Re=(j+K)/2,Se=a.wrap(ue.x,Re-this.worldSize/2,Re+this.worldSize/2),Ie=Y.x/2;Se-Ie<j&&(b=j+Ie),Se+Ie>K&&(b=K-Ie)}b===void 0&&E===void 0||(this.center=this.unproject(new a.pointGeometry(b!==void 0?b:ue.x,E!==void 0?E:ue.y)).wrap()),this._unmodified=ie,this._constraining=!1}_calcMatrices(){if(!this.height)return;const c=this.centerOffset,g=this.point.x,b=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let E=a.identity(new Float64Array(16));a.scale(E,E,[this.width/2,-this.height/2,1]),a.translate(E,E,[1,-1,0]),this.labelPlaneMatrix=E,E=a.identity(new Float64Array(16)),a.scale(E,E,[1,-1,1]),a.translate(E,E,[-1,-1,0]),a.scale(E,E,[2/this.width,2/this.height,1]),this.glCoordMatrix=E,this.cameraToSeaLevelDistance=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch);const A=Math.PI/2+this._pitch,z=this._fov*(.5+c.y/this.height),j=Math.sin(z)*this.cameraToSeaLevelDistance/Math.sin(a.clamp(Math.PI-A-z,.01,Math.PI-.01)),K=this.getHorizon(),Y=2*Math.atan(K/this.cameraToCenterDistance)*(.5+c.y/(2*K)),ie=Math.sin(Y)*this.cameraToSeaLevelDistance/Math.sin(a.clamp(Math.PI-A-Y,.01,Math.PI-.01)),ue=Math.cos(Math.PI/2-this._pitch)*j+this.cameraToSeaLevelDistance,me=Math.cos(Math.PI/2-this._pitch)*ie+this.cameraToSeaLevelDistance,Re=1.01*Math.min(ue,me),Se=this.height/50;E=new Float64Array(16),a.perspective(E,this._fov,this.width/this.height,Se,Re),E[8]=2*-c.x/this.width,E[9]=2*c.y/this.height,a.scale(E,E,[1,-1,1]),a.translate(E,E,[0,0,-this.cameraToCenterDistance]),a.rotateX(E,E,this._pitch),a.rotateZ(E,E,this.angle),a.translate(E,E,[-g,-b,0]),this.mercatorMatrix=a.scale([],E,[this.worldSize,this.worldSize,this.worldSize]),a.scale(E,E,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,E),a.translate(E,E,[0,0,-this.elevation]),this.projMatrix=E,this.invProjMatrix=a.invert([],E),this.pixelMatrix3D=a.multiply(new Float64Array(16),this.labelPlaneMatrix,E);const Ie=this.width%2/2,je=this.height%2/2,Xe=Math.cos(this.angle),st=Math.sin(this.angle),Oe=g-Math.round(g)+Xe*Ie+st*je,vt=b-Math.round(b)+Xe*je+st*Ie,ft=new Float64Array(E);if(a.translate(ft,ft,[Oe>.5?Oe-1:Oe,vt>.5?vt-1:vt,0]),this.alignedProjMatrix=ft,E=a.invert(new Float64Array(16),this.pixelMatrix),!E)throw new Error("failed to invert matrix");this.pixelMatrixInverse=E,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const c=this.pointCoordinate(new a.pointGeometry(0,0)),g=[c.x*this.worldSize,c.y*this.worldSize,0,1];return a.transformMat4(g,g,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const c=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.pointGeometry(0,c))}getCameraQueryGeometry(c){const g=this.getCameraPoint();if(c.length===1)return[c[0],g];{let b=g.x,E=g.y,A=g.x,z=g.y;for(const j of c)b=Math.min(b,j.x),E=Math.min(E,j.y),A=Math.max(A,j.x),z=Math.max(z,j.y);return[new a.pointGeometry(b,E),new a.pointGeometry(A,E),new a.pointGeometry(A,z),new a.pointGeometry(b,z),new a.pointGeometry(b,E)]}}}class $0{constructor(c){this._hashName=c&&encodeURIComponent(c),a.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(g,b){let E=!1,A=null;const z=()=>{A=null,E&&(g(),A=setTimeout(z,300),E=!1)};return()=>(E=!0,A||z(),A)}(this._updateHashUnthrottled.bind(this))}addTo(c){return this._map=c,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(c){const g=this._map.getCenter(),b=Math.round(100*this._map.getZoom())/100,E=Math.ceil((b*Math.LN2+Math.log(512/360/.5))/Math.LN10),A=Math.pow(10,E),z=Math.round(g.lng*A)/A,j=Math.round(g.lat*A)/A,K=this._map.getBearing(),Y=this._map.getPitch();let ie="";if(ie+=c?`/${z}/${j}/${b}`:`${b}/${j}/${z}`,(K||Y)&&(ie+="/"+Math.round(10*K)/10),Y&&(ie+=`/${Math.round(Y)}`),this._hashName){const ue=this._hashName;let me=!1;const Re=window.location.hash.slice(1).split("&").map(Se=>{const Ie=Se.split("=")[0];return Ie===ue?(me=!0,`${Ie}=${ie}`):Se}).filter(Se=>Se);return me||Re.push(`${ue}=${ie}`),`#${Re.join("&")}`}return`#${ie}`}_getCurrentHash(){const c=window.location.hash.replace("#","");if(this._hashName){let g;return c.split("&").map(b=>b.split("=")).forEach(b=>{b[0]===this._hashName&&(g=b)}),(g&&g[1]||"").split("/")}return c.split("/")}_onHashChange(){const c=this._getCurrentHash();if(c.length>=3&&!c.some(g=>isNaN(g))){const g=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(c[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+c[2],+c[1]],zoom:+c[0],bearing:g,pitch:+(c[4]||0)}),!0}return!1}_updateHashUnthrottled(){const c=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,c)}catch{}}}const Qc={linearity:.3,easing:a.bezier(0,0,.3,1)},B0=a.extend({deceleration:2500,maxSpeed:1400},Qc),V0=a.extend({deceleration:20,maxSpeed:1400},Qc),U0=a.extend({deceleration:1e3,maxSpeed:360},Qc),Au=a.extend({deceleration:1e3,maxSpeed:90},Qc);class j0{constructor(c){this._map=c,this.clear()}clear(){this._inertiaBuffer=[]}record(c){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.exported.now(),settings:c})}_drainInertiaBuffer(){const c=this._inertiaBuffer,g=a.exported.now();for(;c.length>0&&g-c[0].time>160;)c.shift()}_onMoveEnd(c){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const g={zoom:0,bearing:0,pitch:0,pan:new a.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:A}of this._inertiaBuffer)g.zoom+=A.zoomDelta||0,g.bearing+=A.bearingDelta||0,g.pitch+=A.pitchDelta||0,A.panDelta&&g.pan._add(A.panDelta),A.around&&(g.around=A.around),A.pinchAround&&(g.pinchAround=A.pinchAround);const b=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,E={};if(g.pan.mag()){const A=ed(g.pan.mag(),b,a.extend({},B0,c||{}));E.offset=g.pan.mult(A.amount/g.pan.mag()),E.center=this._map.transform.center,Jc(E,A)}if(g.zoom){const A=ed(g.zoom,b,V0);E.zoom=this._map.transform.zoom+A.amount,Jc(E,A)}if(g.bearing){const A=ed(g.bearing,b,U0);E.bearing=this._map.transform.bearing+a.clamp(A.amount,-179,179),Jc(E,A)}if(g.pitch){const A=ed(g.pitch,b,Au);E.pitch=this._map.transform.pitch+A.amount,Jc(E,A)}if(E.zoom||E.bearing){const A=g.pinchAround===void 0?g.around:g.pinchAround;E.around=A?this._map.unproject(A):this._map.getCenter()}return this.clear(),a.extend(E,{noMoveStart:!0})}}function Jc(C,c){(!C.duration||C.duration<c.duration)&&(C.duration=c.duration,C.easing=c.easing)}function ed(C,c,g){const{maxSpeed:b,linearity:E,deceleration:A}=g,z=a.clamp(C*E/(c/1e3),-b,b),j=Math.abs(z)/(A*E);return{easing:g.easing,duration:1e3*j,amount:z*(j/2)}}class Lo extends a.Event{constructor(c,g,b,E={}){const A=v.mousePos(g.getCanvasContainer(),b),z=g.unproject(A);super(c,a.extend({point:A,lngLat:z,originalEvent:b},E)),this._defaultPrevented=!1,this.target=g}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class td extends a.Event{constructor(c,g,b){const E=c==="touchend"?b.changedTouches:b.touches,A=v.touchPos(g.getCanvasContainer(),E),z=A.map(K=>g.unproject(K)),j=A.reduce((K,Y,ie,ue)=>K.add(Y.div(ue.length)),new a.pointGeometry(0,0));super(c,{points:A,point:j,lngLats:z,lngLat:g.unproject(j),originalEvent:b}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class Fo extends a.Event{constructor(c,g,b){super(c,{originalEvent:b}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class Bw{constructor(c,g){this._map=c,this._clickTolerance=g.clickTolerance}reset(){delete this._mousedownPos}wheel(c){return this._firePreventable(new Fo(c.type,this._map,c))}mousedown(c,g){return this._mousedownPos=g,this._firePreventable(new Lo(c.type,this._map,c))}mouseup(c){this._map.fire(new Lo(c.type,this._map,c))}click(c,g){this._mousedownPos&&this._mousedownPos.dist(g)>=this._clickTolerance||this._map.fire(new Lo(c.type,this._map,c))}dblclick(c){return this._firePreventable(new Lo(c.type,this._map,c))}mouseover(c){this._map.fire(new Lo(c.type,this._map,c))}mouseout(c){this._map.fire(new Lo(c.type,this._map,c))}touchstart(c){return this._firePreventable(new td(c.type,this._map,c))}touchmove(c){this._map.fire(new td(c.type,this._map,c))}touchend(c){this._map.fire(new td(c.type,this._map,c))}touchcancel(c){this._map.fire(new td(c.type,this._map,c))}_firePreventable(c){if(this._map.fire(c),c.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class qs{constructor(c){this._map=c}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(c){this._map.fire(new Lo(c.type,this._map,c))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Lo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(c){this._delayContextMenu?this._contextMenuEvent=c:this._ignoreContextMenu||this._map.fire(new Lo(c.type,this._map,c)),this._map.listens("contextmenu")&&c.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class H0{constructor(c,g){this._map=c,this._el=c.getCanvasContainer(),this._container=c.getContainer(),this._clickTolerance=g.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(c,g){this.isEnabled()&&c.shiftKey&&c.button===0&&(v.disableDrag(),this._startPos=this._lastPos=g,this._active=!0)}mousemoveWindow(c,g){if(!this._active)return;const b=g;if(this._lastPos.equals(b)||!this._box&&b.dist(this._startPos)<this._clickTolerance)return;const E=this._startPos;this._lastPos=b,this._box||(this._box=v.create("div","maplibregl-boxzoom mapboxgl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair","mapboxgl-crosshair"),this._fireEvent("boxzoomstart",c));const A=Math.min(E.x,b.x),z=Math.max(E.x,b.x),j=Math.min(E.y,b.y),K=Math.max(E.y,b.y);v.setTransform(this._box,`translate(${A}px,${j}px)`),this._box.style.width=z-A+"px",this._box.style.height=K-j+"px"}mouseupWindow(c,g){if(!this._active||c.button!==0)return;const b=this._startPos,E=g;if(this.reset(),v.suppressClick(),b.x!==E.x||b.y!==E.y)return this._map.fire(new a.Event("boxzoomend",{originalEvent:c})),{cameraAnimation:A=>A.fitScreenCoordinates(b,E,this._map.getBearing(),{linear:!0})};this._fireEvent("boxzoomcancel",c)}keydown(c){this._active&&c.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",c))}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(c,g){return this._map.fire(new a.Event(c,{originalEvent:g}))}}function ws(C,c){if(C.length!==c.length)throw new Error(`The number of touches and points are not equal - touches ${C.length}, points ${c.length}`);const g={};for(let b=0;b<C.length;b++)g[C[b].identifier]=c[b];return g}class nd{constructor(c){this.reset(),this.numTouches=c.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(c,g,b){(this.centroid||b.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=c.timeStamp),b.length===this.numTouches&&(this.centroid=function(E){const A=new a.pointGeometry(0,0);for(const z of E)A._add(z);return A.div(E.length)}(g),this.touches=ws(b,g)))}touchmove(c,g,b){if(this.aborted||!this.centroid)return;const E=ws(b,g);for(const A in this.touches){const z=this.touches[A],j=E[A];(!j||j.dist(z)>30)&&(this.aborted=!0)}}touchend(c,g,b){if((!this.centroid||c.timeStamp-this.startTime>500)&&(this.aborted=!0),b.length===0){const E=!this.aborted&&this.centroid;if(this.reset(),E)return E}}}class Yp{constructor(c){this.singleTap=new nd(c),this.numTaps=c.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(c,g,b){this.singleTap.touchstart(c,g,b)}touchmove(c,g,b){this.singleTap.touchmove(c,g,b)}touchend(c,g,b){const E=this.singleTap.touchend(c,g,b);if(E){const A=c.timeStamp-this.lastTime<500,z=!this.lastTap||this.lastTap.dist(E)<30;if(A&&z||this.reset(),this.count++,this.lastTime=c.timeStamp,this.lastTap=E,this.count===this.numTaps)return this.reset(),E}}}class Vw{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(c,g,b){this._zoomIn.touchstart(c,g,b),this._zoomOut.touchstart(c,g,b)}touchmove(c,g,b){this._zoomIn.touchmove(c,g,b),this._zoomOut.touchmove(c,g,b)}touchend(c,g,b){const E=this._zoomIn.touchend(c,g,b),A=this._zoomOut.touchend(c,g,b);return E?(this._active=!0,c.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:z=>z.easeTo({duration:300,zoom:z.getZoom()+1,around:z.unproject(E)},{originalEvent:c})}):A?(this._active=!0,c.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:z=>z.easeTo({duration:300,zoom:z.getZoom()-1,around:z.unproject(A)},{originalEvent:c})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const Uw={0:1,2:2};class $f{constructor(c){this.reset(),this._clickTolerance=c.clickTolerance||1}reset(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton}_correctButton(c,g){return!1}_move(c,g){return{}}mousedown(c,g){if(this._lastPoint)return;const b=v.mouseButton(c);this._correctButton(c,b)&&(this._lastPoint=g,this._eventButton=b)}mousemoveWindow(c,g){const b=this._lastPoint;if(b){if(c.preventDefault(),function(E,A){const z=Uw[A];return E.buttons===void 0||(E.buttons&z)!==z}(c,this._eventButton))this.reset();else if(this._moved||!(g.dist(b)<this._clickTolerance))return this._moved=!0,this._lastPoint=g,this._move(b,g)}}mouseupWindow(c){this._lastPoint&&v.mouseButton(c)===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 rd extends $f{mousedown(c,g){super.mousedown(c,g),this._lastPoint&&(this._active=!0)}_correctButton(c,g){return g===0&&!c.ctrlKey}_move(c,g){return{around:g,panDelta:g.sub(c)}}}class Cs extends $f{_correctButton(c,g){return g===0&&c.ctrlKey||g===2}_move(c,g){const b=.8*(g.x-c.x);if(b)return this._active=!0,{bearingDelta:b}}contextmenu(c){c.preventDefault()}}class yn extends $f{_correctButton(c,g){return g===0&&c.ctrlKey||g===2}_move(c,g){const b=-.5*(g.y-c.y);if(b)return this._active=!0,{pitchDelta:b}}contextmenu(c){c.preventDefault()}}class K0{constructor(c,g){this._minTouches=c.cooperativeGestures?2:1,this._clickTolerance=c.clickTolerance||1,this._map=g,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.pointGeometry(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(c,g,b){return this._calculateTransform(c,g,b)}touchmove(c,g,b){if(this._map._cooperativeGestures&&(this._minTouches===2&&b.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(c,!1,b.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(b.length<this._minTouches))return c.preventDefault(),this._calculateTransform(c,g,b)}touchend(c,g,b){this._calculateTransform(c,g,b),this._active&&b.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(c,g,b){b.length>0&&(this._active=!0);const E=ws(b,g),A=new a.pointGeometry(0,0),z=new a.pointGeometry(0,0);let j=0;for(const Y in E){const ie=E[Y],ue=this._touches[Y];ue&&(A._add(ie),z._add(ie.sub(ue)),j++,E[Y]=ie)}if(this._touches=E,j<this._minTouches||!z.mag())return;const K=z.div(j);return this._sum._add(K),this._sum.mag()<this._clickTolerance?void 0:{around:A.div(j),panDelta:K}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ol{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}_start(c){}_move(c,g,b){return{}}touchstart(c,g,b){this._firstTwoTouches||b.length<2||(this._firstTwoTouches=[b[0].identifier,b[1].identifier],this._start([g[0],g[1]]))}touchmove(c,g,b){if(!this._firstTwoTouches)return;c.preventDefault();const[E,A]=this._firstTwoTouches,z=Zs(b,g,E),j=Zs(b,g,A);if(!z||!j)return;const K=this._aroundCenter?null:z.add(j).div(2);return this._move([z,j],K,c)}touchend(c,g,b){if(!this._firstTwoTouches)return;const[E,A]=this._firstTwoTouches,z=Zs(b,g,E),j=Zs(b,g,A);z&&j||(this._active&&v.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(c){this._enabled=!0,this._aroundCenter=!!c&&c.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Zs(C,c,g){for(let b=0;b<C.length;b++)if(C[b].identifier===g)return c[b]}function Qp(C,c){return Math.log(C/c)/Math.LN2}class un extends Ol{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(c){this._startDistance=this._distance=c[0].dist(c[1])}_move(c,g){const b=this._distance;if(this._distance=c[0].dist(c[1]),this._active||!(Math.abs(Qp(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Qp(this._distance,b),pinchAround:g}}}function Bf(C,c){return 180*C.angleWith(c)/Math.PI}class jw extends Ol{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(c){this._startVector=this._vector=c[0].sub(c[1]),this._minDiameter=c[0].dist(c[1])}_move(c,g){const b=this._vector;if(this._vector=c[0].sub(c[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Bf(this._vector,b),pinchAround:g}}_isBelowThreshold(c){this._minDiameter=Math.min(this._minDiameter,c.mag());const g=25/(Math.PI*this._minDiameter)*360,b=Bf(c,this._startVector);return Math.abs(b)<g}}function Jp(C){return Math.abs(C.y)>Math.abs(C.x)}class em extends Ol{constructor(c){super(),this._map=c}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(c,g,b){super.touchstart(c,g,b),this._currentTouchCount=b.length}_start(c){this._lastPoints=c,Jp(c[0].sub(c[1]))&&(this._valid=!1)}_move(c,g,b){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const E=c[0].sub(this._lastPoints[0]),A=c[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(E,A,b.timeStamp),this._valid?(this._lastPoints=c,this._active=!0,{pitchDelta:(E.y+A.y)/2*-.5}):void 0}gestureBeginsVertically(c,g,b){if(this._valid!==void 0)return this._valid;const E=c.mag()>=2,A=g.mag()>=2;if(!E&&!A)return;if(!E||!A)return this._firstMove===void 0&&(this._firstMove=b),b-this._firstMove<100&&void 0;const z=c.y>0==g.y>0;return Jp(c)&&Jp(g)&&z}}const W0={panStep:100,bearingStep:15,pitchStep:10};class G0{constructor(){const c=W0;this._panStep=c.panStep,this._bearingStep=c.bearingStep,this._pitchStep=c.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(c){if(c.altKey||c.ctrlKey||c.metaKey)return;let g=0,b=0,E=0,A=0,z=0;switch(c.keyCode){case 61:case 107:case 171:case 187:g=1;break;case 189:case 109:case 173:g=-1;break;case 37:c.shiftKey?b=-1:(c.preventDefault(),A=-1);break;case 39:c.shiftKey?b=1:(c.preventDefault(),A=1);break;case 38:c.shiftKey?E=1:(c.preventDefault(),z=-1);break;case 40:c.shiftKey?E=-1:(c.preventDefault(),z=1);break;default:return}return this._rotationDisabled&&(b=0,E=0),{cameraAnimation:j=>{const K=j.getZoom();j.easeTo({duration:300,easeId:"keyboardHandler",easing:Hw,zoom:g?Math.round(K)+g*(c.shiftKey?2:1):K,bearing:j.getBearing()+b*this._bearingStep,pitch:j.getPitch()+E*this._pitchStep,offset:[-A*this._panStep,-z*this._panStep],center:j.getCenter()},{originalEvent:c})}}}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 Hw(C){return C*(2-C)}const q0=4.000244140625;class tm{constructor(c,g){this._map=c,this._el=c.getCanvasContainer(),this._handler=g,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,a.bindAll(["_onTimeout"],this)}setZoomRate(c){this._defaultZoomRate=c}setWheelZoomRate(c){this._wheelZoomRate=c}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(c){this.isEnabled()||(this._enabled=!0,this._aroundCenter=c&&c.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(c){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!this._map._metaPress)return;c.preventDefault()}let g=c.deltaMode===WheelEvent.DOM_DELTA_LINE?40*c.deltaY:c.deltaY;const b=a.exported.now(),E=b-(this._lastWheelEventTime||0);this._lastWheelEventTime=b,g!==0&&g%q0==0?this._type="wheel":g!==0&&Math.abs(g)<4?this._type="trackpad":E>400?(this._type=null,this._lastValue=g,this._timeout=setTimeout(this._onTimeout,40,c)):this._type||(this._type=Math.abs(E*g)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,g+=this._lastValue)),c.shiftKey&&g&&(g/=4),this._type&&(this._lastWheelEvent=c,this._delta-=g,this._active||this._start(c)),c.preventDefault()}_onTimeout(c){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(c)}_start(c){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 g=v.mousePos(this._el,c);this._around=a.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(g)),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 c=this._map.transform;if(this._delta!==0){const j=this._type==="wheel"&&Math.abs(this._delta)>q0?this._wheelZoomRate:this._defaultZoomRate;let K=2/(1+Math.exp(-Math.abs(this._delta*j)));this._delta<0&&K!==0&&(K=1/K);const Y=typeof this._targetZoom=="number"?c.zoomScale(this._targetZoom):c.scale;this._targetZoom=Math.min(c.maxZoom,Math.max(c.minZoom,c.scaleZoom(Y*K))),this._type==="wheel"&&(this._startZoom=c.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const g=typeof this._targetZoom=="number"?this._targetZoom:c.zoom,b=this._startZoom,E=this._easing;let A,z=!1;if(this._type==="wheel"&&b&&E){const j=Math.min((a.exported.now()-this._lastWheelEventTime)/200,1),K=E(j);A=a.number(b,g,K),j<1?this._frameId||(this._frameId=!0):z=!0}else A=g,z=!0;return this._active=!0,z&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!z,zoomDelta:A-c.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(c){let g=a.ease;if(this._prevEase){const b=this._prevEase,E=(a.exported.now()-b.start)/b.duration,A=b.easing(E+.01)-b.easing(E),z=.27/Math.sqrt(A*A+1e-4)*.01,j=Math.sqrt(.0729-z*z);g=a.bezier(z,j,.25,1)}return this._prevEase={start:a.exported.now(),duration:c,easing:g},g}reset(){this._active=!1}}class nm{constructor(c,g){this._clickZoom=c,this._tapZoom=g}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 rm{constructor(){this.reset()}reset(){this._active=!1}dblclick(c,g){return c.preventDefault(),{cameraAnimation:b=>{b.easeTo({duration:300,zoom:b.getZoom()+(c.shiftKey?-1:1),around:b.unproject(g)},{originalEvent:c})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class im{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(c,g,b){this._swipePoint||(this._tapTime&&c.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?b.length>0&&(this._swipePoint=g[0],this._swipeTouch=b[0].identifier):this._tap.touchstart(c,g,b))}touchmove(c,g,b){if(this._tapTime){if(this._swipePoint){if(b[0].identifier!==this._swipeTouch)return;const E=g[0],A=E.y-this._swipePoint.y;return this._swipePoint=E,c.preventDefault(),this._active=!0,{zoomDelta:A/128}}}else this._tap.touchmove(c,g,b)}touchend(c,g,b){this._tapTime?this._swipePoint&&b.length===0&&this.reset():this._tap.touchend(c,g,b)&&(this._tapTime=c.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xo{constructor(c,g,b){this._el=c,this._mousePan=g,this._touchPan=b}enable(c){this._inertiaOptions=c||{},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 Xs{constructor(c,g,b){this._pitchWithRotate=c.pitchWithRotate,this._mouseRotate=g,this._mousePitch=b}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 Z0{constructor(c,g,b,E){this._el=c,this._touchZoom=g,this._touchRotate=b,this._tapDragZoom=E,this._rotationDisabled=!1,this._enabled=!0}enable(c){this._touchZoom.enable(c),this._rotationDisabled||this._touchRotate.enable(c),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 Du=C=>C.zoom||C.drag||C.pitch||C.rotate;class om extends a.Event{}function id(C){return C.panDelta&&C.panDelta.mag()||C.zoomDelta||C.bearingDelta||C.pitchDelta}class X0{constructor(c,g){this._map=c,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new j0(c),this._bearingSnap=g.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(g),a.bindAll(["handleEvent","handleWindowEvent"],this);const b=this._el;this._listeners=[[b,"touchstart",{passive:!0}],[b,"touchmove",{passive:!1}],[b,"touchend",void 0],[b,"touchcancel",void 0],[b,"mousedown",void 0],[b,"mousemove",void 0],[b,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[b,"mouseover",void 0],[b,"mouseout",void 0],[b,"dblclick",void 0],[b,"click",void 0],[b,"keydown",{capture:!1}],[b,"keyup",void 0],[b,"wheel",{passive:!1}],[b,"contextmenu",void 0],[window,"blur",void 0]];for(const[E,A,z]of this._listeners)v.addEventListener(E,A,E===document?this.handleWindowEvent:this.handleEvent,z)}destroy(){for(const[c,g,b]of this._listeners)v.removeEventListener(c,g,c===document?this.handleWindowEvent:this.handleEvent,b)}_addDefaultHandlers(c){const g=this._map,b=g.getCanvasContainer();this._add("mapEvent",new Bw(g,c));const E=g.boxZoom=new H0(g,c);this._add("boxZoom",E);const A=new Vw,z=new rm;g.doubleClickZoom=new nm(z,A),this._add("tapZoom",A),this._add("clickZoom",z);const j=new im;this._add("tapDragZoom",j);const K=g.touchPitch=new em(g);this._add("touchPitch",K);const Y=new Cs(c),ie=new yn(c);g.dragRotate=new Xs(c,Y,ie),this._add("mouseRotate",Y,["mousePitch"]),this._add("mousePitch",ie,["mouseRotate"]);const ue=new rd(c),me=new K0(c,g);g.dragPan=new xo(b,ue,me),this._add("mousePan",ue),this._add("touchPan",me,["touchZoom","touchRotate"]);const Re=new jw,Se=new un;g.touchZoomRotate=new Z0(b,Se,Re,j),this._add("touchRotate",Re,["touchPan","touchZoom"]),this._add("touchZoom",Se,["touchPan","touchRotate"]);const Ie=g.scrollZoom=new tm(g,this);this._add("scrollZoom",Ie,["mousePan"]);const je=g.keyboard=new G0;this._add("keyboard",je),this._add("blockableMapEvent",new qs(g));for(const Xe of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])c.interactive&&c[Xe]&&g[Xe].enable(c[Xe])}_add(c,g,b){this._handlers.push({handlerName:c,handler:g,allowed:b}),this._handlersById[c]=g}stop(c){if(!this._updatingCamera){for(const{handler:g}of this._handlers)g.reset();this._inertia.clear(),this._fireEvents({},{},c),this._changes=[]}}isActive(){for(const{handler:c}of this._handlers)if(c.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(Du(this._eventsInProgress))||this.isZooming()}_blockedByActive(c,g,b){for(const E in c)if(E!==b&&(!g||g.indexOf(E)<0))return!0;return!1}handleWindowEvent(c){this.handleEvent(c,`${c.type}Window`)}_getMapTouches(c){const g=[];for(const b of c)this._el.contains(b.target)&&g.push(b);return g}handleEvent(c,g){if(c.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const b=c.type==="renderFrame"?void 0:c,E={needsRenderFrame:!1},A={},z={},j=c.touches,K=j?this._getMapTouches(j):void 0,Y=K?v.touchPos(this._el,K):v.mousePos(this._el,c);for(const{handlerName:me,handler:Re,allowed:Se}of this._handlers){if(!Re.isEnabled())continue;let Ie;this._blockedByActive(z,Se,me)?Re.reset():Re[g||c.type]&&(Ie=Re[g||c.type](c,Y,K),this.mergeHandlerResult(E,A,Ie,me,b),Ie&&Ie.needsRenderFrame&&this._triggerRenderFrame()),(Ie||Re.isActive())&&(z[me]=Re)}const ie={};for(const me in this._previousActiveHandlers)z[me]||(ie[me]=b);this._previousActiveHandlers=z,(Object.keys(ie).length||id(E))&&(this._changes.push([E,A,ie]),this._triggerRenderFrame()),(Object.keys(z).length||id(E))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ue}=E;ue&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ue(this._map))}mergeHandlerResult(c,g,b,E,A){if(!b)return;a.extend(c,b);const z={handlerName:E,originalEvent:b.originalEvent||A};b.zoomDelta!==void 0&&(g.zoom=z),b.panDelta!==void 0&&(g.drag=z),b.pitchDelta!==void 0&&(g.pitch=z),b.bearingDelta!==void 0&&(g.rotate=z)}_applyChanges(){const c={},g={},b={};for(const[E,A,z]of this._changes)E.panDelta&&(c.panDelta=(c.panDelta||new a.pointGeometry(0,0))._add(E.panDelta)),E.zoomDelta&&(c.zoomDelta=(c.zoomDelta||0)+E.zoomDelta),E.bearingDelta&&(c.bearingDelta=(c.bearingDelta||0)+E.bearingDelta),E.pitchDelta&&(c.pitchDelta=(c.pitchDelta||0)+E.pitchDelta),E.around!==void 0&&(c.around=E.around),E.pinchAround!==void 0&&(c.pinchAround=E.pinchAround),E.noInertia&&(c.noInertia=E.noInertia),a.extend(g,A),a.extend(b,z);this._updateMapTransform(c,g,b),this._changes=[]}_updateMapTransform(c,g,b){const E=this._map,A=E.transform,z=E.style&&E.style.terrain;if(!(id(c)||z&&this._drag))return this._fireEvents(g,b,!0);let{panDelta:j,zoomDelta:K,bearingDelta:Y,pitchDelta:ie,around:ue,pinchAround:me}=c;me!==void 0&&(ue=me),E._stop(!0),ue=ue||E.transform.centerPoint;const Re=A.pointLocation(j?ue.sub(j):ue);Y&&(A.bearing+=Y),ie&&(A.pitch+=ie),K&&(A.zoom+=K),z?g.drag&&!this._drag?(this._drag={center:A.centerPoint,lngLat:A.pointLocation(ue),point:ue,handlerName:g.drag.handlerName},E.fire(new a.Event("freezeElevation",{freeze:!0}))):this._drag&&b[this._drag.handlerName]?(E.fire(new a.Event("freezeElevation",{freeze:!1})),this._drag=null):g.drag&&this._drag&&(A.center=A.pointLocation(A.centerPoint.sub(j))):A.setLocationAtPoint(Re,ue),this._map._update(),c.noInertia||this._inertia.record(c),this._fireEvents(g,b,!0)}_fireEvents(c,g,b){const E=Du(this._eventsInProgress),A=Du(c),z={};for(const ie in c){const{originalEvent:ue}=c[ie];this._eventsInProgress[ie]||(z[`${ie}start`]=ue),this._eventsInProgress[ie]=c[ie]}!E&&A&&this._fireEvent("movestart",A.originalEvent);for(const ie in z)this._fireEvent(ie,z[ie]);A&&this._fireEvent("move",A.originalEvent);for(const ie in c){const{originalEvent:ue}=c[ie];this._fireEvent(ie,ue)}const j={};let K;for(const ie in this._eventsInProgress){const{handlerName:ue,originalEvent:me}=this._eventsInProgress[ie];this._handlersById[ue].isActive()||(delete this._eventsInProgress[ie],K=g[ue]||me,j[`${ie}end`]=K)}for(const ie in j)this._fireEvent(ie,j[ie]);const Y=Du(this._eventsInProgress);if(b&&(E||A)&&!Y){this._updatingCamera=!0;const ie=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),ue=me=>me!==0&&-this._bearingSnap<me&&me<this._bearingSnap;ie?(ue(ie.bearing||this._map.getBearing())&&(ie.bearing=0),this._map.easeTo(ie,{originalEvent:K})):(this._map.fire(new a.Event("moveend",{originalEvent:K})),ue(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(c,g){this._map.fire(new a.Event(c,g?{originalEvent:g}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(c=>{delete this._frameId,this.handleEvent(new om("renderFrame",{timeStamp:c})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}const ea={extend:(C,...c)=>a.extend(C,...c),run(C){C()},logToElement(C,c=!1,g="log"){const b=window.document.getElementById(g);b&&(c&&(b.innerHTML=""),b.innerHTML+=`<br>${C}`)}};class Hr extends a.Evented{constructor(c,g){super(),this._moving=!1,this._zooming=!1,this.transform=c,this._bearingSnap=g.bearingSnap,a.bindAll(["_renderFrameCallback"],this)}getCenter(){return new a.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(c,g){return this.jumpTo({center:c},g)}panBy(c,g,b){return c=a.pointGeometry.convert(c).mult(-1),this.panTo(this.transform.center,a.extend({offset:c},g),b)}panTo(c,g,b){return this.easeTo(a.extend({center:c},g),b)}getZoom(){return this.transform.zoom}setZoom(c,g){return this.jumpTo({zoom:c},g),this}zoomTo(c,g,b){return this.easeTo(a.extend({zoom:c},g),b)}zoomIn(c,g){return this.zoomTo(this.getZoom()+1,c,g),this}zoomOut(c,g){return this.zoomTo(this.getZoom()-1,c,g),this}getBearing(){return this.transform.bearing}setBearing(c,g){return this.jumpTo({bearing:c},g),this}getPadding(){return this.transform.padding}setPadding(c,g){return this.jumpTo({padding:c},g),this}rotateTo(c,g,b){return this.easeTo(a.extend({bearing:c},g),b)}resetNorth(c,g){return this.rotateTo(0,a.extend({duration:1e3},c),g),this}resetNorthPitch(c,g){return this.easeTo(a.extend({bearing:0,pitch:0,duration:1e3},c),g),this}snapToNorth(c,g){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(c,g):this}getPitch(){return this.transform.pitch}setPitch(c,g){return this.jumpTo({pitch:c},g),this}cameraForBounds(c,g){c=a.LngLatBounds.convert(c);const b=g&&g.bearing||0;return this._cameraForBoxAndBearing(c.getNorthWest(),c.getSouthEast(),b,g)}_cameraForBoxAndBearing(c,g,b,E){const A={top:0,bottom:0,right:0,left:0};if(typeof(E=a.extend({padding:A,offset:[0,0],maxZoom:this.transform.maxZoom},E)).padding=="number"){const ft=E.padding;E.padding={top:ft,bottom:ft,right:ft,left:ft}}E.padding=a.extend(A,E.padding);const z=this.transform,j=z.padding,K=z.project(a.LngLat.convert(c)),Y=z.project(a.LngLat.convert(g)),ie=K.rotate(-b*Math.PI/180),ue=Y.rotate(-b*Math.PI/180),me=new a.pointGeometry(Math.max(ie.x,ue.x),Math.max(ie.y,ue.y)),Re=new a.pointGeometry(Math.min(ie.x,ue.x),Math.min(ie.y,ue.y)),Se=me.sub(Re),Ie=(z.width-(j.left+j.right+E.padding.left+E.padding.right))/Se.x,je=(z.height-(j.top+j.bottom+E.padding.top+E.padding.bottom))/Se.y;if(je<0||Ie<0)return void a.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const Xe=Math.min(z.scaleZoom(z.scale*Math.min(Ie,je)),E.maxZoom),st=a.pointGeometry.convert(E.offset),Oe=new a.pointGeometry((E.padding.left-E.padding.right)/2,(E.padding.top-E.padding.bottom)/2).rotate(b*Math.PI/180),vt=st.add(Oe).mult(z.scale/z.zoomScale(Xe));return{center:z.unproject(K.add(Y).div(2).sub(vt)),zoom:Xe,bearing:b}}fitBounds(c,g,b){return this._fitInternal(this.cameraForBounds(c,g),g,b)}fitScreenCoordinates(c,g,b,E,A){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(a.pointGeometry.convert(c)),this.transform.pointLocation(a.pointGeometry.convert(g)),b,E),E,A)}_fitInternal(c,g,b){return c?(delete(g=a.extend(c,g)).padding,g.linear?this.easeTo(g,b):this.flyTo(g,b)):this}jumpTo(c,g){this.stop();const b=this.transform;let E=!1,A=!1,z=!1;return"zoom"in c&&b.zoom!==+c.zoom&&(E=!0,b.zoom=+c.zoom),c.center!==void 0&&(b.center=a.LngLat.convert(c.center)),"bearing"in c&&b.bearing!==+c.bearing&&(A=!0,b.bearing=+c.bearing),"pitch"in c&&b.pitch!==+c.pitch&&(z=!0,b.pitch=+c.pitch),c.padding==null||b.isPaddingEqual(c.padding)||(b.padding=c.padding),this.fire(new a.Event("movestart",g)).fire(new a.Event("move",g)),E&&this.fire(new a.Event("zoomstart",g)).fire(new a.Event("zoom",g)).fire(new a.Event("zoomend",g)),A&&this.fire(new a.Event("rotatestart",g)).fire(new a.Event("rotate",g)).fire(new a.Event("rotateend",g)),z&&this.fire(new a.Event("pitchstart",g)).fire(new a.Event("pitch",g)).fire(new a.Event("pitchend",g)),this.fire(new a.Event("moveend",g))}calculateCameraOptionsFromTo(c,g,b,E=0){const A=a.MercatorCoordinate.fromLngLat(c,g),z=a.MercatorCoordinate.fromLngLat(b,E),j=z.x-A.x,K=z.y-A.y,Y=z.z-A.z,ie=Math.hypot(j,K,Y);if(ie===0)throw new Error("Can't calculate camera options with same From and To");const ue=Math.hypot(j,K),me=this.transform.scaleZoom(this.transform.cameraToCenterDistance/ie/this.transform.tileSize),Re=180*Math.atan2(j,-K)/Math.PI;let Se=180*Math.acos(ue/ie)/Math.PI;return Se=Y<0?90-Se:90+Se,{center:z.toLngLat(),zoom:me,pitch:Se,bearing:Re}}easeTo(c,g){this._stop(!1,c.easeId),((c=a.extend({offset:[0,0],duration:500,easing:a.ease},c)).animate===!1||!c.essential&&a.exported.prefersReducedMotion)&&(c.duration=0);const b=this.transform,E=this.getZoom(),A=this.getBearing(),z=this.getPitch(),j=this.getPadding(),K="zoom"in c?+c.zoom:E,Y="bearing"in c?this._normalizeBearing(c.bearing,A):A,ie="pitch"in c?+c.pitch:z,ue="padding"in c?c.padding:b.padding,me=a.pointGeometry.convert(c.offset);let Re=b.centerPoint.add(me);const Se=b.pointLocation(Re),Ie=a.LngLat.convert(c.center||Se);this._normalizeCenter(Ie);const je=b.project(Se),Xe=b.project(Ie).sub(je),st=b.zoomScale(K-E);let Oe,vt;c.around&&(Oe=a.LngLat.convert(c.around),vt=b.locationPoint(Oe));const ft={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||K!==E,this._rotating=this._rotating||A!==Y,this._pitching=this._pitching||ie!==z,this._padding=!b.isPaddingEqual(ue),this._easeId=c.easeId,this._prepareEase(g,c.noMoveStart,ft),this._ease(Et=>{if(this._zooming&&(b.zoom=a.number(E,K,Et)),this._rotating&&(b.bearing=a.number(A,Y,Et)),this._pitching&&(b.pitch=a.number(z,ie,Et)),this._padding&&(b.interpolatePadding(j,ue,Et),Re=b.centerPoint.add(me)),Oe)b.setLocationAtPoint(Oe,vt);else{const It=b.zoomScale(b.zoom-E),Ht=K>E?Math.min(2,st):Math.max(.5,st),Ct=Math.pow(Ht,1-Et),fn=b.unproject(je.add(Xe.mult(Et*Ct)).mult(It));b.setLocationAtPoint(b.renderWorldCopies?fn.wrap():fn,Re)}this._fireMoveEvents(g)},Et=>{this._afterEase(g,Et)},c),this}_prepareEase(c,g,b={}){this._moving=!0,this.fire(new a.Event("freezeElevation",{freeze:!0})),g||b.moving||this.fire(new a.Event("movestart",c)),this._zooming&&!b.zooming&&this.fire(new a.Event("zoomstart",c)),this._rotating&&!b.rotating&&this.fire(new a.Event("rotatestart",c)),this._pitching&&!b.pitching&&this.fire(new a.Event("pitchstart",c))}_fireMoveEvents(c){this.fire(new a.Event("move",c)),this._zooming&&this.fire(new a.Event("zoom",c)),this._rotating&&this.fire(new a.Event("rotate",c)),this._pitching&&this.fire(new a.Event("pitch",c))}_afterEase(c,g){if(this._easeId&&g&&this._easeId===g)return;delete this._easeId,this.fire(new a.Event("freezeElevation",{freeze:!1}));const b=this._zooming,E=this._rotating,A=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,b&&this.fire(new a.Event("zoomend",c)),E&&this.fire(new a.Event("rotateend",c)),A&&this.fire(new a.Event("pitchend",c)),this.fire(new a.Event("moveend",c))}flyTo(c,g){if(!c.essential&&a.exported.prefersReducedMotion){const kn=a.pick(c,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,g)}this.stop(),c=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},c);const b=this.transform,E=this.getZoom(),A=this.getBearing(),z=this.getPitch(),j=this.getPadding(),K="zoom"in c?a.clamp(+c.zoom,b.minZoom,b.maxZoom):E,Y="bearing"in c?this._normalizeBearing(c.bearing,A):A,ie="pitch"in c?+c.pitch:z,ue="padding"in c?c.padding:b.padding,me=b.zoomScale(K-E),Re=a.pointGeometry.convert(c.offset);let Se=b.centerPoint.add(Re);const Ie=b.pointLocation(Se),je=a.LngLat.convert(c.center||Ie);this._normalizeCenter(je);const Xe=b.project(Ie),st=b.project(je).sub(Xe);let Oe=c.curve;const vt=Math.max(b.width,b.height),ft=vt/me,Et=st.mag();if("minZoom"in c){const kn=a.clamp(Math.min(c.minZoom,E,K),b.minZoom,b.maxZoom),vr=vt/b.zoomScale(kn-E);Oe=Math.sqrt(vr/Et*2)}const It=Oe*Oe;function Ht(kn){const vr=(ft*ft-vt*vt+(kn?-1:1)*It*It*Et*Et)/(2*(kn?ft:vt)*It*Et);return Math.log(Math.sqrt(vr*vr+1)-vr)}function Ct(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function fn(kn){return(Math.exp(kn)+Math.exp(-kn))/2}const rn=Ht(0);let mn=function(kn){return fn(rn)/fn(rn+Oe*kn)},Hn=function(kn){return vt*((fn(rn)*(Ct(vr=rn+Oe*kn)/fn(vr))-Ct(rn))/It)/Et;var vr},qn=(Ht(1)-rn)/Oe;if(Math.abs(Et)<1e-6||!isFinite(qn)){if(Math.abs(vt-ft)<1e-6)return this.easeTo(c,g);const kn=ft<vt?-1:1;qn=Math.abs(Math.log(ft/vt))/Oe,Hn=function(){return 0},mn=function(vr){return Math.exp(kn*Oe*vr)}}return c.duration="duration"in c?+c.duration:1e3*qn/("screenSpeed"in c?+c.screenSpeed/Oe:+c.speed),c.maxDuration&&c.duration>c.maxDuration&&(c.duration=0),this._zooming=!0,this._rotating=A!==Y,this._pitching=ie!==z,this._padding=!b.isPaddingEqual(ue),this._prepareEase(g,!1),this._ease(kn=>{const vr=kn*qn,yr=1/mn(vr);b.zoom=kn===1?K:E+b.scaleZoom(yr),this._rotating&&(b.bearing=a.number(A,Y,kn)),this._pitching&&(b.pitch=a.number(z,ie,kn)),this._padding&&(b.interpolatePadding(j,ue,kn),Se=b.centerPoint.add(Re));const sr=kn===1?je:b.unproject(Xe.add(st.mult(Hn(vr))).mult(yr));b.setLocationAtPoint(b.renderWorldCopies?sr.wrap():sr,Se),this._fireMoveEvents(g)},()=>this._afterEase(g),c),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(c,g){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const b=this._onEaseEnd;delete this._onEaseEnd,b.call(this,g)}if(!c){const b=this.handlers;b&&b.stop(!1)}return this}_ease(c,g,b){b.animate===!1||b.duration===0?(c(1),g()):(this._easeStart=a.exported.now(),this._easeOptions=b,this._onEaseFrame=c,this._onEaseEnd=g,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const c=Math.min((a.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(c)),c<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(c,g){c=a.wrap(c,-180,180);const b=Math.abs(c-g);return Math.abs(c-360-g)<b&&(c-=360),Math.abs(c+360-g)<b&&(c+=360),c}_normalizeCenter(c){const g=this.transform;if(!g.renderWorldCopies||g.lngRange)return;const b=c.lng-g.center.lng;c.lng+=b>180?-360:b<-180?360:0}}class od{constructor(c={}){this.options=c,a.bindAll(["_toggleAttribution","_updateData","_updateCompact","_updateCompactMinimize"],this)}getDefaultPosition(){return"bottom-right"}onAdd(c){return this._map=c,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(c,g){const b=this._map._getUIString(`AttributionControl.${g}`);c.title=b,c.setAttribute("aria-label",b)}_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(c){!c||c.sourceDataType!=="metadata"&&c.sourceDataType!=="visibility"&&c.dataType!=="style"&&c.type!=="terrain"||this._updateAttributions()}_updateAttributions(){if(!this._map.style)return;let c=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?c=c.concat(this.options.customAttribution.map(E=>typeof E!="string"?"":E)):typeof this.options.customAttribution=="string"&&c.push(this.options.customAttribution)),this._map.style.stylesheet){const E=this._map.style.stylesheet;this.styleOwner=E.owner,this.styleId=E.id}const g=this._map.style.sourceCaches;for(const E in g){const A=g[E];if(A.used||A.usedForTerrain){const z=A.getSource();z.attribution&&c.indexOf(z.attribution)<0&&c.push(z.attribution)}}c=c.filter(E=>String(E).trim()),c.sort((E,A)=>E.length-A.length),c=c.filter((E,A)=>{for(let z=A+1;z<c.length;z++)if(c[z].indexOf(E)>=0)return!1;return!0});const b=c.join(" | ");b!==this._attribHTML&&(this._attribHTML=b,c.length?(this._innerContainer.innerHTML=b,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 Vf{constructor(c={}){this.options=c,a.bindAll(["_updateCompact"],this)}getDefaultPosition(){return"bottom-left"}onAdd(c){this._map=c,this._compact=this.options&&this.options.compact,this._container=v.create("div","maplibregl-ctrl mapboxgl-ctrl");const g=v.create("a","maplibregl-ctrl-logo mapboxgl-ctrl-logo");return g.target="_blank",g.rel="noopener nofollow",g.href="https://maplibre.org/",g.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),g.setAttribute("rel","noopener nofollow"),this._container.appendChild(g),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 c=this._container.children;if(c.length){const g=c[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&g.classList.add("maplibregl-compact","mapboxgl-compact"):g.classList.remove("maplibregl-compact","mapboxgl-compact")}}}class Y0{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(c){const g=++this._id;return this._queue.push({callback:c,id:g,cancelled:!1}),g}remove(c){const g=this._currentlyRunning,b=g?this._queue.concat(g):this._queue;for(const E of b)if(E.id===c)return void(E.cancelled=!0)}run(c=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const g=this._currentlyRunning=this._queue;this._queue=[];for(const b of g)if(!b.cancelled&&(b.callback(c),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const Q0={"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"},J0={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},Kw={showCompass:!0,showZoom:!0,visualizePitch:!1};class ja{constructor(c,g,b=!1){this._clickTolerance=10,this.element=g,this.mouseRotate=new Cs({clickTolerance:c.dragRotate._mouseRotate._clickTolerance}),this.map=c,b&&(this.mousePitch=new yn({clickTolerance:c.dragRotate._mousePitch._clickTolerance})),a.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),v.addEventListener(g,"mousedown",this.mousedown),v.addEventListener(g,"touchstart",this.touchstart,{passive:!1}),v.addEventListener(g,"touchmove",this.touchmove),v.addEventListener(g,"touchend",this.touchend),v.addEventListener(g,"touchcancel",this.reset)}down(c,g){this.mouseRotate.mousedown(c,g),this.mousePitch&&this.mousePitch.mousedown(c,g),v.disableDrag()}move(c,g){const b=this.map,E=this.mouseRotate.mousemoveWindow(c,g);if(E&&E.bearingDelta&&b.setBearing(b.getBearing()+E.bearingDelta),this.mousePitch){const A=this.mousePitch.mousemoveWindow(c,g);A&&A.pitchDelta&&b.setPitch(b.getPitch()+A.pitchDelta)}}off(){const c=this.element;v.removeEventListener(c,"mousedown",this.mousedown),v.removeEventListener(c,"touchstart",this.touchstart,{passive:!1}),v.removeEventListener(c,"touchmove",this.touchmove),v.removeEventListener(c,"touchend",this.touchend),v.removeEventListener(c,"touchcancel",this.reset),this.offTemp()}offTemp(){v.enableDrag(),v.removeEventListener(window,"mousemove",this.mousemove),v.removeEventListener(window,"mouseup",this.mouseup)}mousedown(c){this.down(a.extend({},c,{ctrlKey:!0,preventDefault:()=>c.preventDefault()}),v.mousePos(this.element,c)),v.addEventListener(window,"mousemove",this.mousemove),v.addEventListener(window,"mouseup",this.mouseup)}mousemove(c){this.move(c,v.mousePos(this.element,c))}mouseup(c){this.mouseRotate.mouseupWindow(c),this.mousePitch&&this.mousePitch.mouseupWindow(c),this.offTemp()}touchstart(c){c.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=v.touchPos(this.element,c.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>c.preventDefault()},this._startPos))}touchmove(c){c.targetTouches.length!==1?this.reset():(this._lastPos=v.touchPos(this.element,c.targetTouches)[0],this.move({preventDefault:()=>c.preventDefault()},this._lastPos))}touchend(c){c.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 ad(C,c,g){if(C=new a.LngLat(C.lng,C.lat),c){const b=new a.LngLat(C.lng-360,C.lat),E=new a.LngLat(C.lng+360,C.lat),A=g.locationPoint(C).distSqr(c);g.locationPoint(b).distSqr(c)<A?C=b:g.locationPoint(E).distSqr(c)<A&&(C=E)}for(;Math.abs(C.lng-g.center.lng)>180;){const b=g.locationPoint(C);if(b.x>=0&&b.y>=0&&b.x<=g.width&&b.y<=g.height)break;C.lng>g.center.lng?C.lng-=360:C.lng+=360}return C}const wn={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 Dn(C,c,g){const b=C.classList;for(const E in wn)b.remove(`maplibregl-${g}-anchor-${E}`,`mapboxgl-${g}-anchor-${E}`);b.add(`maplibregl-${g}-anchor-${c}`,`mapboxgl-${g}-anchor-${c}`)}class Ou extends a.Evented{constructor(c,g){if(super(),(c instanceof HTMLElement||g)&&(c=a.extend({element:c},g)),a.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=c&&c.anchor||"center",this._color=c&&c.color||"#3FB1CE",this._scale=c&&c.scale||1,this._draggable=c&&c.draggable||!1,this._clickTolerance=c&&c.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=c&&c.rotation||0,this._rotationAlignment=c&&c.rotationAlignment||"auto",this._pitchAlignment=c&&c.pitchAlignment&&c.pitchAlignment!=="auto"?c.pitchAlignment:this._rotationAlignment,c&&c.element)this._element=c.element,this._offset=a.pointGeometry.convert(c&&c.offset||[0,0]);else{this._defaultMarker=!0,this._element=v.create("div"),this._element.setAttribute("aria-label","Map marker");const b=v.createNS("http://www.w3.org/2000/svg","svg"),E=41,A=27;b.setAttributeNS(null,"display","block"),b.setAttributeNS(null,"height",`${E}px`),b.setAttributeNS(null,"width",`${A}px`),b.setAttributeNS(null,"viewBox",`0 0 ${A} ${E}`);const z=v.createNS("http://www.w3.org/2000/svg","g");z.setAttributeNS(null,"stroke","none"),z.setAttributeNS(null,"stroke-width","1"),z.setAttributeNS(null,"fill","none"),z.setAttributeNS(null,"fill-rule","evenodd");const j=v.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"fill-rule","nonzero");const K=v.createNS("http://www.w3.org/2000/svg","g");K.setAttributeNS(null,"transform","translate(3.0, 29.0)"),K.setAttributeNS(null,"fill","#000000");const Y=[{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 st of Y){const Oe=v.createNS("http://www.w3.org/2000/svg","ellipse");Oe.setAttributeNS(null,"opacity","0.04"),Oe.setAttributeNS(null,"cx","10.5"),Oe.setAttributeNS(null,"cy","5.80029008"),Oe.setAttributeNS(null,"rx",st.rx),Oe.setAttributeNS(null,"ry",st.ry),K.appendChild(Oe)}const ie=v.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"fill",this._color);const ue=v.createNS("http://www.w3.org/2000/svg","path");ue.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"),ie.appendChild(ue);const me=v.createNS("http://www.w3.org/2000/svg","g");me.setAttributeNS(null,"opacity","0.25"),me.setAttributeNS(null,"fill","#000000");const Re=v.createNS("http://www.w3.org/2000/svg","path");Re.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"),me.appendChild(Re);const Se=v.createNS("http://www.w3.org/2000/svg","g");Se.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Se.setAttributeNS(null,"fill","#FFFFFF");const Ie=v.createNS("http://www.w3.org/2000/svg","g");Ie.setAttributeNS(null,"transform","translate(8.0, 8.0)");const je=v.createNS("http://www.w3.org/2000/svg","circle");je.setAttributeNS(null,"fill","#000000"),je.setAttributeNS(null,"opacity","0.25"),je.setAttributeNS(null,"cx","5.5"),je.setAttributeNS(null,"cy","5.5"),je.setAttributeNS(null,"r","5.4999962");const Xe=v.createNS("http://www.w3.org/2000/svg","circle");Xe.setAttributeNS(null,"fill","#FFFFFF"),Xe.setAttributeNS(null,"cx","5.5"),Xe.setAttributeNS(null,"cy","5.5"),Xe.setAttributeNS(null,"r","5.4999962"),Ie.appendChild(je),Ie.appendChild(Xe),j.appendChild(K),j.appendChild(ie),j.appendChild(me),j.appendChild(Se),j.appendChild(Ie),b.appendChild(j),b.setAttributeNS(null,"height",E*this._scale+"px"),b.setAttributeNS(null,"width",A*this._scale+"px"),this._element.appendChild(b),this._offset=a.pointGeometry.convert(c&&c.offset||[0,-14])}this._element.classList.add("maplibregl-marker","mapboxgl-marker"),this._element.addEventListener("dragstart",b=>{b.preventDefault()}),this._element.addEventListener("mousedown",b=>{b.preventDefault()}),Dn(this._element,this._anchor,"marker"),this._popup=null}addTo(c){return this.remove(),this._map=c,c.getCanvasContainer().appendChild(this._element),c.on("move",this._update),c.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(c){return this._lngLat=a.LngLat.convert(c),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(c){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),c){if(!("offset"in c.options)){const E=Math.sqrt(Math.pow(13.5,2)/2);c.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[E,-1*(38.1-13.5+E)],"bottom-right":[-E,-1*(38.1-13.5+E)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=c,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(c){const g=c.code,b=c.charCode||c.keyCode;g!=="Space"&&g!=="Enter"&&b!==32&&b!==13||this.togglePopup()}_onMapClick(c){const g=c.originalEvent.target,b=this._element;this._popup&&(g===b||b.contains(g))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const c=this._popup;return c?(c.isOpen()?c.remove():c.addTo(this._map),this):this}_update(c){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=ad(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let g="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?g=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(g=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let b="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?b="rotateX(0deg)":this._pitchAlignment==="map"&&(b=`rotateX(${this._map.getPitch()}deg)`),c&&c.type!=="moveend"||(this._pos=this._pos.round()),v.setTransform(this._element,`${wn[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${b} ${g}`),this._map.style&&this._map.style.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const E=this._map.unproject(this._pos),A=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=E.distanceTo(this._lngLat)>20*A?"0.2":"1.0",this._opacityTimeout=null},100))}getOffset(){return this._offset}setOffset(c){return this._offset=a.pointGeometry.convert(c),this._update(),this}_onMove(c){if(!this._isDragging){const g=this._clickTolerance||this._map._clickTolerance;this._isDragging=c.point.dist(this._pointerdownPos)>=g}this._isDragging&&(this._pos=c.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 a.Event("dragstart"))),this.fire(new a.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 a.Event("dragend")),this._state="inactive"}_addDragHandler(c){this._element.contains(c.originalEvent.target)&&(c.preventDefault(),this._positionDelta=c.point.sub(this._pos).add(this._offset),this._pointerdownPos=c.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(c){return this._draggable=!!c,this._map&&(c?(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(c){return this._rotation=c||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(c){return this._rotationAlignment=c||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(c){return this._pitchAlignment=c&&c!=="auto"?c:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const am={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ys,ji=0,Qs=!1;const Ha={maxWidth:100,unit:"metric"};function ey(C,c,g){const b=g&&g.maxWidth||100,E=C._container.clientHeight/2,A=C.unproject([0,E]),z=C.unproject([b,E]),j=A.distanceTo(z);if(g&&g.unit==="imperial"){const K=3.2808*j;K>5280?Js(c,b,K/5280,C._getUIString("ScaleControl.Miles")):Js(c,b,K,C._getUIString("ScaleControl.Feet"))}else g&&g.unit==="nautical"?Js(c,b,j/1852,C._getUIString("ScaleControl.NauticalMiles")):j>=1e3?Js(c,b,j/1e3,C._getUIString("ScaleControl.Kilometers")):Js(c,b,j,C._getUIString("ScaleControl.Meters"))}function Js(C,c,g,b){const E=function(A){const z=Math.pow(10,`${Math.floor(A)}`.length-1);let j=A/z;return j=j>=10?10:j>=5?5:j>=3?3:j>=2?2:j>=1?1:function(K){const Y=Math.pow(10,Math.ceil(-Math.log(K)/Math.LN10));return Math.round(K*Y)/Y}(j),z*j}(g);C.style.width=c*(E/g)+"px",C.innerHTML=`${E} ${b}`}const ii={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},gi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function sm(C){if(C){if(typeof C=="number"){const c=Math.round(Math.sqrt(.5*Math.pow(C,2)));return{center:new a.pointGeometry(0,0),top:new a.pointGeometry(0,C),"top-left":new a.pointGeometry(c,c),"top-right":new a.pointGeometry(-c,c),bottom:new a.pointGeometry(0,-C),"bottom-left":new a.pointGeometry(c,-c),"bottom-right":new a.pointGeometry(-c,-c),left:new a.pointGeometry(C,0),right:new a.pointGeometry(-C,0)}}if(C instanceof a.pointGeometry||Array.isArray(C)){const c=a.pointGeometry.convert(C);return{center:c,top:c,"top-left":c,"top-right":c,bottom:c,"bottom-left":c,"bottom-right":c,left:c,right:c}}return{center:a.pointGeometry.convert(C.center||[0,0]),top:a.pointGeometry.convert(C.top||[0,0]),"top-left":a.pointGeometry.convert(C["top-left"]||[0,0]),"top-right":a.pointGeometry.convert(C["top-right"]||[0,0]),bottom:a.pointGeometry.convert(C.bottom||[0,0]),"bottom-left":a.pointGeometry.convert(C["bottom-left"]||[0,0]),"bottom-right":a.pointGeometry.convert(C["bottom-right"]||[0,0]),left:a.pointGeometry.convert(C.left||[0,0]),right:a.pointGeometry.convert(C.right||[0,0])}}return sm(new a.pointGeometry(0,0))}const Nl={supported:u,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:class extends Hr{constructor(C){var c;if(a.PerformanceUtils.mark(a.PerformanceMarkers.create),(C=a.extend({},J0,C)).minZoom!=null&&C.maxZoom!=null&&C.minZoom>C.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(C.minPitch!=null&&C.maxPitch!=null&&C.minPitch>C.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(C.minPitch!=null&&C.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(C.maxPitch!=null&&C.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Yc(C.minZoom,C.maxZoom,C.minPitch,C.maxPitch,C.renderWorldCopies),{bearingSnap:C.bearingSnap}),this._interactive=C.interactive,this._cooperativeGestures=C.cooperativeGestures,this._maxTileCacheSize=C.maxTileCacheSize,this._failIfMajorPerformanceCaveat=C.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=C.preserveDrawingBuffer,this._antialias=C.antialias,this._trackResize=C.trackResize,this._bearingSnap=C.bearingSnap,this._refreshExpiredTiles=C.refreshExpiredTiles,this._fadeDuration=C.fadeDuration,this._crossSourceCollisions=C.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=C.collectResourceTiming,this._renderTaskQueue=new Y0,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},Q0,C.locale),this._clickTolerance=C.clickTolerance,this._pixelRatio=(c=C.pixelRatio)!==null&&c!==void 0?c:devicePixelRatio,this._requestManager=new x(C.transformRequest),typeof C.container=="string"){if(this._container=document.getElementById(C.container),!this._container)throw new Error(`Container '${C.container}' not found.`)}else{if(!(C.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=C.container}if(C.maxBounds&&this.setMaxBounds(C.maxBounds),a.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 X0(this,C),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=C.hash&&new $0(typeof C.hash=="string"&&C.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:C.center,zoom:C.zoom,bearing:C.bearing,pitch:C.pitch}),C.bounds&&(this.resize(),this.fitBounds(C.bounds,a.extend({},C.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=C.localIdeographFontFamily,C.style&&this.setStyle(C.style,{localIdeographFontFamily:C.localIdeographFontFamily}),C.attributionControl&&this.addControl(new od({customAttribution:C.customAttribution})),C.maplibreLogo&&this.addControl(new Vf,C.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",g=>{this._update(g.dataType==="style"),this.fire(new a.Event(`${g.dataType}data`,g))}),this.on("dataloading",g=>{this.fire(new a.Event(`${g.dataType}dataloading`,g))}),this.on("dataabort",g=>{this.fire(new a.Event("sourcedataabort",g))})}_getMapId(){return this._mapId}addControl(C,c){if(c===void 0&&(c=C.getDefaultPosition?C.getDefaultPosition():"top-right"),!C||!C.onAdd)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const g=C.onAdd(this);this._controls.push(C);const b=this._controlPositions[c];return c.indexOf("bottom")!==-1?b.insertBefore(g,b.firstChild):b.appendChild(g),this}removeControl(C){if(!C||!C.onRemove)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const c=this._controls.indexOf(C);return c>-1&&this._controls.splice(c,1),C.onRemove(this),this}hasControl(C){return this._controls.indexOf(C)>-1}calculateCameraOptionsFromTo(C,c,g,b){return b==null&&this.style.terrain&&(b=this.transform.getElevation(g,this.style.terrain)),super.calculateCameraOptionsFromTo(C,c,g,b)}resize(C){const c=this._containerDimensions(),g=c[0],b=c[1];this._resizeCanvas(g,b,this.getPixelRatio()),this.transform.resize(g,b),this.painter.resize(g,b,this.getPixelRatio());const E=!this._moving;return E&&(this.stop(),this.fire(new a.Event("movestart",C)).fire(new a.Event("move",C))),this.fire(new a.Event("resize",C)),E&&this.fire(new a.Event("moveend",C)),this}getPixelRatio(){return this._pixelRatio}setPixelRatio(C){const[c,g]=this._containerDimensions();this._pixelRatio=C,this._resizeCanvas(c,g,C),this.painter.resize(c,g,C)}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(C){return this.transform.setMaxBounds(a.LngLatBounds.convert(C)),this._update()}setMinZoom(C){if((C=C==null?-2:C)>=-2&&C<=this.transform.maxZoom)return this.transform.minZoom=C,this._update(),this.getZoom()<C&&this.setZoom(C),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(C){if((C=C==null?22:C)>=this.transform.minZoom)return this.transform.maxZoom=C,this._update(),this.getZoom()>C&&this.setZoom(C),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(C){if((C=C==null?0:C)<0)throw new Error("minPitch must be greater than or equal to 0");if(C>=0&&C<=this.transform.maxPitch)return this.transform.minPitch=C,this._update(),this.getPitch()<C&&this.setPitch(C),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(C){if((C=C==null?60:C)>85)throw new Error("maxPitch must be less than or equal to 85");if(C>=this.transform.minPitch)return this.transform.maxPitch=C,this._update(),this.getPitch()>C&&this.setPitch(C),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(C){return this.transform.renderWorldCopies=C,this._update()}project(C){return this.transform.locationPoint(a.LngLat.convert(C),this.style&&this.style.terrain)}unproject(C){return this.transform.pointLocation(a.pointGeometry.convert(C),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(C,c,g){if(C==="mouseenter"||C==="mouseover"){let b=!1;return{layer:c,listener:g,delegates:{mousemove:A=>{const z=this.getLayer(c)?this.queryRenderedFeatures(A.point,{layers:[c]}):[];z.length?b||(b=!0,g.call(this,new Lo(C,this,A.originalEvent,{features:z}))):b=!1},mouseout:()=>{b=!1}}}}if(C==="mouseleave"||C==="mouseout"){let b=!1;return{layer:c,listener:g,delegates:{mousemove:z=>{(this.getLayer(c)?this.queryRenderedFeatures(z.point,{layers:[c]}):[]).length?b=!0:b&&(b=!1,g.call(this,new Lo(C,this,z.originalEvent)))},mouseout:z=>{b&&(b=!1,g.call(this,new Lo(C,this,z.originalEvent)))}}}}{const b=E=>{const A=this.getLayer(c)?this.queryRenderedFeatures(E.point,{layers:[c]}):[];A.length&&(E.features=A,g.call(this,E),delete E.features)};return{layer:c,listener:g,delegates:{[C]:b}}}}on(C,c,g){if(g===void 0)return super.on(C,c);const b=this._createDelegatedListener(C,c,g);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[C]=this._delegatedListeners[C]||[],this._delegatedListeners[C].push(b);for(const E in b.delegates)this.on(E,b.delegates[E]);return this}once(C,c,g){if(g===void 0)return super.once(C,c);const b=this._createDelegatedListener(C,c,g);for(const E in b.delegates)this.once(E,b.delegates[E]);return this}off(C,c,g){return g===void 0?super.off(C,c):(this._delegatedListeners&&this._delegatedListeners[C]&&(b=>{const E=this._delegatedListeners[C];for(let A=0;A<E.length;A++){const z=E[A];if(z.layer===c&&z.listener===g){for(const j in z.delegates)this.off(j,z.delegates[j]);return E.splice(A,1),this}}})(),this)}queryRenderedFeatures(C,c){if(!this.style)return[];let g;if(c!==void 0||C===void 0||C instanceof a.pointGeometry||Array.isArray(C)||(c=C,C=void 0),c=c||{},(C=C||[[0,0],[this.transform.width,this.transform.height]])instanceof a.pointGeometry||typeof C[0]=="number")g=[a.pointGeometry.convert(C)];else{const b=a.pointGeometry.convert(C[0]),E=a.pointGeometry.convert(C[1]);g=[b,new a.pointGeometry(E.x,b.y),E,new a.pointGeometry(b.x,E.y),b]}return this.style.queryRenderedFeatures(g,c,this.transform)}querySourceFeatures(C,c){return this.style.querySourceFeatures(C,c)}setStyle(C,c){return(c=a.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},c)).diff!==!1&&c.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&C?(this._diffStyle(C,c),this):(this._localIdeographFontFamily=c.localIdeographFontFamily,this._updateStyle(C,c))}setTransformRequest(C){return this._requestManager.setTransformRequest(C),this}_getUIString(C){const c=this._locale[C];if(c==null)throw new Error(`Missing UI string '${C}'`);return c}_updateStyle(C,c){return this.style&&(this.style.setEventedParent(null),this.style._remove()),C?(this.style=new Vr(this,c||{}),this.style.setEventedParent(this,{style:this.style}),typeof C=="string"?this.style.loadURL(C):this.style.loadJSON(C),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Vr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(C,c){if(typeof C=="string"){const g=this._requestManager.transformRequest(C,a.ResourceType.Style);a.getJSON(g,(b,E)=>{b?this.fire(new a.ErrorEvent(b)):E&&this._updateDiff(E,c)})}else typeof C=="object"&&this._updateDiff(C,c)}_updateDiff(C,c){try{this.style.setState(C)&&this._update(!0)}catch(g){a.warnOnce(`Unable to perform style diff: ${g.message||g.error||g}. Rebuilding the style from scratch.`),this._updateStyle(C,c)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.warnOnce("There is no style added to the map.")}addSource(C,c){return this._lazyInitEmptyStyle(),this.style.addSource(C,c),this._update(!0)}isSourceLoaded(C){const c=this.style&&this.style.sourceCaches[C];if(c!==void 0)return c.loaded();this.fire(new a.ErrorEvent(new Error(`There is no source with ID '${C}'`)))}setTerrain(C){return this.style.setTerrain(C),this}getTerrain(){return this.style.terrain&&this.style.terrain.options}areTilesLoaded(){const C=this.style&&this.style.sourceCaches;for(const c in C){const g=C[c]._tiles;for(const b in g){const E=g[b];if(E.state!=="loaded"&&E.state!=="errored")return!1}}return!0}addSourceType(C,c,g){return this._lazyInitEmptyStyle(),this.style.addSourceType(C,c,g)}removeSource(C){return this.style.removeSource(C),this._update(!0)}getSource(C){return this.style.getSource(C)}addImage(C,c,{pixelRatio:g=1,sdf:b=!1,stretchX:E,stretchY:A,content:z}={}){if(this._lazyInitEmptyStyle(),c instanceof HTMLImageElement||a.isImageBitmap(c)){const{width:j,height:K,data:Y}=a.exported.getImageData(c);this.style.addImage(C,{data:new a.RGBAImage({width:j,height:K},Y),pixelRatio:g,stretchX:E,stretchY:A,content:z,sdf:b,version:0})}else{if(c.width===void 0||c.height===void 0)return this.fire(new a.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:j,height:K,data:Y}=c,ie=c;this.style.addImage(C,{data:new a.RGBAImage({width:j,height:K},new Uint8Array(Y)),pixelRatio:g,stretchX:E,stretchY:A,content:z,sdf:b,version:0,userImage:ie}),ie.onAdd&&ie.onAdd(this,C)}}}updateImage(C,c){const g=this.style.getImage(C);if(!g)return this.fire(new a.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const b=c instanceof HTMLImageElement||a.isImageBitmap(c)?a.exported.getImageData(c):c,{width:E,height:A,data:z}=b;if(E===void 0||A===void 0)return this.fire(new a.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(E!==g.data.width||A!==g.data.height)return this.fire(new a.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));const j=!(c instanceof HTMLImageElement||a.isImageBitmap(c));g.data.replace(z,j),this.style.updateImage(C,g)}hasImage(C){return C?!!this.style.getImage(C):(this.fire(new a.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(C){this.style.removeImage(C)}loadImage(C,c){a.getImage(this._requestManager.transformRequest(C,a.ResourceType.Image),c)}listImages(){return this.style.listImages()}addLayer(C,c){return this._lazyInitEmptyStyle(),this.style.addLayer(C,c),this._update(!0)}moveLayer(C,c){return this.style.moveLayer(C,c),this._update(!0)}removeLayer(C){return this.style.removeLayer(C),this._update(!0)}getLayer(C){return this.style.getLayer(C)}setLayerZoomRange(C,c,g){return this.style.setLayerZoomRange(C,c,g),this._update(!0)}setFilter(C,c,g={}){return this.style.setFilter(C,c,g),this._update(!0)}getFilter(C){return this.style.getFilter(C)}setPaintProperty(C,c,g,b={}){return this.style.setPaintProperty(C,c,g,b),this._update(!0)}getPaintProperty(C,c){return this.style.getPaintProperty(C,c)}setLayoutProperty(C,c,g,b={}){return this.style.setLayoutProperty(C,c,g,b),this._update(!0)}getLayoutProperty(C,c){return this.style.getLayoutProperty(C,c)}setLight(C,c={}){return this._lazyInitEmptyStyle(),this.style.setLight(C,c),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(C,c){return this.style.setFeatureState(C,c),this._update()}removeFeatureState(C,c){return this.style.removeFeatureState(C,c),this._update()}getFeatureState(C){return this.style.getFeatureState(C)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let C=0,c=0;return this._container&&(C=this._container.clientWidth||400,c=this._container.clientHeight||300),[C,c]}_setupContainer(){const C=this._container;C.classList.add("maplibregl-map","mapboxgl-map");const c=this._canvasContainer=v.create("div","maplibregl-canvas-container mapboxgl-canvas-container",C);this._interactive&&c.classList.add("maplibregl-interactive","mapboxgl-interactive"),this._canvas=v.create("canvas","maplibregl-canvas mapboxgl-canvas",c),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 g=this._containerDimensions();this._resizeCanvas(g[0],g[1],this.getPixelRatio());const b=this._controlContainer=v.create("div","maplibregl-control-container mapboxgl-control-container",C),E=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(A=>{E[A]=v.create("div",`maplibregl-ctrl-${A} mapboxgl-ctrl-${A}`,b)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){const C=this._container;this._metaPress=!1,this._cooperativeGesturesScreen=v.create("div","maplibregl-cooperative-gesture-screen",C);let c="Control",g=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(g=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use \u2318 + scroll to zoom the map",c="Meta"),this._cooperativeGesturesScreen.innerHTML=`
|
|
|
<div class="maplibregl-desktop-message">${g}</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",b=>{b.key===c&&(this._metaPress=!0)}),document.addEventListener("keyup",b=>{b.key===c&&(this._metaPress=!1)}),this._canvasContainer.addEventListener("wheel",b=>{this._onCooperativeGesture(b,this._metaPress,1)},!1),this._canvasContainer.classList.remove("mapboxgl-touch-drag-pan","maplibregl-touch-drag-pan")}_resizeCanvas(C,c,g){this._canvas.width=g*C,this._canvas.height=g*c,this._canvas.style.width=`${C}px`,this._canvas.style.height=`${c}px`}_setupPainter(){const C=a.extend({},u.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),c=this._canvas.getContext("webgl",C)||this._canvas.getContext("experimental-webgl",C);c?(this.painter=new Xp(c,this.transform),a.exported$1.testSupport(c)):this.fire(new a.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(C){C.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new a.Event("webglcontextlost",{originalEvent:C}))}_contextRestored(C){this._setupPainter(),this.resize(),this._update(),this.fire(new a.Event("webglcontextrestored",{originalEvent:C}))}_onMapScroll(C){if(C.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}_onCooperativeGesture(C,c,g){return!c&&g<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(C){return this.style?(this._styleDirty=this._styleDirty||C,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(C){return this._update(),this._renderTaskQueue.add(C)}_cancelRenderFrame(C){this._renderTaskQueue.remove(C)}_render(C){let c,g=0;const b=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(c=b.createQueryEXT(),b.beginQueryEXT(b.TIME_ELAPSED_EXT,c),g=a.exported.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(C),this._removed)return;let E=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const z=this.transform.zoom,j=a.exported.now();this.style.zoomHistory.update(z,j);const K=new a.EvaluationParameters(z,{now:j,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Y=K.crossFadingFactor();Y===1&&Y===this._crossFadingFactor||(E=!0,this._crossFadingFactor=Y),this.style.update(K)}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 a.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.PerformanceUtils.mark(a.PerformanceMarkers.load),this.fire(new a.Event("load"))),this.style&&(this.style.hasTransitions()||E)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){const z=a.exported.now()-g;b.endQueryEXT(b.TIME_ELAPSED_EXT,c),setTimeout(()=>{const j=b.getQueryObjectEXT(c,b.QUERY_RESULT_EXT)/1e6;b.deleteQueryEXT(c),this.fire(new a.Event("gpu-timing-frame",{cpuTime:z,gpuTime:j}))},50)}if(this.listens("gpu-timing-layer")){const z=this.painter.collectGpuTimers();setTimeout(()=>{const j=this.painter.queryGpuTimers(z);this.fire(new a.Event("gpu-timing-layer",{layerTimes:j}))},50)}const A=this._sourcesDirty||this._styleDirty||this._placementDirty;return A||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.Event("idle")),!this._loaded||this._fullyLoaded||A||(this._fullyLoaded=!0,a.PerformanceUtils.mark(a.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 c of this._controls)c.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 C=this.painter.context.gl.getExtension("WEBGL_lose_context");C&&C.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"),a.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new a.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=a.exported.frame(C=>{a.PerformanceUtils.frame(C),this._frame=null,this._render(C)}))}_onWindowOnline(){this._update()}_onWindowResize(C){this._trackResize&&this.resize({originalEvent:C})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(C){this._showTileBoundaries!==C&&(this._showTileBoundaries=C,this._update())}get showPadding(){return!!this._showPadding}set showPadding(C){this._showPadding!==C&&(this._showPadding=C,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(C){this._showCollisionBoxes!==C&&(this._showCollisionBoxes=C,C?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(C){this._showOverdrawInspector!==C&&(this._showOverdrawInspector=C,this._update())}get repaint(){return!!this._repaint}set repaint(C){this._repaint!==C&&(this._repaint=C,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(C){this._vertices=C,this._update()}_setCacheLimits(C,c){a.setCacheLimits(C,c)}get version(){return"2.4.0"}},NavigationControl:class{constructor(C){this.options=a.extend({},Kw,C),this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",c=>c.preventDefault()),this.options.showZoom&&(a.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in mapboxgl-ctrl-zoom-in",c=>this._map.zoomIn({},{originalEvent:c})),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",c=>this._map.zoomOut({},{originalEvent:c})),v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(a.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("maplibregl-ctrl-compass mapboxgl-ctrl-compass",c=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:c}):this._map.resetNorth({},{originalEvent:c})}),this._compassIcon=v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const C=this._map.getZoom(),c=C===this._map.getMaxZoom(),g=C===this._map.getMinZoom();this._zoomInButton.disabled=c,this._zoomOutButton.disabled=g,this._zoomInButton.setAttribute("aria-disabled",c.toString()),this._zoomOutButton.setAttribute("aria-disabled",g.toString())}_rotateCompassArrow(){const C=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=C}onAdd(C){return this._map=C,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 ja(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(C,c){const g=v.create("button",C,this._container);return g.type="button",g.addEventListener("click",c),g}_setButtonTitle(C,c){const g=this._map._getUIString(`NavigationControl.${c}`);C.title=g,C.setAttribute("aria-label",g)}},GeolocateControl:class extends a.Evented{constructor(C){super(),this.options=a.extend({},am,C),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(C){var c;return this._map=C,this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),c=this._setupUI,Ys!==void 0?c(Ys):window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(g=>{Ys=g.state!=="denied",c(Ys)}):(Ys=!!window.navigator.geolocation,c(Ys)),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,ji=0,Qs=!1}_isOutOfMapMaxBounds(C){const c=this._map.getMaxBounds(),g=C.coords;return c&&(g.longitude<c.getWest()||g.longitude>c.getEast()||g.latitude<c.getSouth()||g.latitude>c.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(C){if(this._map){if(this._isOutOfMapMaxBounds(C))return this._setErrorState(),this.fire(new a.Event("outofmaxbounds",C)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=C,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(C),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(C),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",C)),this._finish()}}_updateCamera(C){const c=new a.LngLat(C.coords.longitude,C.coords.latitude),g=C.coords.accuracy,b=this._map.getBearing(),E=a.extend({bearing:b},this.options.fitBoundsOptions);this._map.fitBounds(c.toBounds(g),E,{geolocateSource:!0})}_updateMarker(C){if(C){const c=new a.LngLat(C.coords.longitude,C.coords.latitude);this._accuracyCircleMarker.setLngLat(c).addTo(this._map),this._userLocationDotMarker.setLngLat(c).addTo(this._map),this._accuracy=C.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const C=this._map._container.clientHeight/2,c=this._map.unproject([0,C]),g=this._map.unproject([1,C]),b=c.distanceTo(g),E=Math.ceil(2*this._accuracy/b);this._circleElement.style.width=`${E}px`,this._circleElement.style.height=`${E}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(C){if(this._map){if(this.options.trackUserLocation)if(C.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 c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(C.code===3&&Qs)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 a.Event("error",C)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(C){if(this._container.addEventListener("contextmenu",c=>c.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",C===!1){a.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c)}else{const c=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c)}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 Ou(this._dotElement),this._circleElement=v.create("div","maplibregl-user-location-accuracy-circle mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ou({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",c=>{c.geolocateSource||this._watchState!=="ACTIVE_LOCK"||c.originalEvent&&c.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 a.Event("trackuserlocationend")))})}trigger(){if(!this._setup)return a.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 a.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ji--,Qs=!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 a.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 a.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 C;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ji++,ji>1?(C={maximumAge:6e5,timeout:0},Qs=!0):(C=this.options.positionOptions,Qs=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,C)}}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:od,LogoControl:Vf,ScaleControl:class{constructor(C){this.options=a.extend({},Ha,C),a.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){ey(this._map,this._container,this.options)}onAdd(C){return this._map=C,this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-scale mapboxgl-ctrl mapboxgl-ctrl-scale",C.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(C){this.options.unit=C,ey(this._map,this._container,this.options)}},FullscreenControl:class{constructor(C){this._fullscreen=!1,C&&C.container&&(C.container instanceof HTMLElement?this._container=C.container:a.warnOnce("Full screen control 'container' must be a DOM element.")),a.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(C){return this._map=C,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",a.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 C=this._fullscreenButton=v.create("button","maplibregl-ctrl-fullscreen mapboxgl-ctrl-fullscreen",this._controlContainer);v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",C).setAttribute("aria-hidden","true"),C.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const C=this._getTitle();this._fullscreenButton.setAttribute("aria-label",C),this._fullscreenButton.title=C}_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(C){this.options=C,a.bindAll(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(C){return this._map=C,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 a.Evented{constructor(C){super(),this.options=a.extend(Object.create(ii),C),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(C){return this._map&&this.remove(),this._map=C,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 a.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 a.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(C){return this._lngLat=a.LngLat.convert(C),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(C){return this.setDOMContent(document.createTextNode(C))}setHTML(C){const c=document.createDocumentFragment(),g=document.createElement("body");let b;for(g.innerHTML=C;b=g.firstChild,b;)c.appendChild(b);return this.setDOMContent(c)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(C){return this.options.maxWidth=C,this._update(),this}setDOMContent(C){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(C),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(C){this._container&&this._container.classList.add(C)}removeClassName(C){this._container&&this._container.classList.remove(C)}setOffset(C){return this.options.offset=C,this._update(),this}toggleClassName(C){if(this._container)return this._container.classList.toggle(C)}_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="×",this._closeButton.addEventListener("click",this._onClose))}_onMouseUp(C){this._update(C.point)}_onMouseMove(C){this._update(C.point)}_onDrag(C){this._update(C.point)}_update(C){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(A=>this._container.classList.add(A)),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=ad(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!C))return;const c=this._pos=this._trackPointer&&C?C:this._map.project(this._lngLat);let g=this.options.anchor;const b=sm(this.options.offset);if(!g){const A=this._container.offsetWidth,z=this._container.offsetHeight;let j;j=c.y+b.bottom.y<z?["top"]:c.y>this._map.transform.height-z?["bottom"]:[],c.x<A/2?j.push("left"):c.x>this._map.transform.width-A/2&&j.push("right"),g=j.length===0?"bottom":j.join("-")}const E=c.add(b[g]).round();v.setTransform(this._container,`${wn[g]} translate(${E.x}px,${E.y}px)`),Dn(this._container,g,"popup")}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const C=this._container.querySelector(gi);C&&C.focus()}_onClose(){this.remove()}},Marker:Ou,Style:Vr,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.pointGeometry,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,AJAXError:a.AJAXError,config:a.config,CanvasSource:be,GeoJSONSource:se,ImageSource:he,RasterDEMTileSource:ne,RasterTileSource:Q,VectorTileSource:Z,VideoSource:_e,prewarm:function(){mt().acquire(St)},clearPrewarmedResources:function(){const C=Qe;C&&(C.isPreloaded()&&C.numActive()===1?(C.release(St),Qe=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 We.workerCount},set workerCount(C){We.workerCount=C},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(C){a.config.MAX_PARALLEL_IMAGE_REQUESTS=C},clearStorage(C){a.clearTileCache(C)},workerUrl:"",addProtocol(C,c){a.config.REGISTERED_PROTOCOLS[C]=c},removeProtocol(C){delete a.config.REGISTERED_PROTOCOLS[C]}};return ea.extend(Nl,{isSafari:a.isSafari,getPerformanceMetrics:a.PerformanceUtils.getPerformanceMetrics}),Nl});var s=i;return s})})(xz);const JY=xz.exports,eQ="modulepreload",tQ=function(e){return"/"+e},PA={},nQ=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=tQ(o),o in PA)return;PA[o]=!0;const s=o.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let p=i.length-1;p>=0;p--){const m=i[p];if(m.href===o&&(!s||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":eQ,s||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),s)return new Promise((p,m)=>{d.addEventListener("load",p),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())},KP=w.exports.createContext(null),rQ=e=>{const[t,n]=w.exports.useState({}),r=w.exports.useCallback((o,s="default")=>{n(a=>{if(s==="current")throw new Error("'current' cannot be used as map id");if(a[s])throw new Error(`Multiple maps with the same id: ${s}`);return{...a,[s]:o}})},[]),i=w.exports.useCallback((o="default")=>{n(s=>{if(s[o]){const a={...s};return delete a[o],a}return s})},[]);return I(KP.Provider,{value:{maps:t,onMapMount:r,onMapUnmount:i},children:e.children})};function WP(){var e;const t=(e=w.exports.useContext(KP))===null||e===void 0?void 0:e.maps,n=w.exports.useContext(hf);return w.exports.useMemo(()=>({...t,current:n==null?void 0:n.map}),[t,n])}function iQ(e){const t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}function IA(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function TA(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 oQ=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function kA(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 o=null;if("interactive"in r&&(o={...r},delete o.interactive),i){o=o||{...r},delete o.ref;for(const s of oQ)s in i&&(o[s]=i[s])}return o||r});return{...e,layers:n}}function aQ(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,o=Array.isArray(t)?t[1]:t?t.y:0;return n===i&&r===o}function os(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(!os(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)||!os(e[i],t[i]))return!1;return!0}return!1}const MA={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"},uC={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"},RA={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"},sQ=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],lQ=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class Xh{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 o=this.props[RA[i.type]];o&&o(i)},this._onPointerEvent=i=>{(i.type==="mousemove"||i.type==="mouseout")&&this._updateHover(i);const o=this.props[MA[i.type]];if(o){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}o(i),delete i.features}},this._onCameraEvent=i=>{if(!this._internalUpdate){const o=this.props[uC[i.type]];o&&o(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),o=this._updateViewState(t,!0);this._updateStyle(t,n),this._updateStyleComponents(t,n),this._updateHandlers(t,n),(r||i||o&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const r=Xh.savedMaps.pop();if(!r)return null;const i=r.map,o=i.getContainer();for(n.className=o.className;o.childNodes.length>0;)n.appendChild(o.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||uQ()||null,container:t,style:kA(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 d=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=d,n.gl)}const o=new this._MapClass(r);i.padding&&o.setPadding(i.padding),n.cursor&&(o.getCanvas().style.cursor=n.cursor),this._createShadowTransform(o);const s=o._render;o._render=d=>{this._inRender=!0,s.call(o,d),this._inRender=!1};const a=o._renderTaskQueue.run;o._renderTaskQueue.run=d=>{a.call(o._renderTaskQueue,d),this._onBeforeRepaint()},o.on("render",()=>this._onAfterRepaint());const u=o.fire;o.fire=this._fireEvent.bind(this,u),o.on("resize",()=>{this._renderTransform.resize(o.transform.width,o.transform.height)}),o.on("styledata",()=>this._updateStyleComponents(this.props,{})),o.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const d in MA)o.on(d,this._onPointerEvent);for(const d in uC)o.on(d,this._onCameraEvent);for(const d in RA)o.on(d,this._onEvent);this._map=o}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),Xh.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=iQ(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:o,pitch:s,bearing:a}=i,u=r.isMoving();u&&(i.cameraElevationReference="sea");const d=TA(i,{...IA(r.transform),...t});if(u&&(i.cameraElevationReference="ground"),d&&n){const p=this._deferredEvents;p.move=!0,p.zoom||(p.zoom=o!==i.zoom),p.rotate||(p.rotate=a!==i.bearing),p.pitch||(p.pitch=s!==i.pitch)}return u||TA(r.transform,t),d}_updateSettings(t,n){const r=this._map;let i=!1;for(const o of sQ)o in t&&!os(t[o],n[o])&&(i=!0,r[`set${o[0].toUpperCase()}${o.slice(1)}`](t[o]));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(kA(t.mapStyle),r),!0}return!1}_updateStyleComponents(t,n){const r=this._map;let i=!1;return r.style.loaded()&&("light"in t&&!os(t.light,n.light)&&(i=!0,r.setLight(t.light)),"fog"in t&&!os(t.fog,n.fog)&&(i=!0,r.setFog(t.fog)),"terrain"in t&&!os(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 o of lQ){const s=t[o];os(s,n[o])||(i=!0,s?r[o].enable(s):r[o].disable())}return i}_updateHover(t){var n;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const o=t.type,s=((n=this._hoveredFeatures)===null||n===void 0?void 0:n.length)>0;let a;if(o==="mousemove")try{a=this._map.queryRenderedFeatures(t.point,{layers:r.interactiveLayerIds})}catch{a=[]}else a=[];const u=a.length>0;!u&&s&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=a,u&&!s&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=o}else this._hoveredFeatures=null}_fireEvent(t,n,r){const i=this._map,o=i.transform,s=typeof n=="string"?n:n.type;return s==="move"&&this._updateViewState(this.props,!1),s in uC&&(typeof n=="object"&&(n.viewState=IA(o)),this._map.isMoving())?(i.transform=this._renderTransform,t.call(i,n,r),i.transform=o,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}}}Xh.savedMaps=[];function uQ(){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 cQ=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function dQ(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,o)=>{const s=n.transform;n.transform=e.transform;const a=n.queryTerrainElevation(i,o);return n.transform=s,a}};for(const i of fQ(n))!(i in r)&&!cQ.includes(i)&&(r[i]=n[i].bind(n));return r}function fQ(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 hQ=typeof document<"u"?w.exports.useLayoutEffect:w.exports.useEffect,pQ=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function mQ(e,t){for(const n of pQ)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 hf=w.exports.createContext(null),gQ={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"},GP=w.exports.forwardRef((e,t)=>{const n=w.exports.useContext(KP),[r,i]=w.exports.useState(null),o=w.exports.useRef(),{current:s}=w.exports.useRef({mapLib:null,map:null});w.exports.useEffect(()=>{const u=e.mapLib;let d=!0,p;return Promise.resolve(u||nQ(()=>import("./index.764e1a39.js").then(m=>m.i),[])).then(m=>{if(!!d){if(m.Map||(m=m.default),!m||!m.Map)throw new Error("Invalid mapLib");if(m.supported(e))mQ(m,e),e.reuseMaps&&(p=Xh.reuse(e,o.current)),p||(p=new Xh(m.Map,e,o.current)),s.map=dQ(p,m),s.mapLib=m,i(p),n==null||n.onMapMount(s.map,e.id);else throw new Error("Map is not supported by this browser")}}).catch(m=>{e.onError({type:"error",target:null,originalEvent:null,error:m})}),()=>{d=!1,p&&(n==null||n.onMapUnmount(e.id),e.reuseMaps?p.recycle():p.destroy())}},[]),hQ(()=>{r&&r.setProps(e)}),w.exports.useImperativeHandle(t,()=>s.map,[r]);const a=w.exports.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return I("div",{id:e.id,ref:o,style:a,children:r&&I(hf.Provider,{value:s,children:I("div",{"mapboxgl-children":"",children:e.children})})})});GP.displayName="Map";GP.defaultProps=gQ;const vQ=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function pf(e,t){if(!e||!t)return;const n=e.style;for(const r in t){const i=t[r];Number.isFinite(i)&&!vQ.test(r)?n[r]=`${i}px`:n[r]=i}}const yQ={draggable:!1,popup:null,rotation:0,rotationAlignment:"auto",pitchAlignment:"auto"};function _z(e){const{map:t,mapLib:n}=w.exports.useContext(hf),r=w.exports.useRef({props:e});r.current.props=e;const i=w.exports.useMemo(()=>{let o=!1;w.exports.Children.forEach(e.children,u=>{u&&(o=!0)});const s={...e,element:o?document.createElement("div"):null},a=new n.Marker(s).setLngLat([e.longitude,e.latitude]);return a.getElement().addEventListener("click",u=>{var d,p;(p=(d=r.current.props).onClick)===null||p===void 0||p.call(d,{type:"click",target:a,originalEvent:u})}),a.on("dragstart",u=>{var d,p;const m=u;m.lngLat=i.getLngLat(),(p=(d=r.current.props).onDragStart)===null||p===void 0||p.call(d,m)}),a.on("drag",u=>{var d,p;const m=u;m.lngLat=i.getLngLat(),(p=(d=r.current.props).onDrag)===null||p===void 0||p.call(d,m)}),a.on("dragend",u=>{var d,p;const m=u;m.lngLat=i.getLngLat(),(p=(d=r.current.props).onDragEnd)===null||p===void 0||p.call(d,m)}),a},[]);return w.exports.useEffect(()=>(i.addTo(t.getMap()),()=>{i.remove()}),[]),w.exports.useEffect(()=>{pf(i.getElement(),e.style)},[e.style]),(i.getLngLat().lng!==e.longitude||i.getLngLat().lat!==e.latitude)&&i.setLngLat([e.longitude,e.latitude]),e.offset&&!aQ(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())}_z.defaultProps=yQ;w.exports.memo(_z);function AA(e){return new Set(e?e.trim().split(/\s+/):[])}function xQ(e){const{map:t,mapLib:n}=w.exports.useContext(hf),r=w.exports.useMemo(()=>document.createElement("div"),[]),i=w.exports.useRef({props:e});i.current.props=e;const o=w.exports.useMemo(()=>{const s={...e},a=new n.Popup(s).setLngLat([e.longitude,e.latitude]);return a.once("open",u=>{var d,p;(p=(d=i.current.props).onOpen)===null||p===void 0||p.call(d,u)}),a},[]);if(w.exports.useEffect(()=>{const s=a=>{var u,d;(d=(u=i.current.props).onClose)===null||d===void 0||d.call(u,a)};return o.on("close",s),o.setDOMContent(r).addTo(t.getMap()),()=>{o.off("close",s),o.isOpen()&&o.remove()}},[]),w.exports.useEffect(()=>{pf(o.getElement(),e.style)},[e.style]),o.isOpen()&&((o.getLngLat().lng!==e.longitude||o.getLngLat().lat!==e.latitude)&&o.setLngLat([e.longitude,e.latitude]),e.offset&&!os(o.options.offset,e.offset)&&o.setOffset(e.offset),(o.options.anchor!==e.anchor||o.options.maxWidth!==e.maxWidth)&&(o.options.anchor=e.anchor,o.setMaxWidth(e.maxWidth)),o.options.className!==e.className)){const s=AA(o.options.className),a=AA(e.className);for(const u of s)a.has(u)||o.removeClassName(u);for(const u of a)s.has(u)||o.addClassName(u);o.options.className=e.className}return Cl.exports.createPortal(e.children,r)}const bQ=w.exports.memo(xQ);function Fv(e,t,n,r){const i=w.exports.useContext(hf),o=w.exports.useMemo(()=>e(i),[]);return w.exports.useEffect(()=>{const s=r||n||t,a=typeof t=="function"&&typeof n=="function"?t:null,u=typeof n=="function"?n:typeof t=="function"?t:null,{map:d}=i;return d.hasControl(o)||(d.addControl(o,s==null?void 0:s.position),a&&a(i)),()=>{u&&u(i),d.hasControl(o)&&d.removeControl(o)}},[]),o}function _Q(e){const t=Fv(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return w.exports.useEffect(()=>{pf(t._container,e.style)},[e.style]),null}w.exports.memo(_Q);function wQ(e){const t=Fv(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return w.exports.useEffect(()=>{pf(t._controlContainer,e.style)},[e.style]),null}w.exports.memo(wQ);const wz=w.exports.forwardRef((e,t)=>{const n=w.exports.useRef({props:e}),r=Fv(({mapLib:i})=>{const o=new i.GeolocateControl(e),s=o._setupUI;return o._setupUI=a=>{o._container.hasChildNodes()||s(a)},o.on("geolocate",a=>{var u,d;(d=(u=n.current.props).onGeolocate)===null||d===void 0||d.call(u,a)}),o.on("error",a=>{var u,d;(d=(u=n.current.props).onError)===null||d===void 0||d.call(u,a)}),o.on("outofmaxbounds",a=>{var u,d;(d=(u=n.current.props).onOutOfMaxBounds)===null||d===void 0||d.call(u,a)}),o.on("trackuserlocationstart",a=>{var u,d;(d=(u=n.current.props).onTrackUserLocationStart)===null||d===void 0||d.call(u,a)}),o.on("trackuserlocationend",a=>{var u,d;(d=(u=n.current.props).onTrackUserLocationEnd)===null||d===void 0||d.call(u,a)}),o},{position:e.position});return n.current.props=e,w.exports.useImperativeHandle(t,()=>({trigger:()=>r.trigger()}),[]),w.exports.useEffect(()=>{pf(r._container,e.style)},[e.style]),null});wz.displayName="GeolocateControl";w.exports.memo(wz);function CQ(e){const t=Fv(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return w.exports.useEffect(()=>{pf(t._container,e.style)},[e.style]),null}w.exports.memo(CQ);const SQ={unit:"metric",maxWidth:100};function Cz(e){const t=Fv(({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)),w.exports.useEffect(()=>{pf(t._container,e.style)},[e.style]),null}Cz.defaultProps=SQ;w.exports.memo(Cz);function Y1(e,t){if(!e)throw new Error(t)}let EQ=0;function PQ(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 IQ(e,t,n){Y1(t.id===n.id,"source id changed"),Y1(t.type===n.type,"source type changed");let r="",i=0;for(const s in t)s!=="children"&&s!=="id"&&!os(n[s],t[s])&&(r=s,i++);if(!i)return;const o=t.type;if(o==="geojson")e.setData(t.data);else if(o==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else if((o==="canvas"||o==="video")&&i===1&&r==="coordinates")e.setCoordinates(t.coordinates);else if(o==="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 Od(e){const t=w.exports.useContext(hf).map.getMap(),n=w.exports.useRef(e),[,r]=w.exports.useState(0),i=w.exports.useMemo(()=>e.id||`jsx-source-${EQ++}`,[]);w.exports.useEffect(()=>{if(t){const s=()=>setTimeout(()=>r(a=>a+1),0);return t.on("styledata",s),s(),()=>{var a;if(t.off("styledata",s),t.style&&t.style._loaded&&t.getSource(i)){const u=(a=t.getStyle())===null||a===void 0?void 0:a.layers;if(u)for(const d of u)d.source===i&&t.removeLayer(d.id);t.removeSource(i)}}}},[t]);let o=t&&t.style&&t.getSource(i);return o?IQ(o,e,n.current):o=PQ(t,i,e),n.current=e,o&&w.exports.Children.map(e.children,s=>s&&w.exports.cloneElement(s,{source:i}))||null}function TQ(e,t,n,r){if(Y1(n.id===r.id,"layer id changed"),Y1(n.type===r.type,"layer type changed"),n.type==="custom"||r.type==="custom")return;const{layout:i={},paint:o={},filter:s,minzoom:a,maxzoom:u,beforeId:d}=n;if(d!==r.beforeId&&e.moveLayer(t,d),i!==r.layout){const p=r.layout||{};for(const m in i)os(i[m],p[m])||e.setLayoutProperty(t,m,i[m]);for(const m in p)i.hasOwnProperty(m)||e.setLayoutProperty(t,m,void 0)}if(o!==r.paint){const p=r.paint||{};for(const m in o)os(o[m],p[m])||e.setPaintProperty(t,m,o[m]);for(const m in p)o.hasOwnProperty(m)||e.setPaintProperty(t,m,void 0)}os(s,r.filter)||e.setFilter(t,s),(a!==r.minzoom||u!==r.maxzoom)&&e.setLayerZoomRange(t,a,u)}function kQ(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 MQ=0;function ps(e){const t=w.exports.useContext(hf).map.getMap(),n=w.exports.useRef(e),[,r]=w.exports.useState(0),i=w.exports.useMemo(()=>e.id||`jsx-layer-${MQ++}`,[]);if(w.exports.useEffect(()=>{if(t){const s=()=>r(a=>a+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{TQ(t,i,e,n.current)}catch(s){console.warn(s)}else kQ(t,i,e);return n.current=e,null}function RQ(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=Sz(t))&&(r&&(r+=" "),r+=n);return r}function Sz(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=Sz(e[r]))&&(n&&(n+=" "),n+=t);return n}var qP="-";function AQ(e){var t=OQ(e);function n(i){var o=i.split(qP);return o[0]===""&&o.length!==1&&o.shift(),Ez(o,t)||DQ(i)}function r(i){return e.conflictingClassGroups[i]||[]}return{getClassGroupId:n,getConflictingClassGroupIds:r}}function Ez(e,t){var s;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),i=r?Ez(e.slice(1),r):void 0;if(i)return i;if(t.validators.length!==0){var o=e.join(qP);return(s=t.validators.find(function(a){var u=a.validator;return u(o)}))==null?void 0:s.classGroupId}}var DA=/^\[(.+)\]$/;function DQ(e){if(DA.test(e)){var t=DA.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function OQ(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},i=LQ(Object.entries(e.classGroups),n);return i.forEach(function(o){var s=o[0],a=o[1];WS(a,r,s,t)}),r}function WS(e,t,n,r){e.forEach(function(i){if(typeof i=="string"){var o=i===""?t:OA(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(NQ(i)){WS(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(function(s){var a=s[0],u=s[1];WS(u,OA(t,a),n,r)})})}function OA(e,t){var n=e;return t.split(qP).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function NQ(e){return e.isThemeGetter}function LQ(e,t){return t?e.map(function(n){var r=n[0],i=n[1],o=i.map(function(s){return typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(function(a){var u=a[0],d=a[1];return[t+u,d]})):s});return[r,o]}):e}function FQ(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function i(o,s){n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(s){var a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set:function(s,a){n.has(s)?n.set(s,a):i(s,a)}}}var Pz="!";function zQ(e){var t=e.separator||":";return function(r){for(var i=0,o=[],s=0,a=0;a<r.length;a++){var u=r[a];i===0&&u===t[0]&&(t.length===1||r.slice(a,a+t.length)===t)&&(o.push(r.slice(s,a)),s=a+t.length),u==="["?i++:u==="]"&&i--}var d=o.length===0?r:r.substring(s),p=d.startsWith(Pz),m=p?d.substring(1):d;return{modifiers:o,hasImportantModifier:p,baseClassName:m}}}function $Q(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 BQ(e){return{cache:FQ(e.cacheSize),splitModifiers:zQ(e),...AQ(e)}}var VQ=/\s+/;function UQ(e,t){var n=t.splitModifiers,r=t.getClassGroupId,i=t.getConflictingClassGroupIds,o=new Set;return e.trim().split(VQ).map(function(s){var a=n(s),u=a.modifiers,d=a.hasImportantModifier,p=a.baseClassName,m=r(p);if(!m)return{isTailwindClass:!1,originalClassName:s};var v=$Q(u).join(":"),x=d?v+Pz:v;return{isTailwindClass:!0,modifierId:x,classGroupId:m,originalClassName:s}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var a=s.modifierId,u=s.classGroupId,d=a+u;return o.has(d)?!1:(o.add(d),i(u).forEach(function(p){return o.add(a+p)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function jQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i,o,s=a;function a(d){var p=t[0],m=t.slice(1),v=m.reduce(function(x,_){return _(x)},p());return r=BQ(v),i=r.cache.get,o=r.cache.set,s=u,u(d)}function u(d){var p=i(d);if(p)return p;var m=UQ(d,r);return o(d,m),m}return function(){return s(RQ.apply(null,arguments))}}function ai(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var Iz=/^\[(?:([a-z-]+):)?(.+)\]$/i,HQ=/^\d+\/\d+$/,KQ=new Set(["px","full","screen"]),WQ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GQ=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/,qQ=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Ms(e){return wg(e)||KQ.has(e)||HQ.test(e)||wd(e)}function wd(e){return mf(e,"length",JQ)}function ZQ(e){return mf(e,"size",Tz)}function XQ(e){return mf(e,"position",Tz)}function YQ(e){return mf(e,"url",eJ)}function cC(e){return mf(e,"number",wg)}function wg(e){return!Number.isNaN(Number(e))}function Nm(e){return NA(e)||mf(e,"number",NA)}function Li(e){return Iz.test(e)}function Lm(){return!0}function Uu(e){return WQ.test(e)}function QQ(e){return mf(e,"",tJ)}function mf(e,t,n){var r=Iz.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function JQ(e){return GQ.test(e)}function Tz(){return!1}function eJ(e){return e.startsWith("url(")}function NA(e){return Number.isInteger(Number(e))}function tJ(e){return qQ.test(e)}function nJ(){var e=ai("colors"),t=ai("spacing"),n=ai("blur"),r=ai("brightness"),i=ai("borderColor"),o=ai("borderRadius"),s=ai("borderSpacing"),a=ai("borderWidth"),u=ai("contrast"),d=ai("grayscale"),p=ai("hueRotate"),m=ai("invert"),v=ai("gap"),x=ai("gradientColorStops"),_=ai("inset"),P=ai("margin"),k=ai("opacity"),T=ai("padding"),M=ai("saturate"),O=ai("scale"),N=ai("sepia"),L=ai("skew"),F=ai("space"),V=ai("translate"),B=function(){return["auto","contain","none"]},H=function(){return["auto","hidden","clip","visible","scroll"]},G=function(){return["auto",t]},ee=function(){return["",Ms]},X=function(){return["auto",wg,Li]},Z=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},Q=function(){return["solid","dashed","dotted","double","none"]},le=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},ne=function(){return["start","end","center","between","around","evenly"]},se=function(){return["","0",Li]},oe=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},he=function(){return[wg,cC]},_e=function(){return[wg,Li]};return{cacheSize:500,theme:{colors:[Lm],spacing:[Ms],blur:["none","",Uu,wd],brightness:he(),borderColor:[e],borderRadius:["none","","full",Uu,wd],borderSpacing:[t],borderWidth:ee(),contrast:he(),grayscale:se(),hueRotate:_e(),invert:se(),gap:[t],gradientColorStops:[e],inset:G(),margin:G(),opacity:he(),padding:[t],saturate:he(),scale:he(),sepia:se(),skew:_e(),space:[t],translate:[t]},classGroups:{aspect:[{aspect:["auto","square","video",Li]}],container:["container"],columns:[{columns:[Uu]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(Z(),[Li])}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],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",Li]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Nm]}],"grid-cols":[{"grid-cols":[Lm]}],"col-start-end":[{col:["auto",{span:[Nm]},Li]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Lm]}],"row-start-end":[{row:["auto",{span:[Nm]},Li]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Li]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Li]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:ne()}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:[].concat(ne(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(ne(),["baseline","stretch"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[F]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[F]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",t]}],"min-w":[{"min-w":["min","max","fit",Ms]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Uu]},Uu,wd]}],h:[{h:[t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Ms]}],"max-h":[{"max-h":[t,"min","max","fit"]}],"font-size":[{text:["base",Uu,wd]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",cC]}],"font-family":[{font:[Lm]}],"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",wd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ms]}],"list-style-type":[{list:["none","disc","decimal",Li]}],"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(Q(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",Ms]}],"underline-offset":[{"underline-offset":["auto",Ms]}],"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",wd]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all","keep"]}],content:[{content:["none",Li]}],"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(Z(),[XQ])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ZQ]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},YQ]}],"bg-color":[{bg:[e]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[].concat(Q(),["hidden"])}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:Q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[""].concat(Q())}],"outline-offset":[{"outline-offset":[Ms]}],"outline-w":[{outline:[Ms]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Ms]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Uu,QQ]}],"shadow-color":[{shadow:[Lm]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":le()}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Uu,Li]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],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":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"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",Li]}],duration:[{duration:_e()}],ease:[{ease:["linear","in","out","in-out",Li]}],delay:[{delay:_e()}],animate:[{animate:["none","spin","ping","pulse","bounce",Li]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Nm,Li]}],"translate-x":[{"translate-x":[V]}],"translate-y":[{"translate-y":[V]}],"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",Li]}],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",Li]}],"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",Li]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ms,cC]}],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 da=jQ(nJ);function kz(e,t){return function(){return e.apply(t,arguments)}}const{toString:Mz}=Object.prototype,{getPrototypeOf:ZP}=Object,XP=(e=>t=>{const n=Mz.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xu=e=>(e=e.toLowerCase(),t=>XP(t)===e),f_=e=>t=>typeof t===e,{isArray:yp}=Array,ov=f_("undefined");function rJ(e){return e!==null&&!ov(e)&&e.constructor!==null&&!ov(e.constructor)&&kc(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Rz=xu("ArrayBuffer");function iJ(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Rz(e.buffer),t}const oJ=f_("string"),kc=f_("function"),Az=f_("number"),YP=e=>e!==null&&typeof e=="object",aJ=e=>e===!0||e===!1,Gx=e=>{if(XP(e)!=="object")return!1;const t=ZP(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},sJ=xu("Date"),lJ=xu("File"),uJ=xu("Blob"),cJ=xu("FileList"),dJ=e=>YP(e)&&kc(e.pipe),fJ=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Mz.call(e)===t||kc(e.toString)&&e.toString()===t)},hJ=xu("URLSearchParams"),pJ=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zv(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),yp(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function Dz(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Oz=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Nz=e=>!ov(e)&&e!==Oz;function GS(){const{caseless:e}=Nz(this)&&this||{},t={},n=(r,i)=>{const o=e&&Dz(t,i)||i;Gx(t[o])&&Gx(r)?t[o]=GS(t[o],r):Gx(r)?t[o]=GS({},r):yp(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&zv(arguments[r],n);return t}const mJ=(e,t,n,{allOwnKeys:r}={})=>(zv(t,(i,o)=>{n&&kc(i)?e[o]=kz(i,n):e[o]=i},{allOwnKeys:r}),e),gJ=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vJ=(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)},yJ=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&ZP(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xJ=(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},bJ=e=>{if(!e)return null;if(yp(e))return e;let t=e.length;if(!Az(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},_J=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ZP(Uint8Array)),wJ=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},CJ=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},SJ=xu("HTMLFormElement"),EJ=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),LA=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),PJ=xu("RegExp"),Lz=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};zv(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},IJ=e=>{Lz(e,(t,n)=>{if(kc(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(!!kc(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+"'")})}})},TJ=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return yp(e)?r(e):r(String(e).split(t)),n},kJ=()=>{},MJ=(e,t)=>(e=+e,Number.isFinite(e)?e:t),dC="abcdefghijklmnopqrstuvwxyz",FA="0123456789",Fz={DIGIT:FA,ALPHA:dC,ALPHA_DIGIT:dC+dC.toUpperCase()+FA},RJ=(e=16,t=Fz.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function AJ(e){return!!(e&&kc(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const DJ=e=>{const t=new Array(10),n=(r,i)=>{if(YP(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=yp(r)?[]:{};return zv(r,(s,a)=>{const u=n(s,i+1);!ov(u)&&(o[a]=u)}),t[i]=void 0,o}}return r};return n(e,0)},Ft={isArray:yp,isArrayBuffer:Rz,isBuffer:rJ,isFormData:fJ,isArrayBufferView:iJ,isString:oJ,isNumber:Az,isBoolean:aJ,isObject:YP,isPlainObject:Gx,isUndefined:ov,isDate:sJ,isFile:lJ,isBlob:uJ,isRegExp:PJ,isFunction:kc,isStream:dJ,isURLSearchParams:hJ,isTypedArray:_J,isFileList:cJ,forEach:zv,merge:GS,extend:mJ,trim:pJ,stripBOM:gJ,inherits:vJ,toFlatObject:yJ,kindOf:XP,kindOfTest:xu,endsWith:xJ,toArray:bJ,forEachEntry:wJ,matchAll:CJ,isHTMLForm:SJ,hasOwnProperty:LA,hasOwnProp:LA,reduceDescriptors:Lz,freezeMethods:IJ,toObjectSet:TJ,toCamelCase:EJ,noop:kJ,toFiniteNumber:MJ,findKey:Dz,global:Oz,isContextDefined:Nz,ALPHABET:Fz,generateString:RJ,isSpecCompliantForm:AJ,toJSONObject:DJ};function xr(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)}Ft.inherits(xr,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:Ft.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const zz=xr.prototype,$z={};["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=>{$z[e]={value:e}});Object.defineProperties(xr,$z);Object.defineProperty(zz,"isAxiosError",{value:!0});xr.from=(e,t,n,r,i,o)=>{const s=Object.create(zz);return Ft.toFlatObject(e,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),xr.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const OJ=null;function qS(e){return Ft.isPlainObject(e)||Ft.isArray(e)}function Bz(e){return Ft.endsWith(e,"[]")?e.slice(0,-2):e}function zA(e,t,n){return e?e.concat(t).map(function(i,o){return i=Bz(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function NJ(e){return Ft.isArray(e)&&!e.some(qS)}const LJ=Ft.toFlatObject(Ft,{},null,function(t){return/^is[A-Z]/.test(t)});function h_(e,t,n){if(!Ft.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Ft.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,k){return!Ft.isUndefined(k[P])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Ft.isSpecCompliantForm(t);if(!Ft.isFunction(i))throw new TypeError("visitor must be a function");function d(_){if(_===null)return"";if(Ft.isDate(_))return _.toISOString();if(!u&&Ft.isBlob(_))throw new xr("Blob is not supported. Use a Buffer instead.");return Ft.isArrayBuffer(_)||Ft.isTypedArray(_)?u&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,P,k){let T=_;if(_&&!k&&typeof _=="object"){if(Ft.endsWith(P,"{}"))P=r?P:P.slice(0,-2),_=JSON.stringify(_);else if(Ft.isArray(_)&&NJ(_)||(Ft.isFileList(_)||Ft.endsWith(P,"[]"))&&(T=Ft.toArray(_)))return P=Bz(P),T.forEach(function(O,N){!(Ft.isUndefined(O)||O===null)&&t.append(s===!0?zA([P],N,o):s===null?P:P+"[]",d(O))}),!1}return qS(_)?!0:(t.append(zA(k,P,o),d(_)),!1)}const m=[],v=Object.assign(LJ,{defaultVisitor:p,convertValue:d,isVisitable:qS});function x(_,P){if(!Ft.isUndefined(_)){if(m.indexOf(_)!==-1)throw Error("Circular reference detected in "+P.join("."));m.push(_),Ft.forEach(_,function(T,M){(!(Ft.isUndefined(T)||T===null)&&i.call(t,T,Ft.isString(M)?M.trim():M,P,v))===!0&&x(T,P?P.concat(M):[M])}),m.pop()}}if(!Ft.isObject(e))throw new TypeError("data must be an object");return x(e),t}function $A(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function QP(e,t){this._pairs=[],e&&h_(e,this,t)}const Vz=QP.prototype;Vz.append=function(t,n){this._pairs.push([t,n])};Vz.toString=function(t){const n=t?function(r){return t.call(this,r,$A)}:$A;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function FJ(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Uz(e,t,n){if(!t)return e;const r=n&&n.encode||FJ,i=n&&n.serialize;let o;if(i?o=i(t,n):o=Ft.isURLSearchParams(t)?t.toString():new QP(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class zJ{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){Ft.forEach(this.handlers,function(r){r!==null&&t(r)})}}const BA=zJ,jz={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$J=typeof URLSearchParams<"u"?URLSearchParams:QP,BJ=typeof FormData<"u"?FormData:null,VJ=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),UJ=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),fl={isBrowser:!0,classes:{URLSearchParams:$J,FormData:BJ,Blob},isStandardBrowserEnv:VJ,isStandardBrowserWebWorkerEnv:UJ,protocols:["http","https","file","blob","url","data"]};function jJ(e,t){return h_(e,new fl.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return fl.isNode&&Ft.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function HJ(e){return Ft.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function KJ(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Hz(e){function t(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),u=o>=n.length;return s=!s&&Ft.isArray(i)?i.length:s,u?(Ft.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!Ft.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&Ft.isArray(i[s])&&(i[s]=KJ(i[s])),!a)}if(Ft.isFormData(e)&&Ft.isFunction(e.entries)){const n={};return Ft.forEachEntry(e,(r,i)=>{t(HJ(r),i,n,0)}),n}return null}const WJ={"Content-Type":void 0};function GJ(e,t,n){if(Ft.isString(e))try{return(t||JSON.parse)(e),Ft.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const p_={transitional:jz,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=Ft.isObject(t);if(o&&Ft.isHTMLForm(t)&&(t=new FormData(t)),Ft.isFormData(t))return i&&i?JSON.stringify(Hz(t)):t;if(Ft.isArrayBuffer(t)||Ft.isBuffer(t)||Ft.isStream(t)||Ft.isFile(t)||Ft.isBlob(t))return t;if(Ft.isArrayBufferView(t))return t.buffer;if(Ft.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return jJ(t,this.formSerializer).toString();if((a=Ft.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return h_(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),GJ(t)):t}],transformResponse:[function(t){const n=this.transitional||p_.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&Ft.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?xr.from(a,xr.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fl.classes.FormData,Blob:fl.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ft.forEach(["delete","get","head"],function(t){p_.headers[t]={}});Ft.forEach(["post","put","patch"],function(t){p_.headers[t]=Ft.merge(WJ)});const JP=p_,qJ=Ft.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"]),ZJ=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]&&qJ[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},VA=Symbol("internals");function Fm(e){return e&&String(e).trim().toLowerCase()}function qx(e){return e===!1||e==null?e:Ft.isArray(e)?e.map(qx):String(e)}function XJ(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function YJ(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function fC(e,t,n,r,i){if(Ft.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Ft.isString(t)){if(Ft.isString(r))return t.indexOf(r)!==-1;if(Ft.isRegExp(r))return r.test(t)}}function QJ(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function JJ(e,t){const n=Ft.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class m_{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,u,d){const p=Fm(u);if(!p)throw new Error("header name must be a non-empty string");const m=Ft.findKey(i,p);(!m||i[m]===void 0||d===!0||d===void 0&&i[m]!==!1)&&(i[m||u]=qx(a))}const s=(a,u)=>Ft.forEach(a,(d,p)=>o(d,p,u));return Ft.isPlainObject(t)||t instanceof this.constructor?s(t,n):Ft.isString(t)&&(t=t.trim())&&!YJ(t)?s(ZJ(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Fm(t),t){const r=Ft.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return XJ(i);if(Ft.isFunction(n))return n.call(this,i,r);if(Ft.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Fm(t),t){const r=Ft.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||fC(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Fm(s),s){const a=Ft.findKey(r,s);a&&(!n||fC(r,r[a],a,n))&&(delete r[a],i=!0)}}return Ft.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||fC(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return Ft.forEach(this,(i,o)=>{const s=Ft.findKey(r,o);if(s){n[s]=qx(i),delete n[o];return}const a=t?QJ(o):String(o).trim();a!==o&&delete n[o],n[a]=qx(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Ft.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Ft.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[VA]=this[VA]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Fm(s);r[a]||(JJ(i,s),r[a]=!0)}return Ft.isArray(t)?t.forEach(o):o(t),this}}m_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ft.freezeMethods(m_.prototype);Ft.freezeMethods(m_);const lu=m_;function hC(e,t){const n=this||JP,r=t||n,i=lu.from(r.headers);let o=r.data;return Ft.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Kz(e){return!!(e&&e.__CANCEL__)}function $v(e,t,n){xr.call(this,e==null?"canceled":e,xr.ERR_CANCELED,t,n),this.name="CanceledError"}Ft.inherits($v,xr,{__CANCEL__:!0});function eee(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new xr("Request failed with status code "+n.status,[xr.ERR_BAD_REQUEST,xr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const tee=fl.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,a){const u=[];u.push(n+"="+encodeURIComponent(r)),Ft.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),Ft.isString(o)&&u.push("path="+o),Ft.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function nee(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ree(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Wz(e,t){return e&&!nee(t)?ree(e,t):t}const iee=fl.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=Ft.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function oee(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aee(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),p=r[o];s||(s=d),n[i]=u,r[i]=d;let m=o,v=0;for(;m!==i;)v+=n[m++],m=m%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-s<t)return;const x=p&&d-p;return x?Math.round(v*1e3/x):void 0}}function UA(e,t){let n=0;const r=aee(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,u=r(a),d=o<=s;n=o;const p={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&d?(s-o)/u:void 0,event:i};p[t?"download":"upload"]=!0,e(p)}}const see=typeof XMLHttpRequest<"u",lee=see&&function(e){return new Promise(function(n,r){let i=e.data;const o=lu.from(e.headers).normalize(),s=e.responseType;let a;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}Ft.isFormData(i)&&(fl.isStandardBrowserEnv||fl.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let d=new XMLHttpRequest;if(e.auth){const x=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(x+":"+_))}const p=Wz(e.baseURL,e.url);d.open(e.method.toUpperCase(),Uz(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function m(){if(!d)return;const x=lu.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:x,config:e,request:d};eee(function(T){n(T),u()},function(T){r(T),u()},P),d=null}if("onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){!d||(r(new xr("Request aborted",xr.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new xr("Network Error",xr.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const P=e.transitional||jz;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),r(new xr(_,P.clarifyTimeoutError?xr.ETIMEDOUT:xr.ECONNABORTED,e,d)),d=null},fl.isStandardBrowserEnv){const x=(e.withCredentials||iee(p))&&e.xsrfCookieName&&tee.read(e.xsrfCookieName);x&&o.set(e.xsrfHeaderName,x)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&Ft.forEach(o.toJSON(),function(_,P){d.setRequestHeader(P,_)}),Ft.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),s&&s!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",UA(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",UA(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=x=>{!d||(r(!x||x.type?new $v(null,e,d):x),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const v=oee(p);if(v&&fl.protocols.indexOf(v)===-1){r(new xr("Unsupported protocol "+v+":",xr.ERR_BAD_REQUEST,e));return}d.send(i||null)})},Zx={http:OJ,xhr:lee};Ft.forEach(Zx,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const uee={getAdapter:e=>{e=Ft.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=Ft.isString(n)?Zx[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new xr(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Ft.hasOwnProp(Zx,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!Ft.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Zx};function pC(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $v(null,e)}function jA(e){return pC(e),e.headers=lu.from(e.headers),e.data=hC.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),uee.getAdapter(e.adapter||JP.adapter)(e).then(function(r){return pC(e),r.data=hC.call(e,e.transformResponse,r),r.headers=lu.from(r.headers),r},function(r){return Kz(r)||(pC(e),r&&r.response&&(r.response.data=hC.call(e,e.transformResponse,r.response),r.response.headers=lu.from(r.response.headers))),Promise.reject(r)})}const HA=e=>e instanceof lu?e.toJSON():e;function Yh(e,t){t=t||{};const n={};function r(d,p,m){return Ft.isPlainObject(d)&&Ft.isPlainObject(p)?Ft.merge.call({caseless:m},d,p):Ft.isPlainObject(p)?Ft.merge({},p):Ft.isArray(p)?p.slice():p}function i(d,p,m){if(Ft.isUndefined(p)){if(!Ft.isUndefined(d))return r(void 0,d,m)}else return r(d,p,m)}function o(d,p){if(!Ft.isUndefined(p))return r(void 0,p)}function s(d,p){if(Ft.isUndefined(p)){if(!Ft.isUndefined(d))return r(void 0,d)}else return r(void 0,p)}function a(d,p,m){if(m in t)return r(d,p);if(m in e)return r(void 0,d)}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials: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:a,headers:(d,p)=>i(HA(d),HA(p),!0)};return Ft.forEach(Object.keys(e).concat(Object.keys(t)),function(p){const m=u[p]||i,v=m(e[p],t[p],p);Ft.isUndefined(v)&&m!==a||(n[p]=v)}),n}const Gz="1.3.3",eI={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{eI[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const KA={};eI.transitional=function(t,n,r){function i(o,s){return"[Axios v"+Gz+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new xr(i(s," has been removed"+(n?" in "+n:"")),xr.ERR_DEPRECATED);return n&&!KA[s]&&(KA[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function cee(e,t,n){if(typeof e!="object")throw new xr("options must be an object",xr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],u=a===void 0||s(a,o,e);if(u!==!0)throw new xr("option "+o+" must be "+u,xr.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new xr("Unknown option "+o,xr.ERR_BAD_OPTION)}}const ZS={assertOptions:cee,validators:eI},ju=ZS.validators;class Q1{constructor(t){this.defaults=t,this.interceptors={request:new BA,response:new BA}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yh(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&ZS.assertOptions(r,{silentJSONParsing:ju.transitional(ju.boolean),forcedJSONParsing:ju.transitional(ju.boolean),clarifyTimeoutError:ju.transitional(ju.boolean)},!1),i!==void 0&&ZS.assertOptions(i,{encode:ju.function,serialize:ju.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=o&&Ft.merge(o.common,o[n.method]),s&&Ft.forEach(["delete","get","head","post","put","patch","common"],_=>{delete o[_]}),n.headers=lu.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(P){typeof P.runWhen=="function"&&P.runWhen(n)===!1||(u=u&&P.synchronous,a.unshift(P.fulfilled,P.rejected))});const d=[];this.interceptors.response.forEach(function(P){d.push(P.fulfilled,P.rejected)});let p,m=0,v;if(!u){const _=[jA.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,d),v=_.length,p=Promise.resolve(n);m<v;)p=p.then(_[m++],_[m++]);return p}v=a.length;let x=n;for(m=0;m<v;){const _=a[m++],P=a[m++];try{x=_(x)}catch(k){P.call(this,k);break}}try{p=jA.call(this,x)}catch(_){return Promise.reject(_)}for(m=0,v=d.length;m<v;)p=p.then(d[m++],d[m++]);return p}getUri(t){t=Yh(this.defaults,t);const n=Wz(t.baseURL,t.url);return Uz(n,t.params,t.paramsSerializer)}}Ft.forEach(["delete","get","head","options"],function(t){Q1.prototype[t]=function(n,r){return this.request(Yh(r||{},{method:t,url:n,data:(r||{}).data}))}});Ft.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(Yh(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Q1.prototype[t]=n(),Q1.prototype[t+"Form"]=n(!0)});const Xx=Q1;class tI{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new $v(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new tI(function(i){t=i}),cancel:t}}}const dee=tI;function fee(e){return function(n){return e.apply(null,n)}}function hee(e){return Ft.isObject(e)&&e.isAxiosError===!0}const XS={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(XS).forEach(([e,t])=>{XS[t]=e});const pee=XS;function qz(e){const t=new Xx(e),n=kz(Xx.prototype.request,t);return Ft.extend(n,Xx.prototype,t,{allOwnKeys:!0}),Ft.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return qz(Yh(e,i))},n}const qi=qz(JP);qi.Axios=Xx;qi.CanceledError=$v;qi.CancelToken=dee;qi.isCancel=Kz;qi.VERSION=Gz;qi.toFormData=h_;qi.AxiosError=xr;qi.Cancel=qi.CanceledError;qi.all=function(t){return Promise.all(t)};qi.spread=fee;qi.isAxiosError=hee;qi.mergeConfig=Yh;qi.AxiosHeaders=lu;qi.formToJSON=e=>Hz(Ft.isHTMLForm(e)?new FormData(e):e);qi.HttpStatusCode=pee;qi.default=qi;const mee=qi,Cn={initial:"initial","initial-match":"initial-match-points","initial-unmatch":"initial-unmatch-points",approve:"approve-points",working:"working-points",workingBackground:"working-points-bg",filteredWorking:"filtered-working-points",filteredWorkingBackground:"filtered-working-points-bg",cancelled:"cancelled-points",atd:"atd",pvz:"pvz",pvz_category:"pvz_category",other_category:"other_category",other:"other"},jn={pending:"Pending",onApproval:"Installation",working:"Working",cancelled:"Cancelled"},Nd={[jn.pending]:"\u041A \u0440\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u044E",[jn.onApproval]:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430",[jn.working]:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442",[jn.cancelled]:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D"},nI={kiosk:"\u0413\u043E\u0440\u043E\u0434\u0441\u043A\u043E\u0439 \u043A\u0438\u043E\u0441\u043A",mfc:"\u041C\u0424\u0426",library:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430",sport:"\u0421\u043F\u043E\u0440\u0442\u0438\u0432\u043D\u044B\u0439 \u043E\u0431\u044A\u0435\u043A\u0442",retail:"\u0420\u0438\u0442\u0435\u0439\u043B",residential:"\u041F\u043E\u0434\u044A\u0435\u0437\u0434 \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430",dk:"\u0414\u043E\u043C \u043A\u0443\u043B\u044C\u0442\u0443\u0440\u044B/\u041A\u043B\u0443\u0431"},gee="\u0424\u0438\u043B\u044C\u0442\u0440 \u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D - \u0431\u044B\u043B\u043E \u0440\u0443\u0447\u043D\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",Gr={PENDING:"INITIAL",ON_APPROVAL:"ON_APPROVAL",WORKING:"WORKING"},vee={[Gr.PENDING]:[Cn.initial,Cn.working,Cn.cancelled],[Gr.ON_APPROVAL]:[Cn.approve,Cn.working,Cn.cancelled],[Gr.WORKING]:[Cn.filteredWorking]},WA=e=>{let t;const n=new Set,r=(u,d)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const m=t;t=(d!=null?d:typeof p!="object")?p:Object.assign({},t,p),n.forEach(v=>v(t,m))}},i=()=>t,a={setState:r,getState:i,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{var u;((u={VITE_API_URL:"https://postamates.spatialsystems.ru",VITE_KEYCLOAK_CLIENT_ID:"postnet",VITE_KEYCLOAK_CLIENT_SECRET:"K2yHweEUispkVeWn03VMk843sW2Moic5",VITE_KEYCLOAK_URL:"https://kk.dev.selftech.ru/",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:u.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,a),a},yee=e=>e?WA(e):WA;var Zz={exports:{}},Xz={};/**
|
|
|
* @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 g_=w.exports,xee=OP.exports;function bee(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _ee=typeof Object.is=="function"?Object.is:bee,wee=xee.useSyncExternalStore,Cee=g_.useRef,See=g_.useEffect,Eee=g_.useMemo,Pee=g_.useDebugValue;Xz.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Cee(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Eee(function(){function u(x){if(!d){if(d=!0,p=x,x=r(x),i!==void 0&&s.hasValue){var _=s.value;if(i(_,x))return m=_}return m=x}if(_=m,_ee(p,x))return _;var P=r(x);return i!==void 0&&i(_,P)?_:(p=x,m=P)}var d=!1,p,m,v=n===void 0?null:n;return[function(){return u(t())},v===null?void 0:function(){return u(v())}]},[t,n,r,i]);var a=wee(e,o[0],o[1]);return See(function(){s.hasValue=!0,s.value=a},[a]),Pee(a),a};(function(e){e.exports=Xz})(Zz);const Iee=LE(Zz.exports),{useSyncExternalStoreWithSelector:Tee}=Iee;function kee(e,t=e.getState,n){const r=Tee(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return w.exports.useDebugValue(r),r}const GA=e=>{var t;((t={VITE_API_URL:"https://postamates.spatialsystems.ru",VITE_KEYCLOAK_CLIENT_ID:"postnet",VITE_KEYCLOAK_CLIENT_SECRET:"K2yHweEUispkVeWn03VMk843sW2Moic5",VITE_KEYCLOAK_URL:"https://kk.dev.selftech.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"?yee(e):e,r=(i,o)=>kee(n,i,o);return Object.assign(r,n),r},Sl=e=>e?GA(e):GA,Mee=e=>(t,n,r)=>(r.setState=(i,o,...s)=>{const a=typeof i=="function"?jX(i):i;return t(a,o,...s)},e(r.setState,n,r)),El=Mee;function Ree(e){let t;try{t=e()}catch{return}return{getItem:r=>{var i;const o=a=>a===null?null:JSON.parse(a),s=(i=t.getItem(r))!=null?i:null;return s instanceof Promise?s.then(o):o(s)},setItem:(r,i)=>t.setItem(r,JSON.stringify(i)),removeItem:r=>t.removeItem(r)}}const av=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return av(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return av(r)(n)}}}},Aee=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:k=>k,version:0,merge:(k,T)=>({...T,...k}),...t},s=!1;const a=new Set,u=new Set;let d;try{d=o.getStorage()}catch{}if(!d)return e((...k)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...k)},r,i);const p=av(o.serialize),m=()=>{const k=o.partialize({...r()});let T;const M=p({state:k,version:o.version}).then(O=>d.setItem(o.name,O)).catch(O=>{T=O});if(T)throw T;return M},v=i.setState;i.setState=(k,T)=>{v(k,T),m()};const x=e((...k)=>{n(...k),m()},r,i);let _;const P=()=>{var k;if(!d)return;s=!1,a.forEach(M=>M(r()));const T=((k=o.onRehydrateStorage)==null?void 0:k.call(o,r()))||void 0;return av(d.getItem.bind(d))(o.name).then(M=>{if(M)return o.deserialize(M)}).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==o.version){if(o.migrate)return o.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 _=o.merge(M,(O=r())!=null?O:x),n(_,!0),m()}).then(()=>{T==null||T(_,void 0),s=!0,u.forEach(M=>M(_))}).catch(M=>{T==null||T(void 0,M)})};return i.persist={setOptions:k=>{o={...o,...k},k.getStorage&&(d=k.getStorage())},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>P(),hasHydrated:()=>s,onHydrate:k=>(a.add(k),()=>{a.delete(k)}),onFinishHydration:k=>(u.add(k),()=>{u.delete(k)})},P(),_||x},Dee=(e,t)=>(n,r,i)=>{let o={storage:Ree(()=>localStorage),partialize:P=>P,version:0,merge:(P,k)=>({...k,...P}),...t},s=!1;const a=new Set,u=new Set;let d=o.storage;if(!d)return e((...P)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...P)},r,i);const p=()=>{const P=o.partialize({...r()});return d.setItem(o.name,{state:P,version:o.version})},m=i.setState;i.setState=(P,k)=>{m(P,k),p()};const v=e((...P)=>{n(...P),p()},r,i);let x;const _=()=>{var P;if(!d)return;s=!1,a.forEach(T=>T(r()));const k=((P=o.onRehydrateStorage)==null?void 0:P.call(o,r()))||void 0;return av(d.getItem.bind(d))(o.name).then(T=>{if(T)if(typeof T.version=="number"&&T.version!==o.version){if(o.migrate)return o.migrate(T.state,T.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return T.state}).then(T=>{var M;return x=o.merge(T,(M=r())!=null?M:v),n(x,!0),p()}).then(()=>{k==null||k(x,void 0),s=!0,u.forEach(T=>T(x))}).catch(T=>{k==null||k(void 0,T)})};return i.persist={setOptions:P=>{o={...o,...P},P.storage&&(d=P.storage)},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:P=>(a.add(P),()=>{a.delete(P)}),onFinishHydration:P=>(u.add(P),()=>{u.delete(P)})},_(),x||v},Oee=(e,t)=>{var n;return"getStorage"in t||"serialize"in t||"deserialize"in t?(((n={VITE_API_URL:"https://postamates.spatialsystems.ru",VITE_KEYCLOAK_CLIENT_ID:"postnet",VITE_KEYCLOAK_CLIENT_SECRET:"K2yHweEUispkVeWn03VMk843sW2Moic5",VITE_KEYCLOAK_URL:"https://kk.dev.selftech.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."),Aee(e,t)):Dee(e,t)},Bv=Oee,Nee=e=>({mode:Gr.PENDING,isImportMode:!1,setMode:t=>{e(n=>{n.mode=t})},setImportMode:t=>{e(n=>{n.isImportMode=t})}}),Do=Sl(Bv(El(Nee),{name:"postnet/mode"})),ms=["doors","flat_cnt","rival_post_cnt","rival_pvz_cnt","target_post_cnt","flats_cnt","tc_cnt","culture_cnt","mfc_cnt","public_stop_cnt","supermarket_cnt","target_dist","metro_dist"],J1={common:{name:"\u041E\u0431\u0449\u0438\u0435",doors:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u043E\u0432 \u0432 \u0436\u0438\u043B\u043E\u043C \u0434\u043E\u043C\u0435",flat_cnt:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440 \u0432 \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u0435 \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430"},objects_dist:{name:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0432 \u043E\u043A\u0440\u0435\u0441\u0442\u043D\u043E\u0441\u0442\u0438 500\u043C",rival_post_cnt:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0442\u0435\u0439",rival_pvz_cnt:"\u041A\u043E\u043B-\u0432\u043E \u041F\u0412\u0417",target_post_cnt:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432 \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442",flats_cnt:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440 \u0432 \u043E\u043A\u0440\u0435\u0441\u0442\u043D\u043E\u0441\u0442\u0438",tc_cnt:"\u041A\u043E\u043B-\u0432\u043E \u0442\u043E\u0440\u0433\u043E\u0432\u044B\u0445 \u0446\u0435\u043D\u0442\u0440\u043E\u0432",culture_cnt:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u043A\u0443\u043B\u044C\u0442\u0443\u0440\u044B (\u0442\u0435\u0430\u0442\u0440\u044B, \u043C\u0443\u0437\u0435\u0439 \u0438 \u0442\u0434)",mfc_cnt:"\u041A\u043E\u043B-\u0432\u043E \u041C\u0424\u0426",public_stop_cnt:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043E\u043A \u041E\u0422",supermarket_cnt:"\u041A\u043E\u043B-\u0432\u043E \u0441\u0443\u043F\u0435\u0440\u043C\u0430\u0440\u043A\u0435\u0442\u043E\u0432",target_dist:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430 \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442",metro_dist:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u043C\u0435\u0442\u0440\u043E"}},Yz={\u041F\u0412\u0417:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u041F\u0412\u0417 \u0441\u0435\u0442\u0438","\u041F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u044B \u043F\u0440\u043E\u0447\u0438\u0445 \u0441\u0435\u0442\u0435\u0439":"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430 \u0441\u0435\u0442\u0438"},Hd={prediction:[0,0],categories:[],region:null,doors__gt:0,doors__lt:0,flat_cnt__gt:0,flat_cnt__lt:5e3,rival_post_cnt__gt:0,rival_post_cnt__lt:5e3,rival_pvz_cnt__gt:0,rival_pvz_cnt__lt:5e3,target_post_cnt__gt:0,target_post_cnt__lt:5e3,flats_cnt__gt:0,flats_cnt__lt:5e3,tc_cnt__gt:0,tc_cnt__lt:5e3,culture_cnt__gt:0,culture_cnt__lt:5e3,mfc_cnt__gt:0,mfc_cnt__lt:5e3,public_stop_cnt__gt:0,public_stop_cnt__lt:5e3,supermarket_cnt__gt:0,supermarket_cnt__lt:5e3,target_dist__gt:0,target_dist__lt:5e3,metro_dist__gt:0,metro_dist__lt:5e3},Lee={prediction:[0,0],doors:[0,0],flat_cnt:[0,5e3],rival_post_cnt:[0,5e3],rival_pvz_cnt:[0,5e3],target_post_cnt:[0,5e3],flats_cnt:[0,5e3],tc_cnt:[0,5e3],culture_cnt:[0,5e3],mfc_cnt:[0,5e3],public_stop_cnt:[0,5e3],supermarket_cnt:[0,5e3],target_dist:[0,5e3],metro_dist:[0,5e3]},Fee=e=>({filters:Hd,ranges:Lee,setPrediction:t=>{e(n=>{n.filters.prediction=t})},setCategories:t=>e(n=>{n.filters.categories=t}),setRegion:t=>e(n=>{n.filters.region=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(!t)return n.filters=Hd,n;n.filters={...Hd,prediction:t.prediction}})}),va=Sl(Bv(El(Fee),{name:"postnet/pending-filters"})),zee={included:new Set([]),excluded:new Set([])},$ee=e=>({selection:zee,include:t=>{e(n=>{const{excluded:r}=n.selection;r.has(t)?n.selection.excluded.delete(t):n.selection.included.add(t)})},exclude:t=>{e(n=>{const{included:r}=n.selection;r.has(t)?n.selection.included.delete(t):n.selection.excluded.add(t)})},reset:()=>e(t=>{t.selection.included.clear(),t.selection.excluded.clear()})}),Pl=Sl(El($ee)),Bee=()=>{const{selection:e}=Pl();return w.exports.useMemo(()=>e.included.size||e.excluded.size,[e])},Vee=e=>({updateCounter:-1,updatePVZLayer:-1,toggleUpdateCounter:()=>{e(t=>{t.updateCounter=t.updateCounter===-1?1:-1})},toggleUpdatePVZLayer:()=>{e(t=>{t.updatePVZLayer=t.updatePVZLayer===-1?1:-1})}}),bu=Sl(El(Vee));function Qz(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)}var Uee={\u0401:"YO",\u0419:"I",\u0426:"TS",\u0423:"U",\u041A:"K",\u0415:"E",\u041D:"N",\u0413:"G",\u0428:"SH",\u0429:"SCH",\u0417:"Z",\u0425:"H",\u042A:"'",\u0451:"yo",\u0439:"i",\u0446:"ts",\u0443:"u",\u043A:"k",\u0435:"e",\u043D:"n",\u0433:"g",\u0448:"sh",\u0449:"sch",\u0437:"z",\u0445:"h",\u044A:"'",\u0424:"F",\u042B:"I",\u0412:"V",\u0410:"A",\u041F:"P",\u0420:"R",\u041E:"O",\u041B:"L",\u0414:"D",\u0416:"ZH",\u042D:"E",\u0444:"f",\u044B:"i",\u0432:"v",\u0430:"a",\u043F:"p",\u0440:"r",\u043E:"o",\u043B:"l",\u0434:"d",\u0436:"zh",\u044D:"e",\u042F:"Ya",\u0427:"CH",\u0421:"S",\u041C:"M",\u0418:"I",\u0422:"T",\u042C:"'",\u0411:"B",\u042E:"YU",\u044F:"ya",\u0447:"ch",\u0441:"s",\u043C:"m",\u0438:"i",\u0442:"t",\u044C:"'",\u0431:"b",\u044E:"yu"," ":""};function YS(e){return e.split("").map(function(t){return t===" "?"":Uee[t]||t}).join("")}function sv(e){return e?e.filter(t=>t.visible).map(t=>({...t,groups:[...t.groups.filter(n=>n.visible)]})):[]}function Qh(e,t,n){const r=t[n],i=e[`${n}__gt`],o=r?r[0]:0,s=e[`${n}__lt`],a=r?r[1]:0;return{result:!(i===o&&s===a),gtValue:i,ltValue:s}}const Jz=(e,t,n)=>{const{prediction:r,categories:i,region:o}=e,{prediction_current:s,category:a,area:u,district:d,area_id:p,district_id:m}=n.properties,v=s>=r[0]&&s<=r[1],x=i.length>0?i.includes(a):!0,_=()=>{let k=!0;return ms.map(T=>{Qh(e,t,T).result&&k&&(k=n.properties[T]>=e[`${T}__gt`]&&n.properties[T]<=e[`${T}__lt`])}),k};return v&&x&&(()=>o?o.type==="ao"?(d!=null?d:m)===o.id:(u!=null?u:p)===o.id:!0)()&&_()},v_=(e,t,n)=>{ms.map(r=>{!Qh(t,n,r).result||(/d[0-9]/.test(r)?(e.append("dist_to_group__gt",[r.split("d")[1],t[`${r}__gt`]-1].join(",")),t[`${r}__lt`]<4e3&&e.append("dist_to_group__lt",[r.split("d")[1],t[`${r}__lt`]+1].join(","))):(e.append(`${r}__gt`,t[`${r}__gt`]-1),e.append(`${r}__lt`,t[`${r}__lt`]+1)))}),rI(t,n)&&e.append("prediction_current[]",t.prediction)},rI=(e,t)=>{const n=t.prediction[0]!==e.prediction[0],r=t.prediction[1]!==e.prediction[1];return n||r},Dh=(e,t,n)=>{if(!t[n])return!1;const r=t[n][0]!==e[0],i=t[n][1]!==e[1];return r||i},QS=e=>e==null||e==="",e$="https://postamates.spatialsystems.ru",Mi=mee.create({baseURL:e$}),ys=()=>{const{isImportMode:e}=Do();return e?"pre_placement_points":"placement_points"},tf=()=>{const{isImportMode:e}=Do();return e?"public.prepoints_with_dist":"public.points_with_dist"},t$=(e,t)=>{const n=e||new URLSearchParams;return t&&(t.type==="ao"&&n.append("district[]",t.id),t.type==="rayon"&&n.append("area[]",t.id)),n},gf=async(e,t,n="placement_points",r)=>{const i=t$(e,t),{data:o}=await Mi.get(`https://postamates.spatialsystems.ru/api/${n}/?${i.toString()}`,{signal:r});return o},iI=async(e,t,n="placement_points")=>{const r=t$(e,t),{data:i}=await Mi.get(`https://postamates.spatialsystems.ru/api/${n}/to_excel/?${r.toString()}`,{responseType:"arraybuffer"});return i},jee=async()=>{const{data:e}=await Mi.get("https://postamates.spatialsystems.ru/api/pre_placement_points/download_template/",{responseType:"arraybuffer"});return e},Hee=async(e,t)=>{const n=new FormData;n.append("file",e);const{data:r}=await Mi.post("https://postamates.spatialsystems.ru/api/pre_placement_points/load_matching_file/",n,t);return r},Kee=async e=>{const t=new FormData;t.append("id",e);const{data:n}=await Mi.post("https://postamates.spatialsystems.ru/api/pre_placement_points/start_matching/",t);return n},Wee=async()=>{const{data:e}=await Mi.get("https://postamates.spatialsystems.ru/api/pre_placement_points/import_status/");return e},Gee=()=>{const e=ys(),{updateCounter:t}=bu();return Vi(["all-initial-count",e,t],async({signal:n})=>{const r=new URLSearchParams({page:1,page_size:1});return r.append("status[]",[jn.pending,jn.cancelled]),await gf(r,null,e,n)},{select:n=>n.count,refetchOnWindowFocus:!1})},qee=e=>{const{filters:t,ranges:n}=va(),{updateCounter:r}=bu(),{categories:i,region:o}=t,{selection:{included:s}}=Pl(),a=[...s],u=()=>{const m=new URLSearchParams({page:1,page_size:1,"categories[]":i,"included[]":a});return m.append("status[]",jn.pending),v_(m,t,n),m},d=()=>new URLSearchParams({matching_status:"New"}),p=ys();return Vi(["filtered-points",t,p,a,r],async({signal:m})=>{const v=e?d():u();return await gf(v,o,p,m)},{select:m=>m.count,keepPreviousData:!0,refetchOnWindowFocus:!1})},Zee=()=>{const e=()=>new URLSearchParams({matching_status:"New"}),t=ys();return Vi(["filtered-points",t],async()=>{const n=e();return await gf(n,null,t)},{select:n=>n.count,keepPreviousData:!0})},Xee=()=>NP({mutationFn:()=>Mi.post("https://postamates.spatialsystems.ru/api/pre_placement_points/move_points/")}),n$=()=>NP({mutationFn:e=>Mi.put(`https://postamates.spatialsystems.ru/api/placement_points/update_postamat_id/?${e.toString()}`)}),Yee=async()=>{const{data:e}=await Mi.get("https://postamates.spatialsystems.ru/api/placement_points/last_time_ml_run/");return e},Qee=async()=>{const{data:e}=await Mi.get("https://postamates.spatialsystems.ru/api/placement_points/start/");return e},Jee=async()=>{const{data:e}=await Mi.get("https://postamates.spatialsystems.ru/api/postamate_and_pvz_groups/");return e},oI=()=>Vi(["groups"],async()=>await Jee()),ete=async()=>{const{data:e}=await Mi.get("https://postamates.spatialsystems.ru/api/other_object_groups/");return e},r$=()=>Vi(["other_groups"],async()=>await ete()),tte=()=>Vi(["last_time"],async()=>await Yee(),{refetchInterval:5e3}),nte=e=>{const{isImportMode:t}=Do(),n=t?"":`?status[]=${jn.pending}`;return Vi(["prediction-max-min",e],async()=>{const{data:r,isInitialLoading:i,isFetching:o}=await Mi.get(`https://postamates.spatialsystems.ru/api/${e}/filters/${n}`);return{data:r,isLoading:i||o}},{select:({data:r,isLoading:i})=>{const o=r.dist_to_groups.map(d=>({[`d${d.group_id}`]:[Math.floor(d.dist[0]),Math.min(Math.ceil(d.dist[1]),4e3)]})),s=Object.assign({},...o),a=ms.map(d=>{if(!/d[0-9]/.test(d))return{[d]:[Math.floor(r[d][0]),Math.ceil(r[d][1])]}}).filter(d=>!!d),u=Object.assign({},...a);return{fullRange:{prediction:r.prediction_current,...u,...s},isLoading:i}}})},rte=e=>{const t=e.map(s=>s.properties.id),n=ys(),{data:r,isInitialLoading:i,isFetching:o}=Vi(["popup_data",e],async()=>{const s=new URLSearchParams({"location_ids[]":t}),{data:a}=await Mi.get(`https://postamates.spatialsystems.ru/api/${n}/?${s.toString()}`);return a.results},{refetchOnWindowFocus:!1,refetchOnMount:!1});return{data:r,isLoading:i||o}},ite=async e=>{const t=new FormData;t.append("ids",e),await Mi.delete("https://postamates.spatialsystems.ru/api/pre_placement_points/delete_points/",{data:t})},i$="/assets/logopng.2d4eca6e.png",ote="/assets/circle.bf765fcc.svg",qA=[{name:"logo",url:i$},{name:"defaultIcon",url:ote}];function ze(){return ze=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},ze.apply(this,arguments)}function nn(e){return nn=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},nn(e)}function ate(e,t){if(nn(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(nn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o$(e){var t=ate(e,"string");return nn(t)==="symbol"?t:String(t)}function re(e,t,n){return t=o$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZA(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,o$(r.key),r)}}function Lr(e,t,n){return t&&ZA(e.prototype,t),n&&ZA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function eb(e,t){return eb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},eb(e,t)}function ci(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&&eb(e,t)}function tb(e){return tb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tb(e)}function ste(){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 Vn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lte(e,t){if(t&&(nn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vn(e)}function di(e){var t=ste();return function(){var r=tb(e),i;if(t){var o=tb(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return lte(this,i)}}var a$={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 o=arguments[i];if(!!o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&r.push(a)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var u in o)t.call(o,u)&&o[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(a$);const He=a$.exports;var y_={exports:{}},Fr={};/** @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 so=typeof Symbol=="function"&&Symbol.for,aI=so?Symbol.for("react.element"):60103,sI=so?Symbol.for("react.portal"):60106,x_=so?Symbol.for("react.fragment"):60107,b_=so?Symbol.for("react.strict_mode"):60108,__=so?Symbol.for("react.profiler"):60114,w_=so?Symbol.for("react.provider"):60109,C_=so?Symbol.for("react.context"):60110,lI=so?Symbol.for("react.async_mode"):60111,S_=so?Symbol.for("react.concurrent_mode"):60111,E_=so?Symbol.for("react.forward_ref"):60112,P_=so?Symbol.for("react.suspense"):60113,ute=so?Symbol.for("react.suspense_list"):60120,I_=so?Symbol.for("react.memo"):60115,T_=so?Symbol.for("react.lazy"):60116,cte=so?Symbol.for("react.block"):60121,dte=so?Symbol.for("react.fundamental"):60117,fte=so?Symbol.for("react.responder"):60118,hte=so?Symbol.for("react.scope"):60119;function Ua(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case aI:switch(e=e.type,e){case lI:case S_:case x_:case __:case b_:case P_:return e;default:switch(e=e&&e.$$typeof,e){case C_:case E_:case T_:case I_:case w_:return e;default:return t}}case sI:return t}}}function s$(e){return Ua(e)===S_}Fr.AsyncMode=lI;Fr.ConcurrentMode=S_;Fr.ContextConsumer=C_;Fr.ContextProvider=w_;Fr.Element=aI;Fr.ForwardRef=E_;Fr.Fragment=x_;Fr.Lazy=T_;Fr.Memo=I_;Fr.Portal=sI;Fr.Profiler=__;Fr.StrictMode=b_;Fr.Suspense=P_;Fr.isAsyncMode=function(e){return s$(e)||Ua(e)===lI};Fr.isConcurrentMode=s$;Fr.isContextConsumer=function(e){return Ua(e)===C_};Fr.isContextProvider=function(e){return Ua(e)===w_};Fr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===aI};Fr.isForwardRef=function(e){return Ua(e)===E_};Fr.isFragment=function(e){return Ua(e)===x_};Fr.isLazy=function(e){return Ua(e)===T_};Fr.isMemo=function(e){return Ua(e)===I_};Fr.isPortal=function(e){return Ua(e)===sI};Fr.isProfiler=function(e){return Ua(e)===__};Fr.isStrictMode=function(e){return Ua(e)===b_};Fr.isSuspense=function(e){return Ua(e)===P_};Fr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===x_||e===S_||e===__||e===b_||e===P_||e===ute||typeof e=="object"&&e!==null&&(e.$$typeof===T_||e.$$typeof===I_||e.$$typeof===w_||e.$$typeof===C_||e.$$typeof===E_||e.$$typeof===dte||e.$$typeof===fte||e.$$typeof===hte||e.$$typeof===cte)};Fr.typeOf=Ua;(function(e){e.exports=Fr})(y_);function yo(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(yo(r)):y_.exports.isFragment(r)&&r.props?n=n.concat(yo(r.props.children,t)):n.push(r))}),n}var XA={};function pte(e,t){}function mte(e,t,n){!t&&!XA[n]&&(e(!1,n),XA[n]=!0)}function Dr(e,t){mte(pte,e,t)}function YA(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?YA(Object(n),!0).forEach(function(r){re(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vv(e,t,n){var r=w.exports.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function nb(e,t){typeof e=="function"?e(t):nn(e)==="object"&&e&&"current"in e&&(e.current=t)}function Zo(){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(o){nb(o,i)})}}function l$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vv(function(){return Zo.apply(void 0,t)},t,function(r,i){return r.length===i.length&&r.every(function(o,s){return o===i[s]})})}function vf(e){var t,n,r=y_.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 lv(e){return e instanceof HTMLElement?e:e instanceof Un.Component?Tc.findDOMNode(e):null}var u$=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(i,o){return i[0]===n?(r=o,!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,o=this.__entries__;i<o.length;i++){var s=o[i];n.call(r,s[1],s[0])}},t}()}(),JS=typeof window<"u"&&typeof document<"u"&&window.document===document,rb=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")()}(),gte=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(rb):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),vte=2;function yte(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&a()}function s(){gte(o)}function a(){var u=Date.now();if(n){if(u-i<vte)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=u}return a}var xte=20,bte=["top","right","bottom","left","width","height","size","weight"],_te=typeof MutationObserver<"u",wte=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=yte(this.refresh.bind(this),xte)}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(){!JS||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),_te?(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(){!JS||!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=bte.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c$=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},Jh=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||rb},d$=k_(0,0,0,0);function ib(e){return parseFloat(e)||0}function QA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,i){var o=e["border-"+i+"-width"];return r+ib(o)},0)}function Cte(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var o=i[r],s=e["padding-"+o];n[o]=ib(s)}return n}function Ste(e){var t=e.getBBox();return k_(0,0,t.width,t.height)}function Ete(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return d$;var r=Jh(e).getComputedStyle(e),i=Cte(r),o=i.left+i.right,s=i.top+i.bottom,a=ib(r.width),u=ib(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+o)!==t&&(a-=QA(r,"left","right")+o),Math.round(u+s)!==n&&(u-=QA(r,"top","bottom")+s)),!Ite(e)){var d=Math.round(a+o)-t,p=Math.round(u+s)-n;Math.abs(d)!==1&&(a-=d),Math.abs(p)!==1&&(u-=p)}return k_(i.left,i.top,a,u)}var Pte=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Jh(e).SVGGraphicsElement}:function(e){return e instanceof Jh(e).SVGElement&&typeof e.getBBox=="function"}}();function Ite(e){return e===Jh(e).document.documentElement}function Tte(e){return JS?Pte(e)?Ste(e):Ete(e):d$}function kte(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return c$(s,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),s}function k_(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Mte=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=k_(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Tte(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}(),Rte=function(){function e(t,n){var r=kte(n);c$(this,{target:t,contentRect:r})}return e}(),Ate=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new u$,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 Jh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Mte(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 Jh(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 Rte(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}(),f$=typeof WeakMap<"u"?new WeakMap:new u$,h$=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=wte.getInstance(),r=new Ate(t,n,this);f$.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){h$.prototype[e]=function(){var t;return(t=f$.get(this))[e].apply(t,arguments)}});var p$=function(){return typeof rb.ResizeObserver<"u"?rb.ResizeObserver:h$}(),rc=new Map;function Dte(e){e.forEach(function(t){var n,r=t.target;(n=rc.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var m$=new p$(Dte);function Ote(e,t){rc.has(e)||(rc.set(e,new Set),m$.observe(e)),rc.get(e).add(t)}function Nte(e,t){rc.has(e)&&(rc.get(e).delete(t),rc.get(e).size||(m$.unobserve(e),rc.delete(e)))}var Lte=function(e){ci(n,e);var t=di(n);function n(){return Nr(this,n),t.apply(this,arguments)}return Lr(n,[{key:"render",value:function(){return this.props.children}}]),n}(w.exports.Component),e3=w.exports.createContext(null);function Fte(e){var t=e.children,n=e.onBatchResize,r=w.exports.useRef(0),i=w.exports.useRef([]),o=w.exports.useContext(e3),s=w.exports.useCallback(function(a,u,d){r.current+=1;var p=r.current;i.current.push({size:a,element:u,data:d}),Promise.resolve().then(function(){p===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(a,u,d)},[n,o]);return I(e3.Provider,{value:s,children:t})}function zte(e,t){var n=e.children,r=e.disabled,i=w.exports.useRef(null),o=w.exports.useRef(null),s=w.exports.useContext(e3),a=typeof n=="function",u=a?n(i):n,d=w.exports.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),p=!a&&w.exports.isValidElement(u)&&vf(u),m=p?u.ref:null,v=w.exports.useMemo(function(){return Zo(m,i)},[m,i]),x=function(){return lv(i.current)||lv(o.current)};w.exports.useImperativeHandle(t,function(){return x()});var _=w.exports.useRef(e);_.current=e;var P=w.exports.useCallback(function(k){var T=_.current,M=T.onResize,O=T.data,N=k.getBoundingClientRect(),L=N.width,F=N.height,V=k.offsetWidth,B=k.offsetHeight,H=Math.floor(L),G=Math.floor(F);if(d.current.width!==H||d.current.height!==G||d.current.offsetWidth!==V||d.current.offsetHeight!==B){var ee={width:H,height:G,offsetWidth:V,offsetHeight:B};d.current=ee;var X=V===Math.round(L)?L:V,Z=B===Math.round(F)?F:B,Q=fe(fe({},ee),{},{offsetWidth:X,offsetHeight:Z});s==null||s(Q,k,O),M&&Promise.resolve().then(function(){M(Q,k)})}},[]);return w.exports.useEffect(function(){var k=x();return k&&!r&&Ote(k,P),function(){return Nte(k,P)}},[i.current,r]),I(Lte,{ref:o,children:p?w.exports.cloneElement(u,{ref:v}):u})}var $te=w.exports.forwardRef(zte),Bte="rc-observer-key";function Vte(e,t){var n=e.children,r=typeof n=="function"?[n]:yo(n);return r.map(function(i,o){var s=(i==null?void 0:i.key)||"".concat(Bte,"-").concat(o);return w.exports.createElement($te,{...e,key:s,ref:o===0?t:void 0},i)})}var _u=w.exports.forwardRef(Vte);_u.Collection=Fte;function Ci(e,t){var n=fe({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}var Ute=w.exports.createContext({});const uI=Ute;function uv(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Rn(e,t){if(e==null)return{};var n=uv(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function t3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jte(e){if(Array.isArray(e))return t3(e)}function g$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cI(e,t){if(!!e){if(typeof e=="string")return t3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t3(e,t)}}function Hte(){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 Pt(e){return jte(e)||g$(e)||cI(e)||Hte()}var Ld="RC_FORM_INTERNAL_HOOKS",Br=function(){Dr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},nf=w.exports.createContext({getFieldValue:Br,getFieldsValue:Br,getFieldError:Br,getFieldWarning:Br,getFieldsError:Br,isFieldsTouched:Br,isFieldTouched:Br,isFieldValidating:Br,isFieldsValidating:Br,resetFields:Br,setFields:Br,setFieldValue:Br,setFieldsValue:Br,validateFields:Br,submit:Br,getInternalHooks:function(){return Br(),{dispatch:Br,initEntityValue:Br,registerField:Br,useSubscribe:Br,setInitialValues:Br,destroyForm:Br,setCallbacks:Br,registerWatch:Br,getFields:Br,setValidateMessages:Br,setPreserve:Br,getInitialValue:Br}}});function n3(e){return e==null?[]:Array.isArray(e)?e:[e]}function Zi(){Zi=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(X,Z,Q){X[Z]=Q.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(X,Z,Q){return Object.defineProperty(X,Z,{value:Q,enumerable:!0,configurable:!0,writable:!0}),X[Z]}try{u({},"")}catch{u=function(Q,le,ne){return Q[le]=ne}}function d(X,Z,Q,le){var ne=Z&&Z.prototype instanceof v?Z:v,se=Object.create(ne.prototype),oe=new H(le||[]);return r(se,"_invoke",{value:L(X,Q,oe)}),se}function p(X,Z,Q){try{return{type:"normal",arg:X.call(Z,Q)}}catch(le){return{type:"throw",arg:le}}}e.wrap=d;var m={};function v(){}function x(){}function _(){}var P={};u(P,o,function(){return this});var k=Object.getPrototypeOf,T=k&&k(k(G([])));T&&T!==t&&n.call(T,o)&&(P=T);var M=_.prototype=v.prototype=Object.create(P);function O(X){["next","throw","return"].forEach(function(Z){u(X,Z,function(Q){return this._invoke(Z,Q)})})}function N(X,Z){function Q(ne,se,oe,he){var _e=p(X[ne],X,se);if(_e.type!=="throw"){var be=_e.arg,xe=be.value;return xe&&nn(xe)=="object"&&n.call(xe,"__await")?Z.resolve(xe.__await).then(function(Te){Q("next",Te,oe,he)},function(Te){Q("throw",Te,oe,he)}):Z.resolve(xe).then(function(Te){be.value=Te,oe(be)},function(Te){return Q("throw",Te,oe,he)})}he(_e.arg)}var le;r(this,"_invoke",{value:function(se,oe){function he(){return new Z(function(_e,be){Q(se,oe,_e,be)})}return le=le?le.then(he,he):he()}})}function L(X,Z,Q){var le="suspendedStart";return function(ne,se){if(le==="executing")throw new Error("Generator is already running");if(le==="completed"){if(ne==="throw")throw se;return ee()}for(Q.method=ne,Q.arg=se;;){var oe=Q.delegate;if(oe){var he=F(oe,Q);if(he){if(he===m)continue;return he}}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(le==="suspendedStart")throw le="completed",Q.arg;Q.dispatchException(Q.arg)}else Q.method==="return"&&Q.abrupt("return",Q.arg);le="executing";var _e=p(X,Z,Q);if(_e.type==="normal"){if(le=Q.done?"completed":"suspendedYield",_e.arg===m)continue;return{value:_e.arg,done:Q.done}}_e.type==="throw"&&(le="completed",Q.method="throw",Q.arg=_e.arg)}}}function F(X,Z){var Q=Z.method,le=X.iterator[Q];if(le===void 0)return Z.delegate=null,Q==="throw"&&X.iterator.return&&(Z.method="return",Z.arg=void 0,F(X,Z),Z.method==="throw")||Q!=="return"&&(Z.method="throw",Z.arg=new TypeError("The iterator does not provide a '"+Q+"' method")),m;var ne=p(le,X.iterator,Z.arg);if(ne.type==="throw")return Z.method="throw",Z.arg=ne.arg,Z.delegate=null,m;var se=ne.arg;return se?se.done?(Z[X.resultName]=se.value,Z.next=X.nextLoc,Z.method!=="return"&&(Z.method="next",Z.arg=void 0),Z.delegate=null,m):se:(Z.method="throw",Z.arg=new TypeError("iterator result is not an object"),Z.delegate=null,m)}function V(X){var Z={tryLoc:X[0]};1 in X&&(Z.catchLoc=X[1]),2 in X&&(Z.finallyLoc=X[2],Z.afterLoc=X[3]),this.tryEntries.push(Z)}function B(X){var Z=X.completion||{};Z.type="normal",delete Z.arg,X.completion=Z}function H(X){this.tryEntries=[{tryLoc:"root"}],X.forEach(V,this),this.reset(!0)}function G(X){if(X){var Z=X[o];if(Z)return Z.call(X);if(typeof X.next=="function")return X;if(!isNaN(X.length)){var Q=-1,le=function ne(){for(;++Q<X.length;)if(n.call(X,Q))return ne.value=X[Q],ne.done=!1,ne;return ne.value=void 0,ne.done=!0,ne};return le.next=le}}return{next:ee}}function ee(){return{value:void 0,done:!0}}return x.prototype=_,r(M,"constructor",{value:_,configurable:!0}),r(_,"constructor",{value:x,configurable:!0}),x.displayName=u(_,a,"GeneratorFunction"),e.isGeneratorFunction=function(X){var Z=typeof X=="function"&&X.constructor;return!!Z&&(Z===x||(Z.displayName||Z.name)==="GeneratorFunction")},e.mark=function(X){return Object.setPrototypeOf?Object.setPrototypeOf(X,_):(X.__proto__=_,u(X,a,"GeneratorFunction")),X.prototype=Object.create(M),X},e.awrap=function(X){return{__await:X}},O(N.prototype),u(N.prototype,s,function(){return this}),e.AsyncIterator=N,e.async=function(X,Z,Q,le,ne){ne===void 0&&(ne=Promise);var se=new N(d(X,Z,Q,le),ne);return e.isGeneratorFunction(Z)?se:se.next().then(function(oe){return oe.done?oe.value:se.next()})},O(M),u(M,a,"Generator"),u(M,o,function(){return this}),u(M,"toString",function(){return"[object Generator]"}),e.keys=function(X){var Z=Object(X),Q=[];for(var le in Z)Q.push(le);return Q.reverse(),function ne(){for(;Q.length;){var se=Q.pop();if(se in Z)return ne.value=se,ne.done=!1,ne}return ne.done=!0,ne}},e.values=G,H.prototype={constructor:H,reset:function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!Z)for(var Q in this)Q.charAt(0)==="t"&&n.call(this,Q)&&!isNaN(+Q.slice(1))&&(this[Q]=void 0)},stop:function(){this.done=!0;var Z=this.tryEntries[0].completion;if(Z.type==="throw")throw Z.arg;return this.rval},dispatchException:function(Z){if(this.done)throw Z;var Q=this;function le(be,xe){return oe.type="throw",oe.arg=Z,Q.next=be,xe&&(Q.method="next",Q.arg=void 0),!!xe}for(var ne=this.tryEntries.length-1;ne>=0;--ne){var se=this.tryEntries[ne],oe=se.completion;if(se.tryLoc==="root")return le("end");if(se.tryLoc<=this.prev){var he=n.call(se,"catchLoc"),_e=n.call(se,"finallyLoc");if(he&&_e){if(this.prev<se.catchLoc)return le(se.catchLoc,!0);if(this.prev<se.finallyLoc)return le(se.finallyLoc)}else if(he){if(this.prev<se.catchLoc)return le(se.catchLoc,!0)}else{if(!_e)throw new Error("try statement without catch or finally");if(this.prev<se.finallyLoc)return le(se.finallyLoc)}}}},abrupt:function(Z,Q){for(var le=this.tryEntries.length-1;le>=0;--le){var ne=this.tryEntries[le];if(ne.tryLoc<=this.prev&&n.call(ne,"finallyLoc")&&this.prev<ne.finallyLoc){var se=ne;break}}se&&(Z==="break"||Z==="continue")&&se.tryLoc<=Q&&Q<=se.finallyLoc&&(se=null);var oe=se?se.completion:{};return oe.type=Z,oe.arg=Q,se?(this.method="next",this.next=se.finallyLoc,m):this.complete(oe)},complete:function(Z,Q){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&Q&&(this.next=Q),m},finish:function(Z){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var le=this.tryEntries[Q];if(le.finallyLoc===Z)return this.complete(le.completion,le.afterLoc),B(le),m}},catch:function(Z){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var le=this.tryEntries[Q];if(le.tryLoc===Z){var ne=le.completion;if(ne.type==="throw"){var se=ne.arg;B(le)}return se}}throw new Error("illegal catch attempt")},delegateYield:function(Z,Q,le){return this.delegate={iterator:G(Z),resultName:Q,nextLoc:le},this.method==="next"&&(this.arg=void 0),m}},e}function JA(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(d){n(d);return}a.done?t(u):Promise.resolve(u).then(r,i)}function Fc(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(u){JA(o,r,i,s,a,"next",u)}function a(u){JA(o,r,i,s,a,"throw",u)}s(void 0)})}}function Fd(){return Fd=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},Fd.apply(this,arguments)}function Kte(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,cv(e,t)}function r3(e){return r3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},r3(e)}function cv(e,t){return cv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cv(e,t)}function Wte(){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 Yx(e,t,n){return Wte()?Yx=Reflect.construct.bind():Yx=function(i,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(i,a),d=new u;return s&&cv(d,s.prototype),d},Yx.apply(null,arguments)}function Gte(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function i3(e){var t=typeof Map=="function"?new Map:void 0;return i3=function(r){if(r===null||!Gte(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 Yx(r,arguments,r3(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),cv(i,r)},i3(e)}var qte=/%[sdj%]/g,Zte=function(){};typeof process<"u"&&process.env;function o3(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 Ma(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,o=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var s=e.replace(qte,function(a){if(a==="%%")return"%";if(i>=o)return a;switch(a){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 a}});return s}return e}function Xte(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Xi(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Xte(t)&&typeof e=="string"&&!e)}function Yte(e,t,n){var r=[],i=0,o=e.length;function s(a){r.push.apply(r,a||[]),i++,i===o&&n(r)}e.forEach(function(a){t(a,s)})}function eD(e,t,n){var r=0,i=e.length;function o(s){if(s&&s.length){n(s);return}var a=r;r=r+1,a<i?t(e[a],o):n([])}o([])}function Qte(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var tD=function(e){Kte(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}(i3(Error));function Jte(e,t,n,r,i){if(t.first){var o=new Promise(function(v,x){var _=function(T){return r(T),T.length?x(new tD(T,o3(T))):v(i)},P=Qte(e);eD(P,n,_)});return o.catch(function(v){return v}),o}var s=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),u=a.length,d=0,p=[],m=new Promise(function(v,x){var _=function(k){if(p.push.apply(p,k),d++,d===u)return r(p),p.length?x(new tD(p,o3(p))):v(i)};a.length||(r(p),v(i)),a.forEach(function(P){var k=e[P];s.indexOf(P)!==-1?eD(k,n,_):Yte(k,n,_)})});return m.catch(function(v){return v}),m}function ene(e){return!!(e&&e.message!==void 0)}function tne(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function nD(e,t){return function(n){var r;return e.fullFields?r=tne(t,e.fullFields):r=t[n.field||e.fullField],ene(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 rD(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]=Fd({},e[n],r):e[n]=r}}return e}var v$=function(t,n,r,i,o,s){t.required&&(!r.hasOwnProperty(t.field)||Xi(n,s||t.type))&&i.push(Ma(o.messages.required,t.fullField))},nne=function(t,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Ma(o.messages.whitespace,t.fullField))},Uy,rne=function(){if(Uy)return Uy;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(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),s=new RegExp("^"+n+"$"),a=new RegExp("^"+i+"$"),u=function(N){return N&&N.exact?o:new RegExp("(?:"+t(N)+n+t(N)+")|(?:"+t(N)+i+t(N)+")","g")};u.v4=function(O){return O&&O.exact?s:new RegExp(""+t(O)+n+t(O),"g")},u.v6=function(O){return O&&O.exact?a:new RegExp(""+t(O)+i+t(O),"g")};var d="(?:(?:[a-z]+:)?//)",p="(?:\\S+(?::\\S*)?@)?",m=u.v4().source,v=u.v6().source,x="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",_="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",P="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",k="(?::\\d{2,5})?",T='(?:[/?#][^\\s"]*)?',M="(?:"+d+"|www\\.)"+p+"(?:localhost|"+m+"|"+v+"|"+x+_+P+")"+k+T;return Uy=new RegExp("(?:^"+M+"$)","i"),Uy},iD={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},ag={integer:function(t){return ag.number(t)&&parseInt(t,10)===t},float:function(t){return ag.number(t)&&!ag.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"&&!ag.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(iD.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(rne())},hex:function(t){return typeof t=="string"&&!!t.match(iD.hex)}},ine=function(t,n,r,i,o){if(t.required&&n===void 0){v$(t,n,r,i,o);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=t.type;s.indexOf(a)>-1?ag[a](n)||i.push(Ma(o.messages.types[a],t.fullField,t.type)):a&&typeof n!==t.type&&i.push(Ma(o.messages.types[a],t.fullField,t.type))},one=function(t,n,r,i,o){var s=typeof t.len=="number",a=typeof t.min=="number",u=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=n,m=null,v=typeof n=="number",x=typeof n=="string",_=Array.isArray(n);if(v?m="number":x?m="string":_&&(m="array"),!m)return!1;_&&(p=n.length),x&&(p=n.replace(d,"_").length),s?p!==t.len&&i.push(Ma(o.messages[m].len,t.fullField,t.len)):a&&!u&&p<t.min?i.push(Ma(o.messages[m].min,t.fullField,t.min)):u&&!a&&p>t.max?i.push(Ma(o.messages[m].max,t.fullField,t.max)):a&&u&&(p<t.min||p>t.max)&&i.push(Ma(o.messages[m].range,t.fullField,t.min,t.max))},eh="enum",ane=function(t,n,r,i,o){t[eh]=Array.isArray(t[eh])?t[eh]:[],t[eh].indexOf(n)===-1&&i.push(Ma(o.messages[eh],t.fullField,t[eh].join(", ")))},sne=function(t,n,r,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(Ma(o.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(Ma(o.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},dr={required:v$,whitespace:nne,type:ine,range:one,enum:ane,pattern:sne},lne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n,"string")&&!t.required)return r();dr.required(t,n,i,s,o,"string"),Xi(n,"string")||(dr.type(t,n,i,s,o),dr.range(t,n,i,s,o),dr.pattern(t,n,i,s,o),t.whitespace===!0&&dr.whitespace(t,n,i,s,o))}r(s)},une=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o),n!==void 0&&dr.type(t,n,i,s,o)}r(s)},cne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(n===""&&(n=void 0),Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o),n!==void 0&&(dr.type(t,n,i,s,o),dr.range(t,n,i,s,o))}r(s)},dne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o),n!==void 0&&dr.type(t,n,i,s,o)}r(s)},fne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o),Xi(n)||dr.type(t,n,i,s,o)}r(s)},hne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o),n!==void 0&&(dr.type(t,n,i,s,o),dr.range(t,n,i,s,o))}r(s)},pne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o),n!==void 0&&(dr.type(t,n,i,s,o),dr.range(t,n,i,s,o))}r(s)},mne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(n==null&&!t.required)return r();dr.required(t,n,i,s,o,"array"),n!=null&&(dr.type(t,n,i,s,o),dr.range(t,n,i,s,o))}r(s)},gne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o),n!==void 0&&dr.type(t,n,i,s,o)}r(s)},vne="enum",yne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o),n!==void 0&&dr[vne](t,n,i,s,o)}r(s)},xne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n,"string")&&!t.required)return r();dr.required(t,n,i,s,o),Xi(n,"string")||dr.pattern(t,n,i,s,o)}r(s)},bne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n,"date")&&!t.required)return r();if(dr.required(t,n,i,s,o),!Xi(n,"date")){var u;n instanceof Date?u=n:u=new Date(n),dr.type(t,u,i,s,o),u&&dr.range(t,u.getTime(),i,s,o)}}r(s)},_ne=function(t,n,r,i,o){var s=[],a=Array.isArray(n)?"array":typeof n;dr.required(t,n,i,s,o,a),r(s)},mC=function(t,n,r,i,o){var s=t.type,a=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Xi(n,s)&&!t.required)return r();dr.required(t,n,i,a,o,s),Xi(n,s)||dr.type(t,n,i,a,o)}r(a)},wne=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Xi(n)&&!t.required)return r();dr.required(t,n,i,s,o)}r(s)},Cg={string:lne,method:une,number:cne,boolean:dne,regexp:fne,integer:hne,float:pne,array:mne,object:gne,enum:yne,pattern:xne,date:bne,url:mC,hex:mC,email:mC,required:_ne,any:wne};function a3(){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 s3=a3(),Uv=function(){function e(n){this.rules=null,this._messages=s3,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(o){var s=r[o];i.rules[o]=Array.isArray(s)?s:[s]})},t.messages=function(r){return r&&(this._messages=rD(a3(),r)),this._messages},t.validate=function(r,i,o){var s=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var a=r,u=i,d=o;if(typeof u=="function"&&(d=u,u={}),!this.rules||Object.keys(this.rules).length===0)return d&&d(null,a),Promise.resolve(a);function p(P){var k=[],T={};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<P.length;O++)M(P[O]);k.length?(T=o3(k),d(k,T)):d(null,a)}if(u.messages){var m=this.messages();m===s3&&(m=a3()),rD(m,u.messages),u.messages=m}else u.messages=this.messages();var v={},x=u.keys||Object.keys(this.rules);x.forEach(function(P){var k=s.rules[P],T=a[P];k.forEach(function(M){var O=M;typeof O.transform=="function"&&(a===r&&(a=Fd({},a)),T=a[P]=O.transform(T)),typeof O=="function"?O={validator:O}:O=Fd({},O),O.validator=s.getValidationMethod(O),O.validator&&(O.field=P,O.fullField=O.fullField||P,O.type=s.getType(O),v[P]=v[P]||[],v[P].push({rule:O,value:T,source:a,field:P}))})});var _={};return Jte(v,u,function(P,k){var T=P.rule,M=(T.type==="object"||T.type==="array")&&(typeof T.fields=="object"||typeof T.defaultField=="object");M=M&&(T.required||!T.required&&P.value),T.field=P.field;function O(F,V){return Fd({},V,{fullField:T.fullField+"."+F,fullFields:T.fullFields?[].concat(T.fullFields,[F]):[F]})}function N(F){F===void 0&&(F=[]);var V=Array.isArray(F)?F:[F];!u.suppressWarning&&V.length&&e.warning("async-validator:",V),V.length&&T.message!==void 0&&(V=[].concat(T.message));var B=V.map(nD(T,a));if(u.first&&B.length)return _[T.field]=1,k(B);if(!M)k(B);else{if(T.required&&!P.value)return T.message!==void 0?B=[].concat(T.message).map(nD(T,a)):u.error&&(B=[u.error(T,Ma(u.messages.required,T.field))]),k(B);var H={};T.defaultField&&Object.keys(P.value).map(function(X){H[X]=T.defaultField}),H=Fd({},H,P.rule.fields);var G={};Object.keys(H).forEach(function(X){var Z=H[X],Q=Array.isArray(Z)?Z:[Z];G[X]=Q.map(O.bind(null,X))});var ee=new e(G);ee.messages(u.messages),P.rule.options&&(P.rule.options.messages=u.messages,P.rule.options.error=u.error),ee.validate(P.value,P.rule.options||u,function(X){var Z=[];B&&B.length&&Z.push.apply(Z,B),X&&X.length&&Z.push.apply(Z,X),k(Z.length?Z:null)})}}var L;if(T.asyncValidator)L=T.asyncValidator(T,P.value,N,P.source,u);else if(T.validator){try{L=T.validator(T,P.value,N,P.source,u)}catch(F){console.error==null||console.error(F),u.suppressValidatorError||setTimeout(function(){throw F},0),N(F.message)}L===!0?N():L===!1?N(typeof T.message=="function"?T.message(T.fullField||T.field):T.message||(T.fullField||T.field)+" fails"):L instanceof Array?N(L):L instanceof Error&&N(L.message)}L&&L.then&&L.then(function(){return N()},function(F){return N(F)})},function(P){p(P)},a)},t.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Cg.hasOwnProperty(r.type))throw new Error(Ma("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),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?Cg.required:Cg[this.getType(r)]||void 0},e}();Uv.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Cg[t]=n};Uv.warning=Zte;Uv.messages=s3;Uv.validators=Cg;var Sa="'${name}' is not a valid ${type}",y$={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:Sa,method:Sa,array:Sa,object:Sa,number:Sa,date:Sa,boolean:Sa,integer:Sa,float:Sa,regexp:Sa,email:Sa,url:Sa,hex:Sa},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 x$(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function b$(e){if(Array.isArray(e))return e}function _$(){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 dI(e){return b$(e)||g$(e)||cI(e)||_$()}function w$(e,t,n,r){if(!t.length)return n;var i=dI(t),o=i[0],s=i.slice(1),a;return!e&&typeof o=="number"?a=[]:Array.isArray(e)?a=Pt(e):a=fe({},e),r&&n===void 0&&s.length===1?delete a[o][s[0]]:a[o]=w$(a[o],s,n,r),a}function Cne(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!x$(e,t.slice(0,-1))?e:w$(e,t,n,r)}function M_(e){return Array.isArray(e)?Ene(e):nn(e)==="object"&&e!==null?Sne(e):e}function Sne(e){if(Object.getPrototypeOf(e)===Object.prototype){var t={};for(var n in e)t[n]=M_(e[n]);return t}return e}function Ene(e){return e.map(function(t){return M_(t)})}function Ii(e){return n3(e)}function ic(e,t){var n=x$(e,t);return n}function Wu(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=Cne(e,t,n,r);return i}function oD(e,t){var n={};return t.forEach(function(r){var i=ic(e,r);n=Wu(n,r,i)}),n}function Sg(e,t){return e&&e.some(function(n){return S$(n,t)})}function aD(e){return nn(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function C$(e,t){var n=Array.isArray(e)?Pt(e):fe({},e);return t&&Object.keys(t).forEach(function(r){var i=n[r],o=t[r],s=aD(i)&&aD(o);n[r]=s?C$(i,o||{}):M_(o)}),n}function Qx(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,o){return C$(i,o)},e)}function S$(e,t){return!e||!t||e.length!==t.length?!1:e.every(function(n,r){return t[r]===n})}function Pne(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||nn(e)!=="object"||nn(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),i=new Set([].concat(n,r));return Pt(i).every(function(o){var s=e[o],a=t[o];return typeof s=="function"&&typeof a=="function"?!0:s===a})}function Ine(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&nn(t.target)==="object"&&e in t.target?t.target[e]:t}function sD(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat(Pt(e.slice(0,n)),[i],Pt(e.slice(n,t)),Pt(e.slice(t+1,r))):o<0?[].concat(Pt(e.slice(0,t)),Pt(e.slice(t+1,n+1)),[i],Pt(e.slice(n+1,r))):e}var Tne=Uv;function kne(e,t){return e.replace(/\$\{\w+\}/g,function(n){var r=n.slice(2,-1);return t[r]})}var lD="CODE_LOGIC_ERROR";function l3(e,t,n,r,i){return u3.apply(this,arguments)}function u3(){return u3=Fc(Zi().mark(function e(t,n,r,i,o){var s,a,u,d,p,m,v,x,_;return Zi().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return s=fe({},r),delete s.ruleIndex,s.validator&&(a=s.validator,s.validator=function(){try{return a.apply(void 0,arguments)}catch(T){return console.error(T),Promise.reject(lD)}}),u=null,s&&s.type==="array"&&s.defaultField&&(u=s.defaultField,delete s.defaultField),d=new Tne(re({},t,[s])),p=Qx({},y$,i.validateMessages),d.messages(p),m=[],k.prev=9,k.next=12,Promise.resolve(d.validate(re({},t,n),fe({},i)));case 12:k.next=17;break;case 14:k.prev=14,k.t0=k.catch(9),k.t0.errors&&(m=k.t0.errors.map(function(T,M){var O=T.message,N=O===lD?p.default:O;return w.exports.isValidElement(N)?w.exports.cloneElement(N,{key:"error_".concat(M)}):N}));case 17:if(!(!m.length&&u)){k.next=22;break}return k.next=20,Promise.all(n.map(function(T,M){return l3("".concat(t,".").concat(M),T,u,i,o)}));case 20:return v=k.sent,k.abrupt("return",v.reduce(function(T,M){return[].concat(Pt(T),Pt(M))},[]));case 22:return x=fe(fe({},r),{},{name:t,enum:(r.enum||[]).join(", ")},o),_=m.map(function(T){return typeof T=="string"?kne(T,x):T}),k.abrupt("return",_);case 25:case"end":return k.stop()}},e,null,[[9,14]])})),u3.apply(this,arguments)}function Mne(e,t,n,r,i,o){var s=e.join("."),a=n.map(function(p,m){var v=p.validator,x=fe(fe({},p),{},{ruleIndex:m});return v&&(x.validator=function(_,P,k){var T=!1,M=function(){for(var L=arguments.length,F=new Array(L),V=0;V<L;V++)F[V]=arguments[V];Promise.resolve().then(function(){Dr(!T,"Your validator function has already return a promise. `callback` will be ignored."),T||k.apply(void 0,F)})},O=v(_,P,M);T=O&&typeof O.then=="function"&&typeof O.catch=="function",Dr(T,"`callback` is deprecated. Please return a promise instead."),T&&O.then(function(){k()}).catch(function(N){k(N||" ")})}),x}).sort(function(p,m){var v=p.warningOnly,x=p.ruleIndex,_=m.warningOnly,P=m.ruleIndex;return!!v==!!_?x-P:v?1:-1}),u;if(i===!0)u=new Promise(function(){var p=Fc(Zi().mark(function m(v,x){var _,P,k;return Zi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:_=0;case 1:if(!(_<a.length)){M.next=12;break}return P=a[_],M.next=5,l3(s,t,P,r,o);case 5:if(k=M.sent,!k.length){M.next=9;break}return x([{errors:k,rule:P}]),M.abrupt("return");case 9:_+=1,M.next=1;break;case 12:v([]);case 13:case"end":return M.stop()}},m)}));return function(m,v){return p.apply(this,arguments)}}());else{var d=a.map(function(p){return l3(s,t,p,r,o).then(function(m){return{errors:m,rule:p}})});u=(i?Ane(d):Rne(d)).then(function(p){return Promise.reject(p)})}return u.catch(function(p){return p}),u}function Rne(e){return c3.apply(this,arguments)}function c3(){return c3=Fc(Zi().mark(function e(t){return Zi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(i){var o,s=(o=[]).concat.apply(o,Pt(i));return s}));case 1:case"end":return r.stop()}},e)})),c3.apply(this,arguments)}function Ane(e){return d3.apply(this,arguments)}function d3(){return d3=Fc(Zi().mark(function e(t){var n;return Zi().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=0,i.abrupt("return",new Promise(function(o){t.forEach(function(s){s.then(function(a){a.errors.length&&o([a]),n+=1,n===t.length&&o([])})})}));case 2:case"end":return i.stop()}},e)})),d3.apply(this,arguments)}var Dne=["name"],Za=[];function uD(e,t,n,r,i,o){return typeof e=="function"?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var fI=function(e){ci(n,e);var t=di(n);function n(r){var i;if(Nr(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=Za,i.warnings=Za,i.cancelRegister=function(){var u=i.props,d=u.preserve,p=u.isListField,m=u.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(p,d,Ii(m)),i.cancelRegisterFunc=null},i.getNamePath=function(){var u=i.props,d=u.name,p=u.fieldContext,m=p.prefixName,v=m===void 0?[]:m;return d!==void 0?[].concat(Pt(v),Pt(d)):[]},i.getRules=function(){var u=i.props,d=u.rules,p=d===void 0?[]:d,m=u.fieldContext;return p.map(function(v){return typeof v=="function"?v(m):v})},i.refresh=function(){!i.mounted||i.setState(function(u){var d=u.resetCount;return{resetCount:d+1}})},i.triggerMetaEvent=function(u){var d=i.props.onMetaChange;d==null||d(fe(fe({},i.getMeta()),{},{destroy:u}))},i.onStoreChange=function(u,d,p){var m=i.props,v=m.shouldUpdate,x=m.dependencies,_=x===void 0?[]:x,P=m.onReset,k=p.store,T=i.getNamePath(),M=i.getValue(u),O=i.getValue(k),N=d&&Sg(d,T);switch(p.type==="valueUpdate"&&p.source==="external"&&M!==O&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Za,i.warnings=Za,i.triggerMetaEvent()),p.type){case"reset":if(!d||N){i.touched=!1,i.dirty=!1,i.validatePromise=null,i.errors=Za,i.warnings=Za,i.triggerMetaEvent(),P==null||P(),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||Za),"warnings"in L&&(i.warnings=L.warnings||Za),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}if(v&&!T.length&&uD(v,u,k,M,O,p)){i.reRender();return}break}case"dependenciesUpdate":{var F=_.map(Ii);if(F.some(function(V){return Sg(p.relatedFields,V)})){i.reRender();return}break}default:if(N||(!_.length||T.length||v)&&uD(v,u,k,M,O,p)){i.reRender();return}break}v===!0&&i.reRender()},i.validateRules=function(u){var d=i.getNamePath(),p=i.getValue(),m=Promise.resolve().then(function(){if(!i.mounted)return[];var v=i.props,x=v.validateFirst,_=x===void 0?!1:x,P=v.messageVariables,k=u||{},T=k.triggerName,M=i.getRules();T&&(M=M.filter(function(N){return N}).filter(function(N){var L=N.validateTrigger;if(!L)return!0;var F=n3(L);return F.includes(T)}));var O=Mne(d,p,M,u,_,P);return O.catch(function(N){return N}).then(function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Za;if(i.validatePromise===m){var L;i.validatePromise=null;var F=[],V=[];(L=N.forEach)===null||L===void 0||L.call(N,function(B){var H=B.rule.warningOnly,G=B.errors,ee=G===void 0?Za:G;H?V.push.apply(V,Pt(ee)):F.push.apply(F,Pt(ee))}),i.errors=F,i.warnings=V,i.triggerMetaEvent(),i.reRender()}}),O});return i.validatePromise=m,i.dirty=!0,i.errors=Za,i.warnings=Za,i.triggerMetaEvent(),i.reRender(),m},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 u=i.props.fieldContext,d=u.getInternalHooks(Ld),p=d.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 u={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath()};return u},i.getOnlyChild=function(u){if(typeof u=="function"){var d=i.getMeta();return fe(fe({},i.getOnlyChild(u(i.getControlled(),d,i.props.fieldContext))),{},{isFunction:!0})}var p=yo(u);return p.length!==1||!w.exports.isValidElement(p[0])?{child:p,isFunction:!1}:{child:p[0],isFunction:!1}},i.getValue=function(u){var d=i.props.fieldContext.getFieldsValue,p=i.getNamePath();return ic(u||d(!0),p)},i.getControlled=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=i.props,p=d.trigger,m=d.validateTrigger,v=d.getValueFromEvent,x=d.normalize,_=d.valuePropName,P=d.getValueProps,k=d.fieldContext,T=m!==void 0?m:k.validateTrigger,M=i.getNamePath(),O=k.getInternalHooks,N=k.getFieldsValue,L=O(Ld),F=L.dispatch,V=i.getValue(),B=P||function(X){return re({},_,X)},H=u[p],G=fe(fe({},u),B(V));G[p]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var X,Z=arguments.length,Q=new Array(Z),le=0;le<Z;le++)Q[le]=arguments[le];v?X=v.apply(void 0,Q):X=Ine.apply(void 0,[_].concat(Q)),x&&(X=x(X,V,N(!0))),F({type:"updateValue",namePath:M,value:X}),H&&H.apply(void 0,Q)};var ee=n3(T||[]);return ee.forEach(function(X){var Z=G[X];G[X]=function(){Z&&Z.apply(void 0,arguments);var Q=i.props.rules;Q&&Q.length&&F({type:"validateField",namePath:M,triggerName:X})}}),G},r.fieldContext){var o=r.fieldContext.getInternalHooks,s=o(Ld),a=s.initEntityValue;a(Vn(i))}return i}return Lr(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,s=i.fieldContext;if(this.mounted=!0,s){var a=s.getInternalHooks,u=a(Ld),d=u.registerField;this.cancelRegisterFunc=d(this)}o===!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,o=this.getOnlyChild(i),s=o.child,a=o.isFunction,u;return a?u=s:w.exports.isValidElement(s)?u=w.exports.cloneElement(s,this.getControlled(s.props)):(Dr(!s,"`children` of Field is not validate ReactElement."),u=s),I(Tn,{children:u})}}]),n}(w.exports.Component);fI.contextType=nf;fI.defaultProps={trigger:"onChange",valuePropName:"value"};function hI(e){var t=e.name,n=Rn(e,Dne),r=w.exports.useContext(nf),i=t!==void 0?Ii(t):void 0,o="keep";return n.isListField||(o="_".concat((i||[]).join("_"))),I(fI,{name:i,...n,fieldContext:r},o)}var E$=w.exports.createContext(null),P$=function(t){var n=t.name,r=t.initialValue,i=t.children,o=t.rules,s=t.validateTrigger,a=w.exports.useContext(nf),u=w.exports.useRef({keys:[],id:0}),d=u.current,p=w.exports.useMemo(function(){var _=Ii(a.prefixName)||[];return[].concat(Pt(_),Pt(Ii(n)))},[a.prefixName,n]),m=w.exports.useMemo(function(){return fe(fe({},a),{},{prefixName:p})},[a,p]),v=w.exports.useMemo(function(){return{getKey:function(P){var k=p.length,T=P[k];return[d.keys[T],P.slice(k+1)]}}},[p]);if(typeof i!="function")return Dr(!1,"Form.List only accepts function as children."),null;var x=function(P,k,T){var M=T.source;return M==="internal"?!1:P!==k};return I(E$.Provider,{value:v,children:I(nf.Provider,{value:m,children:I(hI,{name:[],shouldUpdate:x,rules:o,validateTrigger:s,initialValue:r,isList:!0,children:function(_,P){var k=_.value,T=k===void 0?[]:k,M=_.onChange,O=a.getFieldValue,N=function(){var B=O(p||[]);return B||[]},L={add:function(B,H){var G=N();H>=0&&H<=G.length?(d.keys=[].concat(Pt(d.keys.slice(0,H)),[d.id],Pt(d.keys.slice(H))),M([].concat(Pt(G.slice(0,H)),[B],Pt(G.slice(H))))):(d.keys=[].concat(Pt(d.keys),[d.id]),M([].concat(Pt(G),[B]))),d.id+=1},remove:function(B){var H=N(),G=new Set(Array.isArray(B)?B:[B]);G.size<=0||(d.keys=d.keys.filter(function(ee,X){return!G.has(X)}),M(H.filter(function(ee,X){return!G.has(X)})))},move:function(B,H){if(B!==H){var G=N();B<0||B>=G.length||H<0||H>=G.length||(d.keys=sD(d.keys,B,H),M(sD(G,B,H)))}}},F=T||[];return Array.isArray(F)||(F=[]),i(F.map(function(V,B){var H=d.keys[B];return H===void 0&&(d.keys[B]=d.id,H=d.keys[B],d.id+=1),{name:B,key:H,isListField:!0}}),L,P)}})})})};function One(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(p){d=!0,i=p}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return a}}function Le(e,t){return b$(e)||One(e,t)||cI(e,t)||_$()}function Nne(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(i,o){e.forEach(function(s,a){s.catch(function(u){return t=!0,u}).then(function(u){n-=1,r[a]=u,!(n>0)&&(t&&o(r),i(r))})})}):Promise.resolve([])}var I$="__@field_split__";function gC(e){return e.map(function(t){return"".concat(nn(t),":").concat(t)}).join(I$)}var th=function(){function e(){Nr(this,e),this.kvs=new Map}return Lr(e,[{key:"set",value:function(n,r){this.kvs.set(gC(n),r)}},{key:"get",value:function(n){return this.kvs.get(gC(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(gC(n))}},{key:"map",value:function(n){return Pt(this.kvs.entries()).map(function(r){var i=Le(r,2),o=i[0],s=i[1],a=o.split(I$);return n({key:a.map(function(u){var d=u.match(/^([^:]*):(.*)$/),p=Le(d,3),m=p[1],v=p[2];return m==="number"?Number(v):v}),value:s})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),e}(),Lne=["name","errors"],Fne=Lr(function e(t){var n=this;Nr(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===Ld?(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}):(Dr(!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 o,s=Qx({},r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(a){var u=a.key;s=Wu(s,u,ic(r,u))}),n.prevWithoutPreserves=null,n.updateStore(s)}},this.destroyForm=function(){var r=new th;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||r.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=r},this.getInitialValue=function(r){var i=ic(n.initialValues,r);return r.length?M_(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(o){o(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 th;return n.getFieldEntities(r).forEach(function(o){var s=o.getNamePath();i.set(s,o)}),i},this.getFieldEntitiesForNamePathList=function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var s=Ii(o);return i.get(s)||{INVALIDATE_NAME_PATH:Ii(o)}})},this.getFieldsValue=function(r,i){if(n.warningUnhooked(),r===!0&&!i)return n.store;var o=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[];return o.forEach(function(a){var u,d="INVALIDATE_NAME_PATH"in a?a.INVALIDATE_NAME_PATH:a.getNamePath();if(!(!r&&((u=a.isListField)===null||u===void 0?void 0:u.call(a))))if(!i)s.push(d);else{var p="getMeta"in a?a.getMeta():null;i(p)&&s.push(d)}}),oD(n.store,s.map(Ii))},this.getFieldValue=function(r){n.warningUnhooked();var i=Ii(r);return ic(n.store,i)},this.getFieldsError=function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,s){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:Ii(r[s]),errors:[],warnings:[]}})},this.getFieldError=function(r){n.warningUnhooked();var i=Ii(r),o=n.getFieldsError([i])[0];return o.errors},this.getFieldWarning=function(r){n.warningUnhooked();var i=Ii(r),o=n.getFieldsError([i])[0];return o.warnings},this.isFieldsTouched=function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i[0],a=i[1],u,d=!1;i.length===0?u=null:i.length===1?Array.isArray(s)?(u=s.map(Ii),d=!1):(u=null,d=s):(u=s.map(Ii),d=a);var p=n.getFieldEntities(!0),m=function(k){return k.isFieldTouched()};if(!u)return d?p.every(m):p.some(m);var v=new th;u.forEach(function(P){v.set(P,[])}),p.forEach(function(P){var k=P.getNamePath();u.forEach(function(T){T.every(function(M,O){return k[O]===M})&&v.update(T,function(M){return[].concat(Pt(M),[P])})})});var x=function(k){return k.some(m)},_=v.map(function(P){var k=P.value;return k});return d?_.every(x):_.some(x)},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 o=r.map(Ii);return i.some(function(s){var a=s.getNamePath();return Sg(o,a)&&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 th,o=n.getFieldEntities(!0);o.forEach(function(u){var d=u.props.initialValue,p=u.getNamePath();if(d!==void 0){var m=i.get(p)||new Set;m.add({entity:u,value:d}),i.set(p,m)}});var s=function(d){d.forEach(function(p){var m=p.props.initialValue;if(m!==void 0){var v=p.getNamePath(),x=n.getInitialValue(v);if(x!==void 0)Dr(!1,"Form already set 'initialValues' with path '".concat(v.join("."),"'. Field can not overwrite it."));else{var _=i.get(v);if(_&&_.size>1)Dr(!1,"Multiple Field with path '".concat(v.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(_){var P=n.getFieldValue(v);(!r.skipExist||P===void 0)&&n.updateStore(Wu(n.store,v,Pt(_)[0].value))}}}})},a;r.entities?a=r.entities:r.namePathList?(a=[],r.namePathList.forEach(function(u){var d=i.get(u);if(d){var p;(p=a).push.apply(p,Pt(Pt(d).map(function(m){return m.entity})))}})):a=o,s(a)},this.resetFields=function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Qx({},n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(Ii);o.forEach(function(s){var a=n.getInitialValue(s);n.updateStore(Wu(n.store,s,a))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)},this.setFields=function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(s){var a=s.name;s.errors;var u=Rn(s,Lne),d=Ii(a);o.push(d),"value"in u&&n.updateStore(Wu(n.store,d,u.value)),n.notifyObservers(i,[d],{type:"setField",data:s})}),n.notifyWatch(o)},this.getFields=function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var s=o.getNamePath(),a=o.getMeta(),u=fe(fe({},a),{},{name:s,value:n.getFieldValue(s)});return Object.defineProperty(u,"originRCField",{value:!0}),u});return i},this.initEntityValue=function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),s=ic(n.store,o);s===void 0&&n.updateStore(Wu(n.store,o,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 o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(s,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(m){return m!==r}),!n.isMergedPreserve(a)&&(!s||u.length>1)){var d=s?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==d&&n.fieldEntities.every(function(m){return!S$(m.getNamePath(),i)})){var p=n.store;n.updateStore(Wu(p,i,d,!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,o=r.value;n.updateValue(i,o);break}case"validateField":{var s=r.namePath,a=r.triggerName;n.validateFields([s],{triggerName:a});break}}},this.notifyObservers=function(r,i,o){if(n.subscribable){var s=fe(fe({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(a){var u=a.onStoreChange;u(r,i,s)})}else n.forceRootUpdate()},this.triggerDependenciesUpdate=function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(Pt(o))}),o},this.updateValue=function(r,i){var o=Ii(r),s=n.store;n.updateStore(Wu(n.store,o,i)),n.notifyObservers(s,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var a=n.triggerDependenciesUpdate(s,o),u=n.callbacks.onValuesChange;if(u){var d=oD(n.store,[o]);u(d,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(Pt(a)))},this.setFieldsValue=function(r){n.warningUnhooked();var i=n.store;if(r){var o=Qx(n.store,r);n.updateStore(o)}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,o=[],s=new th;n.getFieldEntities().forEach(function(u){var d=u.props.dependencies;(d||[]).forEach(function(p){var m=Ii(p);s.update(m,function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return v.add(u),v})})});var a=function u(d){var p=s.get(d)||new Set;p.forEach(function(m){if(!i.has(m)){i.add(m);var v=m.getNamePath();m.isFieldDirty()&&v.length&&(o.push(v),u(v))}})};return a(r),o},this.triggerOnFieldsChange=function(r,i){var o=n.callbacks.onFieldsChange;if(o){var s=n.getFields();if(i){var a=new th;i.forEach(function(d){var p=d.name,m=d.errors;a.set(p,m)}),s.forEach(function(d){d.errors=a.get(d.name)||d.errors})}var u=s.filter(function(d){var p=d.name;return Sg(r,p)});o(u,s)}},this.validateFields=function(r,i){n.warningUnhooked();var o=!!r,s=o?r.map(Ii):[],a=[];n.getFieldEntities(!0).forEach(function(p){if(o||s.push(p.getNamePath()),(i==null?void 0:i.recursive)&&o){var m=p.getNamePath();m.every(function(_,P){return r[P]===_||r[P]===void 0})&&s.push(m)}if(!(!p.props.rules||!p.props.rules.length)){var v=p.getNamePath();if(!o||Sg(s,v)){var x=p.validateRules(fe({validateMessages:fe(fe({},y$),n.validateMessages)},i));a.push(x.then(function(){return{name:v,errors:[],warnings:[]}}).catch(function(_){var P,k=[],T=[];return(P=_.forEach)===null||P===void 0||P.call(_,function(M){var O=M.rule.warningOnly,N=M.errors;O?T.push.apply(T,Pt(N)):k.push.apply(k,Pt(N))}),k.length?Promise.reject({name:v,errors:k,warnings:T}):{name:v,errors:k,warnings:T}}))}}});var u=Nne(a);n.lastValidatePromise=u,u.catch(function(p){return p}).then(function(p){var m=p.map(function(v){var x=v.name;return x});n.notifyObservers(n.store,m,{type:"validateFinish"}),n.triggerOnFieldsChange(m,p)});var d=u.then(function(){return n.lastValidatePromise===u?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])}).catch(function(p){var m=p.filter(function(v){return v&&v.errors.length});return Promise.reject({values:n.getFieldsValue(s),errorFields:m,outOfDate:n.lastValidatePromise!==u})});return d.catch(function(p){return p}),d},this.submit=function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})},this.forceRootUpdate=t});function pI(e){var t=w.exports.useRef(),n=w.exports.useState({}),r=Le(n,2),i=r[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},s=new Fne(o);t.current=s.getForm()}return[t.current]}var f3=w.exports.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),mI=function(t){var n=t.validateMessages,r=t.onFormChange,i=t.onFormFinish,o=t.children,s=w.exports.useContext(f3),a=w.exports.useRef({});return I(f3.Provider,{value:fe(fe({},s),{},{validateMessages:fe(fe({},s.validateMessages),n),triggerFormChange:function(d,p){r&&r(d,{changedFields:p,forms:a.current}),s.triggerFormChange(d,p)},triggerFormFinish:function(d,p){i&&i(d,{values:p,forms:a.current}),s.triggerFormFinish(d,p)},registerForm:function(d,p){d&&(a.current=fe(fe({},a.current),{},re({},d,p))),s.registerForm(d,p)},unregisterForm:function(d){var p=fe({},a.current);delete p[d],a.current=p,s.unregisterForm(d)}}),children:o})},zne=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],$ne=function(t,n){var r=t.name,i=t.initialValues,o=t.fields,s=t.form,a=t.preserve,u=t.children,d=t.component,p=d===void 0?"form":d,m=t.validateMessages,v=t.validateTrigger,x=v===void 0?"onChange":v,_=t.onValuesChange,P=t.onFieldsChange,k=t.onFinish,T=t.onFinishFailed,M=Rn(t,zne),O=w.exports.useContext(f3),N=pI(s),L=Le(N,1),F=L[0],V=F.getInternalHooks(Ld),B=V.useSubscribe,H=V.setInitialValues,G=V.setCallbacks,ee=V.setValidateMessages,X=V.setPreserve,Z=V.destroyForm;w.exports.useImperativeHandle(n,function(){return F}),w.exports.useEffect(function(){return O.registerForm(r,F),function(){O.unregisterForm(r)}},[O,F,r]),ee(fe(fe({},O.validateMessages),m)),G({onValuesChange:_,onFieldsChange:function(xe){if(O.triggerFormChange(r,xe),P){for(var Te=arguments.length,Ee=new Array(Te>1?Te-1:0),Ce=1;Ce<Te;Ce++)Ee[Ce-1]=arguments[Ce];P.apply(void 0,[xe].concat(Ee))}},onFinish:function(xe){O.triggerFormFinish(r,xe),k&&k(xe)},onFinishFailed:T}),X(a);var Q=w.exports.useRef(null);H(i,!Q.current),Q.current||(Q.current=!0),w.exports.useEffect(function(){return Z},[]);var le,ne=typeof u=="function";if(ne){var se=F.getFieldsValue(!0);le=u(se,F)}else le=u;B(!ne);var oe=w.exports.useRef();w.exports.useEffect(function(){Pne(oe.current||[],o||[])||F.setFields(o||[]),oe.current=o},[o,F]);var he=w.exports.useMemo(function(){return fe(fe({},F),{},{validateTrigger:x})},[F,x]),_e=I(nf.Provider,{value:he,children:le});return p===!1?_e:I(p,{...M,onSubmit:function(xe){xe.preventDefault(),xe.stopPropagation(),F.submit()},onReset:function(xe){var Te;xe.preventDefault(),F.resetFields(),(Te=M.onReset)===null||Te===void 0||Te.call(M,xe)},children:_e})};function cD(e){try{return JSON.stringify(e)}catch{return Math.random()}}function T$(){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,o=t[1],s=w.exports.useState(),a=Le(s,2),u=a[0],d=a[1],p=w.exports.useMemo(function(){return cD(u)},[u]),m=w.exports.useRef(p);m.current=p;var v=w.exports.useContext(nf),x=o||v,_=x&&x._init,P=Ii(i),k=w.exports.useRef(P);return k.current=P,w.exports.useEffect(function(){if(!!_){var T=x.getFieldsValue,M=x.getInternalHooks,O=M(Ld),N=O.registerWatch,L=N(function(V){var B=ic(V,k.current),H=cD(B);m.current!==H&&(m.current=H,d(B))}),F=ic(T(),k.current);return d(F),L}},[_]),u}var Bne=w.exports.forwardRef($ne),xp=Bne;xp.FormProvider=mI;xp.Field=hI;xp.List=P$;xp.useForm=pI;xp.useWatch=T$;const k$={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 Vne={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"},Une={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};const M$=Une;var jne={lang:ze({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"]},Vne),timePickerLocale:ze({},M$)};const dD=jne;var Ea="${label} is not a valid ${type}",Hne={locale:"en",Pagination:k$,DatePicker:dD,TimePicker:M$,Calendar:dD,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:Ea,method:Ea,array:Ea,object:Ea,number:Ea,date:Ea,boolean:Ea,integer:Ea,float:Ea,regexp:Ea,email:Ea,url:Ea,hex:Ea},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 gs=Hne;var Jx=ze({},gs.Modal);function fD(e){e?Jx=ze(ze({},Jx),e):Jx=ze({},gs.Modal)}function R$(){return Jx}var Kne=w.exports.createContext(void 0);const gI=Kne;var Wne="internalMark",Gne=function(t){var n=t.locale,r=n===void 0?{}:n,i=t.children;t._ANT_MARK__,w.exports.useEffect(function(){return fD(r&&r.Modal),function(){fD()}},[r]);var o=w.exports.useMemo(function(){return ze(ze({},r),{exist:!0})},[r]);return I(gI.Provider,{value:o,children:i})};const qne=Gne;var Zne=function(t){var n=t.componentName,r=n===void 0?"global":n,i=t.defaultLocale,o=t.children,s=w.exports.useContext(gI),a=w.exports.useMemo(function(){var d,p=i||gs[r],m=(d=s==null?void 0:s[r])!==null&&d!==void 0?d:{};return ze(ze({},p instanceof Function?p():p),m||{})},[r,i,s]),u=w.exports.useMemo(function(){var d=s&&s.locale;return s&&s.exist&&!d?gs.locale:d},[s]);return o(a,u,s)};const bp=Zne;var A$=function(t,n){var r=w.exports.useContext(gI),i=w.exports.useMemo(function(){var o,s=n||gs[t],a=(o=r==null?void 0:r[t])!==null&&o!==void 0?o:{};return ze(ze({},typeof s=="function"?s():s),a||{})},[t,n,r]);return[i]},Xne={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 Yne=Xne;function go(e,t){Qne(e)&&(e="100%");var n=Jne(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 jy(e){return Math.min(1,Math.max(0,e))}function Qne(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Jne(e){return typeof e=="string"&&e.indexOf("%")!==-1}function D$(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Hy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function zd(e){return e.length===1?"0"+e:String(e)}function ere(e,t,n){return{r:go(e,255)*255,g:go(t,255)*255,b:go(n,255)*255}}function hD(e,t,n){e=go(e,255),t=go(t,255),n=go(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,s=0,a=(r+i)/2;if(r===i)s=0,o=0;else{var u=r-i;switch(s=a>.5?u/(2-r-i):u/(r+i),r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s,l:a}}function vC(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 tre(e,t,n){var r,i,o;if(e=go(e,360),t=go(t,100),n=go(n,100),t===0)i=n,o=n,r=n;else{var s=n<.5?n*(1+t):n+t-n*t,a=2*n-s;r=vC(a,s,e+1/3),i=vC(a,s,e),o=vC(a,s,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function ob(e,t,n){e=go(e,255),t=go(t,255),n=go(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,s=r,a=r-i,u=r===0?0:a/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4;break}o/=6}return{h:o,s:u,v:s}}function nre(e,t,n){e=go(e,360)*6,t=go(t,100),n=go(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),s=n*(1-i*t),a=n*(1-(1-i)*t),u=r%6,d=[n,s,o,o,a,n][u],p=[a,n,n,s,o,o][u],m=[o,o,a,n,n,s][u];return{r:d*255,g:p*255,b:m*255}}function ab(e,t,n,r){var i=[zd(Math.round(e).toString(16)),zd(Math.round(t).toString(16)),zd(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 rre(e,t,n,r,i){var o=[zd(Math.round(e).toString(16)),zd(Math.round(t).toString(16)),zd(Math.round(n).toString(16)),zd(ire(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function ire(e){return Math.round(parseFloat(e)*255).toString(16)}function pD(e){return Pa(e)/255}function Pa(e){return parseInt(e,16)}function ore(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var h3={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 Fs(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof e=="string"&&(e=lre(e)),typeof e=="object"&&(Kl(e.r)&&Kl(e.g)&&Kl(e.b)?(t=ere(e.r,e.g,e.b),s=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kl(e.h)&&Kl(e.s)&&Kl(e.v)?(r=Hy(e.s),i=Hy(e.v),t=nre(e.h,r,i),s=!0,a="hsv"):Kl(e.h)&&Kl(e.s)&&Kl(e.l)&&(r=Hy(e.s),o=Hy(e.l),t=tre(e.h,r,o),s=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=D$(n),{ok:s,format:e.format||a,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 are="[-\\+]?\\d+%?",sre="[-\\+]?\\d*\\.\\d+%?",oc="(?:".concat(sre,")|(?:").concat(are,")"),yC="[\\s|\\(]+(".concat(oc,")[,|\\s]+(").concat(oc,")[,|\\s]+(").concat(oc,")\\s*\\)?"),xC="[\\s|\\(]+(".concat(oc,")[,|\\s]+(").concat(oc,")[,|\\s]+(").concat(oc,")[,|\\s]+(").concat(oc,")\\s*\\)?"),Rs={CSS_UNIT:new RegExp(oc),rgb:new RegExp("rgb"+yC),rgba:new RegExp("rgba"+xC),hsl:new RegExp("hsl"+yC),hsla:new RegExp("hsla"+xC),hsv:new RegExp("hsv"+yC),hsva:new RegExp("hsva"+xC),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 lre(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(h3[e])e=h3[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Rs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Rs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Rs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Rs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Rs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Rs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Rs.hex8.exec(e),n?{r:Pa(n[1]),g:Pa(n[2]),b:Pa(n[3]),a:pD(n[4]),format:t?"name":"hex8"}:(n=Rs.hex6.exec(e),n?{r:Pa(n[1]),g:Pa(n[2]),b:Pa(n[3]),format:t?"name":"hex"}:(n=Rs.hex4.exec(e),n?{r:Pa(n[1]+n[1]),g:Pa(n[2]+n[2]),b:Pa(n[3]+n[3]),a:pD(n[4]+n[4]),format:t?"name":"hex8"}:(n=Rs.hex3.exec(e),n?{r:Pa(n[1]+n[1]),g:Pa(n[2]+n[2]),b:Pa(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Kl(e){return Boolean(Rs.CSS_UNIT.exec(String(e)))}var bC=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=ore(t)),this.originalInput=t;var i=Fs(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,o=t.r/255,s=t.g/255,a=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.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=D$(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=ob(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=ob(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=hD(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=hD(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),ab(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),rre(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(go(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(go(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="#"+ab(this.r,this.g,this.b,!1),n=0,r=Object.entries(h3);n<r.length;n++){var i=r[n],o=i[0],s=i[1];if(t===s)return o}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,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?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=jy(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=jy(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=jy(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=jy(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(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+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,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},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,o=n.v,s=[],a=1/t;t--;)s.push(new e({h:r,s:i,v:o})),o=(o+a)%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],o=360/t,s=1;s<t;s++)i.push(new e({h:(r+s*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Ky=2,mD=.16,ure=.05,cre=.05,dre=.15,O$=5,N$=4,fre=[{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 gD(e){var t=e.r,n=e.g,r=e.b,i=ob(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function Wy(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ab(t,n,r,!1))}function hre(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 vD(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Ky*t:Math.round(e.h)+Ky*t:r=n?Math.round(e.h)+Ky*t:Math.round(e.h)-Ky*t,r<0?r+=360:r>=360&&(r-=360),r}function yD(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-mD*t:t===N$?r=e.s+mD:r=e.s+ure*t,r>1&&(r=1),n&&t===O$&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function xD(e,t,n){var r;return n?r=e.v+cre*t:r=e.v-dre*t,r>1&&(r=1),Number(r.toFixed(2))}function dv(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Fs(e),i=O$;i>0;i-=1){var o=gD(r),s=Wy(Fs({h:vD(o,i,!0),s:yD(o,i,!0),v:xD(o,i,!0)}));n.push(s)}n.push(Wy(r));for(var a=1;a<=N$;a+=1){var u=gD(r),d=Wy(Fs({h:vD(u,a),s:yD(u,a),v:xD(u,a)}));n.push(d)}return t.theme==="dark"?fre.map(function(p){var m=p.index,v=p.opacity,x=Wy(hre(Fs(t.backgroundColor||"#141414"),Fs(n[m]),v*100));return x}):n}var Oh={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"},_C={},wC={};Object.keys(Oh).forEach(function(e){_C[e]=dv(Oh[e]),_C[e].primary=_C[e][5],wC[e]=dv(Oh[e],{theme:"dark",backgroundColor:"#141414"}),wC[e].primary=wC[e][5]});function Mo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Kd(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 bD="data-rc-order",pre="rc-util-key",p3=new Map;function L$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):pre}function R_(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function mre(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function F$(e){return Array.from((p3.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function z$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Mo())return null;var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute(bD,mre(r)),n!=null&&n.nonce&&(i.nonce=n==null?void 0:n.nonce),i.innerHTML=e;var o=R_(t),s=o.firstChild;if(r){if(r==="queue"){var a=F$(o).filter(function(u){return["prepend","prependQueue"].includes(u.getAttribute(bD))});if(a.length)return o.insertBefore(i,a[a.length-1].nextSibling),i}o.insertBefore(i,s)}else o.appendChild(i);return i}function $$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=R_(t);return F$(n).find(function(r){return r.getAttribute(L$(t))===e})}function _D(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=$$(e,t);if(n){var r=R_(t);r.removeChild(n)}}function gre(e,t){var n=p3.get(e);if(!n||!Kd(document,n)){var r=z$("",t),i=r.parentNode;p3.set(e,i),e.removeChild(r)}}function jv(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=R_(n);gre(r,n);var i=$$(t,n);if(i){var o,s;if((o=n.csp)!==null&&o!==void 0&&o.nonce&&i.nonce!==((s=n.csp)===null||s===void 0?void 0:s.nonce)){var a;i.nonce=(a=n.csp)===null||a===void 0?void 0:a.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var u=z$(e,n);return u.setAttribute(L$(n),t),u}function vre(e,t){Dr(e,"[@ant-design/icons] ".concat(t))}function wD(e){return nn(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(nn(e.icon)==="object"||typeof e.icon=="function")}function CD(){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 m3(e,t,n){return n?Un.createElement(e.tag,fe(fe({key:t},CD(e.attrs)),n),(e.children||[]).map(function(r,i){return m3(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Un.createElement(e.tag,fe({key:t},CD(e.attrs)),(e.children||[]).map(function(r,i){return m3(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function B$(e){return dv(e)[0]}function V$(e){return e?Array.isArray(e)?e:[e]:[]}var yre=`
|
|
|
.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);
|
|
|
}
|
|
|
}
|
|
|
`,xre=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yre,n=w.exports.useContext(uI),r=n.csp;w.exports.useEffect(function(){jv(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},bre=["icon","className","onClick","style","primaryColor","secondaryColor"],Eg={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function _re(e){var t=e.primaryColor,n=e.secondaryColor;Eg.primaryColor=t,Eg.secondaryColor=n||B$(t),Eg.calculated=!!n}function wre(){return fe({},Eg)}var A_=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,s=t.primaryColor,a=t.secondaryColor,u=Rn(t,bre),d=Eg;if(s&&(d={primaryColor:s,secondaryColor:a||B$(s)}),xre(),vre(wD(n),"icon should be icon definiton, but got ".concat(n)),!wD(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=fe(fe({},p),{},{icon:p.icon(d.primaryColor,d.secondaryColor)})),m3(p.icon,"svg-".concat(p.name),fe({className:r,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u))};A_.displayName="IconReact";A_.getTwoToneColors=wre;A_.setTwoToneColors=_re;const vI=A_;function U$(e){var t=V$(e),n=Le(t,2),r=n[0],i=n[1];return vI.setTwoToneColors({primaryColor:r,secondaryColor:i})}function Cre(){var e=vI.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Sre=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];U$("#1890ff");var D_=w.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,o=e.spin,s=e.rotate,a=e.tabIndex,u=e.onClick,d=e.twoToneColor,p=Rn(e,Sre),m=w.exports.useContext(uI),v=m.prefixCls,x=v===void 0?"anticon":v,_=m.rootClassName,P=He(_,x,(n={},re(n,"".concat(x,"-").concat(i.name),!!i.name),re(n,"".concat(x,"-spin"),!!o||i.name==="loading"),n),r),k=a;k===void 0&&u&&(k=-1);var T=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,M=V$(d),O=Le(M,2),N=O[0],L=O[1];return I("span",{...fe(fe({role:"img","aria-label":i.name},p),{},{ref:t,tabIndex:k,onClick:u,className:P}),children:I(vI,{icon:i,primaryColor:N,secondaryColor:L,style:T})})});D_.displayName="AntdIcon";D_.getTwoToneColor=Cre;D_.setTwoToneColor=U$;const Qn=D_;var j$=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Yne})})};j$.displayName="CheckCircleFilled";const O_=w.exports.forwardRef(j$);var Ere={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 Pre=Ere;var H$=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Pre})})};H$.displayName="CloseCircleFilled";const yf=w.exports.forwardRef(H$);var Ire={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 Tre=Ire;var K$=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Tre})})};K$.displayName="ExclamationCircleFilled";const yI=w.exports.forwardRef(K$);var kre={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 Mre=kre;var W$=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Mre})})};W$.displayName="InfoCircleFilled";const G$=w.exports.forwardRef(W$);var Rre={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 q$=Rre;var Z$=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:q$})})};Z$.displayName="LoadingOutlined";const Mc=w.exports.forwardRef(Z$);var Hv=fe({},FZ),Are=Hv.version,Dre=Hv.render,Ore=Hv.unmountComponentAtNode,N_;try{var Nre=Number((Are||"").split(".")[0]);Nre>=18&&(N_=Hv.createRoot)}catch{}function SD(e){var t=Hv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&nn(t)==="object"&&(t.usingClientEntryPoint=e)}var sb="__rc_react_root__";function Lre(e,t){SD(!0);var n=t[sb]||N_(t);SD(!1),n.render(e),t[sb]=n}function Fre(e,t){Dre(e,t)}function X$(e,t){if(N_){Lre(e,t);return}Fre(e,t)}function zre(e){return g3.apply(this,arguments)}function g3(){return g3=Fc(Zi().mark(function e(t){return Zi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=t[sb])===null||i===void 0||i.unmount(),delete t[sb]}));case 1:case"end":return r.stop()}},e)})),g3.apply(this,arguments)}function $re(e){Ore(e)}function Y$(e){return v3.apply(this,arguments)}function v3(){return v3=Fc(Zi().mark(function e(t){return Zi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(N_===void 0){r.next=2;break}return r.abrupt("return",zre(t));case 2:$re(t);case 3:case"end":return r.stop()}},e)})),v3.apply(this,arguments)}function ED(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 Bre(e,t){var n={animationend:ED("Animation","AnimationEnd"),transitionend:ED("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var Vre=Bre(Mo(),typeof window<"u"?window:{}),Q$={};if(Mo()){var Ure=document.createElement("div");Q$=Ure.style}var Gy={};function J$(e){if(Gy[e])return Gy[e];var t=Vre[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in Q$)return Gy[e]=t[o],Gy[e]}return""}var eB=J$("animationend"),tB=J$("transitionend"),nB=!!(eB&&tB),PD=eB||"animationend",ID=tB||"transitionend";function TD(e,t){if(!e)return null;if(nn(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}var lh="none",qy="appear",Zy="enter",Xy="leave",kD="none",eu="prepare",wh="start",Ch="active",xI="end";function vl(e){var t=w.exports.useRef(!1),n=w.exports.useState(e),r=Le(n,2),i=r[0],o=r[1];w.exports.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function s(a,u){u&&t.current||o(a)}return[i,s]}var rB=function(t){return+setTimeout(t,16)},iB=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(rB=function(t){return window.requestAnimationFrame(t)},iB=function(t){return window.cancelAnimationFrame(t)});var MD=0,bI=new Map;function oB(e){bI.delete(e)}var ar=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;MD+=1;var r=MD;function i(o){if(o===0)oB(r),t();else{var s=rB(function(){i(o-1)});bI.set(r,s)}}return i(n),r};ar.cancel=function(e){var t=bI.get(e);return oB(t),iB(t)};const jre=function(){var e=w.exports.useRef(null);function t(){ar.cancel(e.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=ar(function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)});e.current=o}return w.exports.useEffect(function(){return function(){t()}},[]),[n,t]};var aB=Mo()?w.exports.useLayoutEffect:w.exports.useEffect,RD=[eu,wh,Ch,xI],sB=!1,Hre=!0;function lB(e){return e===Ch||e===xI}const Kre=function(e,t){var n=vl(kD),r=Le(n,2),i=r[0],o=r[1],s=jre(),a=Le(s,2),u=a[0],d=a[1];function p(){o(eu,!0)}return aB(function(){if(i!==kD&&i!==xI){var m=RD.indexOf(i),v=RD[m+1],x=t(i);x===sB?o(v,!0):u(function(_){function P(){_.isCanceled()||o(v,!0)}x===!0?P():Promise.resolve(x).then(P)})}},[e,i]),w.exports.useEffect(function(){return function(){d()}},[]),[p,i]},Wre=function(e){var t=w.exports.useRef(),n=w.exports.useRef(e);n.current=e;var r=w.exports.useCallback(function(s){n.current(s)},[]);function i(s){s&&(s.removeEventListener(ID,r),s.removeEventListener(PD,r))}function o(s){t.current&&t.current!==s&&i(t.current),s&&s!==t.current&&(s.addEventListener(ID,r),s.addEventListener(PD,r),t.current=s)}return w.exports.useEffect(function(){return function(){i(t.current)}},[]),[o,i]};function Gre(e,t,n,r){var i=r.motionEnter,o=i===void 0?!0:i,s=r.motionAppear,a=s===void 0?!0:s,u=r.motionLeave,d=u===void 0?!0:u,p=r.motionDeadline,m=r.motionLeaveImmediately,v=r.onAppearPrepare,x=r.onEnterPrepare,_=r.onLeavePrepare,P=r.onAppearStart,k=r.onEnterStart,T=r.onLeaveStart,M=r.onAppearActive,O=r.onEnterActive,N=r.onLeaveActive,L=r.onAppearEnd,F=r.onEnterEnd,V=r.onLeaveEnd,B=r.onVisibleChanged,H=vl(),G=Le(H,2),ee=G[0],X=G[1],Z=vl(lh),Q=Le(Z,2),le=Q[0],ne=Q[1],se=vl(null),oe=Le(se,2),he=oe[0],_e=oe[1],be=w.exports.useRef(!1),xe=w.exports.useRef(null);function Te(){return n()}var Ee=w.exports.useRef(!1);function Ce(ct){var wt=Te();if(!(ct&&!ct.deadline&&ct.target!==wt)){var rt=Ee.current,ut;le===qy&&rt?ut=L==null?void 0:L(wt,ct):le===Zy&&rt?ut=F==null?void 0:F(wt,ct):le===Xy&&rt&&(ut=V==null?void 0:V(wt,ct)),le!==lh&&rt&&ut!==!1&&(ne(lh,!0),_e(null,!0))}}var ke=Wre(Ce),De=Le(ke,1),Ke=De[0],Ue=w.exports.useMemo(function(){var ct,wt,rt;switch(le){case qy:return ct={},re(ct,eu,v),re(ct,wh,P),re(ct,Ch,M),ct;case Zy:return wt={},re(wt,eu,x),re(wt,wh,k),re(wt,Ch,O),wt;case Xy:return rt={},re(rt,eu,_),re(rt,wh,T),re(rt,Ch,N),rt;default:return{}}},[le]),tt=Kre(le,function(ct){if(ct===eu){var wt=Ue[eu];return wt?wt(Te()):sB}if(We in Ue){var rt;_e(((rt=Ue[We])===null||rt===void 0?void 0:rt.call(Ue,Te(),null))||null)}return We===Ch&&(Ke(Te()),p>0&&(clearTimeout(xe.current),xe.current=setTimeout(function(){Ce({deadline:!0})},p))),Hre}),lt=Le(tt,2),St=lt[0],We=lt[1],bt=lB(We);Ee.current=bt,aB(function(){X(t);var ct=be.current;if(be.current=!0,!!e){var wt;!ct&&t&&a&&(wt=qy),ct&&t&&o&&(wt=Zy),(ct&&!t&&d||!ct&&m&&!t&&d)&&(wt=Xy),wt&&(ne(wt),St())}},[t]),w.exports.useEffect(function(){(le===qy&&!a||le===Zy&&!o||le===Xy&&!d)&&ne(lh)},[a,o,d]),w.exports.useEffect(function(){return function(){be.current=!1,clearTimeout(xe.current)}},[]);var Qe=w.exports.useRef(!1);w.exports.useEffect(function(){ee&&(Qe.current=!0),ee!==void 0&&le===lh&&((Qe.current||ee)&&(B==null||B(ee)),Qe.current=!0)},[ee,le]);var mt=he;return Ue[eu]&&We===wh&&(mt=fe({transition:"none"},mt)),[le,We,mt,ee!=null?ee:t]}var qre=function(e){ci(n,e);var t=di(n);function n(){return Nr(this,n),t.apply(this,arguments)}return Lr(n,[{key:"render",value:function(){return this.props.children}}]),n}(w.exports.Component);function Zre(e){var t=e;nn(e)==="object"&&(t=e.transitionSupport);function n(i){return!!(i.motionName&&t)}var r=w.exports.forwardRef(function(i,o){var s=i.visible,a=s===void 0?!0:s,u=i.removeOnLeave,d=u===void 0?!0:u,p=i.forceRender,m=i.children,v=i.motionName,x=i.leavedClassName,_=i.eventProps,P=n(i),k=w.exports.useRef(),T=w.exports.useRef();function M(){try{return k.current instanceof HTMLElement?k.current:lv(T.current)}catch{return null}}var O=Gre(P,a,M,i),N=Le(O,4),L=N[0],F=N[1],V=N[2],B=N[3],H=w.exports.useRef(B);B&&(H.current=!0);var G=w.exports.useCallback(function(se){k.current=se,nb(o,se)},[o]),ee,X=fe(fe({},_),{},{visible:a});if(!m)ee=null;else if(L===lh||!n(i))B?ee=m(fe({},X),G):!d&&H.current&&x?ee=m(fe(fe({},X),{},{className:x}),G):p||!d&&!x?ee=m(fe(fe({},X),{},{style:{display:"none"}}),G):ee=null;else{var Z,Q;F===eu?Q="prepare":lB(F)?Q="active":F===wh&&(Q="start"),ee=m(fe(fe({},X),{},{className:He(TD(v,L),(Z={},re(Z,TD(v,"".concat(L,"-").concat(Q)),Q),re(Z,v,typeof v=="string"),Z)),style:V}),G)}if(w.exports.isValidElement(ee)&&vf(ee)){var le=ee,ne=le.ref;ne||(ee=w.exports.cloneElement(ee,{ref:G}))}return I(qre,{ref:T,children:ee})});return r.displayName="CSSMotion",r}const Xo=Zre(nB);var y3="add",x3="keep",b3="remove",CC="removed";function Xre(e){var t;return e&&nn(e)==="object"&&"key"in e?t=e:t={key:e},fe(fe({},t),{},{key:String(t.key)})}function _3(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Xre)}function Yre(){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,o=_3(e),s=_3(t);o.forEach(function(d){for(var p=!1,m=r;m<i;m+=1){var v=s[m];if(v.key===d.key){r<m&&(n=n.concat(s.slice(r,m).map(function(x){return fe(fe({},x),{},{status:y3})})),r=m),n.push(fe(fe({},v),{},{status:x3})),r+=1,p=!0;break}}p||n.push(fe(fe({},d),{},{status:b3}))}),r<i&&(n=n.concat(s.slice(r).map(function(d){return fe(fe({},d),{},{status:y3})})));var a={};n.forEach(function(d){var p=d.key;a[p]=(a[p]||0)+1});var u=Object.keys(a).filter(function(d){return a[d]>1});return u.forEach(function(d){n=n.filter(function(p){var m=p.key,v=p.status;return m!==d||v!==b3}),n.forEach(function(p){p.key===d&&(p.status=x3)})}),n}var Qre=["component","children","onVisibleChanged","onAllRemoved"],Jre=["status"],eie=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function tie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xo,n=function(r){ci(o,r);var i=di(o);function o(){var s;Nr(this,o);for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];return s=i.call.apply(i,[this].concat(u)),re(Vn(s),"state",{keyEntities:[]}),re(Vn(s),"removeKey",function(p){var m=s.state.keyEntities,v=m.map(function(x){return x.key!==p?x:fe(fe({},x),{},{status:CC})});return s.setState({keyEntities:v}),v.filter(function(x){var _=x.status;return _!==CC}).length}),s}return Lr(o,[{key:"render",value:function(){var a=this,u=this.state.keyEntities,d=this.props,p=d.component,m=d.children,v=d.onVisibleChanged,x=d.onAllRemoved,_=Rn(d,Qre),P=p||w.exports.Fragment,k={};return eie.forEach(function(T){k[T]=_[T],delete _[T]}),delete _.keys,I(P,{..._,children:u.map(function(T){var M=T.status,O=Rn(T,Jre),N=M===y3||M===x3;return w.exports.createElement(t,{...k,key:O.key,visible:N,eventProps:O,onVisibleChanged:function(F){if(v==null||v(F,{key:O.key}),!F){var V=a.removeKey(O.key);V===0&&x&&x()}}},m)})})}}],[{key:"getDerivedStateFromProps",value:function(a,u){var d=a.keys,p=u.keyEntities,m=_3(d),v=Yre(p,m);return{keyEntities:v.filter(function(x){var _=p.find(function(P){var k=P.key;return x.key===k});return!(_&&_.status===CC&&x.status===b3)})}}}]),o}(w.exports.Component);return re(n,"defaultProps",{component:"div"}),n}const _I=tie(nB);var wI=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.closeTimer=null,r.close=function(a){a&&a.stopPropagation(),r.clearCloseTimer();var u=r.props,d=u.onClose,p=u.noticeKey;d&&d(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 Lr(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,o=this.props,s=o.prefixCls,a=o.className,u=o.closable,d=o.closeIcon,p=o.style,m=o.onClick,v=o.children,x=o.holder,_="".concat(s,"-notice"),P=Object.keys(this.props).reduce(function(T,M){return(M.substr(0,5)==="data-"||M.substr(0,5)==="aria-"||M==="role")&&(T[M]=i.props[M]),T},{}),k=$e("div",{className:He(_,a,re({},"".concat(_,"-closable"),u)),style:p,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:m,...P,children:[I("div",{className:"".concat(_,"-content"),children:v}),u?I("a",{tabIndex:0,onClick:this.close,className:"".concat(_,"-close"),children:d||I("span",{className:"".concat(_,"-close-x")})}):null]});return x?Tc.createPortal(k,x):k}}]),n}(w.exports.Component);wI.defaultProps={onClose:function(){},duration:1.5};function CI(e){var t=w.exports.useRef({}),n=w.exports.useState([]),r=Le(n,2),i=r[0],o=r[1];function s(a){var u=!0;e.add(a,function(d,p){var m=p.key;if(d&&(!t.current[m]||u)){var v=I(wI,{...p,holder:d});t.current[m]=v,o(function(x){var _=x.findIndex(function(k){return k.key===p.key});if(_===-1)return[].concat(Pt(x),[v]);var P=Pt(x);return P[_]=v,P})}u=!1})}return[s,I(Tn,{children:i})]}var nie=["getContainer"],AD=0,rie=Date.now();function DD(){var e=AD;return AD+=1,"rcNotification_".concat(rie,"_").concat(e)}var ep=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.state={notices:[]},r.hookRefs=new Map,r.add=function(a,u){var d,p=(d=a.key)!==null&&d!==void 0?d:DD(),m=fe(fe({},a),{},{key:p}),v=r.props.maxCount;r.setState(function(x){var _=x.notices,P=_.map(function(T){return T.notice.key}).indexOf(p),k=_.concat();return P!==-1?k.splice(P,1,{notice:m,holderCallback:u}):(v&&_.length>=v&&(m.key=k[0].notice.key,m.updateMark=DD(),m.userPassKey=p,k.shift()),k.push({notice:m,holderCallback:u})),{notices:k}})},r.remove=function(a){r.setState(function(u){var d=u.notices;return{notices:d.filter(function(p){var m=p.notice,v=m.key,x=m.userPassKey,_=x!=null?x:v;return _!==a})}})},r.noticePropsMap={},r}return Lr(n,[{key:"getTransitionName",value:function(){var i=this.props,o=i.prefixCls,s=i.animation,a=this.props.transitionName;return!a&&s&&(a="".concat(o,"-").concat(s)),a}},{key:"render",value:function(){var i=this,o=this.state.notices,s=this.props,a=s.prefixCls,u=s.className,d=s.closeIcon,p=s.style,m=[];return o.forEach(function(v,x){var _=v.notice,P=v.holderCallback,k=x===o.length-1?_.updateMark:void 0,T=_.key,M=_.userPassKey,O=fe(fe(fe({prefixCls:a,closeIcon:d},_),_.props),{},{key:T,noticeKey:M||T,updateMark:k,onClose:function(L){var F;i.remove(L),(F=_.onClose)===null||F===void 0||F.call(_)},onClick:_.onClick,children:_.content});m.push(T),i.noticePropsMap[T]={props:O,holderCallback:P}}),I("div",{className:He(a,u),style:p,children:I(_I,{keys:m,motionName:this.getTransitionName(),onVisibleChanged:function(x,_){var P=_.key;x||delete i.noticePropsMap[P]},children:function(v){var x=v.key,_=v.className,P=v.style,k=v.visible,T=i.noticePropsMap[x],M=T.props,O=T.holderCallback;return O?I("div",{className:He(_,"".concat(a,"-hook-holder")),style:fe({},P),ref:function(L){typeof x>"u"||(L?(i.hookRefs.set(x,L),O(L,M)):i.hookRefs.delete(x))}},x):I(wI,{...M,className:He(_,M==null?void 0:M.className),style:fe(fe({},P),M==null?void 0:M.style),visible:k})}})})}}]),n}(w.exports.Component);ep.newInstance=void 0;ep.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}};ep.newInstance=function(t,n){var r=t||{},i=r.getContainer,o=Rn(r,nie),s=document.createElement("div");if(i){var a=i();a.appendChild(s)}else document.body.appendChild(s);var u=!1;function d(p){u||(u=!0,n({notice:function(v){p.add(v)},removeNotice:function(v){p.remove(v)},component:p,destroy:function(){Y$(s),s.parentNode&&s.parentNode.removeChild(s)},useNotification:function(){return CI(p)}}))}X$(I(ep,{...o,ref:d}),s)};function iie(e,t){var n=function(){var i,o,s=null,a={add:function(P,k){s==null||s.component.add(P,k)}},u=CI(a),d=Le(u,2),p=d[0],m=d[1];function v(_){var P=_.prefixCls,k=i("message",P),T=i(),M=_.key||gB(),O=new Promise(function(L){var F=function(){return typeof _.onClose=="function"&&_.onClose(),L(!0)};e(ze(ze({},_),{prefixCls:k,rootPrefixCls:T,getPopupContainer:o}),function(V){var B=V.prefixCls,H=V.instance;s=H,p(t(ze(ze({},_),{key:M,onClose:F}),B))})}),N=function(){s&&s.removeNotice(M)};return N.then=function(L,F){return O.then(L,F)},N.promise=O,N}var x=w.exports.useRef({});return x.current.open=v,xB.forEach(function(_){return _B(x.current,_)}),[x.current,I(zc,{children:function(_){return i=_.getPrefixCls,o=_.getPopupContainer,m}},"holder")]};return n}var Ko,uB=3,cB,oie=1,dB="",w3="move-up",fB=!1,hB,pB,mB=!1;function gB(){return oie++}function aie(e){e.top!==void 0&&(cB=e.top,Ko=null),e.duration!==void 0&&(uB=e.duration),e.prefixCls!==void 0&&(dB=e.prefixCls),e.getContainer!==void 0&&(hB=e.getContainer,Ko=null),e.transitionName!==void 0&&(w3=e.transitionName,Ko=null,fB=!0),e.maxCount!==void 0&&(pB=e.maxCount,Ko=null),e.rtl!==void 0&&(mB=e.rtl)}function vB(e,t){var n=e.prefixCls,r=e.getPopupContainer,i=II(),o=i.getPrefixCls,s=i.getRootPrefixCls,a=i.getIconPrefixCls,u=o("message",n||dB),d=s(e.rootPrefixCls,u),p=a();if(Ko){t({prefixCls:u,rootPrefixCls:d,iconPrefixCls:p,instance:Ko});return}var m={prefixCls:u,transitionName:fB?w3:"".concat(d,"-").concat(w3),style:{top:cB},getContainer:hB||r,maxCount:pB};ep.newInstance(m,function(v){if(Ko){t({prefixCls:u,rootPrefixCls:d,iconPrefixCls:p,instance:Ko});return}Ko=v,t({prefixCls:u,rootPrefixCls:d,iconPrefixCls:p,instance:v})})}var yB={info:G$,success:O_,error:yf,warning:yI,loading:Mc},xB=Object.keys(yB);function bB(e,t,n){var r,i=e.duration!==void 0?e.duration:uB,o=yB[e.type],s=He("".concat(t,"-custom-content"),(r={},re(r,"".concat(t,"-").concat(e.type),e.type),re(r,"".concat(t,"-rtl"),mB===!0),r));return{key:e.key,duration:i,style:e.style||{},className:e.className,content:I(wp,{iconPrefixCls:n,children:$e("div",{className:s,children:[e.icon||o&&I(o,{}),I("span",{children:e.content})]})}),onClose:e.onClose,onClick:e.onClick}}function sie(e){var t=e.key||gB(),n=new Promise(function(i){var o=function(){return typeof e.onClose=="function"&&e.onClose(),i(!0)};vB(e,function(s){var a=s.prefixCls,u=s.iconPrefixCls,d=s.instance;d.notice(bB(ze(ze({},e),{key:t,onClose:o}),a,u))})}),r=function(){var o;Ko&&(Ko.removeNotice(t),(o=e.onClose)===null||o===void 0||o.call(e))};return r.then=function(i,o){return n.then(i,o)},r.promise=n,r}function lie(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}var fv={open:sie,config:aie,destroy:function(t){if(Ko)if(t){var n=Ko,r=n.removeNotice;r(t)}else{var i=Ko,o=i.destroy;o(),Ko=null}}};function _B(e,t){e[t]=function(n,r,i){return lie(n)?e.open(ze(ze({},n),{type:t})):(typeof r=="function"&&(i=r,r=void 0),e.open({content:n,duration:r,type:t,onClose:i}))}}xB.forEach(function(e){return _B(fv,e)});fv.warn=fv.warning;fv.useMessage=iie(vB,bB);const uie=fv;var cie={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 wB=cie;var CB=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:wB})})};CB.displayName="CheckCircleOutlined";const SI=w.exports.forwardRef(CB);var die={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 SB=die;var EB=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:SB})})};EB.displayName="CloseCircleOutlined";const EI=w.exports.forwardRef(EB);var fie={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 PB=fie;var IB=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:PB})})};IB.displayName="CloseOutlined";const _p=w.exports.forwardRef(IB);var hie={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 pie=hie;var TB=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:pie})})};TB.displayName="ExclamationCircleOutlined";const L_=w.exports.forwardRef(TB);var mie={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 kB=mie;var MB=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:kB})})};MB.displayName="InfoCircleOutlined";const PI=w.exports.forwardRef(MB);function gie(e,t){var n=function(){var i,o=null,s={add:function(_,P){o==null||o.component.add(_,P)}},a=CI(s),u=Le(a,2),d=u[0],p=u[1];function m(x){var _=x.prefixCls,P=i("notification",_);e(ze(ze({},x),{prefixCls:P}),function(k){var T=k.prefixCls,M=k.instance;o=M,d(t(x,T))})}var v=w.exports.useRef({});return v.current.open=m,["success","info","warning","error"].forEach(function(x){v.current[x]=function(_){return v.current.open(ze(ze({},_),{type:x}))}}),[v.current,I(zc,{children:function(x){return i=x.getPrefixCls,p}},"holder")]};return n}globalThis&&globalThis.__awaiter;var kd={},RB=4.5,AB=24,DB=24,OB="",C3="topRight",NB,LB,FB=!1,zB;function vie(e){var t=e.duration,n=e.placement,r=e.bottom,i=e.top,o=e.getContainer,s=e.closeIcon,a=e.prefixCls;a!==void 0&&(OB=a),t!==void 0&&(RB=t),n!==void 0?C3=n:e.rtl&&(C3="topLeft"),r!==void 0&&(DB=r),i!==void 0&&(AB=i),o!==void 0&&(NB=o),s!==void 0&&(LB=s),e.rtl!==void 0&&(FB=e.rtl),e.maxCount!==void 0&&(zB=e.maxCount)}function yie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:AB,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:DB,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 $B(e,t){var n=e.placement,r=n===void 0?C3:n,i=e.top,o=e.bottom,s=e.getContainer,a=s===void 0?NB:s,u=e.prefixCls,d=II(),p=d.getPrefixCls,m=d.getIconPrefixCls,v=p("notification",u||OB),x=m(),_="".concat(v,"-").concat(r),P=kd[_];if(P){Promise.resolve(P).then(function(T){t({prefixCls:"".concat(v,"-notice"),iconPrefixCls:x,instance:T})});return}var k=He("".concat(v,"-").concat(r),re({},"".concat(v,"-rtl"),FB===!0));kd[_]=new Promise(function(T){ep.newInstance({prefixCls:v,className:k,style:yie(r,i,o),getContainer:a,maxCount:zB},function(M){T(M),t({prefixCls:"".concat(v,"-notice"),iconPrefixCls:x,instance:M})})})}var xie={success:SI,info:PI,error:EI,warning:L_};function BB(e,t,n){var r=e.duration,i=e.icon,o=e.type,s=e.description,a=e.message,u=e.btn,d=e.onClose,p=e.onClick,m=e.key,v=e.style,x=e.className,_=e.closeIcon,P=_===void 0?LB:_,k=e.props,T=r===void 0?RB:r,M=null;i?M=I("span",{className:"".concat(t,"-icon"),children:e.icon}):o&&(M=w.exports.createElement(xie[o]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(o)}));var O=I("span",{className:"".concat(t,"-close-x"),children:P||I(_p,{className:"".concat(t,"-close-icon")})}),N=!s&&M?I("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:I(wp,{iconPrefixCls:n,children:$e("div",{className:M?"".concat(t,"-with-icon"):"",role:"alert",children:[M,$e("div",{className:"".concat(t,"-message"),children:[N,a]}),I("div",{className:"".concat(t,"-description"),children:s}),u?I("span",{className:"".concat(t,"-btn"),children:u}):null]})}),duration:T,closable:!0,closeIcon:O,onClose:d,onClick:p,key:m,style:v||{},className:He(x,re({},"".concat(t,"-").concat(o),!!o)),props:k}}function bie(e){$B(e,function(t){var n=t.prefixCls,r=t.iconPrefixCls,i=t.instance;i.notice(BB(e,n,r))})}var tp={open:bie,close:function(t){Object.keys(kd).forEach(function(n){return Promise.resolve(kd[n]).then(function(r){r.removeNotice(t)})})},config:vie,destroy:function(){Object.keys(kd).forEach(function(t){Promise.resolve(kd[t]).then(function(n){n.destroy()}),delete kd[t]})}};["success","info","warning","error"].forEach(function(e){tp[e]=function(t){return tp.open(ze(ze({},t),{type:e}))}});tp.warn=tp.warning;tp.useNotification=gie($B,BB);const _ie=tp;var wie=function(t,n){return n||(t?"ant-".concat(t):"ant")},On=w.exports.createContext({getPrefixCls:wie}),zc=On.Consumer,Cie="-ant-".concat(Date.now(),"-").concat(Math.random());function Sie(e,t){var n={},r=function(p,m){var v=p.clone();return v=(m==null?void 0:m(v))||v,v.toRgbString()},i=function(p,m){var v=new bC(p),x=dv(v.toRgbString());n["".concat(m,"-color")]=r(v),n["".concat(m,"-color-disabled")]=x[1],n["".concat(m,"-color-hover")]=x[4],n["".concat(m,"-color-active")]=x[6],n["".concat(m,"-color-outline")]=v.clone().setAlpha(.2).toRgbString(),n["".concat(m,"-color-deprecated-bg")]=x[0],n["".concat(m,"-color-deprecated-border")]=x[2]};if(t.primaryColor){i(t.primaryColor,"primary");var o=new bC(t.primaryColor),s=dv(o.toRgbString());s.forEach(function(d,p){n["primary-".concat(p+1)]=d}),n["primary-color-deprecated-l-35"]=r(o,function(d){return d.lighten(35)}),n["primary-color-deprecated-l-20"]=r(o,function(d){return d.lighten(20)}),n["primary-color-deprecated-t-20"]=r(o,function(d){return d.tint(20)}),n["primary-color-deprecated-t-50"]=r(o,function(d){return d.tint(50)}),n["primary-color-deprecated-f-12"]=r(o,function(d){return d.setAlpha(d.getAlpha()*.12)});var a=new bC(s[0]);n["primary-color-active-deprecated-f-30"]=r(a,function(d){return d.setAlpha(d.getAlpha()*.3)}),n["primary-color-active-deprecated-d-02"]=r(a,function(d){return d.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 u=Object.keys(n).map(function(d){return"--".concat(e,"-").concat(d,": ").concat(n[d],";")});return`
|
|
|
:root {
|
|
|
`.concat(u.join(`
|
|
|
`),`
|
|
|
}
|
|
|
`).trim()}function Eie(e,t){var n=Sie(e,t);Mo()&&jv(n,"".concat(Cie,"-dynamic-theme"))}var S3=w.exports.createContext(!1),VB=function(t){var n=t.children,r=t.disabled,i=w.exports.useContext(S3);return I(S3.Provider,{value:r!=null?r:i,children:n})};const Il=S3;var E3=w.exports.createContext(void 0),UB=function(t){var n=t.children,r=t.size;return I(E3.Consumer,{children:function(i){return I(E3.Provider,{value:r||i,children:n})}})};const Hs=E3;var Pie=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form"],Iie="ant",Tie="anticon",lb,jB;function e1(){return lb||Iie}function kie(){return jB||Tie}var Mie=function(t){var n=t.prefixCls,r=t.iconPrefixCls,i=t.theme;n!==void 0&&(lb=n),r!==void 0&&(jB=r),i&&Eie(e1(),i)},II=function(){return{getPrefixCls:function(n,r){return r||(n?"".concat(e1(),"-").concat(n):e1())},getIconPrefixCls:kie,getRootPrefixCls:function(n,r){return n||lb||(r&&r.includes("-")?r.replace(/^(.*)-[^-]*$/,"$1"):e1())}}},Rie=function(t){var n,r,i=t.children,o=t.csp,s=t.autoInsertSpaceInButton,a=t.form,u=t.locale,d=t.componentSize,p=t.direction,m=t.space,v=t.virtual,x=t.dropdownMatchSelectWidth,_=t.legacyLocale,P=t.parentContext,k=t.iconPrefixCls,T=t.componentDisabled,M=w.exports.useCallback(function(B,H){var G=t.prefixCls;if(H)return H;var ee=G||P.getPrefixCls("");return B?"".concat(ee,"-").concat(B):ee},[P.getPrefixCls,t.prefixCls]),O=ze(ze({},P),{csp:o,autoInsertSpaceInButton:s,locale:u||_,direction:p,space:m,virtual:v,dropdownMatchSelectWidth:x,getPrefixCls:M});Pie.forEach(function(B){var H=t[B];H&&(O[B]=H)});var N=Vv(function(){return O},O,function(B,H){var G=Object.keys(B),ee=Object.keys(H);return G.length!==ee.length||G.some(function(X){return B[X]!==H[X]})}),L=w.exports.useMemo(function(){return{prefixCls:k,csp:o}},[k,o]),F=i,V={};return u&&(V=((n=u.Form)===null||n===void 0?void 0:n.defaultValidateMessages)||((r=gs.Form)===null||r===void 0?void 0:r.defaultValidateMessages)||{}),a&&a.validateMessages&&(V=ze(ze({},V),a.validateMessages)),Object.keys(V).length>0&&(F=I(mI,{validateMessages:V,children:i})),u&&(F=I(qne,{locale:u,_ANT_MARK__:Wne,children:F})),(k||o)&&(F=I(uI.Provider,{value:L,children:F})),d&&(F=I(UB,{size:d,children:F})),T!==void 0&&(F=I(VB,{disabled:T,children:F})),I(On.Provider,{value:N,children:F})},wp=function(t){return w.exports.useEffect(function(){t.direction&&(uie.config({rtl:t.direction==="rtl"}),_ie.config({rtl:t.direction==="rtl"}))},[t.direction]),I(bp,{children:function(n,r,i){return I(zc,{children:function(o){return I(Rie,{parentContext:o,legacyLocale:i,...t})}})}})};wp.ConfigContext=On;wp.SizeContext=Hs;wp.config=Mie;function la(e,t,n,r){var i=Tc.unstable_batchedUpdates?function(s){Tc.unstable_batchedUpdates(n,s)}:n;return e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){e.removeEventListener&&e.removeEventListener(t,i,r)}}}function HB(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 Ro=w.exports.isValidElement;function KB(e){return e&&Ro(e)&&e.type===w.exports.Fragment}function WB(e,t,n){return Ro(e)?w.exports.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t}function ui(e,t){return WB(e,e,t)}var Aie=function(e){ci(n,e);var t=di(n);function n(){var r;return Nr(this,n),r=t.apply(this,arguments),r.state={error:void 0,info:{componentStack:""}},r}return Lr(n,[{key:"componentDidCatch",value:function(i,o){this.setState({error:i,info:o})}},{key:"render",value:function(){var i=this.props,o=i.message,s=i.description,a=i.children,u=this.state,d=u.error,p=u.info,m=p&&p.componentStack?p.componentStack:null,v=typeof o>"u"?(d||"").toString():o,x=typeof s>"u"?m:s;return d?I(qB,{type:"error",message:v,description:I("pre",{children:x})}):a}}]),n}(w.exports.Component);const Die=Aie;var Oie=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},Nie={success:O_,info:G$,error:yf,warning:yI},Lie={success:SI,info:PI,error:EI,warning:L_},Fie=function(t){var n=t.description,r=t.icon,i=t.prefixCls,o=t.type,s=(n?Lie:Nie)[o]||null;return r?WB(r,I("span",{className:"".concat(i,"-icon"),children:r}),function(){return{className:He("".concat(i,"-icon"),re({},r.props.className,r.props.className))}}):w.exports.createElement(s,{className:"".concat(i,"-icon")})},zie=function(t){var n=t.isClosable,r=t.closeText,i=t.prefixCls,o=t.closeIcon,s=t.handleClose;return n?I("button",{type:"button",onClick:s,className:"".concat(i,"-close-icon"),tabIndex:0,children:r?I("span",{className:"".concat(i,"-close-text"),children:r}):o}):null},GB=function(t){var n,r=t.description,i=t.prefixCls,o=t.message,s=t.banner,a=t.className,u=a===void 0?"":a,d=t.style,p=t.onMouseEnter,m=t.onMouseLeave,v=t.onClick,x=t.afterClose,_=t.showIcon,P=t.closable,k=t.closeText,T=t.closeIcon,M=T===void 0?I(_p,{}):T,O=t.action,N=Oie(t,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),L=w.exports.useState(!1),F=Le(L,2),V=F[0],B=F[1],H=w.exports.useRef(),G=w.exports.useContext(On),ee=G.getPrefixCls,X=G.direction,Z=ee("alert",i),Q=function(xe){var Te;B(!0),(Te=N.onClose)===null||Te===void 0||Te.call(N,xe)},le=function(){var xe=N.type;return xe!==void 0?xe:s?"warning":"info"},ne=k?!0:P,se=le(),oe=s&&_===void 0?!0:_,he=He(Z,"".concat(Z,"-").concat(se),(n={},re(n,"".concat(Z,"-with-description"),!!r),re(n,"".concat(Z,"-no-icon"),!oe),re(n,"".concat(Z,"-banner"),!!s),re(n,"".concat(Z,"-rtl"),X==="rtl"),n),u),_e=HB(N);return I(Xo,{visible:!V,motionName:"".concat(Z,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(xe){return{maxHeight:xe.offsetHeight}},onLeaveEnd:x,children:function(be){var xe=be.className,Te=be.style;return $e("div",{ref:H,"data-show":!V,className:He(he,xe),style:ze(ze({},d),Te),onMouseEnter:p,onMouseLeave:m,onClick:v,role:"alert",..._e,children:[oe?I(Fie,{description:r,icon:N.icon,prefixCls:Z,type:se}):null,$e("div",{className:"".concat(Z,"-content"),children:[o?I("div",{className:"".concat(Z,"-message"),children:o}):null,r?I("div",{className:"".concat(Z,"-description"),children:r}):null]}),O?I("div",{className:"".concat(Z,"-action"),children:O}):null,I(zie,{isClosable:!!ne,closeText:k,prefixCls:Z,closeIcon:M,handleClose:Q})]})}})};GB.ErrorBoundary=Die;const qB=GB;function P3(e){return e!=null&&e===e.window}function $ie(e,t){var n,r;if(typeof window>"u")return 0;var i=t?"scrollTop":"scrollLeft",o=0;return P3(e)?o=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?o=e.documentElement[i]:(e instanceof HTMLElement||e)&&(o=e[i]),e&&!P3(e)&&typeof o!="number"&&(o=(r=((n=e.ownerDocument)!==null&&n!==void 0?n:e).documentElement)===null||r===void 0?void 0:r[i]),o}function Bie(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 Vie(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,o=t.duration,s=o===void 0?450:o,a=r(),u=$ie(a,!0),d=Date.now(),p=function m(){var v=Date.now(),x=v-d,_=Bie(x>s?s:x,u,e,s);P3(a)?a.scrollTo(window.pageXOffset,_):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=_:a.scrollTop=_,x<s?ar(m):typeof i=="function"&&i()};ar(p)}function hv(e){var t=w.exports.useRef();t.current=e;var n=w.exports.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return n}var wi=Mo()?w.exports.useLayoutEffect:w.exports.useEffect,Pg=function(t,n){var r=w.exports.useRef(!0);wi(function(){if(!r.current)return t()},n),wi(function(){return r.current=!1,function(){r.current=!0}},[])};function SC(e){return e!==void 0}function ki(e,t){var n=t||{},r=n.defaultValue,i=n.value,o=n.onChange,s=n.postState,a=vl(function(){return SC(i)?i:SC(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),u=Le(a,2),d=u[0],p=u[1],m=i!==void 0?i:d,v=s?s(m):m,x=hv(o),_=vl([m]),P=Le(_,2),k=P[0],T=P[1];Pg(function(){var O=k[0];d!==O&&x(d,O)},[k]),Pg(function(){SC(i)||p(i)},[i]);var M=hv(function(O,N){p(O,N),T([m],N)});return[v,M]}const TI=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 kt={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>=kt.F1&&n<=kt.F12)return!1;switch(n){case kt.ALT:case kt.CAPS_LOCK:case kt.CONTEXT_MENU:case kt.CTRL:case kt.DOWN:case kt.END:case kt.ESC:case kt.HOME:case kt.INSERT:case kt.LEFT:case kt.MAC_FF_META:case kt.META:case kt.NUMLOCK:case kt.NUM_CENTER:case kt.PAGE_DOWN:case kt.PAGE_UP:case kt.PAUSE:case kt.PRINT_SCREEN:case kt.RIGHT:case kt.SHIFT:case kt.UP:case kt.WIN_KEY:case kt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=kt.ZERO&&t<=kt.NINE||t>=kt.NUM_ZERO&&t<=kt.NUM_MULTIPLY||t>=kt.A&&t<=kt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case kt.SPACE:case kt.QUESTION_MARK:case kt.NUM_PLUS:case kt.NUM_MINUS:case kt.NUM_PERIOD:case kt.NUM_DIVISION:case kt.SEMICOLON:case kt.DASH:case kt.EQUALS:case kt.COMMA:case kt.PERIOD:case kt.SLASH:case kt.APOSTROPHE:case kt.SINGLE_QUOTE:case kt.OPEN_SQUARE_BRACKET:case kt.BACKSLASH:case kt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ZB=w.exports.createContext(null);function XB(){return w.exports.useContext(ZB)}function Uie(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=w.exports.useState(!1),n=Le(t,2),r=n[0],i=n[1],o=w.exports.useRef(null),s=function(){window.clearTimeout(o.current)};w.exports.useEffect(function(){return s},[]);var a=function(d,p){s(),o.current=window.setTimeout(function(){i(d),p&&p()},e)};return[r,a,s]}function YB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=w.exports.useRef(null),n=w.exports.useRef(null);w.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 jie(e,t,n,r){var i=w.exports.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},w.exports.useEffect(function(){function o(s){var a;if(!((a=i.current)!==null&&a!==void 0&&a.customizedTrigger)){var u=s.target;u.shadowRoot&&s.composed&&(u=s.composedPath()[0]||u),i.current.open&&e().filter(function(d){return d}).every(function(d){return!d.contains(u)&&d!==u})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}var Hie=`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`,Kie=`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`,Wie="".concat(Hie," ").concat(Kie).split(/[\s\n]+/),Gie="aria-",qie="data-";function OD(e,t){return e.indexOf(t)===0}function gu(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"||OD(i,Gie))||n.data&&OD(i,qie)||n.attr&&Wie.includes(i))&&(r[i]=e[i])}),r}var Zie=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],nh=void 0;function Xie(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,o=e.renderItem,s=e.responsive,a=e.responsiveDisabled,u=e.registerSize,d=e.itemKey,p=e.className,m=e.style,v=e.children,x=e.display,_=e.order,P=e.component,k=P===void 0?"div":P,T=Rn(e,Zie),M=s&&!x;function O(B){u(d,B)}w.exports.useEffect(function(){return function(){O(null)}},[]);var N=o&&i!==nh?o(i):v,L;r||(L={opacity:M?0:1,height:M?0:nh,overflowY:M?"hidden":nh,order:s?_:nh,pointerEvents:M?"none":nh,position:M?"absolute":nh});var F={};M&&(F["aria-hidden"]=!0);var V=I(k,{className:He(!r&&n,p),style:fe(fe({},L),m),...F,...T,ref:t,children:N});return s&&(V=I(_u,{onResize:function(H){var G=H.offsetWidth;O(G)},disabled:a,children:V})),V}var Ig=w.exports.forwardRef(Xie);Ig.displayName="Item";function Yie(){var e=vl({}),t=Le(e,2),n=t[1],r=w.exports.useRef([]),i=0,o=0;function s(a){var u=i;i+=1,r.current.length<u+1&&(r.current[u]=a);var d=r.current[u];function p(m){r.current[u]=typeof m=="function"?m(r.current[u]):m,ar.cancel(o),o=ar(function(){n({},!0)})}return[d,p]}return s}var Qie=["component"],Jie=["className"],eoe=["className"],toe=function(t,n){var r=w.exports.useContext(ub);if(!r){var i=t.component,o=i===void 0?"div":i,s=Rn(t,Qie);return I(o,{...s,ref:n})}var a=r.className,u=Rn(r,Jie),d=t.className,p=Rn(t,eoe);return I(ub.Provider,{value:null,children:I(Ig,{ref:n,className:He(a,d),...u,...p})})},QB=w.exports.forwardRef(toe);QB.displayName="RawItem";var noe=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],ub=w.exports.createContext(null),JB="responsive",e9="invalidate";function roe(e){return"+ ".concat(e.length," ...")}function ioe(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,i=e.data,o=i===void 0?[]:i,s=e.renderItem,a=e.renderRawItem,u=e.itemKey,d=e.itemWidth,p=d===void 0?10:d,m=e.ssr,v=e.style,x=e.className,_=e.maxCount,P=e.renderRest,k=e.renderRawRest,T=e.suffix,M=e.component,O=M===void 0?"div":M,N=e.itemComponent,L=e.onVisibleChange,F=Rn(e,noe),V=Yie(),B=m==="full",H=V(null),G=Le(H,2),ee=G[0],X=G[1],Z=ee||0,Q=V(new Map),le=Le(Q,2),ne=le[0],se=le[1],oe=V(0),he=Le(oe,2),_e=he[0],be=he[1],xe=V(0),Te=Le(xe,2),Ee=Te[0],Ce=Te[1],ke=V(0),De=Le(ke,2),Ke=De[0],Ue=De[1],tt=w.exports.useState(null),lt=Le(tt,2),St=lt[0],We=lt[1],bt=w.exports.useState(null),Qe=Le(bt,2),mt=Qe[0],ct=Qe[1],wt=w.exports.useMemo(function(){return mt===null&&B?Number.MAX_SAFE_INTEGER:mt||0},[mt,ee]),rt=w.exports.useState(!1),ut=Le(rt,2),nt=ut[0],qe=ut[1],dt="".concat(r,"-item"),_t=Math.max(_e,Ee),Dt=_===JB,Nt=o.length&&Dt,jt=_===e9,Ve=Nt||typeof _=="number"&&o.length>_,Ze=w.exports.useMemo(function(){var gt=o;return Nt?ee===null&&B?gt=o:gt=o.slice(0,Math.min(o.length,Z/p)):typeof _=="number"&&(gt=o.slice(0,_)),gt},[o,p,ee,_,Nt]),Yt=w.exports.useMemo(function(){return Nt?o.slice(wt+1):o.slice(Ze.length)},[o,Ze,Nt,wt]),sn=w.exports.useCallback(function(gt,xt){var Vt;return typeof u=="function"?u(gt):(Vt=u&&(gt==null?void 0:gt[u]))!==null&&Vt!==void 0?Vt:xt},[u]),Gt=w.exports.useCallback(s||function(gt){return gt},[s]);function zt(gt,xt,Vt){mt===gt&&(xt===void 0||xt===St)||(ct(gt),Vt||(qe(gt<o.length-1),L==null||L(gt)),xt!==void 0&&We(xt))}function Rt(gt,xt){X(xt.clientWidth)}function Qt(gt,xt){se(function(Vt){var qt=new Map(Vt);return xt===null?qt.delete(gt):qt.set(gt,xt),qt})}function pn(gt,xt){Ce(xt),be(Ee)}function ot(gt,xt){Ue(xt)}function Lt(gt){return ne.get(sn(Ze[gt],gt))}wi(function(){if(Z&&_t&&Ze){var gt=Ke,xt=Ze.length,Vt=xt-1;if(!xt){zt(0,null);return}for(var qt=0;qt<xt;qt+=1){var vn=Lt(qt);if(B&&(vn=vn||0),vn===void 0){zt(qt-1,void 0,!0);break}if(gt+=vn,Vt===0&><=Z||qt===Vt-1&>+Lt(Vt)<=Z){zt(Vt,null);break}else if(gt+_t>Z){zt(qt-1,gt-vn-Ke+Ee);break}}T&&Lt(0)+Ke>Z&&We(null)}},[Z,ne,Ee,Ke,sn,Ze]);var Tt=nt&&!!Yt.length,Kt={};St!==null&&Nt&&(Kt={position:"absolute",left:St,top:0});var Zt={prefixCls:dt,responsive:Nt,component:N,invalidate:jt},ht=a?function(gt,xt){var Vt=sn(gt,xt);return I(ub.Provider,{value:fe(fe({},Zt),{},{order:xt,item:gt,itemKey:Vt,registerSize:Qt,display:xt<=wt}),children:a(gt,xt)},Vt)}:function(gt,xt){var Vt=sn(gt,xt);return w.exports.createElement(Ig,{...Zt,order:xt,key:Vt,item:gt,renderItem:Gt,itemKey:Vt,registerSize:Qt,display:xt<=wt})},xn,bn={order:Tt?wt:Number.MAX_SAFE_INTEGER,className:"".concat(dt,"-rest"),registerSize:pn,display:Tt};if(k)k&&(xn=I(ub.Provider,{value:fe(fe({},Zt),bn),children:k(Yt)}));else{var tn=P||roe;xn=I(Ig,{...Zt,...bn,children:typeof tn=="function"?tn(Yt):tn})}var Bt=$e(O,{className:He(!jt&&r,x),style:v,ref:t,...F,children:[Ze.map(ht),Ve?xn:null,T&&I(Ig,{...Zt,responsive:Dt,responsiveDisabled:!Nt,order:wt,className:"".concat(dt,"-suffix"),registerSize:ot,display:!0,style:Kt,children:T})]});return Dt&&(Bt=I(_u,{onResize:Rt,disabled:!Nt,children:Bt})),Bt}var yl=w.exports.forwardRef(ioe);yl.displayName="Overflow";yl.Item=QB;yl.RESPONSIVE=JB;yl.INVALIDATE=e9;var cb=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,o=t.onMouseDown,s=t.onClick,a=t.children,u;return typeof r=="function"?u=r(i):u=r,I("span",{className:n,onMouseDown:function(p){p.preventDefault(),o&&o(p)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0,children:u!==void 0?u:I("span",{className:He(n.split(/\s+/).map(function(d){return"".concat(d,"-icon")})),children:a})})},ooe=function(t,n){var r,i,o=t.prefixCls,s=t.id,a=t.inputElement,u=t.disabled,d=t.tabIndex,p=t.autoFocus,m=t.autoComplete,v=t.editable,x=t.activeDescendantId,_=t.value,P=t.maxLength,k=t.onKeyDown,T=t.onMouseDown,M=t.onChange,O=t.onPaste,N=t.onCompositionStart,L=t.onCompositionEnd,F=t.open,V=t.attrs,B=a||I("input",{}),H=B,G=H.ref,ee=H.props,X=ee.onKeyDown,Z=ee.onChange,Q=ee.onMouseDown,le=ee.onCompositionStart,ne=ee.onCompositionEnd,se=ee.style;return"maxLength"in B.props,B=w.exports.cloneElement(B,fe(fe(fe({type:"search"},ee),{},{id:s,ref:Zo(n,G),disabled:u,tabIndex:d,autoComplete:m||"off",autoFocus:p,className:He("".concat(o,"-selection-search-input"),(r=B)===null||r===void 0||(i=r.props)===null||i===void 0?void 0:i.className),role:"combobox","aria-expanded":F,"aria-haspopup":"listbox","aria-owns":"".concat(s,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(s,"_list"),"aria-activedescendant":x},V),{},{value:v?_:"",maxLength:P,readOnly:!v,unselectable:v?null:"on",style:fe(fe({},se),{},{opacity:v?null:0}),onKeyDown:function(he){k(he),X&&X(he)},onMouseDown:function(he){T(he),Q&&Q(he)},onChange:function(he){M(he),Z&&Z(he)},onCompositionStart:function(he){N(he),le&&le(he)},onCompositionEnd:function(he){L(he),ne&&ne(he)},onPaste:O})),B},kI=w.exports.forwardRef(ooe);kI.displayName="Input";function t9(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var aoe=typeof window<"u"&&window.document&&window.document.documentElement,soe=aoe;function loe(e){return e!=null}function ND(e){return["string","number"].includes(nn(e))}function n9(e){var t=void 0;return e&&(ND(e.title)?t=e.title.toString():ND(e.label)&&(t=e.label.toString())),t}function uoe(e,t){soe?w.exports.useLayoutEffect(e,t):w.exports.useEffect(e,t)}function coe(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var LD=function(t){t.preventDefault(),t.stopPropagation()},doe=function(t){var n=t.id,r=t.prefixCls,i=t.values,o=t.open,s=t.searchValue,a=t.autoClearSearchValue,u=t.inputRef,d=t.placeholder,p=t.disabled,m=t.mode,v=t.showSearch,x=t.autoFocus,_=t.autoComplete,P=t.activeDescendantId,k=t.tabIndex,T=t.removeIcon,M=t.maxTagCount,O=t.maxTagTextLength,N=t.maxTagPlaceholder,L=N===void 0?function(We){return"+ ".concat(We.length," ...")}:N,F=t.tagRender,V=t.onToggleOpen,B=t.onRemove,H=t.onInputChange,G=t.onInputPaste,ee=t.onInputKeyDown,X=t.onInputMouseDown,Z=t.onInputCompositionStart,Q=t.onInputCompositionEnd,le=w.exports.useRef(null),ne=w.exports.useState(0),se=Le(ne,2),oe=se[0],he=se[1],_e=w.exports.useState(!1),be=Le(_e,2),xe=be[0],Te=be[1],Ee="".concat(r,"-selection"),Ce=o||m==="multiple"&&a===!1||m==="tags"?s:"",ke=m==="tags"||m==="multiple"&&a===!1||v&&(o||xe);uoe(function(){he(le.current.scrollWidth)},[Ce]);function De(We,bt,Qe,mt,ct){return $e("span",{className:He("".concat(Ee,"-item"),re({},"".concat(Ee,"-item-disabled"),Qe)),title:n9(We),children:[I("span",{className:"".concat(Ee,"-item-content"),children:bt}),mt&&I(cb,{className:"".concat(Ee,"-item-remove"),onMouseDown:LD,onClick:ct,customizeIcon:T,children:"\xD7"})]})}function Ke(We,bt,Qe,mt,ct){var wt=function(ut){LD(ut),V(!o)};return I("span",{onMouseDown:wt,children:F({label:bt,value:We,disabled:Qe,closable:mt,onClose:ct})})}function Ue(We){var bt=We.disabled,Qe=We.label,mt=We.value,ct=!p&&!bt,wt=Qe;if(typeof O=="number"&&(typeof Qe=="string"||typeof Qe=="number")){var rt=String(wt);rt.length>O&&(wt="".concat(rt.slice(0,O),"..."))}var ut=function(qe){qe&&qe.stopPropagation(),B(We)};return typeof F=="function"?Ke(mt,wt,bt,ct,ut):De(We,wt,bt,ct,ut)}function tt(We){var bt=typeof L=="function"?L(We):L;return De({title:bt},bt,!1)}var lt=$e("div",{className:"".concat(Ee,"-search"),style:{width:oe},onFocus:function(){Te(!0)},onBlur:function(){Te(!1)},children:[I(kI,{ref:u,open:o,prefixCls:r,id:n,inputElement:null,disabled:p,autoFocus:x,autoComplete:_,editable:ke,activeDescendantId:P,value:Ce,onKeyDown:ee,onMouseDown:X,onChange:H,onPaste:G,onCompositionStart:Z,onCompositionEnd:Q,tabIndex:k,attrs:gu(t,!0)}),$e("span",{ref:le,className:"".concat(Ee,"-search-mirror"),"aria-hidden":!0,children:[Ce,"\xA0"]})]}),St=I(yl,{prefixCls:"".concat(Ee,"-overflow"),data:i,renderItem:Ue,renderRest:tt,suffix:lt,itemKey:coe,maxCount:M});return $e(Tn,{children:[St,!i.length&&!Ce&&I("span",{className:"".concat(Ee,"-placeholder"),children:d})]})},foe=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,o=t.inputRef,s=t.disabled,a=t.autoFocus,u=t.autoComplete,d=t.activeDescendantId,p=t.mode,m=t.open,v=t.values,x=t.placeholder,_=t.tabIndex,P=t.showSearch,k=t.searchValue,T=t.activeValue,M=t.maxLength,O=t.onInputKeyDown,N=t.onInputMouseDown,L=t.onInputChange,F=t.onInputPaste,V=t.onInputCompositionStart,B=t.onInputCompositionEnd,H=w.exports.useState(!1),G=Le(H,2),ee=G[0],X=G[1],Z=p==="combobox",Q=Z||P,le=v[0],ne=k||"";Z&&T&&!ee&&(ne=T),w.exports.useEffect(function(){Z&&X(!1)},[Z,T]);var se=p!=="combobox"&&!m&&!P?!1:!!ne,oe=n9(le),he=function(){if(le)return null;var be=se?{visibility:"hidden"}:void 0;return I("span",{className:"".concat(r,"-selection-placeholder"),style:be,children:x})};return $e(Tn,{children:[I("span",{className:"".concat(r,"-selection-search"),children:I(kI,{ref:o,prefixCls:r,id:i,open:m,inputElement:n,disabled:s,autoFocus:a,autoComplete:u,editable:Q,activeDescendantId:d,value:ne,onKeyDown:O,onMouseDown:N,onChange:function(be){X(!0),L(be)},onPaste:F,onCompositionStart:V,onCompositionEnd:B,tabIndex:_,attrs:gu(t,!0),maxLength:Z?M:void 0})}),!Z&&le&&!se&&I("span",{className:"".concat(r,"-selection-item"),title:oe,children:le.label}),he()]})};function hoe(e){return![kt.ESC,kt.SHIFT,kt.BACKSPACE,kt.TAB,kt.WIN_KEY,kt.ALT,kt.META,kt.WIN_KEY_RIGHT,kt.CTRL,kt.SEMICOLON,kt.EQUALS,kt.CAPS_LOCK,kt.CONTEXT_MENU,kt.F1,kt.F2,kt.F3,kt.F4,kt.F5,kt.F6,kt.F7,kt.F8,kt.F9,kt.F10,kt.F11,kt.F12].includes(e)}var poe=function(t,n){var r=w.exports.useRef(null),i=w.exports.useRef(!1),o=t.prefixCls,s=t.open,a=t.mode,u=t.showSearch,d=t.tokenWithEnter,p=t.autoClearSearchValue,m=t.onSearch,v=t.onSearchSubmit,x=t.onToggleOpen,_=t.onInputKeyDown,P=t.domRef;w.exports.useImperativeHandle(n,function(){return{focus:function(){r.current.focus()},blur:function(){r.current.blur()}}});var k=YB(0),T=Le(k,2),M=T[0],O=T[1],N=function(se){var oe=se.which;(oe===kt.UP||oe===kt.DOWN)&&se.preventDefault(),_&&_(se),oe===kt.ENTER&&a==="tags"&&!i.current&&!s&&(v==null||v(se.target.value)),hoe(oe)&&x(!0)},L=function(){O(!0)},F=w.exports.useRef(null),V=function(se){m(se,!0,i.current)!==!1&&x(!0)},B=function(){i.current=!0},H=function(se){i.current=!1,a!=="combobox"&&V(se.target.value)},G=function(se){var oe=se.target.value;if(d&&F.current&&/[\r\n]/.test(F.current)){var he=F.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oe=oe.replace(he,F.current)}F.current=null,V(oe)},ee=function(se){var oe=se.clipboardData,he=oe.getData("text");F.current=he},X=function(se){var oe=se.target;if(oe!==r.current){var he=document.body.style.msTouchAction!==void 0;he?setTimeout(function(){r.current.focus()}):r.current.focus()}},Z=function(se){var oe=M();se.target!==r.current&&!oe&&a!=="combobox"&&se.preventDefault(),(a!=="combobox"&&(!u||!oe)||!s)&&(s&&p!==!1&&m("",!0,!1),x())},Q={inputRef:r,onInputKeyDown:N,onInputMouseDown:L,onInputChange:G,onInputPaste:ee,onInputCompositionStart:B,onInputCompositionEnd:H},le=a==="multiple"||a==="tags"?I(doe,{...t,...Q}):I(foe,{...t,...Q});return I("div",{ref:P,className:"".concat(o,"-selector"),onClick:X,onMouseDown:Z,children:le})},r9=w.exports.forwardRef(poe);r9.displayName="Selector";var moe=w.exports.forwardRef(function(e,t){var n=e.didUpdate,r=e.getContainer,i=e.children,o=w.exports.useRef(),s=w.exports.useRef();w.exports.useImperativeHandle(t,function(){return{}});var a=w.exports.useRef(!1);return!a.current&&Mo()&&(s.current=r(),o.current=s.current.parentNode,a.current=!0),w.exports.useEffect(function(){n==null||n(e)}),w.exports.useEffect(function(){return s.current.parentNode===null&&o.current!==null&&o.current.appendChild(s.current),function(){var u,d;(u=s.current)===null||u===void 0||(d=u.parentNode)===null||d===void 0||d.removeChild(s.current)}},[]),s.current?Tc.createPortal(i,s.current):null});function goe(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function voe(e,t,n){var r=e[t]||{};return fe(fe({},r),n)}function yoe(e,t,n,r){for(var i=n.points,o=Object.keys(e),s=0;s<o.length;s+=1){var a=o[s];if(goe(e[a].points,i,r))return"".concat(t,"-placement-").concat(a)}return""}function i9(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 xoe(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,o=e.maskMotion,s=e.maskAnimation,a=e.maskTransitionName;if(!i)return null;var u={};return(o||a||s)&&(u=fe({motionAppear:!0},i9({motion:o,prefixCls:t,transitionName:a,animation:s}))),I(Xo,{...u,visible:n,removeOnLeave:!0,children:function(d){var p=d.className;return I("div",{style:{zIndex:r},className:He("".concat(t,"-mask"),p)})}})}function FD(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 zD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FD(Object(n),!0).forEach(function(r){boe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I3(e){return I3=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},I3(e)}function boe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zm,_oe={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function db(){if(zm!==void 0)return zm;zm="";var e=document.createElement("p").style,t="Transform";for(var n in _oe)n+t in e&&(zm=n);return zm}function o9(){return db()?"".concat(db(),"TransitionProperty"):"transitionProperty"}function F_(){return db()?"".concat(db(),"Transform"):"transform"}function $D(e,t){var n=o9();n&&(e.style[n]=t,n!=="transitionProperty"&&(e.style.transitionProperty=t))}function EC(e,t){var n=F_();n&&(e.style[n]=t,n!=="transform"&&(e.style.transform=t))}function woe(e){return e.style.transitionProperty||e.style[o9()]}function Coe(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(F_());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 Soe=/matrix\((.*)\)/,Eoe=/matrix3d\((.*)\)/;function Poe(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(F_());if(r&&r!=="none"){var i,o=r.match(Soe);if(o)o=o[1],i=o.split(",").map(function(a){return parseFloat(a,10)}),i[4]=t.x,i[5]=t.y,EC(e,"matrix(".concat(i.join(","),")"));else{var s=r.match(Eoe)[1];i=s.split(",").map(function(a){return parseFloat(a,10)}),i[12]=t.x,i[13]=t.y,EC(e,"matrix3d(".concat(i.join(","),")"))}}else EC(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}var Ioe=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,Kv;function BD(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function Nh(e,t,n){var r=n;if(I3(t)==="object"){for(var i in t)t.hasOwnProperty(i)&&Nh(e,i,t[i]);return}if(typeof r<"u"){typeof r=="number"&&(r="".concat(r,"px")),e.style[t]=r;return}return Kv(e,t)}function Toe(e){var t,n,r,i=e.ownerDocument,o=i.body,s=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),n-=s.clientLeft||o.clientLeft||0,r-=s.clientTop||o.clientTop||0,{left:n,top:r}}function a9(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 s9(e){return a9(e)}function l9(e){return a9(e,!0)}function pv(e){var t=Toe(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=s9(r),t.top+=l9(r),t}function MI(e){return e!=null&&e==e.window}function u9(e){return MI(e)?e.document:e.nodeType===9?e:e.ownerDocument}function koe(e,t,n){var r=n,i="",o=u9(e);return r=r||o.defaultView.getComputedStyle(e,null),r&&(i=r.getPropertyValue(t)||r[t]),i}var Moe=new RegExp("^(".concat(Ioe,")(?!px)[a-z%]+$"),"i"),Roe=/^(top|right|bottom|left)$/,PC="currentStyle",IC="runtimeStyle",hd="left",Aoe="px";function Doe(e,t){var n=e[PC]&&e[PC][t];if(Moe.test(n)&&!Roe.test(t)){var r=e.style,i=r[hd],o=e[IC][hd];e[IC][hd]=e[PC][hd],r[hd]=t==="fontSize"?"1em":n||0,n=r.pixelLeft+Aoe,r[hd]=i,e[IC][hd]=o}return n===""?"auto":n}typeof window<"u"&&(Kv=window.getComputedStyle?koe:Doe);function Yy(e,t){return e==="left"?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function VD(e){if(e==="left")return"right";if(e==="right")return"left";if(e==="top")return"bottom";if(e==="bottom")return"top"}function UD(e,t,n){Nh(e,"position")==="static"&&(e.style.position="relative");var r=-999,i=-999,o=Yy("left",n),s=Yy("top",n),a=VD(o),u=VD(s);o!=="left"&&(r=999),s!=="top"&&(i=999);var d="",p=pv(e);("left"in t||"top"in t)&&(d=woe(e)||"",$D(e,"none")),"left"in t&&(e.style[a]="",e.style[o]="".concat(r,"px")),"top"in t&&(e.style[u]="",e.style[s]="".concat(i,"px")),BD(e);var m=pv(e),v={};for(var x in t)if(t.hasOwnProperty(x)){var _=Yy(x,n),P=x==="left"?r:i,k=p[x]-m[x];_===x?v[_]=P+k:v[_]=P-k}Nh(e,v),BD(e),("left"in t||"top"in t)&&$D(e,d);var T={};for(var M in t)if(t.hasOwnProperty(M)){var O=Yy(M,n),N=t[M]-p[M];M===O?T[O]=v[O]+N:T[O]=v[O]-N}Nh(e,T)}function Ooe(e,t){var n=pv(e),r=Coe(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),Poe(e,i)}function Noe(e,t,n){if(n.ignoreShake){var r=pv(e),i=r.left.toFixed(0),o=r.top.toFixed(0),s=t.left.toFixed(0),a=t.top.toFixed(0);if(i===s&&o===a)return}n.useCssRight||n.useCssBottom?UD(e,t,n):n.useCssTransform&&F_()in document.body.style?Ooe(e,t):UD(e,t,n)}function RI(e,t){for(var n=0;n<e.length;n++)t(e[n])}function c9(e){return Kv(e,"boxSizing")==="border-box"}var Loe=["margin","border","padding"],T3=-1,Foe=2,k3=1,zoe=0;function $oe(e,t,n){var r={},i=e.style,o;for(o in t)t.hasOwnProperty(o)&&(r[o]=i[o],i[o]=t[o]);n.call(e);for(o in t)t.hasOwnProperty(o)&&(i[o]=r[o])}function sg(e,t,n){var r=0,i,o,s;for(o=0;o<t.length;o++)if(i=t[o],i)for(s=0;s<n.length;s++){var a=void 0;i==="border"?a="".concat(i).concat(n[s],"Width"):a=i+n[s],r+=parseFloat(Kv(e,a))||0}return r}var hl={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}};RI(["Width","Height"],function(e){hl["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],hl["viewport".concat(e)](n))},hl["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,i=r.body,o=r.documentElement,s=o[n];return r.compatMode==="CSS1Compat"&&s||i&&i[n]||s}});function jD(e,t,n){var r=n;if(MI(e))return t==="width"?hl.viewportWidth(e):hl.viewportHeight(e);if(e.nodeType===9)return t==="width"?hl.docWidth(e):hl.docHeight(e);var i=t==="width"?["Left","Right"]:["Top","Bottom"],o=Math.floor(t==="width"?e.getBoundingClientRect().width:e.getBoundingClientRect().height),s=c9(e),a=0;(o==null||o<=0)&&(o=void 0,a=Kv(e,t),(a==null||Number(a)<0)&&(a=e.style[t]||0),a=Math.floor(parseFloat(a))||0),r===void 0&&(r=s?k3:T3);var u=o!==void 0||s,d=o||a;return r===T3?u?d-sg(e,["border","padding"],i):a:u?r===k3?d:d+(r===Foe?-sg(e,["border"],i):sg(e,["margin"],i)):a+sg(e,Loe.slice(r),i)}var Boe={position:"absolute",visibility:"hidden",display:"block"};function HD(){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=jD.apply(void 0,t):$oe(i,Boe,function(){r=jD.apply(void 0,t)}),r}RI(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);hl["outer".concat(t)]=function(r,i){return r&&HD(r,e,i?zoe:k3)};var n=e==="width"?["Left","Right"]:["Top","Bottom"];hl[e]=function(r,i){var o=i;if(o!==void 0){if(r){var s=c9(r);return s&&(o+=sg(r,["padding","border"],n)),Nh(r,e,o)}return}return r&&HD(r,e,T3)}});function d9(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var Yn={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var n=t.ownerDocument||t;return n.defaultView||n.parentWindow},getDocument:u9,offset:function(t,n,r){if(typeof n<"u")Noe(t,n,r||{});else return pv(t)},isWindow:MI,each:RI,css:Nh,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:d9,getWindowScrollLeft:function(t){return s9(t)},getWindowScrollTop:function(t){return l9(t)},merge:function(){for(var t={},n=0;n<arguments.length;n++)Yn.mix(t,n<0||arguments.length<=n?void 0:arguments[n]);return t},viewportWidth:0,viewportHeight:0};d9(Yn,hl);var TC=Yn.getParent;function M3(e){if(Yn.isWindow(e)||e.nodeType===9)return null;var t=Yn.getDocument(e),n=t.body,r,i=Yn.css(e,"position"),o=i==="fixed"||i==="absolute";if(!o)return e.nodeName.toLowerCase()==="html"?null:TC(e);for(r=TC(e);r&&r!==n&&r.nodeType!==9;r=TC(r))if(i=Yn.css(r,"position"),i!=="static")return r;return null}var KD=Yn.getParent;function Voe(e){if(Yn.isWindow(e)||e.nodeType===9)return!1;var t=Yn.getDocument(e),n=t.body,r=null;for(r=KD(e);r&&r!==n&&r!==t;r=KD(r)){var i=Yn.css(r,"position");if(i==="fixed")return!0}return!1}function AI(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=M3(e),i=Yn.getDocument(e),o=i.defaultView||i.parentWindow,s=i.body,a=i.documentElement;r;){if((navigator.userAgent.indexOf("MSIE")===-1||r.clientWidth!==0)&&r!==s&&r!==a&&Yn.css(r,"overflow")!=="visible"){var u=Yn.offset(r);u.left+=r.clientLeft,u.top+=r.clientTop,n.top=Math.max(n.top,u.top),n.right=Math.min(n.right,u.left+r.clientWidth),n.bottom=Math.min(n.bottom,u.top+r.clientHeight),n.left=Math.max(n.left,u.left)}else if(r===s||r===a)break;r=M3(r)}var d=null;if(!Yn.isWindow(e)&&e.nodeType!==9){d=e.style.position;var p=Yn.css(e,"position");p==="absolute"&&(e.style.position="fixed")}var m=Yn.getWindowScrollLeft(o),v=Yn.getWindowScrollTop(o),x=Yn.viewportWidth(o),_=Yn.viewportHeight(o),P=a.scrollWidth,k=a.scrollHeight,T=window.getComputedStyle(s);if(T.overflowX==="hidden"&&(P=o.innerWidth),T.overflowY==="hidden"&&(k=o.innerHeight),e.style&&(e.style.position=d),t||Voe(e))n.left=Math.max(n.left,m),n.top=Math.max(n.top,v),n.right=Math.min(n.right,m+x),n.bottom=Math.min(n.bottom,v+_);else{var M=Math.max(P,m+x);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 Uoe(e,t,n,r){var i=Yn.clone(e),o={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+o.width>n.right&&(o.width-=i.left+o.width-n.right),r.adjustX&&i.left+o.width>n.right&&(i.left=Math.max(n.right-o.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+o.height>n.bottom&&(o.height-=i.top+o.height-n.bottom),r.adjustY&&i.top+o.height>n.bottom&&(i.top=Math.max(n.bottom-o.height,n.top)),Yn.mix(i,o)}function DI(e){var t,n,r;if(!Yn.isWindow(e)&&e.nodeType!==9)t=Yn.offset(e),n=Yn.outerWidth(e),r=Yn.outerHeight(e);else{var i=Yn.getWindow(e);t={left:Yn.getWindowScrollLeft(i),top:Yn.getWindowScrollTop(i)},n=Yn.viewportWidth(i),r=Yn.viewportHeight(i)}return t.width=n,t.height=r,t}function WD(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,o=e.height,s=e.left,a=e.top;return n==="c"?a+=o/2:n==="b"&&(a+=o),r==="c"?s+=i/2:r==="r"&&(s+=i),{left:s,top:a}}function Qy(e,t,n,r,i){var o=WD(t,n[1]),s=WD(e,n[0]),a=[s.left-o.left,s.top-o.top];return{left:Math.round(e.left-a[0]+r[0]-i[0]),top:Math.round(e.top-a[1]+r[1]-i[1])}}function GD(e,t,n){return e.left<n.left||e.left+t.width>n.right}function qD(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function joe(e,t,n){return e.left>n.right||e.left+t.width<n.left}function Hoe(e,t,n){return e.top>n.bottom||e.top+t.height<n.top}function Jy(e,t,n){var r=[];return Yn.each(e,function(i){r.push(i.replace(t,function(o){return n[o]}))}),r}function ex(e,t){return e[t]=-e[t],e}function ZD(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 XD(e,t){e[0]=ZD(e[0],t.width),e[1]=ZD(e[1],t.height)}function f9(e,t,n,r){var i=n.points,o=n.offset||[0,0],s=n.targetOffset||[0,0],a=n.overflow,u=n.source||e;o=[].concat(o),s=[].concat(s),a=a||{};var d={},p=0,m=!!(a&&a.alwaysByViewport),v=AI(u,m),x=DI(u);XD(o,x),XD(s,t);var _=Qy(x,t,i,o,s),P=Yn.merge(x,_);if(v&&(a.adjustX||a.adjustY)&&r){if(a.adjustX&&GD(_,x,v)){var k=Jy(i,/[lr]/gi,{l:"r",r:"l"}),T=ex(o,0),M=ex(s,0),O=Qy(x,t,k,T,M);joe(O,x,v)||(p=1,i=k,o=T,s=M)}if(a.adjustY&&qD(_,x,v)){var N=Jy(i,/[tb]/gi,{t:"b",b:"t"}),L=ex(o,1),F=ex(s,1),V=Qy(x,t,N,L,F);Hoe(V,x,v)||(p=1,i=N,o=L,s=F)}p&&(_=Qy(x,t,i,o,s),Yn.mix(P,_));var B=GD(_,x,v),H=qD(_,x,v);if(B||H){var G=i;B&&(G=Jy(i,/[lr]/gi,{l:"r",r:"l"})),H&&(G=Jy(i,/[tb]/gi,{t:"b",b:"t"})),i=G,o=n.offset||[0,0],s=n.targetOffset||[0,0]}d.adjustX=a.adjustX&&B,d.adjustY=a.adjustY&&H,(d.adjustX||d.adjustY)&&(P=Uoe(_,x,v,d))}return P.width!==x.width&&Yn.css(u,"width",Yn.width(u)+P.width-x.width),P.height!==x.height&&Yn.css(u,"height",Yn.height(u)+P.height-x.height),Yn.offset(u,{left:P.left,top:P.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:o,targetOffset:s,overflow:d}}function Koe(e,t){var n=AI(e,t),r=DI(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}function OI(e,t,n){var r=n.target||t,i=DI(r),o=!Koe(r,n.overflow&&n.overflow.alwaysByViewport);return f9(e,i,n,o)}OI.__getOffsetParent=M3;OI.__getVisibleRectForElement=AI;function Woe(e,t,n){var r,i,o=Yn.getDocument(e),s=o.defaultView||o.parentWindow,a=Yn.getWindowScrollLeft(s),u=Yn.getWindowScrollTop(s),d=Yn.viewportWidth(s),p=Yn.viewportHeight(s);"pageX"in t?r=t.pageX:r=a+t.clientX,"pageY"in t?i=t.pageY:i=u+t.clientY;var m={left:r,top:i,width:0,height:0},v=r>=0&&r<=a+d&&i>=0&&i<=u+p,x=[n.points[0],"cc"];return f9(e,m,zD(zD({},n),{},{points:x}),v)}function NI(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,s){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=r.has(o);if(Dr(!u,"Warning: There may be circular references"),u)return!1;if(o===s)return!0;if(n&&a>1)return!1;r.add(o);var d=a+1;if(Array.isArray(o)){if(!Array.isArray(s)||o.length!==s.length)return!1;for(var p=0;p<o.length;p++)if(!i(o[p],s[p],d))return!1;return!0}if(o&&s&&nn(o)==="object"&&nn(s)==="object"){var m=Object.keys(o);return m.length!==Object.keys(s).length?!1:m.every(function(v){return i(o[v],s[v],d)})}return!1}return i(e,t)}const LI=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(),o=i.width,s=i.height;if(o||s)return!0}return!1},Goe=function(e,t){var n=Un.useRef(!1),r=Un.useRef(null);function i(){window.clearTimeout(r.current)}function o(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,o()},t)}return[o,function(){n.current=!1,i()}]};function qoe(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 Zoe(e,t){e!==document.activeElement&&Kd(t,e)&&typeof e.focus=="function"&&e.focus()}function YD(e,t){var n=null,r=null;function i(s){var a=Le(s,1),u=a[0].target;if(!!document.documentElement.contains(u)){var d=u.getBoundingClientRect(),p=d.width,m=d.height,v=Math.floor(p),x=Math.floor(m);(n!==v||r!==x)&&Promise.resolve().then(function(){t({width:v,height:x})}),n=v,r=x}}var o=new p$(i);return e&&o.observe(e),function(){o.disconnect()}}function QD(e){return typeof e!="function"?null:e()}function JD(e){return nn(e)!=="object"||!e?null:e}var Xoe=function(t,n){var r=t.children,i=t.disabled,o=t.target,s=t.align,a=t.onAlign,u=t.monitorWindowResize,d=t.monitorBufferTime,p=d===void 0?0:d,m=Un.useRef({}),v=Un.useRef(),x=Un.Children.only(r),_=Un.useRef({});_.current.disabled=i,_.current.target=o,_.current.align=s,_.current.onAlign=a;var P=Goe(function(){var ee=_.current,X=ee.disabled,Z=ee.target,Q=ee.align,le=ee.onAlign,ne=v.current;if(!X&&Z&&ne){var se,oe=QD(Z),he=JD(Z);m.current.element=oe,m.current.point=he,m.current.align=Q;var _e=document,be=_e.activeElement;return oe&&LI(oe)?se=OI(ne,oe,Q):he&&(se=Woe(ne,he,Q)),Zoe(be,ne),le&&se&&le(ne,se),!0}return!1},p),k=Le(P,2),T=k[0],M=k[1],O=Un.useState(),N=Le(O,2),L=N[0],F=N[1],V=Un.useState(),B=Le(V,2),H=B[0],G=B[1];return wi(function(){F(QD(o)),G(JD(o))}),Un.useEffect(function(){(m.current.element!==L||!qoe(m.current.point,H)||!NI(m.current.align,s))&&T()}),Un.useEffect(function(){var ee=YD(v.current,T);return ee},[v.current]),Un.useEffect(function(){var ee=YD(L,T);return ee},[L]),Un.useEffect(function(){i?M():T()},[i]),Un.useEffect(function(){if(u){var ee=la(window,"resize",T);return ee.remove}},[u]),Un.useEffect(function(){return function(){M()}},[]),Un.useImperativeHandle(n,function(){return{forceAlign:function(){return T(!0)}}}),Un.isValidElement(x)&&(x=Un.cloneElement(x,{ref:Zo(x.ref,v)})),x},h9=Un.forwardRef(Xoe);h9.displayName="Align";var eO=["measure","alignPre","align",null,"motion"];const Yoe=function(e,t){var n=vl(null),r=Le(n,2),i=r[0],o=r[1],s=w.exports.useRef();function a(p){o(p,!0)}function u(){ar.cancel(s.current)}function d(p){u(),s.current=ar(function(){a(function(m){switch(i){case"align":return"motion";case"motion":return"stable"}return m}),p==null||p()})}return w.exports.useEffect(function(){a("measure")},[e]),w.exports.useEffect(function(){switch(i){case"measure":t();break}i&&(s.current=ar(Fc(Zi().mark(function p(){var m,v;return Zi().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:m=eO.indexOf(i),v=eO[m+1],v&&m!==-1&&a(v);case 3:case"end":return _.stop()}},p)}))))},[i]),w.exports.useEffect(function(){return function(){u()}},[]),[i,d]},Qoe=function(e){var t=w.exports.useState({width:0,height:0}),n=Le(t,2),r=n[0],i=n[1];function o(a){var u=a.offsetWidth,d=a.offsetHeight,p=a.getBoundingClientRect(),m=p.width,v=p.height;Math.abs(u-m)<1&&Math.abs(d-v)<1&&(u=m,d=v),i({width:u,height:d})}var s=w.exports.useMemo(function(){var a={};if(e){var u=r.width,d=r.height;e.indexOf("height")!==-1&&d?a.height=d:e.indexOf("minHeight")!==-1&&d&&(a.minHeight=d),e.indexOf("width")!==-1&&u?a.width=u:e.indexOf("minWidth")!==-1&&u&&(a.minWidth=u)}return a},[e,r]);return[s,o]};var p9=w.exports.forwardRef(function(e,t){var n=e.visible,r=e.prefixCls,i=e.className,o=e.style,s=e.children,a=e.zIndex,u=e.stretch,d=e.destroyPopupOnHide,p=e.forceRender,m=e.align,v=e.point,x=e.getRootDomNode,_=e.getClassNameFromAlign,P=e.onAlign,k=e.onMouseEnter,T=e.onMouseLeave,M=e.onMouseDown,O=e.onTouchStart,N=e.onClick,L=w.exports.useRef(),F=w.exports.useRef(),V=w.exports.useState(),B=Le(V,2),H=B[0],G=B[1],ee=Qoe(u),X=Le(ee,2),Z=X[0],Q=X[1];function le(){u&&Q(x())}var ne=Yoe(n,le),se=Le(ne,2),oe=se[0],he=se[1],_e=w.exports.useState(0),be=Le(_e,2),xe=be[0],Te=be[1],Ee=w.exports.useRef();wi(function(){oe==="alignPre"&&Te(0)},[oe]);function Ce(){return v||x}function ke(){var We;(We=L.current)===null||We===void 0||We.forceAlign()}function De(We,bt){var Qe=_(bt);H!==Qe&&G(Qe),Te(function(mt){return mt+1}),oe==="align"&&(P==null||P(We,bt))}wi(function(){oe==="align"&&(xe<3?ke():he(function(){var We;(We=Ee.current)===null||We===void 0||We.call(Ee)}))},[xe]);var Ke=fe({},i9(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(We){var bt=Ke[We];Ke[We]=function(Qe,mt){return he(),bt==null?void 0:bt(Qe,mt)}});function Ue(){return new Promise(function(We){Ee.current=We})}w.exports.useEffect(function(){!Ke.motionName&&oe==="motion"&&he()},[Ke.motionName,oe]),w.exports.useImperativeHandle(t,function(){return{forceAlign:ke,getElement:function(){return F.current}}});var tt=fe(fe({},Z),{},{zIndex:a,opacity:oe==="motion"||oe==="stable"||!n?void 0:0,pointerEvents:!n&&oe!=="stable"?"none":void 0},o),lt=!0;m!=null&&m.points&&(oe==="align"||oe==="stable")&&(lt=!1);var St=s;return w.exports.Children.count(s)>1&&(St=I("div",{className:"".concat(r,"-content"),children:s})),I(Xo,{visible:n,ref:F,leavedClassName:"".concat(r,"-hidden"),...Ke,onAppearPrepare:Ue,onEnterPrepare:Ue,removeOnLeave:d,forceRender:p,children:function(We,bt){var Qe=We.className,mt=We.style,ct=He(r,i,H,Qe);return I(h9,{target:Ce(),ref:L,monitorWindowResize:!0,disabled:lt,align:m,onAlign:De,children:I("div",{ref:bt,className:ct,onMouseEnter:k,onMouseLeave:T,onMouseDownCapture:M,onTouchStartCapture:O,onClick:N,style:fe(fe({},mt),tt),children:St})},"popup")}})});p9.displayName="PopupInner";var m9=w.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,o=e.children,s=e.mobile;s=s===void 0?{}:s;var a=s.popupClassName,u=s.popupStyle,d=s.popupMotion,p=d===void 0?{}:d,m=s.popupRender,v=e.onClick,x=w.exports.useRef();w.exports.useImperativeHandle(t,function(){return{forceAlign:function(){},getElement:function(){return x.current}}});var _=fe({zIndex:i},u),P=o;return w.exports.Children.count(o)>1&&(P=I("div",{className:"".concat(n,"-content"),children:o})),m&&(P=m(P)),I(Xo,{visible:r,ref:x,removeOnLeave:!0,...p,children:function(k,T){var M=k.className,O=k.style,N=He(n,a,M);return I("div",{ref:T,className:N,onClick:v,style:fe(fe({},O),_),children:P})}})});m9.displayName="MobilePopupInner";var Joe=["visible","mobile"],g9=w.exports.forwardRef(function(e,t){var n=e.visible,r=e.mobile,i=Rn(e,Joe),o=w.exports.useState(n),s=Le(o,2),a=s[0],u=s[1],d=w.exports.useState(!1),p=Le(d,2),m=p[0],v=p[1],x=fe(fe({},i),{},{visible:a});w.exports.useEffect(function(){u(n),n&&r&&v(TI())},[n,r]);var _=m?I(m9,{...x,mobile:r,ref:t}):I(p9,{...x,ref:t});return $e("div",{children:[I(xoe,{...x}),_]})});g9.displayName="Popup";var tO=w.exports.createContext(null);function kC(){}function eae(){return""}function tae(e){return e?e.ownerDocument:window.document}var nae=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function rae(e){var t=function(n){ci(i,n);var r=di(i);function i(o){var s;Nr(this,i),s=r.call(this,o),re(Vn(s),"popupRef",w.exports.createRef()),re(Vn(s),"triggerRef",w.exports.createRef()),re(Vn(s),"portalContainer",void 0),re(Vn(s),"attachId",void 0),re(Vn(s),"clickOutsideHandler",void 0),re(Vn(s),"touchOutsideHandler",void 0),re(Vn(s),"contextMenuOutsideHandler1",void 0),re(Vn(s),"contextMenuOutsideHandler2",void 0),re(Vn(s),"mouseDownTimeout",void 0),re(Vn(s),"focusTime",void 0),re(Vn(s),"preClickTime",void 0),re(Vn(s),"preTouchTime",void 0),re(Vn(s),"delayTimer",void 0),re(Vn(s),"hasPopupMouseDown",void 0),re(Vn(s),"onMouseEnter",function(u){var d=s.props.mouseEnterDelay;s.fireEvents("onMouseEnter",u),s.delaySetPopupVisible(!0,d,d?null:u)}),re(Vn(s),"onMouseMove",function(u){s.fireEvents("onMouseMove",u),s.setPoint(u)}),re(Vn(s),"onMouseLeave",function(u){s.fireEvents("onMouseLeave",u),s.delaySetPopupVisible(!1,s.props.mouseLeaveDelay)}),re(Vn(s),"onPopupMouseEnter",function(){s.clearDelayTimer()}),re(Vn(s),"onPopupMouseLeave",function(u){var d;u.relatedTarget&&!u.relatedTarget.setTimeout&&Kd((d=s.popupRef.current)===null||d===void 0?void 0:d.getElement(),u.relatedTarget)||s.delaySetPopupVisible(!1,s.props.mouseLeaveDelay)}),re(Vn(s),"onFocus",function(u){s.fireEvents("onFocus",u),s.clearDelayTimer(),s.isFocusToShow()&&(s.focusTime=Date.now(),s.delaySetPopupVisible(!0,s.props.focusDelay))}),re(Vn(s),"onMouseDown",function(u){s.fireEvents("onMouseDown",u),s.preClickTime=Date.now()}),re(Vn(s),"onTouchStart",function(u){s.fireEvents("onTouchStart",u),s.preTouchTime=Date.now()}),re(Vn(s),"onBlur",function(u){s.fireEvents("onBlur",u),s.clearDelayTimer(),s.isBlurToHide()&&s.delaySetPopupVisible(!1,s.props.blurDelay)}),re(Vn(s),"onContextMenu",function(u){u.preventDefault(),s.fireEvents("onContextMenu",u),s.setPopupVisible(!0,u)}),re(Vn(s),"onContextMenuClose",function(){s.isContextMenuToShow()&&s.close()}),re(Vn(s),"onClick",function(u){if(s.fireEvents("onClick",u),s.focusTime){var d;if(s.preClickTime&&s.preTouchTime?d=Math.min(s.preClickTime,s.preTouchTime):s.preClickTime?d=s.preClickTime:s.preTouchTime&&(d=s.preTouchTime),Math.abs(d-s.focusTime)<20)return;s.focusTime=0}s.preClickTime=0,s.preTouchTime=0,s.isClickToShow()&&(s.isClickToHide()||s.isBlurToHide())&&u&&u.preventDefault&&u.preventDefault();var p=!s.state.popupVisible;(s.isClickToHide()&&!p||p&&s.isClickToShow())&&s.setPopupVisible(!s.state.popupVisible,u)}),re(Vn(s),"onPopupMouseDown",function(){if(s.hasPopupMouseDown=!0,clearTimeout(s.mouseDownTimeout),s.mouseDownTimeout=window.setTimeout(function(){s.hasPopupMouseDown=!1},0),s.context){var u;(u=s.context).onPopupMouseDown.apply(u,arguments)}}),re(Vn(s),"onDocumentClick",function(u){if(!(s.props.mask&&!s.props.maskClosable)){var d=u.target,p=s.getRootDomNode(),m=s.getPopupDomNode();(!Kd(p,d)||s.isContextMenuOnly())&&!Kd(m,d)&&!s.hasPopupMouseDown&&s.close()}}),re(Vn(s),"getRootDomNode",function(){var u=s.props.getTriggerDOMNode;if(u)return u(s.triggerRef.current);try{var d=lv(s.triggerRef.current);if(d)return d}catch{}return Tc.findDOMNode(Vn(s))}),re(Vn(s),"getPopupClassNameFromAlign",function(u){var d=[],p=s.props,m=p.popupPlacement,v=p.builtinPlacements,x=p.prefixCls,_=p.alignPoint,P=p.getPopupClassNameFromAlign;return m&&v&&d.push(yoe(v,x,u,_)),P&&d.push(P(u)),d.join(" ")}),re(Vn(s),"getComponent",function(){var u=s.props,d=u.prefixCls,p=u.destroyPopupOnHide,m=u.popupClassName,v=u.onPopupAlign,x=u.popupMotion,_=u.popupAnimation,P=u.popupTransitionName,k=u.popupStyle,T=u.mask,M=u.maskAnimation,O=u.maskTransitionName,N=u.maskMotion,L=u.zIndex,F=u.popup,V=u.stretch,B=u.alignPoint,H=u.mobile,G=u.forceRender,ee=u.onPopupClick,X=s.state,Z=X.popupVisible,Q=X.point,le=s.getPopupAlign(),ne={};return s.isMouseEnterToShow()&&(ne.onMouseEnter=s.onPopupMouseEnter),s.isMouseLeaveToHide()&&(ne.onMouseLeave=s.onPopupMouseLeave),ne.onMouseDown=s.onPopupMouseDown,ne.onTouchStart=s.onPopupMouseDown,I(g9,{prefixCls:d,destroyPopupOnHide:p,visible:Z,point:B&&Q,className:m,align:le,onAlign:v,animation:_,getClassNameFromAlign:s.getPopupClassNameFromAlign,...ne,stretch:V,getRootDomNode:s.getRootDomNode,style:k,mask:T,zIndex:L,transitionName:P,maskAnimation:M,maskTransitionName:O,maskMotion:N,ref:s.popupRef,motion:x,mobile:H,forceRender:G,onClick:ee,children:typeof F=="function"?F():F})}),re(Vn(s),"attachParent",function(u){ar.cancel(s.attachId);var d=s.props,p=d.getPopupContainer,m=d.getDocument,v=s.getRootDomNode(),x;p?(v||p.length===0)&&(x=p(v)):x=m(s.getRootDomNode()).body,x?x.appendChild(u):s.attachId=ar(function(){s.attachParent(u)})}),re(Vn(s),"getContainer",function(){if(!s.portalContainer){var u=s.props.getDocument,d=u(s.getRootDomNode()).createElement("div");d.style.position="absolute",d.style.top="0",d.style.left="0",d.style.width="100%",s.portalContainer=d}return s.attachParent(s.portalContainer),s.portalContainer}),re(Vn(s),"setPoint",function(u){var d=s.props.alignPoint;!d||!u||s.setState({point:{pageX:u.pageX,pageY:u.pageY}})}),re(Vn(s),"handlePortalUpdate",function(){s.state.prevPopupVisible!==s.state.popupVisible&&s.props.afterPopupVisibleChange(s.state.popupVisible)}),re(Vn(s),"triggerContextValue",{onPopupMouseDown:s.onPopupMouseDown});var a;return"popupVisible"in o?a=!!o.popupVisible:a=!!o.defaultPopupVisible,s.state={prevPopupVisible:a,popupVisible:a},nae.forEach(function(u){s["fire".concat(u)]=function(d){s.fireEvents(u,d)}}),s}return Lr(i,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var s=this.props,a=this.state;if(a.popupVisible){var u;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(u=s.getDocument(this.getRootDomNode()),this.clickOutsideHandler=la(u,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(u=u||s.getDocument(this.getRootDomNode()),this.touchOutsideHandler=la(u,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(u=u||s.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=la(u,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=la(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ar.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,a=s.popupPlacement,u=s.popupAlign,d=s.builtinPlacements;return a&&d?voe(d,a,u):u}},{key:"setPopupVisible",value:function(s,a){var u=this.props.alignPoint,d=this.state.popupVisible;this.clearDelayTimer(),d!==s&&("popupVisible"in this.props||this.setState({popupVisible:s,prevPopupVisible:d}),this.props.onPopupVisibleChange(s)),u&&a&&s&&this.setPoint(a)}},{key:"delaySetPopupVisible",value:function(s,a,u){var d=this,p=a*1e3;if(this.clearDelayTimer(),p){var m=u?{pageX:u.pageX,pageY:u.pageY}:null;this.delayTimer=window.setTimeout(function(){d.setPopupVisible(s,m),d.clearDelayTimer()},p)}else this.setPopupVisible(s,u)}},{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 a=this.props.children.props,u=this.props;return a[s]&&u[s]?this["fire".concat(s)]:a[s]||u[s]}},{key:"isClickToShow",value:function(){var s=this.props,a=s.action,u=s.showAction;return a.indexOf("click")!==-1||u.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,a=s.action,u=s.showAction;return a.indexOf("contextMenu")!==-1||u.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var s=this.props,a=s.action,u=s.hideAction;return a.indexOf("click")!==-1||u.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var s=this.props,a=s.action,u=s.showAction;return a.indexOf("hover")!==-1||u.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var s=this.props,a=s.action,u=s.hideAction;return a.indexOf("hover")!==-1||u.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var s=this.props,a=s.action,u=s.showAction;return a.indexOf("focus")!==-1||u.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var s=this.props,a=s.action,u=s.hideAction;return a.indexOf("focus")!==-1||u.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,a){var u=this.props.children.props[s];u&&u(a);var d=this.props[s];d&&d(a)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var s=this.state.popupVisible,a=this.props,u=a.children,d=a.forceRender,p=a.alignPoint,m=a.className,v=a.autoDestroy,x=w.exports.Children.only(u),_={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 P=He(x&&x.props&&x.props.className,m);P&&(_.className=P);var k=fe({},_);vf(x)&&(k.ref=Zo(this.triggerRef,x.ref));var T=w.exports.cloneElement(x,k),M;return(s||this.popupRef.current||d)&&(M=I(e,{getContainer:this.getContainer,didUpdate:this.handlePortalUpdate,children:this.getComponent()},"portal")),!s&&v&&(M=null),$e(tO.Provider,{value:this.triggerContextValue,children:[T,M]})}}],[{key:"getDerivedStateFromProps",value:function(s,a){var u=s.popupVisible,d={};return u!==void 0&&a.popupVisible!==u&&(d.popupVisible=u,d.prevPopupVisible=a.popupVisible),d}}]),i}(w.exports.Component);return re(t,"contextType",tO),re(t,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:eae,getDocument:tae,onPopupVisibleChange:kC,afterPopupVisibleChange:kC,onPopupAlign:kC,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 z_=rae(moe);var iae=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],oae=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}}}},aae=function(t,n){var r=t.prefixCls;t.disabled;var i=t.visible,o=t.children,s=t.popupElement,a=t.containerWidth,u=t.animation,d=t.transitionName,p=t.dropdownStyle,m=t.dropdownClassName,v=t.direction,x=v===void 0?"ltr":v,_=t.placement,P=t.dropdownMatchSelectWidth,k=t.dropdownRender,T=t.dropdownAlign,M=t.getPopupContainer,O=t.empty,N=t.getTriggerDOMNode,L=t.onPopupVisibleChange,F=t.onPopupMouseEnter,V=Rn(t,iae),B="".concat(r,"-dropdown"),H=s;k&&(H=k(s));var G=w.exports.useMemo(function(){return oae(P)},[P]),ee=u?"".concat(B,"-").concat(u):d,X=w.exports.useRef(null);w.exports.useImperativeHandle(n,function(){return{getPopupElement:function(){return X.current}}});var Z=fe({minWidth:a},p);return typeof P=="number"?Z.width=P:P&&(Z.width=a),I(z_,{...V,showAction:L?["click"]:[],hideAction:L?["click"]:[],popupPlacement:_||(x==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:G,prefixCls:B,popupTransitionName:ee,popup:I("div",{ref:X,onMouseEnter:F,children:H}),popupAlign:T,popupVisible:i,getPopupContainer:M,popupClassName:He(m,re({},"".concat(B,"-empty"),O)),popupStyle:Z,getTriggerDOMNode:N,onPopupVisibleChange:L,children:o})},v9=w.exports.forwardRef(aae);v9.displayName="SelectTrigger";function nO(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 y9(e,t){var n=e||{},r=n.label,i=n.value,o=n.options;return{label:r||(t?"children":"label"),value:i||"value",options:o||"options"}}function sae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=y9(n,!1),s=o.label,a=o.value,u=o.options;function d(p,m){p.forEach(function(v){var x=v[s];if(m||!(u in v)){var _=v[a];i.push({key:nO(v,i.length),groupOption:m,data:v,label:x,value:_})}else{var P=x;P===void 0&&r&&(P=v.label),i.push({key:nO(v,i.length),group:!0,data:v,label:P}),d(v[u],!0)}})}return d(e,!1),i}function R3(e){var t=fe({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Dr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function lae(e,t){if(!t||!t.length)return null;var n=!1;function r(o,s){var a=dI(s),u=a[0],d=a.slice(1);if(!u)return[o];var p=o.split(u);return n=n||p.length>1,p.reduce(function(m,v){return[].concat(Pt(m),Pt(r(v,d)))},[]).filter(function(m){return m})}var i=r(e,t);return n?i:null}var uae=["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"],cae=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function A3(e){return e==="tags"||e==="multiple"}var x9=w.exports.forwardRef(function(e,t){var n,r,i=e.id,o=e.prefixCls,s=e.className,a=e.showSearch,u=e.tagRender,d=e.direction,p=e.omitDomProps,m=e.displayValues,v=e.onDisplayValuesChange,x=e.emptyOptions,_=e.notFoundContent,P=_===void 0?"Not Found":_,k=e.onClear,T=e.mode,M=e.disabled,O=e.loading,N=e.getInputElement,L=e.getRawInputElement,F=e.open,V=e.defaultOpen,B=e.onDropdownVisibleChange,H=e.activeValue,G=e.onActiveValueChange,ee=e.activeDescendantId,X=e.searchValue,Z=e.autoClearSearchValue,Q=e.onSearch,le=e.onSearchSplit,ne=e.tokenSeparators,se=e.allowClear,oe=e.showArrow,he=e.inputIcon,_e=e.clearIcon,be=e.OptionList,xe=e.animation,Te=e.transitionName,Ee=e.dropdownStyle,Ce=e.dropdownClassName,ke=e.dropdownMatchSelectWidth,De=e.dropdownRender,Ke=e.dropdownAlign,Ue=e.placement,tt=e.getPopupContainer,lt=e.showAction,St=lt===void 0?[]:lt,We=e.onFocus,bt=e.onBlur,Qe=e.onKeyUp,mt=e.onKeyDown,ct=e.onMouseDown,wt=Rn(e,uae),rt=A3(T),ut=(a!==void 0?a:rt)||T==="combobox",nt=fe({},wt);cae.forEach(function(Nn){delete nt[Nn]}),p==null||p.forEach(function(Nn){delete nt[Nn]});var qe=w.exports.useState(!1),dt=Le(qe,2),_t=dt[0],Dt=dt[1];w.exports.useEffect(function(){Dt(TI())},[]);var Nt=w.exports.useRef(null),jt=w.exports.useRef(null),Ve=w.exports.useRef(null),Ze=w.exports.useRef(null),Yt=w.exports.useRef(null),sn=Uie(),Gt=Le(sn,3),zt=Gt[0],Rt=Gt[1],Qt=Gt[2];w.exports.useImperativeHandle(t,function(){var Nn,An;return{focus:(Nn=Ze.current)===null||Nn===void 0?void 0:Nn.focus,blur:(An=Ze.current)===null||An===void 0?void 0:An.blur,scrollTo:function(ri){var Er;return(Er=Yt.current)===null||Er===void 0?void 0:Er.scrollTo(ri)}}});var pn=w.exports.useMemo(function(){var Nn;if(T!=="combobox")return X;var An=(Nn=m[0])===null||Nn===void 0?void 0:Nn.value;return typeof An=="string"||typeof An=="number"?String(An):""},[X,T,m]),ot=T==="combobox"&&typeof N=="function"&&N()||null,Lt=typeof L=="function"&&L(),Tt=l$(jt,Lt==null||(n=Lt.props)===null||n===void 0?void 0:n.ref),Kt=ki(void 0,{defaultValue:V,value:F}),Zt=Le(Kt,2),ht=Zt[0],xn=Zt[1],bn=ht,tn=!P&&x;(M||tn&&bn&&T==="combobox")&&(bn=!1);var Bt=tn?!1:bn,gt=w.exports.useCallback(function(Nn){var An=Nn!==void 0?Nn:!bn;M||(xn(An),bn!==An&&(B==null||B(An)))},[M,bn,xn,B]),xt=w.exports.useMemo(function(){return(ne||[]).some(function(Nn){return[`
|
|
|
`,`\r
|
|
|
`].includes(Nn)})},[ne]),Vt=function(An,zn,ri){var Er=!0,Xn=An;G==null||G(null);var Kn=ri?null:lae(An,ne);return T!=="combobox"&&Kn&&(Xn="",le==null||le(Kn),gt(!1),Er=!1),Q&&pn!==Xn&&Q(Xn,{source:zn?"typing":"effect"}),Er},qt=function(An){!An||!An.trim()||Q(An,{source:"submit"})};w.exports.useEffect(function(){!bn&&!rt&&T!=="combobox"&&Vt("",!1,!1)},[bn]),w.exports.useEffect(function(){ht&&M&&xn(!1),M&&Rt(!1)},[M]);var vn=YB(),Fn=Le(vn,2),tr=Fn[0],nr=Fn[1],ye=function(An){var zn=tr(),ri=An.which;if(ri===kt.ENTER&&(T!=="combobox"&&An.preventDefault(),bn||gt(!0)),nr(!!pn),ri===kt.BACKSPACE&&!zn&&rt&&!pn&&m.length){for(var Er=Pt(m),Xn=null,Kn=Er.length-1;Kn>=0;Kn-=1){var or=Er[Kn];if(!or.disabled){Er.splice(Kn,1),Xn=or;break}}Xn&&v(Er,{type:"remove",values:[Xn]})}for(var Tr=arguments.length,Mr=new Array(Tr>1?Tr-1:0),Xr=1;Xr<Tr;Xr++)Mr[Xr-1]=arguments[Xr];if(bn&&Yt.current){var Oo;(Oo=Yt.current).onKeyDown.apply(Oo,[An].concat(Mr))}mt==null||mt.apply(void 0,[An].concat(Mr))},q=function(An){for(var zn=arguments.length,ri=new Array(zn>1?zn-1:0),Er=1;Er<zn;Er++)ri[Er-1]=arguments[Er];if(bn&&Yt.current){var Xn;(Xn=Yt.current).onKeyUp.apply(Xn,[An].concat(ri))}Qe==null||Qe.apply(void 0,[An].concat(ri))},J=function(An){var zn=m.filter(function(ri){return ri!==An});v(zn,{type:"remove",values:[An]})},pe=w.exports.useRef(!1),ce=function(){Rt(!0),M||(We&&!pe.current&&We.apply(void 0,arguments),St.includes("focus")&>(!0)),pe.current=!0},we=function(){Rt(!1,function(){pe.current=!1,gt(!1)}),!M&&(pn&&(T==="tags"?Q(pn,{source:"submit"}):T==="multiple"&&Q("",{source:"blur"})),bt&&bt.apply(void 0,arguments))},Ae=[];w.exports.useEffect(function(){return function(){Ae.forEach(function(Nn){return clearTimeout(Nn)}),Ae.splice(0,Ae.length)}},[]);var Pe=function(An){var zn,ri=An.target,Er=(zn=Ve.current)===null||zn===void 0?void 0:zn.getPopupElement();if(Er&&Er.contains(ri)){var Xn=setTimeout(function(){var Mr=Ae.indexOf(Xn);if(Mr!==-1&&Ae.splice(Mr,1),Qt(),!_t&&!Er.contains(document.activeElement)){var Xr;(Xr=Ze.current)===null||Xr===void 0||Xr.focus()}});Ae.push(Xn)}for(var Kn=arguments.length,or=new Array(Kn>1?Kn-1:0),Tr=1;Tr<Kn;Tr++)or[Tr-1]=arguments[Tr];ct==null||ct.apply(void 0,[An].concat(or))},Me=w.exports.useState(null),Be=Le(Me,2),Je=Be[0],et=Be[1],Ge=w.exports.useState({}),Ut=Le(Ge,2),Mt=Ut[1];function at(){Mt({})}wi(function(){if(Bt){var Nn,An=Math.ceil((Nn=Nt.current)===null||Nn===void 0?void 0:Nn.offsetWidth);Je!==An&&!Number.isNaN(An)&&et(An)}},[Bt]);var $t;Lt&&($t=function(An){gt(An)}),jie(function(){var Nn;return[Nt.current,(Nn=Ve.current)===null||Nn===void 0?void 0:Nn.getPopupElement()]},Bt,gt,!!Lt);var Xt=w.exports.useMemo(function(){return fe(fe({},e),{},{notFoundContent:P,open:bn,triggerOpen:Bt,id:i,showSearch:ut,multiple:rt,toggleOpen:gt})},[e,P,Bt,bn,i,ut,rt,gt]),En=oe!==void 0?oe:O||!rt&&T!=="combobox",hn;En&&(hn=I(cb,{className:He("".concat(o,"-arrow"),re({},"".concat(o,"-arrow-loading"),O)),customizeIcon:he,customizeIconProps:{loading:O,searchValue:pn,open:bn,focused:zt,showSearch:ut}}));var Pn,Gn=function(){var An;k==null||k(),(An=Ze.current)===null||An===void 0||An.focus(),v([],{type:"clear",values:m}),Vt("",!1,!1)};!M&&se&&(m.length||pn)&&!(T==="combobox"&&pn==="")&&(Pn=I(cb,{className:"".concat(o,"-clear"),onMouseDown:Gn,customizeIcon:_e,children:"\xD7"}));var lr=I(be,{ref:Yt}),Zr=He(o,s,(r={},re(r,"".concat(o,"-focused"),zt),re(r,"".concat(o,"-multiple"),rt),re(r,"".concat(o,"-single"),!rt),re(r,"".concat(o,"-allow-clear"),se),re(r,"".concat(o,"-show-arrow"),En),re(r,"".concat(o,"-disabled"),M),re(r,"".concat(o,"-loading"),O),re(r,"".concat(o,"-open"),bn),re(r,"".concat(o,"-customize-input"),ot),re(r,"".concat(o,"-show-search"),ut),r)),hr=I(v9,{ref:Ve,disabled:M,prefixCls:o,visible:Bt,popupElement:lr,containerWidth:Je,animation:xe,transitionName:Te,dropdownStyle:Ee,dropdownClassName:Ce,direction:d,dropdownMatchSelectWidth:ke,dropdownRender:De,dropdownAlign:Ke,placement:Ue,getPopupContainer:tt,empty:x,getTriggerDOMNode:function(){return jt.current},onPopupVisibleChange:$t,onPopupMouseEnter:at,children:Lt?w.exports.cloneElement(Lt,{ref:Tt}):I(r9,{...e,domRef:jt,prefixCls:o,inputElement:ot,ref:Ze,id:i,showSearch:ut,autoClearSearchValue:Z,mode:T,activeDescendantId:ee,tagRender:u,values:m,open:bn,onToggleOpen:gt,activeValue:H,searchValue:pn,onSearch:Vt,onSearchSubmit:qt,onRemove:J,tokenWithEnter:xt})}),Vr;return Lt?Vr=hr:Vr=$e("div",{className:Zr,...nt,ref:Nt,onMouseDown:Pe,onKeyDown:ye,onKeyUp:q,onFocus:ce,onBlur:we,children:[zt&&!bn&&I("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite",children:"".concat(m.map(function(Nn){var An=Nn.label,zn=Nn.value;return["number","string"].includes(nn(An))?An:zn}).join(", "))}),hr,hn,Pn]}),I(ZB.Provider,{value:Xt,children:Vr})});const dae=function(e,t){var n=w.exports.useRef({values:new Map,options:new Map}),r=w.exports.useMemo(function(){var o=n.current,s=o.values,a=o.options,u=e.map(function(m){if(m.label===void 0){var v;return fe(fe({},m),{},{label:(v=s.get(m.value))===null||v===void 0?void 0:v.label})}return m}),d=new Map,p=new Map;return u.forEach(function(m){d.set(m.value,m),p.set(m.value,t.get(m.value)||a.get(m.value))}),n.current.values=d,n.current.options=p,u},[e,t]),i=w.exports.useCallback(function(o){return t.get(o)||n.current.options.get(o)},[t]);return[r,i]};function MC(e,t){return t9(e).join("").toUpperCase().includes(t)}const fae=function(e,t,n,r,i){return w.exports.useMemo(function(){if(!n||r===!1)return e;var o=t.options,s=t.label,a=t.value,u=[],d=typeof r=="function",p=n.toUpperCase(),m=d?r:function(x,_){return i?MC(_[i],p):_[o]?MC(_[s!=="children"?s:"label"],p):MC(_[a],p)},v=d?function(x){return R3(x)}:function(x){return x};return e.forEach(function(x){if(x[o]){var _=m(n,v(x));if(_)u.push(x);else{var P=x[o].filter(function(k){return m(n,v(k))});P.length&&u.push(fe(fe({},x),{},re({},o,P)))}return}m(n,v(x))&&u.push(x)}),u},[e,r,i,n,t])};var rO=0,hae=Mo();function pae(){var e;return hae?(e=rO,rO+=1):e="TEST_OR_SSR",e}function b9(e){var t=w.exports.useState(),n=Le(t,2),r=n[0],i=n[1];return w.exports.useEffect(function(){i("rc_select_".concat(pae()))},[]),e||r}var mae=["children","value"],gae=["children"];function vae(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value,s=Rn(r,mae);return fe({key:n,value:o!==void 0?o:n,children:i},s)}function _9(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return yo(e).map(function(n,r){if(!w.exports.isValidElement(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,s=i.key,a=i.props,u=a.children,d=Rn(a,gae);return t||!o?vae(n):fe(fe({key:"__RC_SELECT_GRP__".concat(s===null?r:s,"__"),label:s},d),{},{options:_9(u)})}).filter(function(n){return n})}function yae(e,t,n,r,i){return w.exports.useMemo(function(){var o=e,s=!e;s&&(o=_9(t));var a=new Map,u=new Map,d=function(v,x,_){_&&typeof _=="string"&&v.set(x[_],x)};function p(m){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=0;x<m.length;x+=1){var _=m[x];!_[n.options]||v?(a.set(_[n.value],_),d(u,_,n.label),d(u,_,r),d(u,_,i)):p(_[n.options],!0)}}return p(o),{options:o,valueOptions:a,labelOptions:u}},[e,t,n,r,i])}function iO(e){var t=w.exports.useRef();t.current=e;var n=w.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}var FI=function(){return null};FI.isSelectOptGroup=!0;var zI=function(){return null};zI.isSelectOption=!0;var w9=w.exports.forwardRef(function(e,t){var n=e.height,r=e.offset,i=e.children,o=e.prefixCls,s=e.onInnerResize,a=e.innerProps,u={},d={display:"flex",flexDirection:"column"};return r!==void 0&&(u={height:n,position:"relative",overflow:"hidden"},d=fe(fe({},d),{},{transform:"translateY(".concat(r,"px)"),position:"absolute",left:0,right:0,top:0})),I("div",{style:u,children:I(_u,{onResize:function(m){var v=m.offsetHeight;v&&s&&s()},children:I("div",{style:d,className:He(re({},"".concat(o,"-holder-inner"),o)),ref:t,...a,children:i})})})});w9.displayName="Filler";var xae=20;function oO(e){return"touches"in e?e.touches[0].pageY:e.pageY}var bae=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.moveRaf=null,r.scrollbarRef=w.exports.createRef(),r.thumbRef=w.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(a){a.preventDefault()},r.onContainerMouseDown=function(a){a.stopPropagation(),a.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 a;window.removeEventListener("mousemove",r.onMouseMove),window.removeEventListener("mouseup",r.onMouseUp),(a=r.scrollbarRef.current)===null||a===void 0||a.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)),ar.cancel(r.moveRaf)},r.onMouseDown=function(a){var u=r.props.onStartMove;r.setState({dragging:!0,pageY:oO(a),startTop:r.getTop()}),u(),r.patchEvents(),a.stopPropagation(),a.preventDefault()},r.onMouseMove=function(a){var u=r.state,d=u.dragging,p=u.pageY,m=u.startTop,v=r.props.onScroll;if(ar.cancel(r.moveRaf),d){var x=oO(a)-p,_=m+x,P=r.getEnableScrollRange(),k=r.getEnableHeightRange(),T=k?_/k:0,M=Math.ceil(T*P);r.moveRaf=ar(function(){v(M)})}},r.onMouseUp=function(){var a=r.props.onStopMove;r.setState({dragging:!1}),a(),r.removeEvents()},r.getSpinHeight=function(){var a=r.props,u=a.height,d=a.count,p=u/d*10;return p=Math.max(p,xae),p=Math.min(p,u/2),Math.floor(p)},r.getEnableScrollRange=function(){var a=r.props,u=a.scrollHeight,d=a.height;return u-d||0},r.getEnableHeightRange=function(){var a=r.props.height,u=r.getSpinHeight();return a-u||0},r.getTop=function(){var a=r.props.scrollTop,u=r.getEnableScrollRange(),d=r.getEnableHeightRange();if(a===0||u===0)return 0;var p=a/u;return p*d},r.showScroll=function(){var a=r.props,u=a.height,d=a.scrollHeight;return d>u},r}return Lr(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,o=i.dragging,s=i.visible,a=this.props.prefixCls,u=this.getSpinHeight(),d=this.getTop(),p=this.showScroll(),m=p&&s;return I("div",{ref:this.scrollbarRef,className:He("".concat(a,"-scrollbar"),re({},"".concat(a,"-scrollbar-show"),p)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:m?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden,children:I("div",{ref:this.thumbRef,className:He("".concat(a,"-scrollbar-thumb"),re({},"".concat(a,"-scrollbar-thumb-moving"),o)),style:{width:"100%",height:u,top:d,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown})})}}]),n}(w.exports.Component);function _ae(e){var t=e.children,n=e.setRef,r=w.exports.useCallback(function(i){n(i)},[]);return w.exports.cloneElement(t,{ref:r})}function wae(e,t,n,r,i,o){var s=o.getKey;return e.slice(t,n+1).map(function(a,u){var d=t+u,p=i(a,d,{}),m=s(a);return I(_ae,{setRef:function(x){return r(a,x)},children:p},m)})}var Cae=function(){function e(){Nr(this,e),this.maps=void 0,this.maps=Object.create(null)}return Lr(e,[{key:"set",value:function(n,r){this.maps[n]=r}},{key:"get",value:function(n){return this.maps[n]}}]),e}();function Sae(e,t,n){var r=w.exports.useState(0),i=Le(r,2),o=i[0],s=i[1],a=w.exports.useRef(new Map),u=w.exports.useRef(new Cae),d=w.exports.useRef();function p(){ar.cancel(d.current)}function m(){p(),d.current=ar(function(){a.current.forEach(function(x,_){if(x&&x.offsetParent){var P=lv(x),k=P.offsetHeight;u.current.get(_)!==k&&u.current.set(_,P.offsetHeight)}}),s(function(x){return x+1})})}function v(x,_){var P=e(x),k=a.current.get(P);_?(a.current.set(P,_),m()):a.current.delete(P),!k!=!_&&(_?t==null||t(x):n==null||n(x))}return w.exports.useEffect(function(){return p},[]),[v,m,u.current,o]}function Eae(e,t,n,r,i,o,s,a){var u=w.exports.useRef();return function(d){if(d==null){a();return}if(ar.cancel(u.current),typeof d=="number")s(d);else if(d&&nn(d)==="object"){var p,m=d.align;"index"in d?p=d.index:p=t.findIndex(function(P){return i(P)===d.key});var v=d.offset,x=v===void 0?0:v,_=function P(k,T){if(!(k<0||!e.current)){var M=e.current.clientHeight,O=!1,N=T;if(M){for(var L=T||m,F=0,V=0,B=0,H=Math.min(t.length,p),G=0;G<=H;G+=1){var ee=i(t[G]);V=F;var X=n.get(ee);B=V+(X===void 0?r:X),F=B,G===p&&X===void 0&&(O=!0)}var Z=null;switch(L){case"top":Z=V-x;break;case"bottom":Z=B-M+x;break;default:{var Q=e.current.scrollTop,le=Q+M;V<Q?N="top":B>le&&(N="bottom")}}Z!==null&&Z!==e.current.scrollTop&&s(Z)}u.current=ar(function(){O&&o(),P(k-1,N)},2)}};_(3)}}}function Pae(e,t,n){var r=e.length,i=t.length,o,s;if(r===0&&i===0)return null;r<i?(o=e,s=t):(o=t,s=e);var a={__EMPTY_ITEM__:!0};function u(_){return _!==void 0?n(_):a}for(var d=null,p=Math.abs(r-i)!==1,m=0;m<s.length;m+=1){var v=u(o[m]),x=u(s[m]);if(v!==x){d=m,p=p||v!==u(s[m+1]);break}}return d===null?null:{index:d,multiple:p}}function Iae(e,t,n){var r=w.exports.useState(e),i=Le(r,2),o=i[0],s=i[1],a=w.exports.useState(null),u=Le(a,2),d=u[0],p=u[1];return w.exports.useEffect(function(){var m=Pae(o||[],e||[],t);(m==null?void 0:m.index)!==void 0&&(n==null||n(m.index),p(e[m.index])),s(e)},[e]),[d]}var Tae=(typeof navigator>"u"?"undefined":nn(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const C9=function(e,t){var n=w.exports.useRef(!1),r=w.exports.useRef(null);function i(){clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)}var o=w.exports.useRef({top:e,bottom:t});return o.current.top=e,o.current.bottom=t,function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u=s<0&&o.current.top||s>0&&o.current.bottom;return a&&u?(clearTimeout(r.current),n.current=!1):(!u||n.current)&&i(),!n.current&&u}};function kae(e,t,n,r){var i=w.exports.useRef(0),o=w.exports.useRef(null),s=w.exports.useRef(null),a=w.exports.useRef(!1),u=C9(t,n);function d(m){if(!!e){ar.cancel(o.current);var v=m.deltaY;i.current+=v,s.current=v,!u(v)&&(Tae||m.preventDefault(),o.current=ar(function(){var x=a.current?10:1;r(i.current*x),i.current=0}))}}function p(m){!e||(a.current=m.detail===s.current)}return[d,p]}var Mae=14/15;function Rae(e,t,n){var r=w.exports.useRef(!1),i=w.exports.useRef(0),o=w.exports.useRef(null),s=w.exports.useRef(null),a,u=function(v){if(r.current){var x=Math.ceil(v.touches[0].pageY),_=i.current-x;i.current=x,n(_)&&v.preventDefault(),clearInterval(s.current),s.current=setInterval(function(){_*=Mae,(!n(_,!0)||Math.abs(_)<=.1)&&clearInterval(s.current)},16)}},d=function(){r.current=!1,a()},p=function(v){a(),v.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(v.touches[0].pageY),o.current=v.target,o.current.addEventListener("touchmove",u),o.current.addEventListener("touchend",d))};a=function(){o.current&&(o.current.removeEventListener("touchmove",u),o.current.removeEventListener("touchend",d))},wi(function(){return e&&t.current.addEventListener("touchstart",p),function(){var m;(m=t.current)===null||m===void 0||m.removeEventListener("touchstart",p),a(),clearInterval(s.current)}},[e])}var Aae=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange","innerProps"],Dae=[],Oae={overflowY:"auto",overflowAnchor:"none"};function Nae(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,i=e.className,o=e.height,s=e.itemHeight,a=e.fullHeight,u=a===void 0?!0:a,d=e.style,p=e.data,m=e.children,v=e.itemKey,x=e.virtual,_=e.component,P=_===void 0?"div":_,k=e.onScroll,T=e.onVisibleChange,M=e.innerProps,O=Rn(e,Aae),N=!!(x!==!1&&o&&s),L=N&&p&&s*p.length>o,F=w.exports.useState(0),V=Le(F,2),B=V[0],H=V[1],G=w.exports.useState(!1),ee=Le(G,2),X=ee[0],Z=ee[1],Q=He(r,i),le=p||Dae,ne=w.exports.useRef(),se=w.exports.useRef(),oe=w.exports.useRef(),he=w.exports.useCallback(function(zt){return typeof v=="function"?v(zt):zt==null?void 0:zt[v]},[v]),_e={getKey:he};function be(zt){H(function(Rt){var Qt;typeof zt=="function"?Qt=zt(Rt):Qt=zt;var pn=ut(Qt);return ne.current.scrollTop=pn,pn})}var xe=w.exports.useRef({start:0,end:le.length}),Te=w.exports.useRef(),Ee=Iae(le,he),Ce=Le(Ee,1),ke=Ce[0];Te.current=ke;var De=Sae(he,null,null),Ke=Le(De,4),Ue=Ke[0],tt=Ke[1],lt=Ke[2],St=Ke[3],We=w.exports.useMemo(function(){if(!N)return{scrollHeight:void 0,start:0,end:le.length-1,offset:void 0};if(!L){var zt;return{scrollHeight:((zt=se.current)===null||zt===void 0?void 0:zt.offsetHeight)||0,start:0,end:le.length-1,offset:void 0}}for(var Rt=0,Qt,pn,ot,Lt=le.length,Tt=0;Tt<Lt;Tt+=1){var Kt=le[Tt],Zt=he(Kt),ht=lt.get(Zt),xn=Rt+(ht===void 0?s:ht);xn>=B&&Qt===void 0&&(Qt=Tt,pn=Rt),xn>B+o&&ot===void 0&&(ot=Tt),Rt=xn}return Qt===void 0&&(Qt=0,pn=0,ot=Math.ceil(o/s)),ot===void 0&&(ot=le.length-1),ot=Math.min(ot+1,le.length),{scrollHeight:Rt,start:Qt,end:ot,offset:pn}},[L,N,B,le,St,o]),bt=We.scrollHeight,Qe=We.start,mt=We.end,ct=We.offset;xe.current.start=Qe,xe.current.end=mt;var wt=bt-o,rt=w.exports.useRef(wt);rt.current=wt;function ut(zt){var Rt=zt;return Number.isNaN(rt.current)||(Rt=Math.min(Rt,rt.current)),Rt=Math.max(Rt,0),Rt}var nt=B<=0,qe=B>=wt,dt=C9(nt,qe);function _t(zt){var Rt=zt;be(Rt)}function Dt(zt){var Rt=zt.currentTarget.scrollTop;Rt!==B&&be(Rt),k==null||k(zt)}var Nt=kae(N,nt,qe,function(zt){be(function(Rt){var Qt=Rt+zt;return Qt})}),jt=Le(Nt,2),Ve=jt[0],Ze=jt[1];Rae(N,ne,function(zt,Rt){return dt(zt,Rt)?!1:(Ve({preventDefault:function(){},deltaY:zt}),!0)}),wi(function(){function zt(Rt){N&&Rt.preventDefault()}return ne.current.addEventListener("wheel",Ve),ne.current.addEventListener("DOMMouseScroll",Ze),ne.current.addEventListener("MozMousePixelScroll",zt),function(){ne.current&&(ne.current.removeEventListener("wheel",Ve),ne.current.removeEventListener("DOMMouseScroll",Ze),ne.current.removeEventListener("MozMousePixelScroll",zt))}},[N]);var Yt=Eae(ne,le,lt,s,he,tt,be,function(){var zt;(zt=oe.current)===null||zt===void 0||zt.delayHidden()});w.exports.useImperativeHandle(t,function(){return{scrollTo:Yt}}),wi(function(){if(T){var zt=le.slice(Qe,mt+1);T(zt,le)}},[Qe,mt,le]);var sn=wae(le,Qe,mt,Ue,m,_e),Gt=null;return o&&(Gt=fe(re({},u?"height":"maxHeight",o),Oae),N&&(Gt.overflowY="hidden",X&&(Gt.pointerEvents="none"))),$e("div",{style:fe(fe({},d),{},{position:"relative"}),className:Q,...O,children:[I(P,{className:"".concat(r,"-holder"),style:Gt,ref:ne,onScroll:Dt,children:I(w9,{prefixCls:r,height:bt,offset:ct,onInnerResize:tt,ref:se,innerProps:M,children:sn})}),N&&I(bae,{ref:oe,prefixCls:r,scrollTop:B,height:o,scrollHeight:bt,count:le.length,onScroll:_t,onStartMove:function(){Z(!0)},onStopMove:function(){Z(!1)}})]})}var $I=w.exports.forwardRef(Nae);$I.displayName="List";function Lae(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var S9=w.exports.createContext(null),Fae=["disabled","title","children","style","className"];function aO(e){return typeof e=="string"||typeof e=="number"}var zae=function(t,n){var r=XB(),i=r.prefixCls,o=r.id,s=r.open,a=r.multiple,u=r.mode,d=r.searchValue,p=r.toggleOpen,m=r.notFoundContent,v=r.onPopupScroll,x=w.exports.useContext(S9),_=x.flattenOptions,P=x.onActiveValue,k=x.defaultActiveFirstOption,T=x.onSelect,M=x.menuItemSelectedIcon,O=x.rawValues,N=x.fieldNames,L=x.virtual,F=x.listHeight,V=x.listItemHeight,B="".concat(i,"-item"),H=Vv(function(){return _},[s,_],function(Ee,Ce){return Ce[0]&&Ee[1]!==Ce[1]}),G=w.exports.useRef(null),ee=function(Ce){Ce.preventDefault()},X=function(Ce){G.current&&G.current.scrollTo(typeof Ce=="number"?{index:Ce}:Ce)},Z=function(Ce){for(var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,De=H.length,Ke=0;Ke<De;Ke+=1){var Ue=(Ce+Ke*ke+De)%De,tt=H[Ue],lt=tt.group,St=tt.data;if(!lt&&!St.disabled)return Ue}return-1},Q=w.exports.useState(function(){return Z(0)}),le=Le(Q,2),ne=le[0],se=le[1],oe=function(Ce){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;se(Ce);var De={source:ke?"keyboard":"mouse"},Ke=H[Ce];if(!Ke){P(null,-1,De);return}P(Ke.value,Ce,De)};w.exports.useEffect(function(){oe(k!==!1?Z(0):-1)},[H.length,d]);var he=w.exports.useCallback(function(Ee){return O.has(Ee)&&u!=="combobox"},[u,Pt(O).toString(),O.size]);w.exports.useEffect(function(){var Ee=setTimeout(function(){if(!a&&s&&O.size===1){var ke=Array.from(O)[0],De=H.findIndex(function(Ke){var Ue=Ke.data;return Ue.value===ke});De!==-1&&(oe(De),X(De))}});if(s){var Ce;(Ce=G.current)===null||Ce===void 0||Ce.scrollTo(void 0)}return function(){return clearTimeout(Ee)}},[s,d]);var _e=function(Ce){Ce!==void 0&&T(Ce,{selected:!O.has(Ce)}),a||p(!1)};if(w.exports.useImperativeHandle(n,function(){return{onKeyDown:function(Ce){var ke=Ce.which,De=Ce.ctrlKey;switch(ke){case kt.N:case kt.P:case kt.UP:case kt.DOWN:{var Ke=0;if(ke===kt.UP?Ke=-1:ke===kt.DOWN?Ke=1:Lae()&&De&&(ke===kt.N?Ke=1:ke===kt.P&&(Ke=-1)),Ke!==0){var Ue=Z(ne+Ke,Ke);X(Ue),oe(Ue,!0)}break}case kt.ENTER:{var tt=H[ne];tt&&!tt.data.disabled?_e(tt.value):_e(void 0),s&&Ce.preventDefault();break}case kt.ESC:p(!1),s&&Ce.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ce){X(Ce)}}}),H.length===0)return I("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(B,"-empty"),onMouseDown:ee,children:m});var be=Object.keys(N).map(function(Ee){return N[Ee]}),xe=function(Ce){return Ce.label},Te=function(Ce){var ke=H[Ce];if(!ke)return null;var De=ke.data||{},Ke=De.value,Ue=ke.group,tt=gu(De,!0),lt=xe(ke);return ke?w.exports.createElement("div",{"aria-label":typeof lt=="string"&&!Ue?lt:null,...tt,key:Ce,role:Ue?"presentation":"option",id:"".concat(o,"_list_").concat(Ce),"aria-selected":he(Ke)},Ke):null};return $e(Tn,{children:[$e("div",{role:"listbox",id:"".concat(o,"_list"),style:{height:0,width:0,overflow:"hidden"},children:[Te(ne-1),Te(ne),Te(ne+1)]}),I($I,{itemKey:"key",ref:G,data:H,height:F,itemHeight:V,fullHeight:!1,onMouseDown:ee,onScroll:v,virtual:L,children:function(Ee,Ce){var ke,De=Ee.group,Ke=Ee.groupOption,Ue=Ee.data,tt=Ee.label,lt=Ee.value,St=Ue.key;if(De){var We,bt=(We=Ue.title)!==null&&We!==void 0?We:aO(tt)?tt.toString():void 0;return I("div",{className:He(B,"".concat(B,"-group")),title:bt,children:tt!==void 0?tt:St})}var Qe=Ue.disabled,mt=Ue.title;Ue.children;var ct=Ue.style,wt=Ue.className,rt=Rn(Ue,Fae),ut=Ci(rt,be),nt=he(lt),qe="".concat(B,"-option"),dt=He(B,qe,wt,(ke={},re(ke,"".concat(qe,"-grouped"),Ke),re(ke,"".concat(qe,"-active"),ne===Ce&&!Qe),re(ke,"".concat(qe,"-disabled"),Qe),re(ke,"".concat(qe,"-selected"),nt),ke)),_t=xe(Ee),Dt=!M||typeof M=="function"||nt,Nt=typeof _t=="number"?_t:_t||lt,jt=aO(Nt)?Nt.toString():void 0;return mt!==void 0&&(jt=mt),$e("div",{...gu(ut),"aria-selected":nt,className:dt,title:jt,onMouseMove:function(){ne===Ce||Qe||oe(Ce)},onClick:function(){Qe||_e(lt)},style:ct,children:[I("div",{className:"".concat(qe,"-content"),children:Nt}),w.exports.isValidElement(M)||nt,Dt&&I(cb,{className:"".concat(B,"-option-state"),customizeIcon:M,customizeIconProps:{isSelected:nt},children:nt?"\u2713":null})]})}})]})},E9=w.exports.forwardRef(zae);E9.displayName="OptionList";var $ae=["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"],Bae=["inputValue"];function Vae(e){return!e||nn(e)!=="object"}var Uae=w.exports.forwardRef(function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,o=i===void 0?"rc-select":i,s=e.backfill,a=e.fieldNames,u=e.inputValue,d=e.searchValue,p=e.onSearch,m=e.autoClearSearchValue,v=m===void 0?!0:m,x=e.onSelect,_=e.onDeselect,P=e.dropdownMatchSelectWidth,k=P===void 0?!0:P,T=e.filterOption,M=e.filterSort,O=e.optionFilterProp,N=e.optionLabelProp,L=e.options,F=e.children,V=e.defaultActiveFirstOption,B=e.menuItemSelectedIcon,H=e.virtual,G=e.listHeight,ee=G===void 0?200:G,X=e.listItemHeight,Z=X===void 0?20:X,Q=e.value,le=e.defaultValue,ne=e.labelInValue,se=e.onChange,oe=Rn(e,$ae),he=b9(n),_e=A3(r),be=!!(!L&&F),xe=w.exports.useMemo(function(){return T===void 0&&r==="combobox"?!1:T},[T,r]),Te=w.exports.useMemo(function(){return y9(a,be)},[JSON.stringify(a),be]),Ee=ki("",{value:d!==void 0?d:u,postState:function(xt){return xt||""}}),Ce=Le(Ee,2),ke=Ce[0],De=Ce[1],Ke=yae(L,F,Te,O,N),Ue=Ke.valueOptions,tt=Ke.labelOptions,lt=Ke.options,St=w.exports.useCallback(function(gt){var xt=t9(gt);return xt.map(function(Vt){var qt,vn,Fn,tr,nr;if(Vae(Vt))qt=Vt;else{var ye;Fn=Vt.key,vn=Vt.label,qt=(ye=Vt.value)!==null&&ye!==void 0?ye:Fn}var q=Ue.get(qt);if(q){var J;vn===void 0&&(vn=q==null?void 0:q[N||Te.label]),Fn===void 0&&(Fn=(J=q==null?void 0:q.key)!==null&&J!==void 0?J:qt),tr=q==null?void 0:q.disabled,nr=q==null?void 0:q.title}return{label:vn,value:qt,key:Fn,disabled:tr,title:nr}})},[Te,N,Ue]),We=ki(le,{value:Q}),bt=Le(We,2),Qe=bt[0],mt=bt[1],ct=w.exports.useMemo(function(){var gt,xt=St(Qe);return r==="combobox"&&!((gt=xt[0])!==null&>!==void 0&>.value)?[]:xt},[Qe,St,r]),wt=dae(ct,Ue),rt=Le(wt,2),ut=rt[0],nt=rt[1],qe=w.exports.useMemo(function(){if(!r&&ut.length===1){var gt=ut[0];if(gt.value===null&&(gt.label===null||gt.label===void 0))return[]}return ut.map(function(xt){var Vt;return fe(fe({},xt),{},{label:(Vt=xt.label)!==null&&Vt!==void 0?Vt:xt.value})})},[r,ut]),dt=w.exports.useMemo(function(){return new Set(ut.map(function(gt){return gt.value}))},[ut]);w.exports.useEffect(function(){if(r==="combobox"){var gt,xt=(gt=ut[0])===null||gt===void 0?void 0:gt.value;De(loe(xt)?String(xt):"")}},[ut]);var _t=iO(function(gt,xt){var Vt,qt=xt!=null?xt:gt;return Vt={},re(Vt,Te.value,gt),re(Vt,Te.label,qt),Vt}),Dt=w.exports.useMemo(function(){if(r!=="tags")return lt;var gt=Pt(lt),xt=function(qt){return Ue.has(qt)};return Pt(ut).sort(function(Vt,qt){return Vt.value<qt.value?-1:1}).forEach(function(Vt){var qt=Vt.value;xt(qt)||gt.push(_t(qt,Vt.label))}),gt},[_t,lt,Ue,ut,r]),Nt=fae(Dt,Te,ke,xe,O),jt=w.exports.useMemo(function(){return r!=="tags"||!ke||Nt.some(function(gt){return gt[O||"value"]===ke})?Nt:[_t(ke)].concat(Pt(Nt))},[_t,O,r,Nt,ke]),Ve=w.exports.useMemo(function(){return M?Pt(jt).sort(function(gt,xt){return M(gt,xt)}):jt},[jt,M]),Ze=w.exports.useMemo(function(){return sae(Ve,{fieldNames:Te,childrenAsData:be})},[Ve,Te,be]),Yt=function(xt){var Vt=St(xt);if(mt(Vt),se&&(Vt.length!==ut.length||Vt.some(function(Fn,tr){var nr;return((nr=ut[tr])===null||nr===void 0?void 0:nr.value)!==(Fn==null?void 0:Fn.value)}))){var qt=ne?Vt:Vt.map(function(Fn){return Fn.value}),vn=Vt.map(function(Fn){return R3(nt(Fn.value))});se(_e?qt:qt[0],_e?vn:vn[0])}},sn=w.exports.useState(null),Gt=Le(sn,2),zt=Gt[0],Rt=Gt[1],Qt=w.exports.useState(0),pn=Le(Qt,2),ot=pn[0],Lt=pn[1],Tt=V!==void 0?V:r!=="combobox",Kt=w.exports.useCallback(function(gt,xt){var Vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},qt=Vt.source,vn=qt===void 0?"keyboard":qt;Lt(xt),s&&r==="combobox"&>!==null&&vn==="keyboard"&&Rt(String(gt))},[s,r]),Zt=function(xt,Vt,qt){var vn=function(){var Ae,Pe=nt(xt);return[ne?{label:Pe==null?void 0:Pe[Te.label],value:xt,key:(Ae=Pe==null?void 0:Pe.key)!==null&&Ae!==void 0?Ae:xt}:xt,R3(Pe)]};if(Vt&&x){var Fn=vn(),tr=Le(Fn,2),nr=tr[0],ye=tr[1];x(nr,ye)}else if(!Vt&&_&&qt!=="clear"){var q=vn(),J=Le(q,2),pe=J[0],ce=J[1];_(pe,ce)}},ht=iO(function(gt,xt){var Vt,qt=_e?xt.selected:!0;qt?Vt=_e?[].concat(Pt(ut),[gt]):[gt]:Vt=ut.filter(function(vn){return vn.value!==gt}),Yt(Vt),Zt(gt,qt),r==="combobox"?Rt(""):(!A3||v)&&(De(""),Rt(""))}),xn=function(xt,Vt){Yt(xt);var qt=Vt.type,vn=Vt.values;(qt==="remove"||qt==="clear")&&vn.forEach(function(Fn){Zt(Fn.value,!1,qt)})},bn=function(xt,Vt){if(De(xt),Rt(null),Vt.source==="submit"){var qt=(xt||"").trim();if(qt){var vn=Array.from(new Set([].concat(Pt(dt),[qt])));Yt(vn),Zt(qt,!0),De("")}return}Vt.source!=="blur"&&(r==="combobox"&&Yt(xt),p==null||p(xt))},tn=function(xt){var Vt=xt;r!=="tags"&&(Vt=xt.map(function(vn){var Fn=tt.get(vn);return Fn==null?void 0:Fn.value}).filter(function(vn){return vn!==void 0}));var qt=Array.from(new Set([].concat(Pt(dt),Pt(Vt))));Yt(qt),qt.forEach(function(vn){Zt(vn,!0)})},Bt=w.exports.useMemo(function(){var gt=H!==!1&&k!==!1;return fe(fe({},Ke),{},{flattenOptions:Ze,onActiveValue:Kt,defaultActiveFirstOption:Tt,onSelect:ht,menuItemSelectedIcon:B,rawValues:dt,fieldNames:Te,virtual:gt,listHeight:ee,listItemHeight:Z,childrenAsData:be})},[Ke,Ze,Kt,Tt,ht,B,dt,Te,H,k,ee,Z,be]);return I(S9.Provider,{value:Bt,children:I(x9,{...oe,id:he,prefixCls:o,ref:t,omitDomProps:Bae,mode:r,displayValues:qe,onDisplayValuesChange:xn,searchValue:ke,onSearch:bn,autoClearSearchValue:v,onSearchSplit:tn,dropdownMatchSelectWidth:k,OptionList:E9,emptyOptions:!Ze.length,activeValue:zt,activeDescendantId:"".concat(he,"_list_").concat(ot)})})}),BI=Uae;BI.Option=zI;BI.OptGroup=FI;var jae=function(){var t=w.exports.useContext(On),n=t.getPrefixCls,r=n("empty-img-default");return I("svg",{className:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg",children:$e("g",{fill:"none",fillRule:"evenodd",children:[$e("g",{transform:"translate(24 31.67)",children:[I("ellipse",{className:"".concat(r,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),I("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"}),I("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)"}),I("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"}),I("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"})]}),I("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"}),$e("g",{className:"".concat(r,"-g"),transform:"translate(149.65 15.383)",children:[I("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),I("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})})};const Hae=jae;var Kae=function(){var t=w.exports.useContext(On),n=t.getPrefixCls,r=n("empty-img-simple");return I("svg",{className:r,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:$e("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[I("ellipse",{className:"".concat(r,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),$e("g",{className:"".concat(r,"-g"),fillRule:"nonzero",children:[I("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"}),I("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 Wae=Kae;var Gae=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},P9=I(Hae,{}),I9=I(Wae,{}),VI=function(t){var n=t.className,r=t.prefixCls,i=t.image,o=i===void 0?P9:i,s=t.description,a=t.children,u=t.imageStyle,d=Gae(t,["className","prefixCls","image","description","children","imageStyle"]),p=w.exports.useContext(On),m=p.getPrefixCls,v=p.direction;return I(bp,{componentName:"Empty",children:function(x){var _,P=m("empty",r),k=typeof s<"u"?s:x.description,T=typeof k=="string"?k:"empty",M=null;return typeof o=="string"?M=I("img",{alt:T,src:o}):M=o,$e("div",{className:He(P,(_={},re(_,"".concat(P,"-normal"),o===I9),re(_,"".concat(P,"-rtl"),v==="rtl"),_),n),...d,children:[I("div",{className:"".concat(P,"-image"),style:u,children:M}),k&&I("div",{className:"".concat(P,"-description"),children:k}),a&&I("div",{className:"".concat(P,"-footer"),children:a})]})}})};VI.PRESENTED_IMAGE_DEFAULT=P9;VI.PRESENTED_IMAGE_SIMPLE=I9;const dl=VI;var qae=function(t){return I(zc,{children:function(n){var r=n.getPrefixCls,i=r("empty");switch(t){case"Table":case"List":return I(dl,{image:dl.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return I(dl,{image:dl.PRESENTED_IMAGE_SIMPLE,className:"".concat(i,"-small")});default:return I(dl,{})}}})};const UI=qae;var Rc=w.exports.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}}),T9=w.exports.createContext(null),Zae=function(t){var n=Ci(t,["prefixCls"]);return I(mI,{...n})},jI=w.exports.createContext({prefixCls:""}),ga=w.exports.createContext({}),mv=function(t){var n=t.children,r=t.status,i=t.override,o=w.exports.useContext(ga),s=w.exports.useMemo(function(){var a=ze({},o);return i&&delete a.isFormItemInput,r&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[r,i,o]);return I(ga.Provider,{value:s,children:n})},Yo=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n},Xae=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n},RC=function(){return{height:0,opacity:0}},sO=function(t){var n=t.scrollHeight;return{height:n,opacity:1}},Yae=function(t){return{height:t?t.offsetHeight:0}},AC=function(t,n){return(n==null?void 0:n.deadline)===!0||n.propertyName==="height"},Qae={motionName:"ant-motion-collapse",onAppearStart:RC,onEnterStart:RC,onAppearActive:sO,onEnterActive:sO,onLeaveStart:Yae,onLeaveActive:RC,onAppearEnd:AC,onEnterEnd:AC,onLeaveEnd:AC,motionDeadline:500};Yo("bottomLeft","bottomRight","topLeft","topRight");var k9=function(t){return t!==void 0&&(t==="topLeft"||t==="topRight")?"slide-down":"slide-up"},$a=function(t,n,r){return r!==void 0?r:"".concat(t,"-").concat(n)};const np=Qae;Yo("warning","error","");function Vs(e,t,n){var r;return He((r={},re(r,"".concat(e,"-status-success"),t==="success"),re(r,"".concat(e,"-status-warning"),t==="warning"),re(r,"".concat(e,"-status-error"),t==="error"),re(r,"".concat(e,"-status-validating"),t==="validating"),re(r,"".concat(e,"-has-feedback"),n),r))}var Cp=function(t,n){return n||t},Jae={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 ese=Jae;var M9=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:ese})})};M9.displayName="CheckOutlined";const HI=w.exports.forwardRef(M9);var tse={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 nse=tse;var R9=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:nse})})};R9.displayName="DownOutlined";const KI=w.exports.forwardRef(R9);var rse={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 A9=rse;var D9=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:A9})})};D9.displayName="SearchOutlined";const WI=w.exports.forwardRef(D9);function O9(e){var t=e.suffixIcon,n=e.clearIcon,r=e.menuItemSelectedIcon,i=e.removeIcon,o=e.loading,s=e.multiple,a=e.hasFeedback,u=e.prefixCls,d=e.showArrow,p=e.feedbackIcon,m=n!=null?n:I(yf,{}),v=function(M){return $e(Tn,{children:[d!==!1&&M,a&&p]})},x=null;if(t!==void 0)x=v(t);else if(o)x=v(I(Mc,{spin:!0}));else{var _="".concat(u,"-suffix");x=function(M){var O=M.open,N=M.showSearch;return v(O&&N?I(WI,{className:_}):I(KI,{className:_}))}}var P=null;r!==void 0?P=r:s?P=I(HI,{}):P=null;var k=null;return i!==void 0?k=i:k=I(_p,{}),{clearIcon:m,suffixIcon:x,itemIcon:P,removeIcon:k}}var N9=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},$_=w.exports.createContext(null),xf=function(t,n){var r=w.exports.useContext($_),i=w.exports.useMemo(function(){var o;if(!r)return"";var s=r.compactDirection,a=r.isFirstItem,u=r.isLastItem,d=s==="vertical"?"-vertical-":"-";return He((o={},re(o,"".concat(t,"-compact").concat(d,"item"),!0),re(o,"".concat(t,"-compact").concat(d,"first-item"),a),re(o,"".concat(t,"-compact").concat(d,"last-item"),u),re(o,"".concat(t,"-compact").concat(d,"item-rtl"),n==="rtl"),o))},[t,n,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:i}},rp=function(t){var n=t.children;return I($_.Provider,{value:null,children:n})},ise=function(t){var n=t.children,r=N9(t,["children"]);return I($_.Provider,{value:r,children:n})},ose=function(t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=t.size,a=s===void 0?"middle":s,u=t.direction,d=t.block,p=t.prefixCls,m=t.className,v=t.children,x=N9(t,["size","direction","block","prefixCls","className","children"]),_=i("space-compact",p),P=He(_,(n={},re(n,"".concat(_,"-rtl"),o==="rtl"),re(n,"".concat(_,"-block"),d),re(n,"".concat(_,"-vertical"),u==="vertical"),n),m),k=w.exports.useContext($_),T=yo(v),M=w.exports.useMemo(function(){return T.map(function(O,N){var L=O&&O.key||"".concat(_,"-item-").concat(N);return I(ise,{compactSize:a,compactDirection:u,isFirstItem:N===0&&(!k||(k==null?void 0:k.isFirstItem)),isLastItem:N===T.length-1&&(!k||(k==null?void 0:k.isLastItem)),children:O},L)})},[a,T,k]);return T.length===0?null:I("div",{className:P,...x,children:M})},ase=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},L9="SECRET_COMBOBOX_MODE_DO_NOT_USE",sse=function(t,n){var r,i=t.prefixCls,o=t.bordered,s=o===void 0?!0:o,a=t.className,u=t.getPopupContainer,d=t.dropdownClassName,p=t.popupClassName,m=t.listHeight,v=m===void 0?256:m,x=t.placement,_=t.listItemHeight,P=_===void 0?24:_,k=t.size,T=t.disabled,M=t.notFoundContent,O=t.status,N=t.showArrow,L=ase(t,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),F=w.exports.useContext(On),V=F.getPopupContainer,B=F.getPrefixCls,H=F.renderEmpty,G=F.direction,ee=F.virtual,X=F.dropdownMatchSelectWidth,Z=w.exports.useContext(Hs),Q=B("select",i),le=B(),ne=xf(Q,G),se=ne.compactSize,oe=ne.compactItemClassnames,he=w.exports.useMemo(function(){var nt=L.mode;if(nt!=="combobox")return nt===L9?"combobox":nt},[L.mode]),_e=he==="multiple"||he==="tags",be=N!==void 0?N:L.loading||!(_e||he==="combobox"),xe=w.exports.useContext(ga),Te=xe.status,Ee=xe.hasFeedback,Ce=xe.isFormItemInput,ke=xe.feedbackIcon,De=Cp(Te,O),Ke;M!==void 0?Ke=M:he==="combobox"?Ke=null:Ke=(H||UI)("Select");var Ue=O9(ze(ze({},L),{multiple:_e,hasFeedback:Ee,feedbackIcon:ke,showArrow:be,prefixCls:Q})),tt=Ue.suffixIcon,lt=Ue.itemIcon,St=Ue.removeIcon,We=Ue.clearIcon,bt=Ci(L,["suffixIcon","itemIcon"]),Qe=He(p||d,re({},"".concat(Q,"-dropdown-").concat(G),G==="rtl")),mt=se||k||Z,ct=w.exports.useContext(Il),wt=T!=null?T:ct,rt=He((r={},re(r,"".concat(Q,"-lg"),mt==="large"),re(r,"".concat(Q,"-sm"),mt==="small"),re(r,"".concat(Q,"-rtl"),G==="rtl"),re(r,"".concat(Q,"-borderless"),!s),re(r,"".concat(Q,"-in-form-item"),Ce),r),Vs(Q,De,Ee),oe,a),ut=function(){return x!==void 0?x:G==="rtl"?"bottomRight":"bottomLeft"};return I(BI,{ref:n,virtual:ee,dropdownMatchSelectWidth:X,...bt,transitionName:$a(le,k9(x),L.transitionName),listHeight:v,listItemHeight:P,mode:he,prefixCls:Q,placement:ut(),direction:G,inputIcon:tt,menuItemSelectedIcon:lt,removeIcon:St,clearIcon:We,notFoundContent:Ke,className:rt,getPopupContainer:u||V,dropdownClassName:Qe,showArrow:Ee||N,disabled:wt})},B_=w.exports.forwardRef(sse);B_.SECRET_COMBOBOX_MODE_DO_NOT_USE=L9;B_.Option=zI;B_.OptGroup=FI;const vu=B_;var D3=vu.Option;function lO(e){return e&&e.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}var lse=function(t,n){var r=t.prefixCls,i=t.className,o=t.popupClassName,s=t.dropdownClassName,a=t.children,u=t.dataSource,d=yo(a),p;if(d.length===1&&Ro(d[0])&&!lO(d[0])){var m=Le(d,1);p=m[0]}var v=p?function(){return p}:void 0,x;return d.length&&lO(d[0])?x=a:x=u?u.map(function(_){if(Ro(_))return _;switch(nn(_)){case"string":return I(D3,{value:_,children:_},_);case"object":{var P=_.value;return I(D3,{value:P,children:_.text},P)}default:return}}):[],I(zc,{children:function(_){var P=_.getPrefixCls,k=P("select",r);return I(vu,{ref:n,...Ci(t,["dataSource"]),prefixCls:k,popupClassName:o||s,className:He("".concat(k,"-auto-complete"),i),mode:vu.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:v,children:x})}})},F9=w.exports.forwardRef(lse);F9.Option=D3;const use=F9;function GI(){var e=w.exports.useReducer(function(r){return r+1},0),t=Le(e,2),n=t[1];return n}var fb=["xxl","xl","lg","md","sm","xs"],tx={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},pd=new Map,DC=-1,nx={},cse={matchHandlers:{},dispatch:function(t){return nx=t,pd.forEach(function(n){return n(nx)}),pd.size>=1},subscribe:function(t){return pd.size||this.register(),DC+=1,pd.set(DC,t),t(nx),DC},unsubscribe:function(t){pd.delete(t),pd.size||this.unregister()},unregister:function(){var t=this;Object.keys(tx).forEach(function(n){var r=tx[n],i=t.matchHandlers[r];i==null||i.mql.removeListener(i==null?void 0:i.listener)}),pd.clear()},register:function(){var t=this;Object.keys(tx).forEach(function(n){var r=tx[n],i=function(a){var u=a.matches;t.dispatch(ze(ze({},nx),re({},n,u)))},o=window.matchMedia(r);o.addListener(i),t.matchHandlers[r]={mql:o,listener:i},i(o)})}};const hb=cse;function z9(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=w.exports.useRef({}),n=GI();return w.exports.useEffect(function(){var r=hb.subscribe(function(i){t.current=i,e&&n()});return function(){return hb.unsubscribe(r)}},[]),t.current}var Xa={adjustX:1,adjustY:1},Ya=[0,0],$9={left:{points:["cr","cl"],overflow:Xa,offset:[-4,0],targetOffset:Ya},right:{points:["cl","cr"],overflow:Xa,offset:[4,0],targetOffset:Ya},top:{points:["bc","tc"],overflow:Xa,offset:[0,-4],targetOffset:Ya},bottom:{points:["tc","bc"],overflow:Xa,offset:[0,4],targetOffset:Ya},topLeft:{points:["bl","tl"],overflow:Xa,offset:[0,-4],targetOffset:Ya},leftTop:{points:["tr","tl"],overflow:Xa,offset:[-4,0],targetOffset:Ya},topRight:{points:["br","tr"],overflow:Xa,offset:[0,-4],targetOffset:Ya},rightTop:{points:["tl","tr"],overflow:Xa,offset:[4,0],targetOffset:Ya},bottomRight:{points:["tr","br"],overflow:Xa,offset:[0,4],targetOffset:Ya},rightBottom:{points:["bl","br"],overflow:Xa,offset:[4,0],targetOffset:Ya},bottomLeft:{points:["tl","bl"],overflow:Xa,offset:[0,4],targetOffset:Ya},leftBottom:{points:["br","bl"],overflow:Xa,offset:[-4,0],targetOffset:Ya}};function dse(e){var t=e.showArrow,n=e.arrowContent,r=e.children,i=e.prefixCls,o=e.id,s=e.overlayInnerStyle,a=e.className,u=e.style;return $e("div",{className:He("".concat(i,"-content"),a),style:u,children:[t!==!1&&I("div",{className:"".concat(i,"-arrow"),children:n},"arrow"),I("div",{className:"".concat(i,"-inner"),id:o,role:"tooltip",style:s,children:typeof r=="function"?r():r})]})}var fse=function(t,n){var r=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,s=t.mouseEnterDelay,a=s===void 0?0:s,u=t.mouseLeaveDelay,d=u===void 0?.1:u,p=t.overlayStyle,m=t.prefixCls,v=m===void 0?"rc-tooltip":m,x=t.children,_=t.onVisibleChange,P=t.afterVisibleChange,k=t.transitionName,T=t.animation,M=t.motion,O=t.placement,N=O===void 0?"right":O,L=t.align,F=L===void 0?{}:L,V=t.destroyTooltipOnHide,B=V===void 0?!1:V,H=t.defaultVisible,G=t.getTooltipContainer,ee=t.overlayInnerStyle,X=t.arrowContent,Z=t.overlay,Q=t.id,le=t.showArrow,ne=Rn(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),se=w.exports.useRef(null);w.exports.useImperativeHandle(n,function(){return se.current});var oe=fe({},ne);"visible"in t&&(oe.popupVisible=t.visible);var he=function(){return I(dse,{showArrow:le,arrowContent:X,prefixCls:v,id:Q,overlayInnerStyle:ee,children:Z},"content")},_e=!1,be=!1;if(typeof B=="boolean")_e=B;else if(B&&nn(B)==="object"){var xe=B.keepParent;_e=xe===!0,be=xe===!1}return I(z_,{popupClassName:r,prefixCls:v,popup:he,action:o,builtinPlacements:$9,popupPlacement:N,ref:se,popupAlign:F,getPopupContainer:G,onPopupVisibleChange:_,afterPopupVisibleChange:P,popupTransitionName:k,popupAnimation:T,popupMotion:M,defaultPopupVisible:H,destroyPopupOnHide:_e,autoDestroy:be,mouseLeaveDelay:d,popupStyle:p,mouseEnterDelay:a,...oe,children:x})};const hse=w.exports.forwardRef(fse);Yo("success","processing","error","default","warning");var pse=Yo("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"),mse={adjustX:1,adjustY:1},uO={adjustX:0,adjustY:0},gse=[0,0];function cO(e){return typeof e=="boolean"?e?mse:uO:ze(ze({},uO),e)}function B9(e){var t=e.arrowWidth,n=t===void 0?4:t,r=e.horizontalArrowShift,i=r===void 0?16:r,o=e.verticalArrowShift,s=o===void 0?8:o,a=e.autoAdjustOverflow,u=e.arrowPointAtCenter,d={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(d).forEach(function(p){d[p]=u?ze(ze({},d[p]),{overflow:cO(a),targetOffset:gse}):ze(ze({},$9[p]),{overflow:cO(a)}),d[p].ignoreShake=!0}),d}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},yse=function(t,n){var r={},i=ze({},t);return n.forEach(function(o){t&&o in t&&(r[o]=t[o],delete i[o])}),{picked:r,omitted:i}},dO=new RegExp("^(".concat(pse.join("|"),")(-inverse)?$"));function xse(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=yse(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),i=r.picked,o=r.omitted,s=ze(ze({display:"inline-block"},i),{cursor:"not-allowed",width:e.props.block?"100%":void 0}),a=ze(ze({},o),{pointerEvents:"none"}),u=ui(e,{style:a,className:null});return I("span",{style:s,className:He(e.props.className,"".concat(t,"-disabled-compatible-wrapper")),children:u})}return e}var bse=w.exports.forwardRef(function(e,t){var n,r=w.exports.useContext(On),i=r.getPopupContainer,o=r.getPrefixCls,s=r.direction,a=ki(!1,{value:e.open!==void 0?e.open:e.visible,defaultValue:e.defaultOpen!==void 0?e.defaultOpen:e.defaultVisible}),u=Le(a,2),d=u[0],p=u[1],m=function(){var Ce=e.title,ke=e.overlay;return!Ce&&!ke&&Ce!==0},v=function(Ce){var ke,De;p(m()?!1:Ce),m()||((ke=e.onOpenChange)===null||ke===void 0||ke.call(e,Ce),(De=e.onVisibleChange)===null||De===void 0||De.call(e,Ce))},x=function(){var Ce=e.builtinPlacements,ke=e.arrowPointAtCenter,De=ke===void 0?!1:ke,Ke=e.autoAdjustOverflow,Ue=Ke===void 0?!0:Ke;return Ce||B9({arrowPointAtCenter:De,autoAdjustOverflow:Ue})},_=function(Ce,ke){var De=x(),Ke=Object.keys(De).find(function(lt){var St,We;return De[lt].points[0]===((St=ke.points)===null||St===void 0?void 0:St[0])&&De[lt].points[1]===((We=ke.points)===null||We===void 0?void 0:We[1])});if(!!Ke){var Ue=Ce.getBoundingClientRect(),tt={top:"50%",left:"50%"};/top|Bottom/.test(Ke)?tt.top="".concat(Ue.height-ke.offset[1],"px"):/Top|bottom/.test(Ke)&&(tt.top="".concat(-ke.offset[1],"px")),/left|Right/.test(Ke)?tt.left="".concat(Ue.width-ke.offset[0],"px"):/right|Left/.test(Ke)&&(tt.left="".concat(-ke.offset[0],"px")),Ce.style.transformOrigin="".concat(tt.left," ").concat(tt.top)}},P=function(){var Ce=e.title,ke=e.overlay;return Ce===0?Ce:ke||Ce||""},k=e.getPopupContainer,T=e.placement,M=T===void 0?"top":T,O=e.mouseEnterDelay,N=O===void 0?.1:O,L=e.mouseLeaveDelay,F=L===void 0?.1:L,V=vse(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay"]),B=e.prefixCls,H=e.openClassName,G=e.getTooltipContainer,ee=e.overlayClassName,X=e.color,Z=e.overlayInnerStyle,Q=e.children,le=o("tooltip",B),ne=o(),se=d;!("open"in e)&&!("visible"in e)&&m()&&(se=!1);var oe=xse(Ro(Q)&&!KB(Q)?Q:I("span",{children:Q}),le),he=oe.props,_e=!he.className||typeof he.className=="string"?He(he.className,re({},H||"".concat(le,"-open"),!0)):he.className,be=He(ee,(n={},re(n,"".concat(le,"-rtl"),s==="rtl"),re(n,"".concat(le,"-").concat(X),X&&dO.test(X)),n)),xe=Z,Te={};return X&&!dO.test(X)&&(xe=ze(ze({},Z),{background:X}),Te={"--antd-arrow-background-color":X}),I(hse,{...V,placement:M,mouseEnterDelay:N,mouseLeaveDelay:F,prefixCls:le,overlayClassName:be,getTooltipContainer:k||G||i,ref:t,builtinPlacements:x(),overlay:P(),visible:se,onVisibleChange:v,onPopupAlign:_,overlayInnerStyle:xe,arrowContent:I("span",{className:"".concat(le,"-arrow-content"),style:Te}),motion:{motionName:$a(ne,"zoom-big-fast",e.transitionName),motionDeadline:1e3},children:se?ui(oe,{className:_e}):oe})});const $i=bse;var fO=function(t){return t?typeof t=="function"?t():t:null},_se=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},wse=function(t){var n=t.title,r=t.content,i=t.prefixCls;return!n&&!r?null:$e(Tn,{children:[n&&I("div",{className:"".concat(i,"-title"),children:fO(n)}),I("div",{className:"".concat(i,"-inner-content"),children:fO(r)})]})},Cse=w.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.content,o=e._overlay,s=e.placement,a=s===void 0?"top":s,u=e.trigger,d=u===void 0?"hover":u,p=e.mouseEnterDelay,m=p===void 0?.1:p,v=e.mouseLeaveDelay,x=v===void 0?.1:v,_=e.overlayStyle,P=_===void 0?{}:_,k=_se(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),T=w.exports.useContext(On),M=T.getPrefixCls,O=M("popover",n),N=M();return I($i,{placement:a,trigger:d,mouseEnterDelay:m,mouseLeaveDelay:x,overlayStyle:P,...k,prefixCls:O,ref:t,overlay:o||I(wse,{prefixCls:O,title:r,content:i}),transitionName:$a(N,"zoom-big",k.transitionName)})});const bf=Cse;var Sse={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 Ese=Sse;var V9=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Ese})})};V9.displayName="EllipsisOutlined";const U9=w.exports.forwardRef(V9);var j9=w.exports.createContext(null);function qI(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function H9(e){var t=w.exports.useContext(j9);return qI(t,e)}var Pse=["children","locked"],js=w.exports.createContext(null);function Ise(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 gv(e){var t=e.children,n=e.locked,r=Rn(e,Pse),i=w.exports.useContext(js),o=Vv(function(){return Ise(i,r)},[i,r],function(s,a){return!n&&(s[0]!==a[0]||!NI(s[1],a[1],!0))});return I(js.Provider,{value:o,children:t})}var Tse=[],K9=w.exports.createContext(null);function V_(){return w.exports.useContext(K9)}var W9=w.exports.createContext(Tse);function Sp(e){var t=w.exports.useContext(W9);return w.exports.useMemo(function(){return e!==void 0?[].concat(Pt(t),[e]):t},[t,e])}var G9=w.exports.createContext(null),ZI=w.exports.createContext({});function hO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(LI(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),s=null;return i&&!Number.isNaN(o)?s=o:r&&s===null&&(s=0),r&&e.disabled&&(s=null),s!==null&&(s>=0||t&&s<0)}return!1}function q9(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Pt(e.querySelectorAll("*")).filter(function(r){return hO(r,t)});return hO(e,t)&&n.unshift(e),n}var O3=kt.LEFT,N3=kt.RIGHT,L3=kt.UP,t1=kt.DOWN,n1=kt.ENTER,Z9=kt.ESC,$m=kt.HOME,Bm=kt.END,pO=[L3,t1,O3,N3];function kse(e,t,n,r){var i,o,s,a,u="prev",d="next",p="children",m="parent";if(e==="inline"&&r===n1)return{inlineTrigger:!0};var v=(i={},re(i,L3,u),re(i,t1,d),i),x=(o={},re(o,O3,n?d:u),re(o,N3,n?u:d),re(o,t1,p),re(o,n1,p),o),_=(s={},re(s,L3,u),re(s,t1,d),re(s,n1,p),re(s,Z9,m),re(s,O3,n?p:m),re(s,N3,n?m:p),s),P={inline:v,horizontal:x,vertical:_,inlineSub:v,horizontalSub:_,verticalSub:_},k=(a=P["".concat(e).concat(t?"":"Sub")])===null||a===void 0?void 0:a[r];switch(k){case u:return{offset:-1,sibling:!0};case d:return{offset:1,sibling:!0};case m:return{offset:-1,sibling:!1};case p:return{offset:1,sibling:!1};default:return null}}function Mse(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function Rse(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function X9(e,t){var n=q9(e,!0);return n.filter(function(r){return t.has(r)})}function mO(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=X9(e,t),o=i.length,s=i.findIndex(function(a){return n===a});return r<0?s===-1?s=o-1:s-=1:r>0&&(s+=1),s=(s+o)%o,i[s]}function Ase(e,t,n,r,i,o,s,a,u,d){var p=w.exports.useRef(),m=w.exports.useRef();m.current=t;var v=function(){ar.cancel(p.current)};return w.exports.useEffect(function(){return function(){v()}},[]),function(x){var _=x.which;if([].concat(pO,[n1,Z9,$m,Bm]).includes(_)){var P,k,T,M=function(){P=new Set,k=new Map,T=new Map;var le=o();return le.forEach(function(ne){var se=document.querySelector("[data-menu-id='".concat(qI(r,ne),"']"));se&&(P.add(se),T.set(se,ne),k.set(ne,se))}),P};M();var O=k.get(t),N=Rse(O,P),L=T.get(N),F=kse(e,s(L,!0).length===1,n,_);if(!F&&_!==$m&&_!==Bm)return;(pO.includes(_)||[$m,Bm].includes(_))&&x.preventDefault();var V=function(le){if(le){var ne=le,se=le.querySelector("a");se!=null&&se.getAttribute("href")&&(ne=se);var oe=T.get(le);a(oe),v(),p.current=ar(function(){m.current===oe&&ne.focus()})}};if([$m,Bm].includes(_)||F.sibling||!N){var B;!N||e==="inline"?B=i.current:B=Mse(N);var H,G=X9(B,P);_===$m?H=G[0]:_===Bm?H=G[G.length-1]:H=mO(B,P,N,F.offset),V(H)}else if(F.inlineTrigger)u(L);else if(F.offset>0)u(L,!0),v(),p.current=ar(function(){M();var Q=N.getAttribute("aria-controls"),le=document.getElementById(Q),ne=mO(le,P);V(ne)},5);else if(F.offset<0){var ee=s(L,!0),X=ee[ee.length-2],Z=k.get(X);u(X,!1),V(Z)}}d==null||d(x)}}function Dse(e){Promise.resolve().then(e)}var XI="__RC_UTIL_PATH_SPLIT__",gO=function(t){return t.join(XI)},Ose=function(t){return t.split(XI)},F3="rc-menu-more";function Nse(){var e=w.exports.useState({}),t=Le(e,2),n=t[1],r=w.exports.useRef(new Map),i=w.exports.useRef(new Map),o=w.exports.useState([]),s=Le(o,2),a=s[0],u=s[1],d=w.exports.useRef(0),p=w.exports.useRef(!1),m=function(){p.current||n({})},v=w.exports.useCallback(function(O,N){var L=gO(N);i.current.set(L,O),r.current.set(O,L),d.current+=1;var F=d.current;Dse(function(){F===d.current&&m()})},[]),x=w.exports.useCallback(function(O,N){var L=gO(N);i.current.delete(L),r.current.delete(O)},[]),_=w.exports.useCallback(function(O){u(O)},[]),P=w.exports.useCallback(function(O,N){var L=r.current.get(O)||"",F=Ose(L);return N&&a.includes(F[0])&&F.unshift(F3),F},[a]),k=w.exports.useCallback(function(O,N){return O.some(function(L){var F=P(L,!0);return F.includes(N)})},[P]),T=function(){var N=Pt(r.current.keys());return a.length&&N.push(F3),N},M=w.exports.useCallback(function(O){var N="".concat(r.current.get(O)).concat(XI),L=new Set;return Pt(i.current.keys()).forEach(function(F){F.startsWith(N)&&L.add(i.current.get(F))}),L},[]);return w.exports.useEffect(function(){return function(){p.current=!0}},[]),{registerPath:v,unregisterPath:x,refreshOverflowKeys:_,isSubPathKey:k,getKeyPath:P,getKeys:T,getSubPathKeys:M}}function uh(e){var t=w.exports.useRef(e);t.current=e;var n=w.exports.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return e?n:void 0}var Lse=Math.random().toFixed(5).toString().slice(2),vO=0;function Fse(e){var t=ki(e,{value:e}),n=Le(t,2),r=n[0],i=n[1];return w.exports.useEffect(function(){vO+=1;var o="".concat(Lse,"-").concat(vO);i("rc-menu-uuid-".concat(o))},[]),r}function Y9(e,t,n,r){var i=w.exports.useContext(js),o=i.activeKey,s=i.onActive,a=i.onInactive,u={active:o===e};return t||(u.onMouseEnter=function(d){n==null||n({key:e,domEvent:d}),s(e)},u.onMouseLeave=function(d){r==null||r({key:e,domEvent:d}),a(e)}),u}var zse=["item"];function pb(e){var t=e.item,n=Rn(e,zse);return Object.defineProperty(n,"item",{get:function(){return Dr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}function Q9(e){var t=e.icon,n=e.props,r=e.children,i;return typeof t=="function"?i=w.exports.createElement(t,fe({},n)):i=t,i||r||null}function J9(e){var t=w.exports.useContext(js),n=t.mode,r=t.rtl,i=t.inlineIndent;if(n!=="inline")return null;var o=e;return r?{paddingRight:o*i}:{paddingLeft:o*i}}var $se=["title","attribute","elementRef"],Bse=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Vse=["active"],Use=function(e){ci(n,e);var t=di(n);function n(){return Nr(this,n),t.apply(this,arguments)}return Lr(n,[{key:"render",value:function(){var i=this.props,o=i.title,s=i.attribute,a=i.elementRef,u=Rn(i,$se),d=Ci(u,["eventKey"]);return Dr(!s,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),I(yl.Item,{...s,title:typeof o=="string"?o:void 0,...d,ref:a})}}]),n}(w.exports.Component),jse=function(t){var n,r=t.style,i=t.className,o=t.eventKey;t.warnKey;var s=t.disabled,a=t.itemIcon,u=t.children,d=t.role,p=t.onMouseEnter,m=t.onMouseLeave,v=t.onClick,x=t.onKeyDown,_=t.onFocus,P=Rn(t,Bse),k=H9(o),T=w.exports.useContext(js),M=T.prefixCls,O=T.onItemClick,N=T.disabled,L=T.overflowDisabled,F=T.itemIcon,V=T.selectedKeys,B=T.onActive,H=w.exports.useContext(ZI),G=H._internalRenderMenuItem,ee="".concat(M,"-item"),X=w.exports.useRef(),Z=w.exports.useRef(),Q=N||s,le=Sp(o),ne=function(Ue){return{key:o,keyPath:Pt(le).reverse(),item:X.current,domEvent:Ue}},se=a||F,oe=Y9(o,Q,p,m),he=oe.active,_e=Rn(oe,Vse),be=V.includes(o),xe=J9(le.length),Te=function(Ue){if(!Q){var tt=ne(Ue);v==null||v(pb(tt)),O(tt)}},Ee=function(Ue){if(x==null||x(Ue),Ue.which===kt.ENTER){var tt=ne(Ue);v==null||v(pb(tt)),O(tt)}},Ce=function(Ue){B(o),_==null||_(Ue)},ke={};t.role==="option"&&(ke["aria-selected"]=be);var De=$e(Use,{ref:X,elementRef:Z,role:d===null?"none":d||"menuitem",tabIndex:s?null:-1,"data-menu-id":L&&k?null:k,...P,..._e,...ke,component:"li","aria-disabled":s,style:fe(fe({},xe),r),className:He(ee,(n={},re(n,"".concat(ee,"-active"),he),re(n,"".concat(ee,"-selected"),be),re(n,"".concat(ee,"-disabled"),Q),n),i),onClick:Te,onKeyDown:Ee,onFocus:Ce,children:[u,I(Q9,{props:fe(fe({},t),{},{isSelected:be}),icon:se})]});return G&&(De=G(De,t,{selected:be})),De};function U_(e){var t=e.eventKey,n=V_(),r=Sp(t);return w.exports.useEffect(function(){if(n)return n.registerPath(t,r),function(){n.unregisterPath(t,r)}},[r]),n?null:I(jse,{...e})}var Hse=["className","children"],Kse=function(t,n){var r=t.className,i=t.children,o=Rn(t,Hse),s=w.exports.useContext(js),a=s.prefixCls,u=s.mode,d=s.rtl;return I("ul",{className:He(a,d&&"".concat(a,"-rtl"),"".concat(a,"-sub"),"".concat(a,"-").concat(u==="inline"?"inline":"vertical"),r),role:"menu",...o,"data-menu-list":!0,ref:n,children:i})},YI=w.exports.forwardRef(Kse);YI.displayName="SubMenuList";var Wse=["label","children","key","type"];function QI(e,t){return yo(e).map(function(n,r){if(w.exports.isValidElement(n)){var i,o,s=n.key,a=(i=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:s,u=a==null;u&&(a="tmp_key-".concat([].concat(Pt(t),[r]).join("-")));var d={key:a,eventKey:a};return w.exports.cloneElement(n,d)}return n})}function z3(e){return(e||[]).map(function(t,n){if(t&&nn(t)==="object"){var r=t,i=r.label,o=r.children,s=r.key,a=r.type,u=Rn(r,Wse),d=s!=null?s:"tmp-".concat(n);return o||a==="group"?a==="group"?I(H_,{...u,title:i,children:z3(o)},d):I(j_,{...u,title:i,children:z3(o)},d):a==="divider"?I(JI,{...u},d):I(U_,{...u,children:i},d)}return null}).filter(function(t){return t})}function Gse(e,t,n){var r=e;return t&&(r=z3(t)),QI(r,n)}var ac={adjustX:1,adjustY:1},qse={topLeft:{points:["bl","tl"],overflow:ac,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ac,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ac,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ac,offset:[4,0]}},Zse={topLeft:{points:["bl","tl"],overflow:ac,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ac,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ac,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ac,offset:[4,0]}};function e7(e,t,n){if(t)return t;if(n)return n[e]||n.other}var Xse={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Yse(e){var t=e.prefixCls,n=e.visible,r=e.children,i=e.popup,o=e.popupClassName,s=e.popupOffset,a=e.disabled,u=e.mode,d=e.onVisibleChange,p=w.exports.useContext(js),m=p.getPopupContainer,v=p.rtl,x=p.subMenuOpenDelay,_=p.subMenuCloseDelay,P=p.builtinPlacements,k=p.triggerSubMenuAction,T=p.forceSubMenuRender,M=p.rootClassName,O=p.motion,N=p.defaultMotions,L=w.exports.useState(!1),F=Le(L,2),V=F[0],B=F[1],H=fe(v?fe({},Zse):fe({},qse),P),G=Xse[u],ee=e7(u,O,N),X=w.exports.useRef(ee);u!=="inline"&&(X.current=ee);var Z=fe(fe({},X.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Q=w.exports.useRef();return w.exports.useEffect(function(){return Q.current=ar(function(){B(n)}),function(){ar.cancel(Q.current)}},[n]),I(z_,{prefixCls:t,popupClassName:He("".concat(t,"-popup"),re({},"".concat(t,"-rtl"),v),o,M),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:H,popupPlacement:G,popupVisible:V,popup:i,popupAlign:s&&{offset:s},action:a?[]:[k],mouseEnterDelay:x,mouseLeaveDelay:_,onPopupVisibleChange:d,forceRender:T,popupMotion:Z,children:r})}function Qse(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,o="inline",s=w.exports.useContext(js),a=s.prefixCls,u=s.forceSubMenuRender,d=s.motion,p=s.defaultMotions,m=s.mode,v=w.exports.useRef(!1);v.current=m===o;var x=w.exports.useState(!v.current),_=Le(x,2),P=_[0],k=_[1],T=v.current?n:!1;w.exports.useEffect(function(){v.current&&k(!1)},[m]);var M=fe({},e7(o,d,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)},P?null:I(gv,{mode:o,locked:!v.current,children:I(Xo,{visible:T,...M,forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(a,"-hidden"),children:function(N){var L=N.className,F=N.style;return I(YI,{id:t,className:L,style:F,children:i})}})})}var Jse=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],ele=["active"],tle=function(t){var n,r=t.style,i=t.className,o=t.title,s=t.eventKey;t.warnKey;var a=t.disabled,u=t.internalPopupClose,d=t.children,p=t.itemIcon,m=t.expandIcon,v=t.popupClassName,x=t.popupOffset,_=t.onClick,P=t.onMouseEnter,k=t.onMouseLeave,T=t.onTitleClick,M=t.onTitleMouseEnter,O=t.onTitleMouseLeave,N=Rn(t,Jse),L=H9(s),F=w.exports.useContext(js),V=F.prefixCls,B=F.mode,H=F.openKeys,G=F.disabled,ee=F.overflowDisabled,X=F.activeKey,Z=F.selectedKeys,Q=F.itemIcon,le=F.expandIcon,ne=F.onItemClick,se=F.onOpenChange,oe=F.onActive,he=w.exports.useContext(ZI),_e=he._internalRenderSubMenuItem,be=w.exports.useContext(G9),xe=be.isSubPathKey,Te=Sp(),Ee="".concat(V,"-submenu"),Ce=G||a,ke=w.exports.useRef(),De=w.exports.useRef(),Ke=p||Q,Ue=m||le,tt=H.includes(s),lt=!ee&&tt,St=xe(Z,s),We=Y9(s,Ce,M,O),bt=We.active,Qe=Rn(We,ele),mt=w.exports.useState(!1),ct=Le(mt,2),wt=ct[0],rt=ct[1],ut=function(Qt){Ce||rt(Qt)},nt=function(Qt){ut(!0),P==null||P({key:s,domEvent:Qt})},qe=function(Qt){ut(!1),k==null||k({key:s,domEvent:Qt})},dt=w.exports.useMemo(function(){return bt||(B!=="inline"?wt||xe([X],s):!1)},[B,bt,X,wt,s,xe]),_t=J9(Te.length),Dt=function(Qt){Ce||(T==null||T({key:s,domEvent:Qt}),B==="inline"&&se(s,!tt))},Nt=uh(function(Rt){_==null||_(pb(Rt)),ne(Rt)}),jt=function(Qt){B!=="inline"&&se(s,Qt)},Ve=function(){oe(s)},Ze=L&&"".concat(L,"-popup"),Yt=$e("div",{role:"menuitem",style:_t,className:"".concat(Ee,"-title"),tabIndex:Ce?null:-1,ref:ke,title:typeof o=="string"?o:null,"data-menu-id":ee&&L?null:L,"aria-expanded":lt,"aria-haspopup":!0,"aria-controls":Ze,"aria-disabled":Ce,onClick:Dt,onFocus:Ve,...Qe,children:[o,I(Q9,{icon:B!=="horizontal"?Ue:null,props:fe(fe({},t),{},{isOpen:lt,isSubMenu:!0}),children:I("i",{className:"".concat(Ee,"-arrow")})})]}),sn=w.exports.useRef(B);if(B!=="inline"&&Te.length>1?sn.current="vertical":sn.current=B,!ee){var Gt=sn.current;Yt=I(Yse,{mode:Gt,prefixCls:Ee,visible:!u&<&&B!=="inline",popupClassName:v,popupOffset:x,popup:I(gv,{mode:Gt==="horizontal"?"vertical":Gt,children:I(YI,{id:Ze,ref:De,children:d})}),disabled:Ce,onVisibleChange:jt,children:Yt})}var zt=$e(yl.Item,{role:"none",...N,component:"li",style:r,className:He(Ee,"".concat(Ee,"-").concat(B),i,(n={},re(n,"".concat(Ee,"-open"),lt),re(n,"".concat(Ee,"-active"),dt),re(n,"".concat(Ee,"-selected"),St),re(n,"".concat(Ee,"-disabled"),Ce),n)),onMouseEnter:nt,onMouseLeave:qe,children:[Yt,!ee&&I(Qse,{id:Ze,open:lt,keyPath:Te,children:d})]});return _e&&(zt=_e(zt,t,{selected:St,active:dt,open:lt,disabled:Ce})),I(gv,{onItemClick:Nt,mode:B==="horizontal"?"vertical":B,itemIcon:Ke,expandIcon:Ue,children:zt})};function j_(e){var t=e.eventKey,n=e.children,r=Sp(t),i=QI(n,r),o=V_();w.exports.useEffect(function(){if(o)return o.registerPath(t,r),function(){o.unregisterPath(t,r)}},[r]);var s;return o?s=i:s=I(tle,{...e,children:i}),I(W9.Provider,{value:r,children:s})}var nle=["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"],rh=[],rle=w.exports.forwardRef(function(e,t){var n,r,i=e,o=i.prefixCls,s=o===void 0?"rc-menu":o,a=i.rootClassName,u=i.style,d=i.className,p=i.tabIndex,m=p===void 0?0:p,v=i.items,x=i.children,_=i.direction,P=i.id,k=i.mode,T=k===void 0?"vertical":k,M=i.inlineCollapsed,O=i.disabled,N=i.disabledOverflow,L=i.subMenuOpenDelay,F=L===void 0?.1:L,V=i.subMenuCloseDelay,B=V===void 0?.1:V,H=i.forceSubMenuRender,G=i.defaultOpenKeys,ee=i.openKeys,X=i.activeKey,Z=i.defaultActiveFirst,Q=i.selectable,le=Q===void 0?!0:Q,ne=i.multiple,se=ne===void 0?!1:ne,oe=i.defaultSelectedKeys,he=i.selectedKeys,_e=i.onSelect,be=i.onDeselect,xe=i.inlineIndent,Te=xe===void 0?24:xe,Ee=i.motion,Ce=i.defaultMotions,ke=i.triggerSubMenuAction,De=ke===void 0?"hover":ke,Ke=i.builtinPlacements,Ue=i.itemIcon,tt=i.expandIcon,lt=i.overflowedIndicator,St=lt===void 0?"...":lt,We=i.overflowedIndicatorPopupClassName,bt=i.getPopupContainer,Qe=i.onClick,mt=i.onOpenChange,ct=i.onKeyDown;i.openAnimation,i.openTransitionName;var wt=i._internalRenderMenuItem,rt=i._internalRenderSubMenuItem,ut=Rn(i,nle),nt=w.exports.useMemo(function(){return Gse(x,v,rh)},[x,v]),qe=w.exports.useState(!1),dt=Le(qe,2),_t=dt[0],Dt=dt[1],Nt=w.exports.useRef(),jt=Fse(P),Ve=_==="rtl",Ze=ki(G,{value:ee,postState:function(Kn){return Kn||rh}}),Yt=Le(Ze,2),sn=Yt[0],Gt=Yt[1],zt=function(Kn){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Tr(){Gt(Kn),mt==null||mt(Kn)}or?Cl.exports.flushSync(Tr):Tr()},Rt=w.exports.useState(sn),Qt=Le(Rt,2),pn=Qt[0],ot=Qt[1],Lt=w.exports.useRef(!1),Tt=w.exports.useMemo(function(){return(T==="inline"||T==="vertical")&&M?["vertical",M]:[T,!1]},[T,M]),Kt=Le(Tt,2),Zt=Kt[0],ht=Kt[1],xn=Zt==="inline",bn=w.exports.useState(Zt),tn=Le(bn,2),Bt=tn[0],gt=tn[1],xt=w.exports.useState(ht),Vt=Le(xt,2),qt=Vt[0],vn=Vt[1];w.exports.useEffect(function(){gt(Zt),vn(ht),Lt.current&&(xn?Gt(pn):zt(rh))},[Zt,ht]);var Fn=w.exports.useState(0),tr=Le(Fn,2),nr=tr[0],ye=tr[1],q=nr>=nt.length-1||Bt!=="horizontal"||N;w.exports.useEffect(function(){xn&&ot(sn)},[sn]),w.exports.useEffect(function(){return Lt.current=!0,function(){Lt.current=!1}},[]);var J=Nse(),pe=J.registerPath,ce=J.unregisterPath,we=J.refreshOverflowKeys,Ae=J.isSubPathKey,Pe=J.getKeyPath,Me=J.getKeys,Be=J.getSubPathKeys,Je=w.exports.useMemo(function(){return{registerPath:pe,unregisterPath:ce}},[pe,ce]),et=w.exports.useMemo(function(){return{isSubPathKey:Ae}},[Ae]);w.exports.useEffect(function(){we(q?rh:nt.slice(nr+1).map(function(Xn){return Xn.key}))},[nr,q]);var Ge=ki(X||Z&&((n=nt[0])===null||n===void 0?void 0:n.key),{value:X}),Ut=Le(Ge,2),Mt=Ut[0],at=Ut[1],$t=uh(function(Xn){at(Xn)}),Xt=uh(function(){at(void 0)});w.exports.useImperativeHandle(t,function(){return{list:Nt.current,focus:function(Kn){var or,Tr=Mt!=null?Mt:(or=nt.find(function(Eu){return!Eu.props.disabled}))===null||or===void 0?void 0:or.key;if(Tr){var Mr,Xr,Oo;(Mr=Nt.current)===null||Mr===void 0||(Xr=Mr.querySelector("li[data-menu-id='".concat(qI(jt,Tr),"']")))===null||Xr===void 0||(Oo=Xr.focus)===null||Oo===void 0||Oo.call(Xr,Kn)}}}});var En=ki(oe||[],{value:he,postState:function(Kn){return Array.isArray(Kn)?Kn:Kn==null?rh:[Kn]}}),hn=Le(En,2),Pn=hn[0],Gn=hn[1],lr=function(Kn){if(le){var or=Kn.key,Tr=Pn.includes(or),Mr;se?Tr?Mr=Pn.filter(function(Oo){return Oo!==or}):Mr=[].concat(Pt(Pn),[or]):Mr=[or],Gn(Mr);var Xr=fe(fe({},Kn),{},{selectedKeys:Mr});Tr?be==null||be(Xr):_e==null||_e(Xr)}!se&&sn.length&&Bt!=="inline"&&zt(rh)},Zr=uh(function(Xn){Qe==null||Qe(pb(Xn)),lr(Xn)}),hr=uh(function(Xn,Kn){var or=sn.filter(function(Mr){return Mr!==Xn});if(Kn)or.push(Xn);else if(Bt!=="inline"){var Tr=Be(Xn);or=or.filter(function(Mr){return!Tr.has(Mr)})}NI(sn,or,!0)||zt(or,!0)}),Vr=uh(bt),Nn=function(Kn,or){var Tr=or!=null?or:!sn.includes(Kn);hr(Kn,Tr)},An=Ase(Bt,Mt,Ve,jt,Nt,Me,Pe,at,Nn,ct);w.exports.useEffect(function(){Dt(!0)},[]);var zn=w.exports.useMemo(function(){return{_internalRenderMenuItem:wt,_internalRenderSubMenuItem:rt}},[wt,rt]),ri=Bt!=="horizontal"||N?nt:nt.map(function(Xn,Kn){return I(gv,{overflowDisabled:Kn>nr,children:Xn},Xn.key)}),Er=I(yl,{id:P,ref:Nt,prefixCls:"".concat(s,"-overflow"),component:"ul",itemComponent:U_,className:He(s,"".concat(s,"-root"),"".concat(s,"-").concat(Bt),d,(r={},re(r,"".concat(s,"-inline-collapsed"),qt),re(r,"".concat(s,"-rtl"),Ve),r),a),dir:_,style:u,role:"menu",tabIndex:m,data:ri,renderRawItem:function(Kn){return Kn},renderRawRest:function(Kn){var or=Kn.length,Tr=or?nt.slice(-or):null;return I(j_,{eventKey:F3,title:St,disabled:q,internalPopupClose:or===0,popupClassName:We,children:Tr})},maxCount:Bt!=="horizontal"||N?yl.INVALIDATE:yl.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Kn){ye(Kn)},onKeyDown:An,...ut});return I(ZI.Provider,{value:zn,children:I(j9.Provider,{value:jt,children:$e(gv,{prefixCls:s,rootClassName:a,mode:Bt,openKeys:sn,rtl:Ve,disabled:O,motion:_t?Ee:null,defaultMotions:_t?Ce:null,activeKey:Mt,onActive:$t,onInactive:Xt,selectedKeys:Pn,inlineIndent:Te,subMenuOpenDelay:F,subMenuCloseDelay:B,forceSubMenuRender:H,builtinPlacements:Ke,triggerSubMenuAction:De,getPopupContainer:Vr,itemIcon:Ue,expandIcon:tt,onItemClick:Zr,onOpenChange:hr,children:[I(G9.Provider,{value:et,children:Er}),I("div",{style:{display:"none"},"aria-hidden":!0,children:I(K9.Provider,{value:Je,children:nt})})]})})})}),ile=["className","title","eventKey","children"],ole=["children"],ale=function(t){var n=t.className,r=t.title;t.eventKey;var i=t.children,o=Rn(t,ile),s=w.exports.useContext(js),a=s.prefixCls,u="".concat(a,"-item-group");return $e("li",{role:"presentation",...o,onClick:function(p){return p.stopPropagation()},className:He(u,n),children:[I("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof r=="string"?r:void 0,children:r}),I("ul",{role:"group",className:"".concat(u,"-list"),children:i})]})};function H_(e){var t=e.children,n=Rn(e,ole),r=Sp(n.eventKey),i=QI(t,r),o=V_();return o?i:I(ale,{...Ci(n,["warnKey"]),children:i})}function JI(e){var t=e.className,n=e.style,r=w.exports.useContext(js),i=r.prefixCls,o=V_();return o?null:I("li",{className:He("".concat(i,"-item-divider"),t),style:n})}var Wv=rle;Wv.Item=U_;Wv.SubMenu=j_;Wv.ItemGroup=H_;Wv.Divider=JI;var sle={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 lle=sle;var t7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:lle})})};t7.displayName="LeftOutlined";const n7=w.exports.forwardRef(t7);var ule={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 r7=ule;var i7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:r7})})};i7.displayName="RightOutlined";const K_=w.exports.forwardRef(i7);globalThis&&globalThis.__rest;var o7=w.exports.createContext({}),cle=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},dle=function(t){var n=t.prefixCls,r=t.className,i=t.dashed,o=cle(t,["prefixCls","className","dashed"]),s=w.exports.useContext(On),a=s.getPrefixCls,u=a("menu",n),d=He(re({},"".concat(u,"-item-divider-dashed"),!!i),r);return I(JI,{className:d,...o})};const a7=dle;var fle=w.exports.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});const mb=fle;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},eT=function(e){ci(n,e);var t=di(n);function n(){var r;return Nr(this,n),r=t.apply(this,arguments),r.renderItem=function(i){var o,s=i.siderCollapsed,a,u=r.context,d=u.prefixCls,p=u.firstLevel,m=u.inlineCollapsed,v=u.direction,x=u.disableMenuItemTitleTooltip,_=r.props,P=_.className,k=_.children,T=r.props,M=T.title,O=T.icon,N=T.danger,L=hle(T,["title","icon","danger"]),F=M;typeof M>"u"?F=p?k:"":M===!1&&(F="");var V={title:F};!s&&!m&&(V.title=null,V.open=!1);var B=yo(k).length,H=$e(U_,{...L,className:He((o={},re(o,"".concat(d,"-item-danger"),N),re(o,"".concat(d,"-item-only-child"),(O?B+1:B)===1),o),P),title:typeof M=="string"?M:void 0,children:[ui(O,{className:He(Ro(O)?(a=O.props)===null||a===void 0?void 0:a.className:"","".concat(d,"-item-icon"))}),r.renderItemChildren(m)]});return x||(H=I($i,{...V,placement:v==="rtl"?"left":"right",overlayClassName:"".concat(d,"-inline-collapsed-tooltip"),children:H})),H},r}return Lr(n,[{key:"renderItemChildren",value:function(i){var o=this.context,s=o.prefixCls,a=o.firstLevel,u=this.props,d=u.icon,p=u.children,m=I("span",{className:"".concat(s,"-title-content"),children:p});return(!d||Ro(p)&&p.type==="span")&&p&&i&&a&&typeof p=="string"?I("div",{className:"".concat(s,"-inline-collapsed-noicon"),children:p.charAt(0)}):m}},{key:"render",value:function(){return I(o7.Consumer,{children:this.renderItem})}}]),n}(w.exports.Component);eT.contextType=mb;function s7(e){var t,n=e.popupClassName,r=e.icon,i=e.title,o=e.theme,s=w.exports.useContext(mb),a=s.prefixCls,u=s.inlineCollapsed,d=s.antdMenuTheme,p=Sp(),m;if(!r)m=u&&!p.length&&i&&typeof i=="string"?I("div",{className:"".concat(a,"-inline-collapsed-noicon"),children:i.charAt(0)}):I("span",{className:"".concat(a,"-title-content"),children:i});else{var v=Ro(i)&&i.type==="span";m=$e(Tn,{children:[ui(r,{className:He(Ro(r)?(t=r.props)===null||t===void 0?void 0:t.className:"","".concat(a,"-item-icon"))}),v?i:I("span",{className:"".concat(a,"-title-content"),children:i})]})}var x=w.exports.useMemo(function(){return ze(ze({},s),{firstLevel:!1})},[s]);return I(mb.Provider,{value:x,children:I(j_,{...Ci(e,["icon"]),title:m,popupClassName:He(a,"".concat(a,"-").concat(o||d),n)})})}var ple=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 $3(e){return(e||[]).map(function(t,n){if(t&&nn(t)==="object"){var r=t,i=r.label,o=r.children,s=r.key,a=r.type,u=ple(r,["label","children","key","type"]),d=s!=null?s:"tmp-".concat(n);return o||a==="group"?a==="group"?I(H_,{...u,title:i,children:$3(o)},d):I(s7,{...u,title:i,children:$3(o)},d):a==="divider"?I(a7,{...u},d):I(eT,{...u,children:i},d)}return null}).filter(function(t){return t})}function mle(e){return w.exports.useMemo(function(){return e&&$3(e)},[e])}var gle=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},gb=w.exports.createContext(null),l7=function(t){var n=t.children,r=gle(t,["children"]),i=w.exports.useContext(gb),o=w.exports.useMemo(function(){return ze(ze({},i),r)},[i,r.prefixCls,r.mode,r.selectable]);return I(gb.Provider,{value:o,children:n})},vle=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},yle=w.exports.forwardRef(function(e,t){var n,r=w.exports.useContext(gb)||{},i=w.exports.useContext(On),o=i.getPrefixCls,s=i.getPopupContainer,a=i.direction,u=o(),d=e.prefixCls,p=e.className,m=e.theme,v=m===void 0?"light":m,x=e.expandIcon,_=e._internalDisableMenuItemTitleTooltip,P=e.inlineCollapsed,k=e.siderCollapsed,T=e.items,M=e.children,O=e.mode,N=e.selectable,L=e.onClick,F=vle(e,["prefixCls","className","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","mode","selectable","onClick"]),V=Ci(F,["collapsedWidth"]),B=mle(T)||M;(n=r.validator)===null||n===void 0||n.call(r,{mode:O});var H=hv(function(){var oe;L==null||L.apply(void 0,arguments),(oe=r==null?void 0:r.onClick)===null||oe===void 0||oe.call(r)}),G=r.mode||O,ee=N!=null?N:r.selectable,X=w.exports.useMemo(function(){return k!==void 0?k:P},[P,k]),Z={horizontal:{motionName:"".concat(u,"-slide-up")},inline:np,other:{motionName:"".concat(u,"-zoom-big")}},Q=o("menu",d||r.prefixCls),le=He("".concat(Q,"-").concat(v),p),ne;typeof x=="function"?ne=x:ne=ui(x||r.expandIcon,{className:"".concat(Q,"-submenu-expand-icon")});var se=w.exports.useMemo(function(){return{prefixCls:Q,inlineCollapsed:X||!1,antdMenuTheme:v,direction:a,firstLevel:!0,disableMenuItemTitleTooltip:_}},[Q,X,v,a,_]);return I(gb.Provider,{value:null,children:I(mb.Provider,{value:se,children:I(Wv,{getPopupContainer:s,overflowedIndicator:I(U9,{}),overflowedIndicatorPopupClassName:"".concat(Q,"-").concat(v),mode:G,selectable:ee,onClick:H,...V,inlineCollapsed:X,className:le,prefixCls:Q,direction:a,defaultMotions:Z,expandIcon:ne,ref:t,children:B})})})}),Gv=function(e){ci(n,e);var t=di(n);function n(){var r;return Nr(this,n),r=t.apply(this,arguments),r.focus=function(i){var o;(o=r.menu)===null||o===void 0||o.focus(i)},r}return Lr(n,[{key:"render",value:function(){var i=this;return I(o7.Consumer,{children:function(o){return I(yle,{ref:function(a){i.menu=a},...i.props,...o})}})}}]),n}(w.exports.Component);Gv.Divider=a7;Gv.Item=eT;Gv.SubMenu=s7;Gv.ItemGroup=H_;const u7=Gv;var ih={adjustX:1,adjustY:1},oh=[0,0],xle={topLeft:{points:["bl","tl"],overflow:ih,offset:[0,-4],targetOffset:oh},topCenter:{points:["bc","tc"],overflow:ih,offset:[0,-4],targetOffset:oh},topRight:{points:["br","tr"],overflow:ih,offset:[0,-4],targetOffset:oh},bottomLeft:{points:["tl","bl"],overflow:ih,offset:[0,4],targetOffset:oh},bottomCenter:{points:["tc","bc"],overflow:ih,offset:[0,4],targetOffset:oh},bottomRight:{points:["tr","br"],overflow:ih,offset:[0,4],targetOffset:oh}},ble=kt.ESC,_le=kt.TAB;function wle(e){var t=e.visible,n=e.setTriggerVisible,r=e.triggerRef,i=e.onVisibleChange,o=e.autoFocus,s=w.exports.useRef(!1),a=function(){if(t&&r.current){var m,v,x,_;(m=r.current)===null||m===void 0||(v=m.triggerRef)===null||v===void 0||(x=v.current)===null||x===void 0||(_=x.focus)===null||_===void 0||_.call(x),n(!1),typeof i=="function"&&i(!1)}},u=function(){var m,v,x,_,P=q9((m=r.current)===null||m===void 0||(v=m.popupRef)===null||v===void 0||(x=v.current)===null||x===void 0||(_=x.getElement)===null||_===void 0?void 0:_.call(x)),k=P[0];return k!=null&&k.focus?(k.focus(),s.current=!0,!0):!1},d=function(m){switch(m.keyCode){case ble:a();break;case _le:{var v=!1;s.current||(v=u()),v?m.preventDefault():a();break}}};w.exports.useEffect(function(){return t?(window.addEventListener("keydown",d),o&&ar(u,3),function(){window.removeEventListener("keydown",d),s.current=!1}):function(){s.current=!1}},[t])}var Cle=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"];function Sle(e,t){var n=e.arrow,r=n===void 0?!1:n,i=e.prefixCls,o=i===void 0?"rc-dropdown":i,s=e.transitionName,a=e.animation,u=e.align,d=e.placement,p=d===void 0?"bottomLeft":d,m=e.placements,v=m===void 0?xle:m,x=e.getPopupContainer,_=e.showAction,P=e.hideAction,k=e.overlayClassName,T=e.overlayStyle,M=e.visible,O=e.trigger,N=O===void 0?["hover"]:O,L=e.autoFocus,F=Rn(e,Cle),V=w.exports.useState(),B=Le(V,2),H=B[0],G=B[1],ee="visible"in e?M:H,X=w.exports.useRef(null);w.exports.useImperativeHandle(t,function(){return X.current}),wle({visible:ee,setTriggerVisible:G,triggerRef:X,onVisibleChange:e.onVisibleChange,autoFocus:L});var Z=function(){var Te=e.overlay,Ee;return typeof Te=="function"?Ee=Te():Ee=Te,Ee},Q=function(Te){var Ee=e.onOverlayClick;G(!1),Ee&&Ee(Te)},le=function(Te){var Ee=e.onVisibleChange;G(Te),typeof Ee=="function"&&Ee(Te)},ne=function(){var Te=Z();return $e(Tn,{children:[r&&I("div",{className:"".concat(o,"-arrow")}),Te]})},se=function(){var Te=e.overlay;return typeof Te=="function"?ne:ne()},oe=function(){var Te=e.minOverlayWidthMatchTrigger,Ee=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?Te:!Ee},he=function(){var Te=e.openClassName;return Te!==void 0?Te:"".concat(o,"-open")},_e=function(){var Te=e.children,Ee=Te.props?Te.props:{},Ce=He(Ee.className,he());return ee&&Te?w.exports.cloneElement(Te,{className:Ce}):Te},be=P;return!be&&N.indexOf("contextMenu")!==-1&&(be=["click"]),I(z_,{...fe(fe({builtinPlacements:v},F),{},{prefixCls:o,ref:X,popupClassName:He(k,re({},"".concat(o,"-show-arrow"),r)),popupStyle:T,action:N,showAction:_,hideAction:be||[],popupPlacement:p,popupAlign:u,popupTransitionName:s,popupAnimation:a,popupVisible:ee,stretch:oe()?"minWidth":"",popup:se(),onPopupVisibleChange:le,onPopupClick:Q,getPopupContainer:x}),children:_e()})}const Ele=w.exports.forwardRef(Sle);var Ple=0,Lh={};function vb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=Ple++,r=t;function i(){r-=1,r<=0?(e(),delete Lh[n]):Lh[n]=ar(i)}return Lh[n]=ar(i),n}vb.cancel=function(t){t!==void 0&&(ar.cancel(Lh[t]),delete Lh[t])};vb.ids=Lh;var OC;function yO(e){return!e||e.offsetParent===null||e.hidden}function Ile(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 Tle(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 c7=function(e){ci(n,e);var t=di(n);function n(){var r;return Nr(this,n),r=t.apply(this,arguments),r.containerRef=w.exports.createRef(),r.animationStart=!1,r.destroyed=!1,r.onClick=function(i,o){var s,a,u=r.props,d=u.insertExtraNode,p=u.disabled;if(!(p||!i||yO(i)||i.className.includes("-leave"))){r.extraNode=document.createElement("div");var m=Vn(r),v=m.extraNode,x=r.context.getPrefixCls;v.className="".concat(x(""),"-click-animating-node");var _=r.getAttributeName();if(i.setAttribute(_,"true"),o&&o!=="#fff"&&o!=="#ffffff"&&o!=="rgb(255, 255, 255)"&&o!=="rgba(255, 255, 255, 1)"&&Tle(o)&&!/rgba\((?:\d*, ){3}0\)/.test(o)&&o!=="transparent"){v.style.borderColor=o;var P=((s=i.getRootNode)===null||s===void 0?void 0:s.call(i))||i.ownerDocument,k=(a=Ile(P))!==null&&a!==void 0?a:P;OC=jv(`
|
|
|
[`.concat(x(""),"-click-animating-without-extra-node='true']::after, .").concat(x(""),`-click-animating-node {
|
|
|
--antd-wave-shadow-color: `).concat(o,`;
|
|
|
}`),"antd-wave",{csp:r.csp,attachTo:k})}d&&i.appendChild(v),["transition","animation"].forEach(function(T){i.addEventListener("".concat(T,"start"),r.onTransitionStart),i.addEventListener("".concat(T,"end"),r.onTransitionEnd)})}},r.onTransitionStart=function(i){if(!r.destroyed){var o=r.containerRef.current;!i||i.target!==o||r.animationStart||r.resetEffect(o)}},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 o=function(a){if(!(a.target.tagName==="INPUT"||yO(a.target))){r.resetEffect(i);var u=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,u)},0),vb.cancel(r.animationStartId),r.animationStart=!0,r.animationStartId=vb(function(){r.animationStart=!1},10)}};return i.addEventListener("click",o,!0),{cancel:function(){i.removeEventListener("click",o,!0)}}}},r.renderWave=function(i){var o=i.csp,s=r.props.children;if(r.csp=o,!w.exports.isValidElement(s))return s;var a=r.containerRef;return vf(s)&&(a=Zo(s.ref,r.containerRef)),ui(s,{ref:a})},r}return Lr(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,o=this.props.insertExtraNode;return o?"".concat(i(""),"-click-animating"):"".concat(i(""),"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(i){var o=this;if(!(!i||i===this.extraNode||!(i instanceof Element))){var s=this.props.insertExtraNode,a=this.getAttributeName();i.setAttribute(a,"false"),OC&&(OC.innerHTML=""),s&&this.extraNode&&i.contains(this.extraNode)&&i.removeChild(this.extraNode),["transition","animation"].forEach(function(u){i.removeEventListener("".concat(u,"start"),o.onTransitionStart),i.removeEventListener("".concat(u,"end"),o.onTransitionEnd)})}}},{key:"render",value:function(){return I(zc,{children:this.renderWave})}}]),n}(w.exports.Component);c7.contextType=On;const kle=c7;var Mle=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},d7=w.exports.createContext(void 0),Rle=function(t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=t.prefixCls,a=t.size,u=t.className,d=Mle(t,["prefixCls","size","className"]),p=i("btn-group",s),m="";switch(a){case"large":m="lg";break;case"small":m="sm";break}var v=He(p,(n={},re(n,"".concat(p,"-").concat(m),m),re(n,"".concat(p,"-rtl"),o==="rtl"),n),u);return I(d7.Provider,{value:a,children:I("div",{...d,className:v})})};const Ale=Rle;var NC=function(){return{width:0,opacity:0,transform:"scale(0)"}},LC=function(t){return{width:t.scrollWidth,opacity:1,transform:"scale(1)"}},Dle=function(t){var n=t.prefixCls,r=t.loading,i=t.existIcon,o=!!r;return i?I("span",{className:"".concat(n,"-loading-icon"),children:I(Mc,{})}):I(Xo,{visible:o,motionName:"".concat(n,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:NC,onAppearActive:LC,onEnterStart:NC,onEnterActive:LC,onLeaveStart:LC,onLeaveActive:NC,children:function(s,a){var u=s.className,d=s.style;return I("span",{className:"".concat(n,"-loading-icon"),style:d,ref:a,children:I(Mc,{className:u})})}})};const Ole=Dle;var Nle=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},xO=/^[\u4e00-\u9fa5]{2}$/,B3=xO.test.bind(xO);function Lle(e){return typeof e=="string"}function FC(e){return e==="text"||e==="link"}function Fle(e,t){if(e!=null){var n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&Lle(e.type)&&B3(e.props.children)?ui(e,{children:e.props.children.split("").join(n)}):typeof e=="string"?B3(e)?I("span",{children:e.split("").join(n)}):I("span",{children:e}):KB(e)?I("span",{children:e}):e}}function zle(e,t){var n=!1,r=[];return w.exports.Children.forEach(e,function(i){var o=nn(i),s=o==="string"||o==="number";if(n&&s){var a=r.length-1,u=r[a];r[a]="".concat(u).concat(i)}else r.push(i);n=s}),w.exports.Children.map(r,function(i){return Fle(i,t)})}Yo("default","primary","ghost","dashed","link","text");Yo("default","circle","round");Yo("submit","button","reset");function f7(e){return e==="danger"?{danger:!0}:{type:e}}var $le=function(t,n){var r,i=t.loading,o=i===void 0?!1:i,s=t.prefixCls,a=t.type,u=a===void 0?"default":a,d=t.danger,p=t.shape,m=p===void 0?"default":p,v=t.size,x=t.disabled,_=t.className,P=t.children,k=t.icon,T=t.ghost,M=T===void 0?!1:T,O=t.block,N=O===void 0?!1:O,L=t.htmlType,F=L===void 0?"button":L,V=Nle(t,["loading","prefixCls","type","danger","shape","size","disabled","className","children","icon","ghost","block","htmlType"]),B=w.exports.useContext(Hs),H=w.exports.useContext(Il),G=x!=null?x:H,ee=w.exports.useContext(d7),X=w.exports.useState(!!o),Z=Le(X,2),Q=Z[0],le=Z[1],ne=w.exports.useState(!1),se=Le(ne,2),oe=se[0],he=se[1],_e=w.exports.useContext(On),be=_e.getPrefixCls,xe=_e.autoInsertSpaceInButton,Te=_e.direction,Ee=n||w.exports.createRef(),Ce=function(){return w.exports.Children.count(P)===1&&!k&&!FC(u)},ke=function(){if(!(!Ee||!Ee.current||xe===!1)){var _t=Ee.current.textContent;Ce()&&B3(_t)?oe||he(!0):oe&&he(!1)}},De=typeof o=="boolean"?o:(o==null?void 0:o.delay)||!0;w.exports.useEffect(function(){var dt=null;return typeof De=="number"?dt=window.setTimeout(function(){dt=null,le(De)},De):le(De),function(){dt&&(window.clearTimeout(dt),dt=null)}},[De]),w.exports.useEffect(ke,[Ee]);var Ke=function(_t){var Dt=t.onClick;if(Q||G){_t.preventDefault();return}Dt==null||Dt(_t)},Ue=be("btn",s),tt=xe!==!1,lt=xf(Ue,Te),St=lt.compactSize,We=lt.compactItemClassnames,bt={large:"lg",small:"sm",middle:void 0},Qe=St||ee||v||B,mt=Qe&&bt[Qe]||"",ct=Q?"loading":k,wt=Ci(V,["navigate"]),rt=He(Ue,(r={},re(r,"".concat(Ue,"-").concat(m),m!=="default"&&m),re(r,"".concat(Ue,"-").concat(u),u),re(r,"".concat(Ue,"-").concat(mt),mt),re(r,"".concat(Ue,"-icon-only"),!P&&P!==0&&!!ct),re(r,"".concat(Ue,"-background-ghost"),M&&!FC(u)),re(r,"".concat(Ue,"-loading"),Q),re(r,"".concat(Ue,"-two-chinese-chars"),oe&&tt&&!Q),re(r,"".concat(Ue,"-block"),N),re(r,"".concat(Ue,"-dangerous"),!!d),re(r,"".concat(Ue,"-rtl"),Te==="rtl"),re(r,"".concat(Ue,"-disabled"),wt.href!==void 0&&G),r),We,_),ut=k&&!Q?k:I(Ole,{existIcon:!!k,prefixCls:Ue,loading:!!Q}),nt=P||P===0?zle(P,Ce()&&tt):null;if(wt.href!==void 0)return $e("a",{...wt,className:rt,onClick:Ke,ref:Ee,children:[ut,nt]});var qe=$e("button",{...V,type:F,className:rt,onClick:Ke,disabled:G,ref:Ee,children:[ut,nt]});return FC(u)?qe:I(kle,{disabled:!!Q,children:qe})},tT=w.exports.forwardRef($le);tT.Group=Ale;tT.__ANT_BUTTON=!0;const $n=tT;var h7=function(t){if(Mo()&&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},Ble=function(t,n){if(!h7(t))return!1;var r=document.createElement("div"),i=r.style[t];return r.style[t]=n,r.style[t]!==i};function V3(e,t){return!Array.isArray(e)&&t!==void 0?Ble(e,t):h7(e)}var p7=function(){return Mo()&&window.document.documentElement},rx,Vle=function(){if(!p7())return!1;if(rx!==void 0)return rx;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),rx=t.scrollHeight===1,document.body.removeChild(t),rx};const m7=function(){var e=w.exports.useState(!1),t=Le(e,2),n=t[0],r=t[1];return w.exports.useEffect(function(){r(Vle())},[]),n};function Ule(e){var t=e.className,n=e.direction,r=e.index,i=e.marginDirection,o=e.children,s=e.split,a=e.wrap,u=w.exports.useContext(g7),d=u.horizontalSize,p=u.verticalSize,m=u.latestIndex,v=u.supportFlexGap,x={};return v||(n==="vertical"?r<m&&(x={marginBottom:d/(s?2:1)}):x=ze(ze({},r<m&&re({},i,d/(s?2:1))),a&&{paddingBottom:p})),o==null?null:$e(Tn,{children:[I("div",{className:t,style:x,children:o}),r<m&&s&&I("span",{className:"".concat(t,"-split"),style:x,children:s})]})}var jle=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},g7=w.exports.createContext({latestIndex:0,horizontalSize:0,verticalSize:0,supportFlexGap:!1}),Hle={small:8,middle:16,large:24};function Kle(e){return typeof e=="string"?Hle[e]:e||0}var Wle=function(t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.space,s=r.direction,a=t.size,u=a===void 0?(o==null?void 0:o.size)||"small":a,d=t.align,p=t.className,m=t.children,v=t.direction,x=v===void 0?"horizontal":v,_=t.prefixCls,P=t.split,k=t.style,T=t.wrap,M=T===void 0?!1:T,O=jle(t,["size","align","className","children","direction","prefixCls","split","style","wrap"]),N=m7(),L=w.exports.useMemo(function(){return(Array.isArray(u)?u:[u,u]).map(function(he){return Kle(he)})},[u]),F=Le(L,2),V=F[0],B=F[1],H=yo(m,{keepEmpty:!0}),G=d===void 0&&x==="horizontal"?"center":d,ee=i("space",_),X=He(ee,"".concat(ee,"-").concat(x),(n={},re(n,"".concat(ee,"-rtl"),s==="rtl"),re(n,"".concat(ee,"-align-").concat(G),G),n),p),Z="".concat(ee,"-item"),Q=s==="rtl"?"marginLeft":"marginRight",le=0,ne=H.map(function(he,_e){he!=null&&(le=_e);var be=he&&he.key||"".concat(Z,"-").concat(_e);return I(Ule,{className:Z,direction:x,index:_e,marginDirection:Q,split:P,wrap:M,children:he},be)}),se=w.exports.useMemo(function(){return{horizontalSize:V,verticalSize:B,latestIndex:le,supportFlexGap:N}},[V,B,le,N]);if(H.length===0)return null;var oe={};return M&&(oe.flexWrap="wrap",N||(oe.marginBottom=-B)),N&&(oe.columnGap=V,oe.rowGap=B),I("div",{className:X,style:ze(ze({},oe),k),...O,children:I(g7.Provider,{value:se,children:ne})})},v7=Wle;v7.Compact=ose;const Gle=v7;var qle=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},y7=function(t){var n=w.exports.useContext(On),r=n.getPopupContainer,i=n.getPrefixCls,o=n.direction,s=t.prefixCls,a=t.type,u=a===void 0?"default":a,d=t.danger,p=t.disabled,m=t.loading,v=t.onClick,x=t.htmlType,_=t.children,P=t.className,k=t.menu,T=t.arrow,M=t.autoFocus,O=t.overlay,N=t.trigger,L=t.align,F=t.visible,V=t.open,B=t.onVisibleChange,H=t.onOpenChange,G=t.placement,ee=t.getPopupContainer,X=t.href,Z=t.icon,Q=Z===void 0?I(U9,{}):Z,le=t.title,ne=t.buttonsRender,se=ne===void 0?function(mt){return mt}:ne,oe=t.mouseEnterDelay,he=t.mouseLeaveDelay,_e=t.overlayClassName,be=t.overlayStyle,xe=t.destroyPopupOnHide,Te=qle(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),Ce={menu:k,arrow:T,autoFocus:M,align:L,disabled:p,trigger:p?[]:N,onOpenChange:H||B,getPopupContainer:ee||r,mouseEnterDelay:oe,mouseLeaveDelay:he,overlayClassName:_e,overlayStyle:be,destroyPopupOnHide:xe},ke=xf(Ee,o),De=ke.compactSize,Ke=ke.compactItemClassnames,Ue=He(Ee,Ke,P);"overlay"in t&&(Ce.overlay=O),"open"in t?Ce.open=V:"visible"in t&&(Ce.open=F),"placement"in t?Ce.placement=G:Ce.placement=o==="rtl"?"bottomLeft":"bottomRight";var tt=I($n,{type:u,danger:d,disabled:p,loading:m,onClick:v,htmlType:x,href:X,title:le,children:_}),lt=I($n,{type:u,danger:d,icon:Q}),St=se([tt,lt]),We=Le(St,2),bt=We[0],Qe=We[1];return $e(Gle.Compact,{className:Ue,size:De,block:!0,...Te,children:[bt,I(qv,{...Ce,children:Qe})]})};y7.__ANT_BUTTON=!0;const Zle=y7;Yo("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight","top","bottom");var x7=function(t){var n=w.exports.useContext(On),r=n.getPopupContainer,i=n.getPrefixCls,o=n.direction,s=function(){var ke=i(),De=t.placement,Ke=De===void 0?"":De,Ue=t.transitionName;return Ue!==void 0?Ue:Ke.includes("top")?"".concat(ke,"-slide-down"):"".concat(ke,"-slide-up")},a=function(){var ke=t.placement;if(!ke)return o==="rtl"?"bottomRight":"bottomLeft";if(ke.includes("Center")){var De=ke.slice(0,ke.indexOf("Center"));return De}return ke},u=t.menu,d=t.arrow,p=t.prefixCls,m=t.children,v=t.trigger,x=t.disabled,_=t.dropdownRender,P=t.getPopupContainer,k=t.overlayClassName,T=t.visible,M=t.open,O=t.onVisibleChange,N=t.onOpenChange,L=t.mouseEnterDelay,F=L===void 0?.15:L,V=t.mouseLeaveDelay,B=V===void 0?.1:V,H=t.autoAdjustOverflow,G=H===void 0?!0:H,ee=i("dropdown",p),X=w.exports.Children.only(m),Z=ui(X,{className:He("".concat(ee,"-trigger"),re({},"".concat(ee,"-rtl"),o==="rtl"),X.props.className),disabled:x}),Q=x?[]:v,le;Q&&Q.includes("contextMenu")&&(le=!0);var ne=ki(!1,{value:M!==void 0?M:T}),se=Le(ne,2),oe=se[0],he=se[1],_e=hv(function(Ce){O==null||O(Ce),N==null||N(Ce),he(Ce)}),be=He(k,re({},"".concat(ee,"-rtl"),o==="rtl")),xe=B9({arrowPointAtCenter:nn(d)==="object"&&d.pointAtCenter,autoAdjustOverflow:G}),Te=w.exports.useCallback(function(){he(!1)},[]),Ee=function(){var ke=t.overlay,De;return u!=null&&u.items?De=I(u7,{...u}):typeof ke=="function"?De=ke():De=ke,_&&(De=_(De)),De=w.exports.Children.only(typeof De=="string"?I("span",{children:De}):De),I(l7,{prefixCls:"".concat(ee,"-menu"),expandIcon:I("span",{className:"".concat(ee,"-menu-submenu-arrow"),children:I(K_,{className:"".concat(ee,"-menu-submenu-arrow-icon")})}),mode:"vertical",selectable:!1,onClick:Te,validator:function(Ue){Ue.mode},children:I(rp,{children:De})})};return I(Ele,{alignPoint:le,...t,mouseEnterDelay:F,mouseLeaveDelay:B,visible:oe,builtinPlacements:xe,arrow:!!d,overlayClassName:be,prefixCls:ee,getPopupContainer:P||r,transitionName:s(),trigger:Q,overlay:Ee,placement:a(),onVisibleChange:_e,children:Z})};x7.Button=Zle;const qv=x7;var Xle=typeof ru=="object"&&ru&&ru.Object===Object&&ru,b7=Xle,Yle=b7,Qle=typeof self=="object"&&self&&self.Object===Object&&self,Jle=Yle||Qle||Function("return this")(),Tl=Jle,eue=Tl,tue=eue.Symbol,nT=tue,nue=Array.isArray,rT=nue,bO=nT,_7=Object.prototype,rue=_7.hasOwnProperty,iue=_7.toString,Vm=bO?bO.toStringTag:void 0;function oue(e){var t=rue.call(e,Vm),n=e[Vm];try{e[Vm]=void 0;var r=!0}catch{}var i=iue.call(e);return r&&(t?e[Vm]=n:delete e[Vm]),i}var aue=oue,sue=Object.prototype,lue=sue.toString;function uue(e){return lue.call(e)}var cue=uue,_O=nT,due=aue,fue=cue,hue="[object Null]",pue="[object Undefined]",wO=_O?_O.toStringTag:void 0;function mue(e){return e==null?e===void 0?pue:hue:wO&&wO in Object(e)?due(e):fue(e)}var Zv=mue;function gue(e){return e!=null&&typeof e=="object"}var Xv=gue,vue=Zv,yue=Xv,xue="[object Symbol]";function bue(e){return typeof e=="symbol"||yue(e)&&vue(e)==xue}var _ue=bue,wue=/\s/;function Cue(e){for(var t=e.length;t--&&wue.test(e.charAt(t)););return t}var Sue=Cue,Eue=Sue,Pue=/^\s+/;function Iue(e){return e&&e.slice(0,Eue(e)+1).replace(Pue,"")}var Tue=Iue;function kue(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var W_=kue,Mue=Tue,CO=W_,Rue=_ue,SO=0/0,Aue=/^[-+]0x[0-9a-f]+$/i,Due=/^0b[01]+$/i,Oue=/^0o[0-7]+$/i,Nue=parseInt;function Lue(e){if(typeof e=="number")return e;if(Rue(e))return SO;if(CO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=CO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Mue(e);var n=Due.test(e);return n||Oue.test(e)?Nue(e.slice(2),n?2:8):Aue.test(e)?SO:+e}var Fue=Lue,rf=function(t,n,r,i){var o=r?r.call(i,t,n):void 0;if(o!==void 0)return!!o;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var s=Object.keys(t),a=Object.keys(n);if(s.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(n),d=0;d<s.length;d++){var p=s[d];if(!u(p))return!1;var m=t[p],v=n[p];if(o=r?r.call(i,m,v,p):void 0,o===!1||o===void 0&&m!==v)return!1}return!0},w7=w.exports.createContext(null),zue=w7.Provider,C7=w.exports.createContext(null),$ue=C7.Provider,iT=function(e){ci(n,e);var t=di(n);function n(r){var i;Nr(this,n),i=t.call(this,r),i.handleChange=function(s){var a=i.props,u=a.disabled,d=a.onChange;u||("checked"in i.props||i.setState({checked:s.target.checked}),d&&d({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 o="checked"in r?r.checked:r.defaultChecked;return i.state={checked:o},i}return Lr(n,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var i,o=this.props,s=o.prefixCls,a=o.className,u=o.style,d=o.name,p=o.id,m=o.type,v=o.disabled,x=o.readOnly,_=o.tabIndex,P=o.onClick,k=o.onFocus,T=o.onBlur,M=o.onKeyDown,O=o.onKeyPress,N=o.onKeyUp,L=o.autoFocus,F=o.value,V=o.required,B=Rn(o,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","onKeyDown","onKeyPress","onKeyUp","autoFocus","value","required"]),H=Object.keys(B).reduce(function(X,Z){return(Z.substr(0,5)==="aria-"||Z.substr(0,5)==="data-"||Z==="role")&&(X[Z]=B[Z]),X},{}),G=this.state.checked,ee=He(s,a,(i={},re(i,"".concat(s,"-checked"),G),re(i,"".concat(s,"-disabled"),v),i));return $e("span",{className:ee,style:u,children:[I("input",{name:d,id:p,type:m,required:V,readOnly:x,disabled:v,tabIndex:_,className:"".concat(s,"-input"),checked:!!G,onClick:P,onFocus:k,onBlur:T,onKeyUp:N,onKeyDown:M,onKeyPress:O,onChange:this.handleChange,autoFocus:L,ref:this.saveInput,value:F,...H}),I("span",{className:"".concat(s,"-inner")})]})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return"checked"in i?fe(fe({},o),{},{checked:i.checked}):null}}]),n}(w.exports.Component);iT.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){}};var Bue=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},Vue=function(t,n){var r,i=w.exports.useContext(w7),o=w.exports.useContext(C7),s=w.exports.useContext(On),a=s.getPrefixCls,u=s.direction,d=w.exports.useRef(),p=Zo(n,d),m=w.exports.useContext(ga),v=m.isFormItemInput,x=function(G){var ee,X;(ee=t.onChange)===null||ee===void 0||ee.call(t,G),(X=i==null?void 0:i.onChange)===null||X===void 0||X.call(i,G)},_=t.prefixCls,P=t.className,k=t.children,T=t.style,M=t.disabled,O=Bue(t,["prefixCls","className","children","style","disabled"]),N=a("radio",_),L=((i==null?void 0:i.optionType)||o)==="button"?"".concat(N,"-button"):N,F=ze({},O),V=w.exports.useContext(Il);F.disabled=M||V,i&&(F.name=i.name,F.onChange=x,F.checked=t.value===i.value,F.disabled=F.disabled||i.disabled);var B=He("".concat(L,"-wrapper"),(r={},re(r,"".concat(L,"-wrapper-checked"),F.checked),re(r,"".concat(L,"-wrapper-disabled"),F.disabled),re(r,"".concat(L,"-wrapper-rtl"),u==="rtl"),re(r,"".concat(L,"-wrapper-in-form-item"),v),r),P);return $e("label",{className:B,style:T,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,children:[I(iT,{...F,type:"radio",prefixCls:L,ref:p}),k!==void 0?I("span",{children:k}):null]})},Uue=w.exports.forwardRef(Vue);const yb=Uue;var jue=w.exports.forwardRef(function(e,t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=w.exports.useContext(Hs),a=ki(e.defaultValue,{value:e.value}),u=Le(a,2),d=u[0],p=u[1],m=function(se){var oe=d,he=se.target.value;"value"in e||p(he);var _e=e.onChange;_e&&he!==oe&&_e(se)},v=e.prefixCls,x=e.className,_=x===void 0?"":x,P=e.options,k=e.buttonStyle,T=k===void 0?"outline":k,M=e.disabled,O=e.children,N=e.size,L=e.style,F=e.id,V=e.onMouseEnter,B=e.onMouseLeave,H=e.onFocus,G=e.onBlur,ee=i("radio",v),X="".concat(ee,"-group"),Z=O;P&&P.length>0&&(Z=P.map(function(ne){return typeof ne=="string"||typeof ne=="number"?I(yb,{prefixCls:ee,disabled:M,value:ne,checked:d===ne,children:ne},ne.toString()):I(yb,{prefixCls:ee,disabled:ne.disabled||M,value:ne.value,checked:d===ne.value,style:ne.style,children:ne.label},"radio-group-value-options-".concat(ne.value))}));var Q=N||s,le=He(X,"".concat(X,"-").concat(T),(n={},re(n,"".concat(X,"-").concat(Q),Q),re(n,"".concat(X,"-rtl"),o==="rtl"),n),_);return I("div",{...HB(e),className:le,style:L,onMouseEnter:V,onMouseLeave:B,onFocus:H,onBlur:G,id:F,ref:t,children:I(zue,{value:{onChange:m,value:d,disabled:e.disabled,name:e.name,optionType:e.optionType},children:Z})})});const Hue=w.exports.memo(jue);var Kue=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},Wue=function(t,n){var r=w.exports.useContext(On),i=r.getPrefixCls,o=t.prefixCls,s=Kue(t,["prefixCls"]),a=i("radio",o);return I($ue,{value:"button",children:I(yb,{prefixCls:a,...s,type:"radio",ref:n})})};const Gue=w.exports.forwardRef(Wue);var G_=yb;G_.Button=Gue;G_.Group=Hue;G_.__ANT_RADIO=!0;const S7=G_;var que=Tl,Zue=function(){return que.Date.now()},Xue=Zue,Yue=W_,zC=Xue,EO=Fue,Que="Expected a function",Jue=Math.max,ece=Math.min;function tce(e,t,n){var r,i,o,s,a,u,d=0,p=!1,m=!1,v=!0;if(typeof e!="function")throw new TypeError(Que);t=EO(t)||0,Yue(n)&&(p=!!n.leading,m="maxWait"in n,o=m?Jue(EO(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v);function x(F){var V=r,B=i;return r=i=void 0,d=F,s=e.apply(B,V),s}function _(F){return d=F,a=setTimeout(T,t),p?x(F):s}function P(F){var V=F-u,B=F-d,H=t-V;return m?ece(H,o-B):H}function k(F){var V=F-u,B=F-d;return u===void 0||V>=t||V<0||m&&B>=o}function T(){var F=zC();if(k(F))return M(F);a=setTimeout(T,P(F))}function M(F){return a=void 0,v&&r?x(F):(r=i=void 0,s)}function O(){a!==void 0&&clearTimeout(a),d=0,r=u=i=a=void 0}function N(){return a===void 0?s:M(zC())}function L(){var F=zC(),V=k(F);if(r=arguments,i=this,u=F,V){if(a===void 0)return _(u);if(m)return clearTimeout(a),a=setTimeout(T,t),x(u)}return a===void 0&&(a=setTimeout(T,t)),s}return L.cancel=O,L.flush=N,L}var nce=tce;function E7(e,t){var n=new Set;return e.forEach(function(r){t.has(r)||n.add(r)}),n}function rce(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!!(n||r)||i===!1}function ice(e,t,n,r){for(var i=new Set(e),o=new Set,s=0;s<=n;s+=1){var a=t.get(s)||new Set;a.forEach(function(m){var v=m.key,x=m.node,_=m.children,P=_===void 0?[]:_;i.has(v)&&!r(x)&&P.filter(function(k){return!r(k.node)}).forEach(function(k){i.add(k.key)})})}for(var u=new Set,d=n;d>=0;d-=1){var p=t.get(d)||new Set;p.forEach(function(m){var v=m.parent,x=m.node;if(!(r(x)||!m.parent||u.has(m.parent.key))){if(r(m.parent.node)){u.add(v.key);return}var _=!0,P=!1;(v.children||[]).filter(function(k){return!r(k.node)}).forEach(function(k){var T=k.key,M=i.has(T);_&&!M&&(_=!1),!P&&(M||o.has(T))&&(P=!0)}),_&&i.add(v.key),P&&o.add(v.key),u.add(v.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(E7(o,i))}}function oce(e,t,n,r,i){for(var o=new Set(e),s=new Set(t),a=0;a<=r;a+=1){var u=n.get(a)||new Set;u.forEach(function(v){var x=v.key,_=v.node,P=v.children,k=P===void 0?[]:P;!o.has(x)&&!s.has(x)&&!i(_)&&k.filter(function(T){return!i(T.node)}).forEach(function(T){o.delete(T.key)})})}s=new Set;for(var d=new Set,p=r;p>=0;p-=1){var m=n.get(p)||new Set;m.forEach(function(v){var x=v.parent,_=v.node;if(!(i(_)||!v.parent||d.has(v.parent.key))){if(i(v.parent.node)){d.add(x.key);return}var P=!0,k=!1;(x.children||[]).filter(function(T){return!i(T.node)}).forEach(function(T){var M=T.key,O=o.has(M);P&&!O&&(P=!1),!k&&(O||s.has(M))&&(k=!0)}),P||o.delete(x.key),k&&s.add(x.key),d.add(x.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(E7(s,o))}}function uu(e,t,n,r){var i=[],o;r?o=r:o=rce;var s=new Set(e.filter(function(p){var m=!!n[p];return m||i.push(p),m})),a=new Map,u=0;Object.keys(n).forEach(function(p){var m=n[p],v=m.level,x=a.get(v);x||(x=new Set,a.set(v,x)),x.add(m),u=Math.max(u,v)}),Dr(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(p){return"'".concat(p,"'")}).join(", ")));var d;return t===!0?d=ice(s,a,u,o):d=oce(s,t.halfCheckedKeys,a,u,o),d}var oT=w.exports.createContext(null),ace=function(t){for(var n=t.prefixCls,r=t.level,i=t.isStart,o=t.isEnd,s="".concat(n,"-indent-unit"),a=[],u=0;u<r;u+=1){var d;a.push(I("span",{className:He(s,(d={},re(d,"".concat(s,"-start"),i[u]),re(d,"".concat(s,"-end"),o[u]),d))},u))}return I("span",{"aria-hidden":"true",className:"".concat(n,"-indent"),children:a})};const sce=w.exports.memo(ace);var lce=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],PO="open",IO="close",uce="---",cce=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.state={dragNodeHighlight:!1},r.selectHandle=void 0,r.onSelectorClick=function(a){var u=r.props.context.onNodeClick;u(a,Fi(r.props)),r.isSelectable()?r.onSelect(a):r.onCheck(a)},r.onSelectorDoubleClick=function(a){var u=r.props.context.onNodeDoubleClick;u(a,Fi(r.props))},r.onSelect=function(a){if(!r.isDisabled()){var u=r.props.context.onNodeSelect;a.preventDefault(),u(a,Fi(r.props))}},r.onCheck=function(a){if(!r.isDisabled()){var u=r.props,d=u.disableCheckbox,p=u.checked,m=r.props.context.onNodeCheck;if(!(!r.isCheckable()||d)){a.preventDefault();var v=!p;m(a,Fi(r.props),v)}}},r.onMouseEnter=function(a){var u=r.props.context.onNodeMouseEnter;u(a,Fi(r.props))},r.onMouseLeave=function(a){var u=r.props.context.onNodeMouseLeave;u(a,Fi(r.props))},r.onContextMenu=function(a){var u=r.props.context.onNodeContextMenu;u(a,Fi(r.props))},r.onDragStart=function(a){var u=r.props.context.onNodeDragStart;a.stopPropagation(),r.setState({dragNodeHighlight:!0}),u(a,Vn(r));try{a.dataTransfer.setData("text/plain","")}catch{}},r.onDragEnter=function(a){var u=r.props.context.onNodeDragEnter;a.preventDefault(),a.stopPropagation(),u(a,Vn(r))},r.onDragOver=function(a){var u=r.props.context.onNodeDragOver;a.preventDefault(),a.stopPropagation(),u(a,Vn(r))},r.onDragLeave=function(a){var u=r.props.context.onNodeDragLeave;a.stopPropagation(),u(a,Vn(r))},r.onDragEnd=function(a){var u=r.props.context.onNodeDragEnd;a.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(a,Vn(r))},r.onDrop=function(a){var u=r.props.context.onNodeDrop;a.preventDefault(),a.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(a,Vn(r))},r.onExpand=function(a){var u=r.props,d=u.loading,p=u.context.onNodeExpand;d||p(a,Fi(r.props))},r.setSelectHandle=function(a){r.selectHandle=a},r.getNodeState=function(){var a=r.props.expanded;return r.isLeaf()?null:a?PO:IO},r.hasChildren=function(){var a=r.props.eventKey,u=r.props.context.keyEntities,d=u[a]||{},p=d.children;return!!(p||[]).length},r.isLeaf=function(){var a=r.props,u=a.isLeaf,d=a.loaded,p=r.props.context.loadData,m=r.hasChildren();return u===!1?!1:u||!p&&!m||p&&d&&!m},r.isDisabled=function(){var a=r.props.disabled,u=r.props.context.disabled;return!!(u||a)},r.isCheckable=function(){var a=r.props.checkable,u=r.props.context.checkable;return!u||a===!1?!1:u},r.syncLoadData=function(a){var u=a.expanded,d=a.loading,p=a.loaded,m=r.props.context,v=m.loadData,x=m.onNodeLoad;d||v&&u&&!r.isLeaf()&&!r.hasChildren()&&!p&&x(Fi(r.props))},r.isDraggable=function(){var a=r.props,u=a.data,d=a.context.draggable;return!!(d&&(!d.nodeDraggable||d.nodeDraggable(u)))},r.renderDragHandler=function(){var a=r.props.context,u=a.draggable,d=a.prefixCls;return u!=null&&u.icon?I("span",{className:"".concat(d,"-draggable-icon"),children:u.icon}):null},r.renderSwitcherIconDom=function(a){var u=r.props.switcherIcon,d=r.props.context.switcherIcon,p=u||d;return typeof p=="function"?p(fe(fe({},r.props),{},{isLeaf:a})):p},r.renderSwitcher=function(){var a=r.props.expanded,u=r.props.context.prefixCls;if(r.isLeaf()){var d=r.renderSwitcherIconDom(!0);return d!==!1?I("span",{className:He("".concat(u,"-switcher"),"".concat(u,"-switcher-noop")),children:d}):null}var p=He("".concat(u,"-switcher"),"".concat(u,"-switcher_").concat(a?PO:IO)),m=r.renderSwitcherIconDom(!1);return m!==!1?I("span",{onClick:r.onExpand,className:p,children:m}):null},r.renderCheckbox=function(){var a=r.props,u=a.checked,d=a.halfChecked,p=a.disableCheckbox,m=r.props.context.prefixCls,v=r.isDisabled(),x=r.isCheckable();if(!x)return null;var _=typeof x!="boolean"?x:null;return I("span",{className:He("".concat(m,"-checkbox"),u&&"".concat(m,"-checkbox-checked"),!u&&d&&"".concat(m,"-checkbox-indeterminate"),(v||p)&&"".concat(m,"-checkbox-disabled")),onClick:r.onCheck,children:_})},r.renderIcon=function(){var a=r.props.loading,u=r.props.context.prefixCls;return I("span",{className:He("".concat(u,"-iconEle"),"".concat(u,"-icon__").concat(r.getNodeState()||"docu"),a&&"".concat(u,"-icon_loading"))})},r.renderSelector=function(){var a=r.state.dragNodeHighlight,u=r.props,d=u.title,p=u.selected,m=u.icon,v=u.loading,x=u.data,_=r.props.context,P=_.prefixCls,k=_.showIcon,T=_.icon,M=_.loadData,O=_.titleRender,N=r.isDisabled(),L="".concat(P,"-node-content-wrapper"),F;if(k){var V=m||T;F=V?I("span",{className:He("".concat(P,"-iconEle"),"".concat(P,"-icon__customize")),children:typeof V=="function"?V(r.props):V}):r.renderIcon()}else M&&v&&(F=r.renderIcon());var B;typeof d=="function"?B=d(x):O?B=O(x):B=d;var H=I("span",{className:"".concat(P,"-title"),children:B});return $e("span",{ref:r.setSelectHandle,title:typeof d=="string"?d:"",className:He("".concat(L),"".concat(L,"-").concat(r.getNodeState()||"normal"),!N&&(p||a)&&"".concat(P,"-node-selected")),onMouseEnter:r.onMouseEnter,onMouseLeave:r.onMouseLeave,onContextMenu:r.onContextMenu,onClick:r.onSelectorClick,onDoubleClick:r.onSelectorDoubleClick,children:[F,H,r.renderDropIndicator()]})},r.renderDropIndicator=function(){var a=r.props,u=a.disabled,d=a.eventKey,p=r.props.context,m=p.draggable,v=p.dropLevelOffset,x=p.dropPosition,_=p.prefixCls,P=p.indent,k=p.dropIndicatorRender,T=p.dragOverNodeKey,M=p.direction,O=!!m,N=!u&&O&&T===d;return N?k({dropPosition:x,dropLevelOffset:v,indent:P,prefixCls:_,direction:M}):null},r}return Lr(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,o=this.props.context.selectable;return typeof i=="boolean"?i:o}},{key:"render",value:function(){var i,o=this.props,s=o.eventKey,a=o.className,u=o.style,d=o.dragOver,p=o.dragOverGapTop,m=o.dragOverGapBottom,v=o.isLeaf,x=o.isStart,_=o.isEnd,P=o.expanded,k=o.selected,T=o.checked,M=o.halfChecked,O=o.loading,N=o.domRef,L=o.active;o.data;var F=o.onMouseMove,V=o.selectable,B=Rn(o,lce),H=this.props.context,G=H.prefixCls,ee=H.filterTreeNode,X=H.keyEntities,Z=H.dropContainerKey,Q=H.dropTargetKey,le=H.draggingNodeKey,ne=this.isDisabled(),se=gu(B,{aria:!0,data:!0}),oe=X[s]||{},he=oe.level,_e=_[_.length-1],be=this.isDraggable(),xe=!ne&&be,Te=le===s,Ee=V!==void 0?{"aria-selected":!!V}:void 0;return $e("div",{ref:N,className:He(a,"".concat(G,"-treenode"),(i={},re(i,"".concat(G,"-treenode-disabled"),ne),re(i,"".concat(G,"-treenode-switcher-").concat(P?"open":"close"),!v),re(i,"".concat(G,"-treenode-checkbox-checked"),T),re(i,"".concat(G,"-treenode-checkbox-indeterminate"),M),re(i,"".concat(G,"-treenode-selected"),k),re(i,"".concat(G,"-treenode-loading"),O),re(i,"".concat(G,"-treenode-active"),L),re(i,"".concat(G,"-treenode-leaf-last"),_e),re(i,"".concat(G,"-treenode-draggable"),be),re(i,"dragging",Te),re(i,"drop-target",Q===s),re(i,"drop-container",Z===s),re(i,"drag-over",!ne&&d),re(i,"drag-over-gap-top",!ne&&p),re(i,"drag-over-gap-bottom",!ne&&m),re(i,"filter-node",ee&&ee(Fi(this.props))),i)),style:u,draggable:xe,"aria-grabbed":Te,onDragStart:xe?this.onDragStart:void 0,onDragEnter:be?this.onDragEnter:void 0,onDragOver:be?this.onDragOver:void 0,onDragLeave:be?this.onDragLeave:void 0,onDrop:be?this.onDrop:void 0,onDragEnd:be?this.onDragEnd:void 0,onMouseMove:F,...Ee,...se,children:[I(sce,{prefixCls:G,level:he,isStart:x,isEnd:_}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector()]})}}]),n}(w.exports.Component),of=function(t){return I(oT.Consumer,{children:function(n){return I(cce,{...t,context:n})}})};of.displayName="TreeNode";of.defaultProps={title:uce};of.isTreeNode=1;function il(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Gl(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function aT(e){return e.split("-")}function P7(e,t){return"".concat(e,"-").concat(t)}function dce(e){return e&&e.type&&e.type.isTreeNode}function fce(e,t){var n=[],r=t[e];function i(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(s){var a=s.key,u=s.children;n.push(a),i(u)})}return i(r.children),n}function hce(e){if(e.parent){var t=aT(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function pce(e){var t=aT(e.pos);return Number(t[t.length-1])===0}function TO(e,t,n,r,i,o,s,a,u,d){var p,m=e.clientX,v=e.clientY,x=e.target.getBoundingClientRect(),_=x.top,P=x.height,k=(d==="rtl"?-1:1)*(((i==null?void 0:i.x)||0)-m),T=(k-12)/r,M=a[n.props.eventKey];if(v<_+P/2){var O=s.findIndex(function(le){return le.key===M.key}),N=O<=0?0:O-1,L=s[N].key;M=a[L]}var F=M.key,V=M,B=M.key,H=0,G=0;if(!u.includes(F))for(var ee=0;ee<T&&hce(M);ee+=1)M=M.parent,G+=1;var X=t.props.data,Z=M.node,Q=!0;return pce(M)&&M.level===0&&v<_+P/2&&o({dragNode:X,dropNode:Z,dropPosition:-1})&&M.key===n.props.eventKey?H=-1:(V.children||[]).length&&u.includes(B)?o({dragNode:X,dropNode:Z,dropPosition:0})?H=0:Q=!1:G===0?T>-1.5?o({dragNode:X,dropNode:Z,dropPosition:1})?H=1:Q=!1:o({dragNode:X,dropNode:Z,dropPosition:0})?H=0:o({dragNode:X,dropNode:Z,dropPosition:1})?H=1:Q=!1:o({dragNode:X,dropNode:Z,dropPosition:1})?H=1:Q=!1,{dropPosition:H,dropLevelOffset:G,dropTargetKey:M.key,dropTargetPos:M.pos,dragOverNodeKey:B,dropContainerKey:H===0?null:((p=M.parent)===null||p===void 0?void 0:p.key)||null,dropAllowed:Q}}function kO(e,t){if(!!e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function $C(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(nn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Dr(!1,"`checkedKeys` is not an array or an object"),null;return t}function U3(e,t){var n=new Set;function r(i){if(!n.has(i)){var o=t[i];if(!!o){n.add(i);var s=o.parent,a=o.node;a.disabled||s&&r(s.key)}}}return(e||[]).forEach(function(i){r(i)}),Pt(n)}var mce=["children"];function Yv(e,t){return e!=null?e:t}function xb(e){var t=e||{},n=t.title,r=t._title,i=t.key,o=t.children,s=n||"title";return{title:s,_title:r||[s],key:i||"key",children:o||"children"}}function I7(e){function t(n){var r=yo(n);return r.map(function(i){if(!dce(i))return Dr(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var o=i.key,s=i.props,a=s.children,u=Rn(s,mce),d=fe({key:o},u),p=t(a);return p.length&&(d.children=p),d}).filter(function(i){return i})}return t(e)}function BC(e,t,n){var r=xb(n),i=r._title,o=r.key,s=r.children,a=new Set(t===!0?[]:t),u=[];function d(p){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(v,x){for(var _=P7(m?m.pos:"0",x),P=Yv(v[o],_),k,T=0;T<i.length;T+=1){var M=i[T];if(v[M]!==void 0){k=v[M];break}}var O=fe(fe({},Ci(v,[].concat(Pt(i),[o,s]))),{},{title:k,key:P,parent:m,pos:_,children:null,data:v,isStart:[].concat(Pt(m?m.isStart:[]),[x===0]),isEnd:[].concat(Pt(m?m.isEnd:[]),[x===p.length-1])});return u.push(O),t===!0||a.has(P)?O.children=d(v[s]||[],O):O.children=[],O})}return d(e),u}function gce(e,t,n){var r={};nn(n)==="object"?r=n:r={externalGetKey:n},r=r||{};var i=r,o=i.childrenPropName,s=i.externalGetKey,a=i.fieldNames,u=xb(a),d=u.key,p=u.children,m=o||p,v;s?typeof s=="string"?v=function(P){return P[s]}:typeof s=="function"&&(v=function(P){return s(P)}):v=function(P,k){return Yv(P[d],k)};function x(_,P,k,T){var M=_?_[m]:e,O=_?P7(k.pos,P):"0",N=_?[].concat(Pt(T),[_]):[];if(_){var L=v(_,O),F={node:_,index:P,pos:O,key:L,parentPos:k.node?k.pos:null,level:k.level+1,nodes:N};t(F)}M&&M.forEach(function(V,B){x(V,B,{node:_,pos:O,level:k?k.level+1:-1},N)})}x(null)}function q_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,o=t.externalGetKey,s=t.childrenPropName,a=t.fieldNames,u=arguments.length>2?arguments[2]:void 0,d=o||u,p={},m={},v={posEntities:p,keyEntities:m};return n&&(v=n(v)||v),gce(e,function(x){var _=x.node,P=x.index,k=x.pos,T=x.key,M=x.parentPos,O=x.level,N=x.nodes,L={node:_,nodes:N,index:P,key:T,pos:k,level:O},F=Yv(T,k);p[k]=L,m[F]=L,L.parent=p[M],L.parent&&(L.parent.children=L.parent.children||[],L.parent.children.push(L)),r&&r(L,v)},{externalGetKey:d,childrenPropName:s,fieldNames:a}),i&&i(v),v}function Tg(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,o=t.loadingKeys,s=t.checkedKeys,a=t.halfCheckedKeys,u=t.dragOverNodeKey,d=t.dropPosition,p=t.keyEntities,m=p[e],v={eventKey:e,expanded:n.indexOf(e)!==-1,selected:r.indexOf(e)!==-1,loaded:i.indexOf(e)!==-1,loading:o.indexOf(e)!==-1,checked:s.indexOf(e)!==-1,halfChecked:a.indexOf(e)!==-1,pos:String(m?m.pos:""),dragOver:u===e&&d===0,dragOverGapTop:u===e&&d===-1,dragOverGapBottom:u===e&&d===1};return v}function Fi(e){var t=e.data,n=e.expanded,r=e.selected,i=e.checked,o=e.loaded,s=e.loading,a=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,p=e.dragOverGapBottom,m=e.pos,v=e.active,x=e.eventKey,_=fe(fe({},t),{},{expanded:n,selected:r,checked:i,loaded:o,loading:s,halfChecked:a,dragOver:u,dragOverGapTop:d,dragOverGapBottom:p,pos:m,active:v,key:x});return"props"in _||Object.defineProperty(_,"props",{get:function(){return Dr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),_}var vce=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},T7=w.exports.createContext(null),yce=function(t,n){var r=t.defaultValue,i=t.children,o=t.options,s=o===void 0?[]:o,a=t.prefixCls,u=t.className,d=t.style,p=t.onChange,m=vce(t,["defaultValue","children","options","prefixCls","className","style","onChange"]),v=w.exports.useContext(On),x=v.getPrefixCls,_=v.direction,P=w.exports.useState(m.value||r||[]),k=Le(P,2),T=k[0],M=k[1],O=w.exports.useState([]),N=Le(O,2),L=N[0],F=N[1];w.exports.useEffect(function(){"value"in m&&M(m.value||[])},[m.value]);var V=function(){return s.map(function(se){return typeof se=="string"||typeof se=="number"?{label:se,value:se}:se})},B=function(se){F(function(oe){return oe.filter(function(he){return he!==se})})},H=function(se){F(function(oe){return[].concat(Pt(oe),[se])})},G=function(se){var oe=T.indexOf(se.value),he=Pt(T);oe===-1?he.push(se.value):he.splice(oe,1),"value"in m||M(he);var _e=V();p==null||p(he.filter(function(be){return L.includes(be)}).sort(function(be,xe){var Te=_e.findIndex(function(Ce){return Ce.value===be}),Ee=_e.findIndex(function(Ce){return Ce.value===xe});return Te-Ee}))},ee=x("checkbox",a),X="".concat(ee,"-group"),Z=Ci(m,["value","disabled"]);s&&s.length>0&&(i=V().map(function(ne){return I($d,{prefixCls:ee,disabled:"disabled"in ne?ne.disabled:m.disabled,value:ne.value,checked:T.includes(ne.value),onChange:ne.onChange,className:"".concat(X,"-item"),style:ne.style,children:ne.label},ne.value.toString())}));var Q={toggleOption:G,value:T,disabled:m.disabled,name:m.name,registerValue:H,cancelValue:B},le=He(X,re({},"".concat(X,"-rtl"),_==="rtl"),u);return I("div",{className:le,style:d,...Z,ref:n,children:I(T7.Provider,{value:Q,children:i})})},xce=w.exports.forwardRef(yce);const bce=w.exports.memo(xce);var _ce=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},wce=function(t,n){var r,i,o=t.prefixCls,s=t.className,a=t.children,u=t.indeterminate,d=u===void 0?!1:u,p=t.style,m=t.onMouseEnter,v=t.onMouseLeave,x=t.skipGroup,_=x===void 0?!1:x,P=t.disabled,k=_ce(t,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),T=w.exports.useContext(On),M=T.getPrefixCls,O=T.direction,N=w.exports.useContext(T7),L=w.exports.useContext(ga),F=L.isFormItemInput,V=w.exports.useContext(Il),B=(i=(N==null?void 0:N.disabled)||P)!==null&&i!==void 0?i:V,H=w.exports.useRef(k.value);w.exports.useEffect(function(){N==null||N.registerValue(k.value)},[]),w.exports.useEffect(function(){if(!_)return k.value!==H.current&&(N==null||N.cancelValue(H.current),N==null||N.registerValue(k.value),H.current=k.value),function(){return N==null?void 0:N.cancelValue(k.value)}},[k.value]);var G=M("checkbox",o),ee=ze({},k);N&&!_&&(ee.onChange=function(){k.onChange&&k.onChange.apply(k,arguments),N.toggleOption&&N.toggleOption({label:a,value:k.value})},ee.name=N.name,ee.checked=N.value.includes(k.value));var X=He((r={},re(r,"".concat(G,"-wrapper"),!0),re(r,"".concat(G,"-rtl"),O==="rtl"),re(r,"".concat(G,"-wrapper-checked"),ee.checked),re(r,"".concat(G,"-wrapper-disabled"),B),re(r,"".concat(G,"-wrapper-in-form-item"),F),r),s),Z=He(re({},"".concat(G,"-indeterminate"),d)),Q=d?"mixed":void 0;return $e("label",{className:X,style:p,onMouseEnter:m,onMouseLeave:v,children:[I(iT,{"aria-checked":Q,...ee,prefixCls:G,className:Z,disabled:B,ref:n}),a!==void 0&&I("span",{children:a})]})},Cce=w.exports.forwardRef(wce);const $d=Cce;var sT=$d;sT.Group=bce;sT.__ANT_CHECKBOX=!0;const bc=sT;var Sce=w.exports.createContext({});const k7=Sce;var Ece=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 Pce(e){return typeof e=="number"?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}var Ice=["xs","sm","md","lg","xl","xxl"],Tce=w.exports.forwardRef(function(e,t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=w.exports.useContext(k7),a=s.gutter,u=s.wrap,d=s.supportFlexGap,p=e.prefixCls,m=e.span,v=e.order,x=e.offset,_=e.push,P=e.pull,k=e.className,T=e.children,M=e.flex,O=e.style,N=Ece(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),L=i("col",p),F={};Ice.forEach(function(ee){var X,Z={},Q=e[ee];typeof Q=="number"?Z.span=Q:nn(Q)==="object"&&(Z=Q||{}),delete N[ee],F=ze(ze({},F),(X={},re(X,"".concat(L,"-").concat(ee,"-").concat(Z.span),Z.span!==void 0),re(X,"".concat(L,"-").concat(ee,"-order-").concat(Z.order),Z.order||Z.order===0),re(X,"".concat(L,"-").concat(ee,"-offset-").concat(Z.offset),Z.offset||Z.offset===0),re(X,"".concat(L,"-").concat(ee,"-push-").concat(Z.push),Z.push||Z.push===0),re(X,"".concat(L,"-").concat(ee,"-pull-").concat(Z.pull),Z.pull||Z.pull===0),re(X,"".concat(L,"-rtl"),o==="rtl"),X))});var V=He(L,(n={},re(n,"".concat(L,"-").concat(m),m!==void 0),re(n,"".concat(L,"-order-").concat(v),v),re(n,"".concat(L,"-offset-").concat(x),x),re(n,"".concat(L,"-push-").concat(_),_),re(n,"".concat(L,"-pull-").concat(P),P),n),k,F),B={};if(a&&a[0]>0){var H=a[0]/2;B.paddingLeft=H,B.paddingRight=H}if(a&&a[1]>0&&!d){var G=a[1]/2;B.paddingTop=G,B.paddingBottom=G}return M&&(B.flex=Pce(M),u===!1&&!B.minWidth&&(B.minWidth=0)),I("div",{...N,style:ze(ze({},B),O),className:V,ref:t,children:T})});const Io=Tce;var kce=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};Yo("top","middle","bottom","stretch");Yo("start","end","center","space-around","space-between","space-evenly");function MO(e,t){var n=w.exports.useState(typeof e=="string"?e:""),r=Le(n,2),i=r[0],o=r[1],s=function(){if(typeof e=="string"&&o(e),nn(e)==="object")for(var u=0;u<fb.length;u++){var d=fb[u];if(!!t[d]){var p=e[d];if(p!==void 0){o(p);return}}}};return w.exports.useEffect(function(){s()},[JSON.stringify(e),t]),i}var Mce=w.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.justify,o=e.align,s=e.className,a=e.style,u=e.children,d=e.gutter,p=d===void 0?0:d,m=e.wrap,v=kce(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),x=w.exports.useContext(On),_=x.getPrefixCls,P=x.direction,k=w.exports.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),T=Le(k,2),M=T[0],O=T[1],N=w.exports.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),L=Le(N,2),F=L[0],V=L[1],B=MO(o,F),H=MO(i,F),G=m7(),ee=w.exports.useRef(p);w.exports.useEffect(function(){var Ee=hb.subscribe(function(Ce){V(Ce);var ke=ee.current||0;(!Array.isArray(ke)&&nn(ke)==="object"||Array.isArray(ke)&&(nn(ke[0])==="object"||nn(ke[1])==="object"))&&O(Ce)});return function(){return hb.unsubscribe(Ee)}},[]);var X=function(){var Ce=[void 0,void 0],ke=Array.isArray(p)?p:[p,void 0];return ke.forEach(function(De,Ke){if(nn(De)==="object")for(var Ue=0;Ue<fb.length;Ue++){var tt=fb[Ue];if(M[tt]&&De[tt]!==void 0){Ce[Ke]=De[tt];break}}else Ce[Ke]=De}),Ce},Z=_("row",r),Q=X(),le=He(Z,(n={},re(n,"".concat(Z,"-no-wrap"),m===!1),re(n,"".concat(Z,"-").concat(H),H),re(n,"".concat(Z,"-").concat(B),B),re(n,"".concat(Z,"-rtl"),P==="rtl"),n),s),ne={},se=Q[0]!=null&&Q[0]>0?Q[0]/-2:void 0,oe=Q[1]!=null&&Q[1]>0?Q[1]/-2:void 0;if(se&&(ne.marginLeft=se,ne.marginRight=se),G){var he=Le(Q,2);ne.rowGap=he[1]}else oe&&(ne.marginTop=oe,ne.marginBottom=oe);var _e=Le(Q,2),be=_e[0],xe=_e[1],Te=w.exports.useMemo(function(){return{gutter:[be,xe],wrap:m,supportFlexGap:G}},[be,xe,m,G]);return I(k7.Provider,{value:Te,children:I("div",{...v,className:le,style:ze(ze({},ne),a),ref:t,children:u})})});const sc=Mce;var M7=w.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.forceRender,o=e.className,s=e.style,a=e.children,u=e.isActive,d=e.role,p=w.exports.useState(u||i),m=Le(p,2),v=m[0],x=m[1];return w.exports.useEffect(function(){(i||u)&&x(!0)},[i,u]),v?I("div",{ref:t,className:He("".concat(r,"-content"),(n={},re(n,"".concat(r,"-content-active"),u),re(n,"".concat(r,"-content-inactive"),!u),n),o),style:s,role:d,children:I("div",{className:"".concat(r,"-content-box"),children:a})}):null});M7.displayName="PanelContent";var Rce=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],R7=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.onItemClick=function(){var a=r.props,u=a.onItemClick,d=a.panelKey;typeof u=="function"&&u(d)},r.handleKeyPress=function(a){(a.key==="Enter"||a.keyCode===13||a.which===13)&&r.onItemClick()},r.renderIcon=function(){var a=r.props,u=a.showArrow,d=a.expandIcon,p=a.prefixCls,m=a.collapsible;if(!u)return null;var v=typeof d=="function"?d(r.props):I("i",{className:"arrow"});return v&&I("div",{className:"".concat(p,"-expand-icon"),onClick:m==="header"||m==="icon"?r.onItemClick:null,children:v})},r.renderTitle=function(){var a=r.props,u=a.header,d=a.prefixCls,p=a.collapsible;return I("span",{className:"".concat(d,"-header-text"),onClick:p==="header"?r.onItemClick:null,children:u})},r}return Lr(n,[{key:"shouldComponentUpdate",value:function(i){return!rf(this.props,i)}},{key:"render",value:function(){var i,o,s=this.props,a=s.className,u=s.id,d=s.style,p=s.prefixCls,m=s.headerClass,v=s.children,x=s.isActive,_=s.destroyInactivePanel,P=s.accordion,k=s.forceRender,T=s.openMotion,M=s.extra,O=s.collapsible,N=Rn(s,Rce),L=O==="disabled",F=O==="header",V=O==="icon",B=He((i={},re(i,"".concat(p,"-item"),!0),re(i,"".concat(p,"-item-active"),x),re(i,"".concat(p,"-item-disabled"),L),i),a),H=He("".concat(p,"-header"),(o={},re(o,m,m),re(o,"".concat(p,"-header-collapsible-only"),F),re(o,"".concat(p,"-icon-collapsible-only"),V),o)),G={className:H,"aria-expanded":x,"aria-disabled":L,onKeyPress:this.handleKeyPress};!F&&!V&&(G.onClick=this.onItemClick,G.role=P?"tab":"button",G.tabIndex=L?-1:0);var ee=M!=null&&typeof M!="boolean";return delete N.header,delete N.panelKey,delete N.onItemClick,delete N.showArrow,delete N.expandIcon,$e("div",{...N,className:B,style:d,id:u,children:[$e("div",{...G,children:[this.renderIcon(),this.renderTitle(),ee&&I("div",{className:"".concat(p,"-extra"),children:M})]}),I(Xo,{visible:x,leavedClassName:"".concat(p,"-content-hidden"),...T,forceRender:k,removeOnLeave:_,children:function(X,Z){var Q=X.className,le=X.style;return I(M7,{ref:Z,prefixCls:p,className:Q,style:le,isActive:x,forceRender:k,role:P?"tabpanel":null,children:v})}})]})}}]),n}(w.exports.Component);R7.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};function RO(e){var t=e;if(!Array.isArray(t)){var n=nn(t);t=n==="number"||n==="string"?[t]:[]}return t.map(function(r){return String(r)})}var Qv=function(e){ci(n,e);var t=di(n);function n(r){var i;Nr(this,n),i=t.call(this,r),i.onClickItem=function(u){var d=i.state.activeKey;if(i.props.accordion)d=d[0]===u?[]:[u];else{d=Pt(d);var p=d.indexOf(u),m=p>-1;m?d.splice(p,1):d.push(u)}i.setActiveKey(d)},i.getNewChild=function(u,d){if(!u)return null;var p=i.state.activeKey,m=i.props,v=m.prefixCls,x=m.openMotion,_=m.accordion,P=m.destroyInactivePanel,k=m.expandIcon,T=m.collapsible,M=u.key||String(d),O=u.props,N=O.header,L=O.headerClass,F=O.destroyInactivePanel,V=O.collapsible,B=!1;_?B=p[0]===M:B=p.indexOf(M)>-1;var H=V!=null?V:T,G={key:M,panelKey:M,header:N,headerClass:L,isActive:B,prefixCls:v,destroyInactivePanel:F!=null?F:P,openMotion:x,accordion:_,children:u.props.children,onItemClick:H==="disabled"?null:i.onClickItem,expandIcon:k,collapsible:H};return typeof u.type=="string"?u:(Object.keys(G).forEach(function(ee){typeof G[ee]>"u"&&delete G[ee]}),w.exports.cloneElement(u,G))},i.getItems=function(){var u=i.props.children;return yo(u).map(i.getNewChild)},i.setActiveKey=function(u){"activeKey"in i.props||i.setState({activeKey:u}),i.props.onChange(i.props.accordion?u[0]:u)};var o=r.activeKey,s=r.defaultActiveKey,a=s;return"activeKey"in r&&(a=o),i.state={activeKey:RO(a)},i}return Lr(n,[{key:"shouldComponentUpdate",value:function(i,o){return!rf(this.props,i)||!rf(this.state,o)}},{key:"render",value:function(){var i,o=this.props,s=o.prefixCls,a=o.className,u=o.style,d=o.accordion,p=He((i={},re(i,s,!0),re(i,a,!!a),i));return I("div",{className:p,style:u,role:d?"tablist":null,children:this.getItems()})}}],[{key:"getDerivedStateFromProps",value:function(i){var o={};return"activeKey"in i&&(o.activeKey=RO(i.activeKey)),o}}]),n}(w.exports.Component);Qv.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1};Qv.Panel=R7;Qv.Panel;var Ace=function(t){var n=w.exports.useContext(On),r=n.getPrefixCls,i=t.prefixCls,o=t.className,s=o===void 0?"":o,a=t.showArrow,u=a===void 0?!0:a,d=r("collapse",i),p=He(re({},"".concat(d,"-no-arrow"),!u),s);return I(Qv.Panel,{...t,prefixCls:d,className:p})};const Dce=Ace;var A7=function(t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=t.prefixCls,a=t.className,u=a===void 0?"":a,d=t.bordered,p=d===void 0?!0:d,m=t.ghost,v=t.expandIconPosition,x=v===void 0?"start":v,_=i("collapse",s),P=w.exports.useMemo(function(){return x==="left"?"start":x==="right"?"end":x},[x]),k=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=t.expandIcon,V=F?F(L):I(K_,{rotate:L.isActive?90:void 0});return ui(V,function(){return{className:He(V.props.className,"".concat(_,"-arrow"))}})},T=He("".concat(_,"-icon-position-").concat(P),(n={},re(n,"".concat(_,"-borderless"),!p),re(n,"".concat(_,"-rtl"),o==="rtl"),re(n,"".concat(_,"-ghost"),!!m),n),u),M=ze(ze({},np),{motionAppear:!1,leavedClassName:"".concat(_,"-content-hidden")}),O=function(){var L=t.children;return yo(L).map(function(F,V){var B;if(!((B=F.props)===null||B===void 0)&&B.disabled){var H=F.key||String(V),G=F.props,ee=G.disabled,X=G.collapsible,Z=ze(ze({},Ci(F.props,["disabled"])),{key:H,collapsible:X!=null?X:ee?"disabled":void 0});return ui(F,Z)}return F})};return I(Qv,{openMotion:M,...t,expandIcon:k,prefixCls:_,className:T,children:O()})};A7.Panel=Dce;const ll=A7;var Oce=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},Nce=function(t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=t.prefixCls,a=t.type,u=a===void 0?"horizontal":a,d=t.orientation,p=d===void 0?"center":d,m=t.orientationMargin,v=t.className,x=t.children,_=t.dashed,P=t.plain,k=Oce(t,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),T=i("divider",s),M=p.length>0?"-".concat(p):p,O=!!x,N=p==="left"&&m!=null,L=p==="right"&&m!=null,F=He(T,"".concat(T,"-").concat(u),(n={},re(n,"".concat(T,"-with-text"),O),re(n,"".concat(T,"-with-text").concat(M),O),re(n,"".concat(T,"-dashed"),!!_),re(n,"".concat(T,"-plain"),!!P),re(n,"".concat(T,"-rtl"),o==="rtl"),re(n,"".concat(T,"-no-default-orientation-margin-left"),N),re(n,"".concat(T,"-no-default-orientation-margin-right"),L),n),v),V=ze(ze({},N&&{marginLeft:m}),L&&{marginRight:m});return I("div",{className:F,...k,role:"separator",children:x&&u!=="vertical"&&I("span",{className:"".concat(T,"-inner-text"),style:V,children:x})})};const Lce=Nce;var D7=w.exports.createContext(null),AO=[];function Fce(e,t){var n=w.exports.useState(function(){if(!Mo())return null;var _=document.createElement("div");return _}),r=Le(n,1),i=r[0],o=w.exports.useRef(!1),s=w.exports.useContext(D7),a=w.exports.useState(AO),u=Le(a,2),d=u[0],p=u[1],m=s||(o.current?void 0:function(_){p(function(P){var k=[_].concat(Pt(P));return k})});function v(){i.parentElement||document.body.appendChild(i),o.current=!0}function x(){var _;(_=i.parentElement)===null||_===void 0||_.removeChild(i),o.current=!1}return wi(function(){return e?s?s(v):v():x(),x},[e]),wi(function(){d.length&&(d.forEach(function(_){return _()}),p(AO))},[d]),[i,m]}var VC;function bb(e){if(typeof document>"u")return 0;if(e||VC===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 o=t.offsetWidth;i===o&&(o=n.clientWidth),document.body.removeChild(n),VC=i-o}return VC}function DO(e){var t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?bb():n}function OO(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:DO(n),height:DO(r)}}function zce(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var $ce="rc-util-locker-".concat(Date.now()),NO=0;function Bce(e){var t=!!e,n=w.exports.useState(function(){return NO+=1,"".concat($ce,"_").concat(NO)}),r=Le(n,1),i=r[0];wi(function(){if(t){var o=bb(),s=zce();jv(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(s?"width: calc(100% - ".concat(o,"px);"):"",`
|
|
|
}`),i)}else _D(i);return function(){_D(i)}},[t,i])}var LO=!1;function Vce(e){return typeof e=="boolean"&&(LO=e),LO}var FO=function(t){return t===!1?!1:!Mo()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},O7=w.exports.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer;e.debug;var o=e.autoDestroy,s=o===void 0?!0:o,a=e.children,u=w.exports.useState(n),d=Le(u,2),p=d[0],m=d[1],v=p||n;w.exports.useEffect(function(){(s||n)&&m(n)},[n,s]);var x=w.exports.useState(function(){return FO(i)}),_=Le(x,2),P=_[0],k=_[1];w.exports.useEffect(function(){var ee=FO(i);k(ee!=null?ee:null)});var T=Fce(v&&!P),M=Le(T,2),O=M[0],N=M[1],L=P!=null?P:O;Bce(r&&n&&Mo()&&(L===O||L===document.body));var F=null;if(a&&vf(a)&&t){var V=a;F=V.ref}var B=l$(F,t);if(!v||!Mo()||P===void 0)return null;var H=L===!1||Vce(),G=a;return t&&(G=w.exports.cloneElement(a,{ref:B})),I(D7.Provider,{value:N,children:H?G:Cl.exports.createPortal(G,L)})});function _b(e){var t=w.exports.useState(e),n=Le(t,2),r=n[0],i=n[1];return w.exports.useEffect(function(){var o=setTimeout(function(){i(e)},e.length?0:10);return function(){clearTimeout(o)}},[e]),r}var zO=[];function UC(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof e=="string"?e:"".concat(n,"-").concat(r),error:e,errorStatus:t}}function N7(e){var t=e.help,n=e.helpStatus,r=e.errors,i=r===void 0?zO:r,o=e.warnings,s=o===void 0?zO:o,a=e.className,u=e.fieldId,d=e.onVisibleChanged,p=w.exports.useContext(jI),m=p.prefixCls,v=w.exports.useContext(On),x=v.getPrefixCls,_="".concat(m,"-item-explain"),P=x(),k=_b(i),T=_b(s),M=w.exports.useMemo(function(){return t!=null?[UC(t,n,"help")]:[].concat(Pt(k.map(function(N,L){return UC(N,"error","error",L)})),Pt(T.map(function(N,L){return UC(N,"warning","warning",L)})))},[t,n,k,T]),O={};return u&&(O.id="".concat(u,"_help")),I(Xo,{motionDeadline:np.motionDeadline,motionName:"".concat(P,"-show-help"),visible:!!M.length,onVisibleChanged:d,children:function(N){var L=N.className,F=N.style;return I("div",{...O,className:He(_,L,a),style:F,role:"alert",children:I(_I,{keys:M,...np,motionName:"".concat(P,"-show-help-item"),component:!1,children:function(V){var B=V.key,H=V.error,G=V.errorStatus,ee=V.className,X=V.style;return I("div",{className:He(ee,re({},"".concat(_,"-").concat(G),G)),style:X,children:H},B)}})})}})}function $O(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function BO(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function jC(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return BO(n.overflowY,t)||BO(n.overflowX,t)||function(r){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)}(e)}return!1}function ix(e,t,n,r,i,o,s,a){return o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0}var VO=function(e,t){var n=window,r=t.scrollMode,i=t.block,o=t.inline,s=t.boundary,a=t.skipOverflowHiddenElements,u=typeof s=="function"?s:function(bt){return bt!==s};if(!$O(e))throw new TypeError("Invalid target");for(var d,p,m=document.scrollingElement||document.documentElement,v=[],x=e;$O(x)&&u(x);){if((x=(p=(d=x).parentElement)==null?d.getRootNode().host||null:p)===m){v.push(x);break}x!=null&&x===document.body&&jC(x)&&!jC(document.documentElement)||x!=null&&jC(x,a)&&v.push(x)}for(var _=n.visualViewport?n.visualViewport.width:innerWidth,P=n.visualViewport?n.visualViewport.height:innerHeight,k=window.scrollX||pageXOffset,T=window.scrollY||pageYOffset,M=e.getBoundingClientRect(),O=M.height,N=M.width,L=M.top,F=M.right,V=M.bottom,B=M.left,H=i==="start"||i==="nearest"?L:i==="end"?V:L+O/2,G=o==="center"?B+N/2:o==="end"?F:B,ee=[],X=0;X<v.length;X++){var Z=v[X],Q=Z.getBoundingClientRect(),le=Q.height,ne=Q.width,se=Q.top,oe=Q.right,he=Q.bottom,_e=Q.left;if(r==="if-needed"&&L>=0&&B>=0&&V<=P&&F<=_&&L>=se&&V<=he&&B>=_e&&F<=oe)return ee;var be=getComputedStyle(Z),xe=parseInt(be.borderLeftWidth,10),Te=parseInt(be.borderTopWidth,10),Ee=parseInt(be.borderRightWidth,10),Ce=parseInt(be.borderBottomWidth,10),ke=0,De=0,Ke="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-xe-Ee:0,Ue="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-Te-Ce:0,tt="offsetWidth"in Z?Z.offsetWidth===0?0:ne/Z.offsetWidth:0,lt="offsetHeight"in Z?Z.offsetHeight===0?0:le/Z.offsetHeight:0;if(m===Z)ke=i==="start"?H:i==="end"?H-P:i==="nearest"?ix(T,T+P,P,Te,Ce,T+H,T+H+O,O):H-P/2,De=o==="start"?G:o==="center"?G-_/2:o==="end"?G-_:ix(k,k+_,_,xe,Ee,k+G,k+G+N,N),ke=Math.max(0,ke+T),De=Math.max(0,De+k);else{ke=i==="start"?H-se-Te:i==="end"?H-he+Ce+Ue:i==="nearest"?ix(se,he,le,Te,Ce+Ue,H,H+O,O):H-(se+le/2)+Ue/2,De=o==="start"?G-_e-xe:o==="center"?G-(_e+ne/2)+Ke/2:o==="end"?G-oe+Ee+Ke:ix(_e,oe,ne,xe,Ee+Ke,G,G+N,N);var St=Z.scrollLeft,We=Z.scrollTop;H+=We-(ke=Math.max(0,Math.min(We+ke/lt,Z.scrollHeight-le/lt+Ue))),G+=St-(De=Math.max(0,Math.min(St+De/tt,Z.scrollWidth-ne/tt+Ke)))}ee.push({el:Z,top:ke,left:De})}return ee};function L7(e){return e===Object(e)&&Object.keys(e).length!==0}function Uce(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var i=r.el,o=r.top,s=r.left;i.scroll&&n?i.scroll({top:o,left:s,behavior:t}):(i.scrollTop=o,i.scrollLeft=s)})}function jce(e){return e===!1?{block:"end",inline:"nearest"}:L7(e)?e:{block:"start",inline:"nearest"}}function Hce(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(L7(t)&&typeof t.behavior=="function")return t.behavior(n?VO(e,t):[]);if(!!n){var r=jce(t);return Uce(VO(e,r),r.behavior)}}var Kce=["parentNode"],Wce="form_item";function kg(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function F7(e,t){if(!!e.length){var n=e.join("_");if(t)return"".concat(t,"_").concat(n);var r=Kce.includes(n);return r?"".concat(Wce,"_").concat(n):n}}function UO(e){var t=kg(e);return t.join("_")}function z7(e){var t=pI(),n=Le(t,1),r=n[0],i=w.exports.useRef({}),o=w.exports.useMemo(function(){return e!=null?e:ze(ze({},r),{__INTERNAL__:{itemRef:function(a){return function(u){var d=UO(a);u?i.current[d]=u:delete i.current[d]}}},scrollToField:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=kg(a),p=F7(d,o.__INTERNAL__.name),m=p?document.getElementById(p):null;m&&Hce(m,ze({scrollMode:"if-needed",block:"nearest"},u))},getFieldInstance:function(a){var u=UO(a);return i.current[u]}})},[e,r]);return[o]}var Gce=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},qce=function(t,n){var r,i=w.exports.useContext(Hs),o=w.exports.useContext(Il),s=w.exports.useContext(On),a=s.getPrefixCls,u=s.direction,d=s.form,p=t.prefixCls,m=t.className,v=m===void 0?"":m,x=t.size,_=x===void 0?i:x,P=t.disabled,k=P===void 0?o:P,T=t.form,M=t.colon,O=t.labelAlign,N=t.labelWrap,L=t.labelCol,F=t.wrapperCol,V=t.hideRequiredMark,B=t.layout,H=B===void 0?"horizontal":B,G=t.scrollToFirstError,ee=t.requiredMark,X=t.onFinishFailed,Z=t.name,Q=Gce(t,["prefixCls","className","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name"]),le=w.exports.useMemo(function(){return ee!==void 0?ee:d&&d.requiredMark!==void 0?d.requiredMark:!V},[V,ee,d]),ne=M!=null?M:d==null?void 0:d.colon,se=a("form",p),oe=He(se,(r={},re(r,"".concat(se,"-").concat(H),!0),re(r,"".concat(se,"-hide-required-mark"),le===!1),re(r,"".concat(se,"-rtl"),u==="rtl"),re(r,"".concat(se,"-").concat(_),_),r),v),he=z7(T),_e=Le(he,1),be=_e[0],xe=be.__INTERNAL__;xe.name=Z;var Te=w.exports.useMemo(function(){return{name:Z,labelAlign:O,labelCol:L,labelWrap:N,wrapperCol:F,vertical:H==="vertical",colon:ne,requiredMark:le,itemRef:xe.itemRef,form:be}},[Z,O,L,F,H,ne,le,be]);w.exports.useImperativeHandle(n,function(){return be});var Ee=function(ke){X==null||X(ke);var De={block:"nearest"};G&&ke.errorFields.length&&(nn(G)==="object"&&(De=G),be.scrollToField(ke.errorFields[0].name,De))};return I(VB,{disabled:k,children:I(UB,{size:_,children:I(Rc.Provider,{value:Te,children:I(xp,{id:Z,...Q,name:Z,onFinishFailed:Ee,form:be,className:oe})})})})},Zce=w.exports.forwardRef(qce);const Xce=Zce;var Yce=function(){var t=w.exports.useContext(ga),n=t.status;return{status:n}};const Qce=Yce;function Jce(e){var t=w.exports.useState(e),n=Le(t,2),r=n[0],i=n[1],o=w.exports.useRef(null),s=w.exports.useRef([]),a=w.exports.useRef(!1);w.exports.useEffect(function(){return a.current=!1,function(){a.current=!0,ar.cancel(o.current),o.current=null}},[]);function u(d){a.current||(o.current===null&&(s.current=[],o.current=ar(function(){o.current=null,i(function(p){var m=p;return s.current.forEach(function(v){m=v(m)}),m})})),s.current.push(d))}return[r,u]}function ede(){var e=w.exports.useContext(Rc),t=e.itemRef,n=w.exports.useRef({});function r(i,o){var s=o&&nn(o)==="object"&&o.ref,a=i.join("_");return(n.current.name!==a||n.current.originRef!==s)&&(n.current.name=a,n.current.originRef=s,n.current.ref=Zo(t(i),s)),n.current.ref}return r}var tde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const nde=tde;var $7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:nde})})};$7.displayName="QuestionCircleOutlined";const rde=w.exports.forwardRef($7);var ide=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 ode(e){return e?nn(e)==="object"&&!w.exports.isValidElement(e)?e:{title:e}:null}var ade=function(t){var n=t.prefixCls,r=t.label,i=t.htmlFor,o=t.labelCol,s=t.labelAlign,a=t.colon,u=t.required,d=t.requiredMark,p=t.tooltip,m=A$("Form"),v=Le(m,1),x=v[0];return r?I(Rc.Consumer,{children:function(_){var P,k=_.vertical,T=_.labelAlign,M=_.labelCol,O=_.labelWrap,N=_.colon,L,F=o||M||{},V=s||T,B="".concat(n,"-item-label"),H=He(B,V==="left"&&"".concat(B,"-left"),F.className,re({},"".concat(B,"-wrap"),!!O)),G=r,ee=a===!0||N!==!1&&a!==!1,X=ee&&!k;X&&typeof r=="string"&&r.trim()!==""&&(G=r.replace(/[:|:]\s*$/,""));var Z=ode(p);if(Z){var Q=Z.icon,le=Q===void 0?I(rde,{}):Q,ne=ide(Z,["icon"]),se=I($i,{...ne,children:w.exports.cloneElement(le,{className:"".concat(n,"-item-tooltip"),title:""})});G=$e(Tn,{children:[G,se]})}d==="optional"&&!u&&(G=$e(Tn,{children:[G,I("span",{className:"".concat(n,"-item-optional"),title:"",children:(x==null?void 0:x.optional)||((L=gs.Form)===null||L===void 0?void 0:L.optional)})]}));var oe=He((P={},re(P,"".concat(n,"-item-required"),u),re(P,"".concat(n,"-item-required-mark-optional"),d==="optional"),re(P,"".concat(n,"-item-no-colon"),!ee),P));return I(Io,{...F,className:H,children:I("label",{htmlFor:i,className:oe,title:typeof r=="string"?r:"",children:G})})}},"label"):null};const sde=ade;var lde=function(t){var n=t.prefixCls,r=t.status,i=t.wrapperCol,o=t.children,s=t.errors,a=t.warnings,u=t._internalItemRender,d=t.extra,p=t.help,m=t.fieldId,v=t.marginBottom,x=t.onErrorVisibleChanged,_="".concat(n,"-item"),P=w.exports.useContext(Rc),k=i||P.wrapperCol||{},T=He("".concat(_,"-control"),k.className),M=w.exports.useMemo(function(){return ze({},P)},[P]);delete M.labelCol,delete M.wrapperCol;var O=I("div",{className:"".concat(_,"-control-input"),children:I("div",{className:"".concat(_,"-control-input-content"),children:o})}),N=w.exports.useMemo(function(){return{prefixCls:n,status:r}},[n,r]),L=v!==null||s.length||a.length?$e("div",{style:{display:"flex",flexWrap:"nowrap"},children:[I(jI.Provider,{value:N,children:I(N7,{fieldId:m,errors:s,warnings:a,help:p,helpStatus:r,className:"".concat(_,"-explain-connected"),onVisibleChanged:x})}),!!v&&I("div",{style:{width:0,height:v}})]}):null,F={};m&&(F.id="".concat(m,"_extra"));var V=d?I("div",{...F,className:"".concat(_,"-extra"),children:d}):null,B=u&&u.mark==="pro_table_render"&&u.render?u.render(t,{input:O,errorList:L,extra:V}):$e(Tn,{children:[O,L,V]});return I(Rc.Provider,{value:M,children:I(Io,{...k,className:T,children:B})})};const ude=lde;var cde=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},dde={success:O_,warning:yI,error:yf,validating:Mc};function fde(e){var t,n=e.prefixCls,r=e.className,i=e.style,o=e.help,s=e.errors,a=e.warnings,u=e.validateStatus,d=e.meta,p=e.hasFeedback,m=e.hidden,v=e.children,x=e.fieldId,_=e.isRequired,P=e.onSubItemMetaChange,k=cde(e,["prefixCls","className","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","isRequired","onSubItemMetaChange"]),T="".concat(n,"-item"),M=w.exports.useContext(Rc),O=M.requiredMark,N=w.exports.useRef(null),L=_b(s),F=_b(a),V=o!=null,B=!!(V||s.length||a.length),H=w.exports.useState(null),G=Le(H,2),ee=G[0],X=G[1];wi(function(){if(B&&N.current){var se=getComputedStyle(N.current);X(parseInt(se.marginBottom,10))}},[B]);var Z=function(oe){oe||X(null)},Q="";u!==void 0?Q=u:d.validating?Q="validating":L.length?Q="error":F.length?Q="warning":d.touched&&(Q="success");var le=w.exports.useMemo(function(){var se;if(p){var oe=Q&&dde[Q];se=oe?I("span",{className:He("".concat(T,"-feedback-icon"),"".concat(T,"-feedback-icon-").concat(Q)),children:I(oe,{})}):null}return{status:Q,hasFeedback:p,feedbackIcon:se,isFormItemInput:!0}},[Q,p]),ne=(t={},re(t,T,!0),re(t,"".concat(T,"-with-help"),V||L.length||F.length),re(t,"".concat(r),!!r),re(t,"".concat(T,"-has-feedback"),Q&&p),re(t,"".concat(T,"-has-success"),Q==="success"),re(t,"".concat(T,"-has-warning"),Q==="warning"),re(t,"".concat(T,"-has-error"),Q==="error"),re(t,"".concat(T,"-is-validating"),Q==="validating"),re(t,"".concat(T,"-hidden"),m),t);return $e("div",{className:He(ne),style:i,ref:N,children:[$e(sc,{className:"".concat(T,"-row"),...Ci(k,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","required","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol"]),children:[I(sde,{htmlFor:x,required:_,requiredMark:O,...e,prefixCls:n}),I(ude,{...e,...d,errors:L,warnings:F,prefixCls:n,status:Q,help:o,marginBottom:ee,onErrorVisibleChanged:Z,children:I(T9.Provider,{value:P,children:I(ga.Provider,{value:le,children:v})})})]}),!!ee&&I("div",{className:"".concat(T,"-margin-offset"),style:{marginBottom:-ee}})]})}var hde="__SPLIT__";Yo("success","warning","error","validating","");var pde=w.exports.memo(function(e){var t=e.children;return t},function(e,t){return e.value===t.value&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every(function(n,r){return n===t.childProps[r]})});function mde(e){return e!=null}function jO(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[]}}function gde(e){var t=e.name,n=e.noStyle,r=e.dependencies,i=e.prefixCls,o=e.shouldUpdate,s=e.rules,a=e.children,u=e.required,d=e.label,p=e.messageVariables,m=e.trigger,v=m===void 0?"onChange":m,x=e.validateTrigger,_=e.hidden,P=w.exports.useContext(On),k=P.getPrefixCls,T=w.exports.useContext(Rc),M=T.name,O=typeof a=="function",N=w.exports.useContext(T9),L=w.exports.useContext(nf),F=L.validateTrigger,V=x!==void 0?x:F,B=mde(t),H=k("form",i),G=w.exports.useContext(E$),ee=w.exports.useRef(),X=Jce({}),Z=Le(X,2),Q=Z[0],le=Z[1],ne=vl(function(){return jO()}),se=Le(ne,2),oe=se[0],he=se[1],_e=function(tt){var lt=G==null?void 0:G.getKey(tt.name);if(he(tt.destroy?jO():tt,!0),n&&N){var St=tt.name;if(tt.destroy)St=ee.current||St;else if(lt!==void 0){var We=Le(lt,2),bt=We[0],Qe=We[1];St=[bt].concat(Pt(Qe)),ee.current=St}N(tt,St)}},be=function(tt,lt){le(function(St){var We=ze({},St),bt=[].concat(Pt(tt.name.slice(0,-1)),Pt(lt)),Qe=bt.join(hde);return tt.destroy?delete We[Qe]:We[Qe]=tt,We})},xe=w.exports.useMemo(function(){var Ue=Pt(oe.errors),tt=Pt(oe.warnings);return Object.values(Q).forEach(function(lt){Ue.push.apply(Ue,Pt(lt.errors||[])),tt.push.apply(tt,Pt(lt.warnings||[]))}),[Ue,tt]},[Q,oe.errors,oe.warnings]),Te=Le(xe,2),Ee=Te[0],Ce=Te[1],ke=ede();function De(Ue,tt,lt){return n&&!_?Ue:I(fde,{...e,prefixCls:H,fieldId:tt,isRequired:lt,errors:Ee,warnings:Ce,meta:oe,onSubItemMetaChange:be,children:Ue},"row")}if(!B&&!O&&!r)return De(a);var Ke={};return typeof d=="string"?Ke.label=d:t&&(Ke.label=String(t)),p&&(Ke=ze(ze({},Ke),p)),I(hI,{...e,messageVariables:Ke,trigger:v,validateTrigger:V,onMetaChange:_e,children:function(Ue,tt,lt){var St=kg(t).length&&tt?tt.name:[],We=F7(St,M),bt=u!==void 0?u:!!(s&&s.some(function(nt){if(nt&&nn(nt)==="object"&&nt.required&&!nt.warningOnly)return!0;if(typeof nt=="function"){var qe=nt(lt);return qe&&qe.required&&!qe.warningOnly}return!1})),Qe=ze({},Ue),mt=null;if(Array.isArray(a)&&B)mt=a;else if(!(O&&(!(o||r)||B))){if(!(r&&!O&&!B))if(Ro(a)){var ct=ze(ze({},a.props),Qe);if(ct.id||(ct.id=We),e.help||Ee.length>0||Ce.length>0||e.extra){var wt=[];(e.help||Ee.length>0)&&wt.push("".concat(We,"_help")),e.extra&&wt.push("".concat(We,"_extra")),ct["aria-describedby"]=wt.join(" ")}Ee.length>0&&(ct["aria-invalid"]="true"),bt&&(ct["aria-required"]="true"),vf(a)&&(ct.ref=ke(St,a));var rt=new Set([].concat(Pt(kg(v)),Pt(kg(V))));rt.forEach(function(nt){ct[nt]=function(){for(var qe,dt,_t,Dt,Nt,jt=arguments.length,Ve=new Array(jt),Ze=0;Ze<jt;Ze++)Ve[Ze]=arguments[Ze];(_t=Qe[nt])===null||_t===void 0||(qe=_t).call.apply(qe,[Qe].concat(Ve)),(Nt=(Dt=a.props)[nt])===null||Nt===void 0||(dt=Nt).call.apply(dt,[Dt].concat(Ve))}});var ut=[ct["aria-required"],ct["aria-invalid"],ct["aria-describedby"]];mt=I(pde,{value:Qe[e.valuePropName||"value"],update:a,childProps:ut,children:ui(a,ct)})}else O&&(o||r)&&!B?mt=a(lt):mt=a}return De(mt,We,bt)}})}var B7=gde;B7.useStatus=Qce;const vde=B7;var yde=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},xde=function(t){var n=t.prefixCls,r=t.children,i=yde(t,["prefixCls","children"]),o=w.exports.useContext(On),s=o.getPrefixCls,a=s("form",n),u=w.exports.useMemo(function(){return{prefixCls:a,status:"error"}},[a]);return I(P$,{...i,children:function(d,p,m){return I(jI.Provider,{value:u,children:r(d.map(function(v){return ze(ze({},v),{fieldKey:v.key})}),p,{errors:m.errors,warnings:m.warnings})})}})};const bde=xde;function _de(){var e=w.exports.useContext(Rc),t=e.form;return t}var wu=Xce;wu.Item=vde;wu.List=bde;wu.ErrorList=N7;wu.useForm=z7;wu.useFormInstance=_de;wu.useWatch=T$;wu.Provider=Zae;wu.create=function(){};const j3=wu;var wde={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 Cde=wde;var V7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Cde})})};V7.displayName="EyeOutlined";const lT=w.exports.forwardRef(V7);function U7(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function H3(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 Sde(){var e=fe({},v1);return e.useId}var HO=0;function Ede(e){var t=w.exports.useState("ssr-id"),n=Le(t,2),r=n[0],i=n[1],o=Sde(),s=o==null?void 0:o();return w.exports.useEffect(function(){if(!o){var a=HO;HO+=1,i("rc_unique_".concat(a))}},[]),e||s||r}function Pde(e){var t=e.prefixCls,n=e.style,r=e.visible,i=e.maskProps,o=e.motionName;return I(Xo,{visible:r,motionName:o,leavedClassName:"".concat(t,"-mask-hidden"),children:function(s,a){var u=s.className,d=s.style;return I("div",{ref:a,style:fe(fe({},d),n),className:He("".concat(t,"-mask"),u),...i})}},"mask")}function KO(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function WO(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 Ide(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=WO(i),n.top+=WO(i,!0),n}const Tde=w.exports.memo(function(e){var t=e.children;return t},function(e,t){var n=t.shouldUpdate;return!n});var GO={width:0,height:0,overflow:"hidden",outline:"none"},kde=Un.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.title,s=e.ariaId,a=e.footer,u=e.closable,d=e.closeIcon,p=e.onClose,m=e.children,v=e.bodyStyle,x=e.bodyProps,_=e.modalRender,P=e.onMouseDown,k=e.onMouseUp,T=e.holderRef,M=e.visible,O=e.forceRender,N=e.width,L=e.height,F=w.exports.useRef(),V=w.exports.useRef();Un.useImperativeHandle(t,function(){return{focus:function(){var Q;(Q=F.current)===null||Q===void 0||Q.focus()},changeActive:function(Q){var le=document,ne=le.activeElement;Q&&ne===V.current?F.current.focus():!Q&&ne===F.current&&V.current.focus()}}});var B={};N!==void 0&&(B.width=N),L!==void 0&&(B.height=L);var H;a&&(H=I("div",{className:"".concat(n,"-footer"),children:a}));var G;o&&(G=I("div",{className:"".concat(n,"-header"),children:I("div",{className:"".concat(n,"-title"),id:s,children:o})}));var ee;u&&(ee=I("button",{type:"button",onClick:p,"aria-label":"Close",className:"".concat(n,"-close"),children:d||I("span",{className:"".concat(n,"-close-x")})}));var X=$e("div",{className:"".concat(n,"-content"),children:[ee,G,I("div",{className:"".concat(n,"-body"),style:v,...x,children:m}),H]});return $e("div",{role:"dialog","aria-labelledby":o?s:null,"aria-modal":"true",ref:T,style:fe(fe({},i),B),className:He(n,r),onMouseDown:P,onMouseUp:k,children:[I("div",{tabIndex:0,ref:F,style:GO,"aria-hidden":"true"}),I(Tde,{shouldUpdate:M||O,children:_?_(X):X}),I("div",{tabIndex:0,ref:V,style:GO,"aria-hidden":"true"})]},"dialog-element")}),j7=w.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.style,o=e.className,s=e.visible,a=e.forceRender,u=e.destroyOnClose,d=e.motionName,p=e.ariaId,m=e.onVisibleChanged,v=e.mousePosition,x=w.exports.useRef(),_=w.exports.useState(),P=Le(_,2),k=P[0],T=P[1],M={};k&&(M.transformOrigin=k);function O(){var N=Ide(x.current);T(v?"".concat(v.x-N.left,"px ").concat(v.y-N.top,"px"):"")}return I(Xo,{visible:s,onVisibleChanged:m,onAppearPrepare:O,onEnterPrepare:O,forceRender:a,motionName:d,removeOnLeave:u,ref:x,children:function(N,L){var F=N.className,V=N.style;return I(kde,{...e,ref:t,title:r,ariaId:p,prefixCls:n,holderRef:L,style:fe(fe(fe({},V),i),M),className:He(o,F)})}})});j7.displayName="Content";function Mde(e){var t=e.prefixCls,n=t===void 0?"rc-dialog":t,r=e.zIndex,i=e.visible,o=i===void 0?!1:i,s=e.keyboard,a=s===void 0?!0:s,u=e.focusTriggerAfterClose,d=u===void 0?!0:u,p=e.wrapStyle,m=e.wrapClassName,v=e.wrapProps,x=e.onClose,_=e.afterClose,P=e.transitionName,k=e.animation,T=e.closable,M=T===void 0?!0:T,O=e.mask,N=O===void 0?!0:O,L=e.maskTransitionName,F=e.maskAnimation,V=e.maskClosable,B=V===void 0?!0:V,H=e.maskStyle,G=e.maskProps,ee=e.rootClassName,X=w.exports.useRef(),Z=w.exports.useRef(),Q=w.exports.useRef(),le=w.exports.useState(o),ne=Le(le,2),se=ne[0],oe=ne[1],he=Ede();function _e(){Kd(Z.current,document.activeElement)||(X.current=document.activeElement)}function be(){if(!Kd(Z.current,document.activeElement)){var tt;(tt=Q.current)===null||tt===void 0||tt.focus()}}function xe(tt){if(tt)be();else{if(oe(!1),N&&X.current&&d){try{X.current.focus({preventScroll:!0})}catch{}X.current=null}se&&(_==null||_())}}function Te(tt){x==null||x(tt)}var Ee=w.exports.useRef(!1),Ce=w.exports.useRef(),ke=function(){clearTimeout(Ce.current),Ee.current=!0},De=function(){Ce.current=setTimeout(function(){Ee.current=!1})},Ke=null;B&&(Ke=function(lt){Ee.current?Ee.current=!1:Z.current===lt.target&&Te(lt)});function Ue(tt){if(a&&tt.keyCode===kt.ESC){tt.stopPropagation(),Te(tt);return}o&&tt.keyCode===kt.TAB&&Q.current.changeActive(!tt.shiftKey)}return w.exports.useEffect(function(){o&&(oe(!0),_e())},[o]),w.exports.useEffect(function(){return function(){clearTimeout(Ce.current)}},[]),$e("div",{className:He("".concat(n,"-root"),ee),...gu(e,{data:!0}),children:[I(Pde,{prefixCls:n,visible:N&&o,motionName:KO(n,L,F),style:fe({zIndex:r},H),maskProps:G}),I("div",{tabIndex:-1,onKeyDown:Ue,className:He("".concat(n,"-wrap"),m),ref:Z,onClick:Ke,style:fe(fe({zIndex:r},p),{},{display:se?null:"none"}),...v,children:I(j7,{...e,onMouseDown:ke,onMouseUp:De,ref:Q,closable:M,ariaId:he,prefixCls:n,visible:o&&se,onClose:Te,onVisibleChanged:xe,motionName:KO(n,P,k)})})]})}var uT=function(t){var n=t.visible,r=t.getContainer,i=t.forceRender,o=t.destroyOnClose,s=o===void 0?!1:o,a=t.afterClose,u=w.exports.useState(n),d=Le(u,2),p=d[0],m=d[1];return w.exports.useEffect(function(){n&&m(!0)},[n]),!i&&s&&!p?null:I(O7,{open:n||i||p,autoDestroy:!1,getContainer:r,autoLock:n||p,children:I(Mde,{...t,destroyOnClose:s,afterClose:function(){a==null||a(),m(!1)}})})};uT.displayName="Dialog";var Rde=["visible","onVisibleChange","getContainer","current","countRender"],cT=w.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:""}),Ade=cT.Provider,Dde=function(t){var n=t.previewPrefixCls,r=n===void 0?"rc-image-preview":n,i=t.children,o=t.icons,s=o===void 0?{}:o,a=t.preview,u=nn(a)==="object"?a:{},d=u.visible,p=d===void 0?void 0:d,m=u.onVisibleChange,v=m===void 0?void 0:m,x=u.getContainer,_=x===void 0?void 0:x,P=u.current,k=P===void 0?0:P,T=u.countRender,M=T===void 0?void 0:T,O=Rn(u,Rde),N=w.exports.useState(new Map),L=Le(N,2),F=L[0],V=L[1],B=w.exports.useState(),H=Le(B,2),G=H[0],ee=H[1],X=ki(!!p,{value:p,onChange:v}),Z=Le(X,2),Q=Z[0],le=Z[1],ne=w.exports.useState(null),se=Le(ne,2),oe=se[0],he=se[1],_e=p!==void 0,be=Array.from(F.keys()),xe=be[k],Te=new Map(Array.from(F).filter(function(ke){var De=Le(ke,2),Ke=De[1].canPreview;return!!Ke}).map(function(ke){var De=Le(ke,2),Ke=De[0],Ue=De[1].url;return[Ke,Ue]})),Ee=function(De,Ke){var Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,tt=function(){V(function(St){var We=new Map(St),bt=We.delete(De);return bt?We:St})};return V(function(lt){return new Map(lt).set(De,{url:Ke,canPreview:Ue})}),tt},Ce=function(De){De.stopPropagation(),le(!1),he(null)};return w.exports.useEffect(function(){ee(xe)},[xe]),w.exports.useEffect(function(){!Q&&_e&&ee(xe)},[xe,_e,Q]),$e(Ade,{value:{isPreviewGroup:!0,previewUrls:Te,setPreviewUrls:V,current:G,setCurrent:ee,setShowPreview:le,setMousePosition:he,registerImage:Ee},children:[i,I(H7,{"aria-hidden":!Q,visible:Q,prefixCls:r,onClose:Ce,mousePosition:oe,src:Te.get(G),icons:s,getContainer:_,countRender:M,...O})]})},r1=1,i1=50,Um=1,Ode=.2,Nde=function(t){var n,r=t.visible,i=t.maskTransitionName,o=t.getContainer,s=t.prefixCls,a=t.rootClassName,u=t.icons,d=t.countRender,p=t.showSwitch,m=t.showProgress,v=t.current,x=t.count,_=t.scale,P=t.onSwitchLeft,k=t.onSwitchRight,T=t.onClose,M=t.onZoomIn,O=t.onZoomOut,N=t.onRotateRight,L=t.onRotateLeft,F=u.rotateLeft,V=u.rotateRight,B=u.zoomIn,H=u.zoomOut,G=u.close,ee=u.left,X=u.right,Z="".concat(s,"-operations-operation"),Q="".concat(s,"-operations-icon"),le=[{icon:G,onClick:T,type:"close"},{icon:B,onClick:M,type:"zoomIn",disabled:_===i1},{icon:H,onClick:O,type:"zoomOut",disabled:_===r1},{icon:V,onClick:N,type:"rotateRight"},{icon:F,onClick:L,type:"rotateLeft"}],ne=$e(Tn,{children:[p&&$e(Tn,{children:[I("div",{className:He("".concat(s,"-switch-left"),re({},"".concat(s,"-switch-left-disabled"),v===0)),onClick:P,children:ee}),I("div",{className:He("".concat(s,"-switch-right"),re({},"".concat(s,"-switch-right-disabled"),v===x-1)),onClick:k,children:X})]}),$e("ul",{className:"".concat(s,"-operations"),children:[m&&I("li",{className:"".concat(s,"-operations-progress"),children:(n=d==null?void 0:d(v+1,x))!==null&&n!==void 0?n:"".concat(v+1," / ").concat(x)}),le.map(function(se){var oe,he=se.icon,_e=se.onClick,be=se.type,xe=se.disabled;return I("li",{className:He(Z,(oe={},re(oe,"".concat(s,"-operations-operation-").concat(be),!0),re(oe,"".concat(s,"-operations-operation-disabled"),!!xe),oe)),onClick:_e,children:w.exports.isValidElement(he)?w.exports.cloneElement(he,{className:Q}):he},be)})]})]});return I(Xo,{visible:r,motionName:i,children:function(se){var oe=se.className,he=se.style;return I(O7,{open:!0,getContainer:o!=null?o:document.body,children:I("div",{className:He("".concat(s,"-operations-wrapper"),oe,a),style:he,children:ne})})}})},qO={x:0,y:0,rotate:0,scale:1};function Lde(e){var t=w.exports.useRef(null),n=w.exports.useRef([]),r=w.exports.useState(qO),i=Le(r,2),o=i[0],s=i[1],a=function(){s(qO)},u=function(m){t.current===null&&(n.current=[],t.current=ar(function(){s(function(v){var x=v;return n.current.forEach(function(_){x=fe(fe({},x),_)}),t.current=null,x})})),n.current.push(fe(fe({},o),m))},d=function(m,v,x){var _=e.current,P=_.width,k=_.height,T=_.offsetWidth,M=_.offsetHeight,O=_.offsetLeft,N=_.offsetTop,L=m,F=o.scale*m;F>i1?(L=i1/o.scale,F=i1):F<r1&&(L=r1/o.scale,F=r1);var V=v!=null?v:innerWidth/2,B=x!=null?x:innerHeight/2,H=L-1,G=H*P*.5,ee=H*k*.5,X=H*(V-o.x-O),Z=H*(B-o.y-N),Q=o.x-(X-G),le=o.y-(Z-ee);if(m<1&&F===1){var ne=T*F,se=M*F,oe=U7(),he=oe.width,_e=oe.height;ne<=he&&se<=_e&&(Q=0,le=0)}u({x:Q,y:le,scale:F})};return{transform:o,resetTransform:a,updateTransform:u,dispatchZoonChange:d}}function ZO(e,t,n,r){var i=t+n,o=(n-r)/2;if(n>r){if(t>0)return re({},e,o);if(t<0&&i<r)return re({},e,-o)}else if(t<0||i>r)return re({},e,t<0?o:-o);return{}}function Fde(e,t,n,r){var i=U7(),o=i.width,s=i.height,a=null;return e<=o&&t<=s?a={x:0,y:0}:(e>o||t>s)&&(a=fe(fe({},ZO("x",n,e,o)),ZO("y",r,t,s))),a}var zde=["prefixCls","src","alt","onClose","afterClose","visible","icons","rootClassName","getContainer","countRender","scaleStep","transitionName","maskTransitionName"],H7=function(t){var n=t.prefixCls,r=t.src,i=t.alt,o=t.onClose;t.afterClose;var s=t.visible,a=t.icons,u=a===void 0?{}:a,d=t.rootClassName,p=t.getContainer,m=t.countRender,v=t.scaleStep,x=v===void 0?.5:v,_=t.transitionName,P=_===void 0?"zoom":_,k=t.maskTransitionName,T=k===void 0?"fade":k,M=Rn(t,zde),O=w.exports.useRef(),N=w.exports.useRef({deltaX:0,deltaY:0,transformX:0,transformY:0}),L=w.exports.useState(!1),F=Le(L,2),V=F[0],B=F[1],H=w.exports.useContext(cT),G=H.previewUrls,ee=H.current,X=H.isPreviewGroup,Z=H.setCurrent,Q=G.size,le=Array.from(G.keys()),ne=le.indexOf(ee),se=X?G.get(ee):r,oe=X&&Q>1,he=X&&Q>=1,_e=Lde(O),be=_e.transform,xe=_e.resetTransform,Te=_e.updateTransform,Ee=_e.dispatchZoonChange,Ce=be.rotate,ke=be.scale,De=He(re({},"".concat(n,"-moving"),V)),Ke=function(){xe()},Ue=function(){Ee(Um+x)},tt=function(){Ee(Um-x)},lt=function(){Te({rotate:Ce+90})},St=function(){Te({rotate:Ce-90})},We=function(qe){qe.preventDefault(),qe.stopPropagation(),ne>0&&Z(le[ne-1])},bt=function(qe){qe.preventDefault(),qe.stopPropagation(),ne<Q-1&&Z(le[ne+1])},Qe=function(){if(s&&V){B(!1);var qe=N.current,dt=qe.transformX,_t=qe.transformY,Dt=be.x!==dt&&be.y!==_t;if(!Dt)return;var Nt=O.current.offsetWidth*ke,jt=O.current.offsetHeight*ke,Ve=O.current.getBoundingClientRect(),Ze=Ve.left,Yt=Ve.top,sn=Ce%180!==0,Gt=Fde(sn?jt:Nt,sn?Nt:jt,Ze,Yt);Gt&&Te(fe({},Gt))}},mt=function(qe){qe.button===0&&(qe.preventDefault(),qe.stopPropagation(),N.current={deltaX:qe.pageX-be.x,deltaY:qe.pageY-be.y,transformX:be.x,transformY:be.y},B(!0))},ct=function(qe){s&&V&&Te({x:qe.pageX-N.current.deltaX,y:qe.pageY-N.current.deltaY})},wt=function(qe){if(!(!s||qe.deltaY==0)){var dt=Math.abs(qe.deltaY/100),_t=Math.min(dt,Ode),Dt=Um+_t*x;qe.deltaY>0&&(Dt=Um/Dt),Ee(Dt,qe.clientX,qe.clientY)}},rt=w.exports.useCallback(function(nt){!s||!oe||(nt.keyCode===kt.LEFT?ne>0&&Z(le[ne-1]):nt.keyCode===kt.RIGHT&&ne<Q-1&&Z(le[ne+1]))},[ne,Q,le,Z,oe,s]),ut=function(qe){s&&(ke!==1?Te({x:0,y:0,scale:1}):Ee(Um+x,qe.clientX,qe.clientY))};return w.exports.useEffect(function(){var nt,qe,dt=la(window,"mouseup",Qe,!1),_t=la(window,"mousemove",ct,!1),Dt=la(window,"keydown",rt,!1);try{window.top!==window.self&&(nt=la(window.top,"mouseup",Qe,!1),qe=la(window.top,"mousemove",ct,!1))}catch{}return function(){var Nt,jt;dt.remove(),_t.remove(),Dt.remove(),(Nt=nt)===null||Nt===void 0||Nt.remove(),(jt=qe)===null||jt===void 0||jt.remove()}},[s,V,rt]),$e(Tn,{children:[I(uT,{transitionName:P,maskTransitionName:T,closable:!1,keyboard:!0,prefixCls:n,onClose:o,afterClose:Ke,visible:s,wrapClassName:De,rootClassName:d,getContainer:p,...M,children:I("div",{className:"".concat(n,"-img-wrapper"),children:I("img",{width:t.width,height:t.height,onWheel:wt,onMouseDown:mt,onDoubleClick:ut,ref:O,className:"".concat(n,"-img"),src:se,alt:i,style:{transform:"translate3d(".concat(be.x,"px, ").concat(be.y,"px, 0) scale3d(").concat(ke,", ").concat(ke,", 1) rotate(").concat(Ce,"deg)")}})})}),I(Nde,{visible:s,maskTransitionName:T,getContainer:p,prefixCls:n,rootClassName:d,icons:u,countRender:m,showSwitch:oe,showProgress:he,current:ne,count:Q,scale:ke,onSwitchLeft:We,onSwitchRight:bt,onZoomIn:Ue,onZoomOut:tt,onRotateRight:lt,onRotateLeft:St,onClose:o})]})},$de=["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"],Bde=["src","visible","onVisibleChange","getContainer","mask","maskClassName","icons","scaleStep"],XO=0,Z_=function(t){var n,r=t.src,i=t.alt,o=t.onPreviewClose,s=t.prefixCls,a=s===void 0?"rc-image":s,u=t.previewPrefixCls,d=u===void 0?"".concat(a,"-preview"):u,p=t.placeholder,m=t.fallback,v=t.width,x=t.height,_=t.style,P=t.preview,k=P===void 0?!0:P,T=t.className,M=t.onClick,O=t.onError,N=t.wrapperClassName,L=t.wrapperStyle,F=t.rootClassName,V=t.crossOrigin,B=t.decoding,H=t.loading,G=t.referrerPolicy,ee=t.sizes,X=t.srcSet,Z=t.useMap,Q=t.draggable,le=Rn(t,$de),ne=p&&p!==!0,se=nn(k)==="object"?k:{},oe=se.src,he=se.visible,_e=he===void 0?void 0:he,be=se.onVisibleChange,xe=be===void 0?o:be,Te=se.getContainer,Ee=Te===void 0?void 0:Te,Ce=se.mask,ke=se.maskClassName,De=se.icons,Ke=se.scaleStep,Ue=Rn(se,Bde),tt=oe!=null?oe:r,lt=_e!==void 0,St=ki(!!_e,{value:_e,onChange:xe}),We=Le(St,2),bt=We[0],Qe=We[1],mt=w.exports.useState(ne?"loading":"normal"),ct=Le(mt,2),wt=ct[0],rt=ct[1],ut=w.exports.useState(null),nt=Le(ut,2),qe=nt[0],dt=nt[1],_t=wt==="error",Dt=w.exports.useContext(cT),Nt=Dt.isPreviewGroup,jt=Dt.setCurrent,Ve=Dt.setShowPreview,Ze=Dt.setMousePosition,Yt=Dt.registerImage,sn=w.exports.useState(function(){return XO+=1,XO}),Gt=Le(sn,1),zt=Gt[0],Rt=!!k,Qt=w.exports.useRef(!1),pn=function(){rt("normal")},ot=function(tn){O&&O(tn),rt("error")},Lt=function(tn){if(!lt){var Bt=H3(tn.target),gt=Bt.left,xt=Bt.top;Nt?(jt(zt),Ze({x:gt,y:xt})):dt({x:gt,y:xt})}Nt?Ve(!0):Qe(!0),M&&M(tn)},Tt=function(tn){tn.stopPropagation(),Qe(!1),lt||dt(null)},Kt=function(tn){Qt.current=!1,wt==="loading"&&tn!=null&&tn.complete&&(tn.naturalWidth||tn.naturalHeight)&&(Qt.current=!0,pn())};w.exports.useEffect(function(){var bn=Yt(zt,tt);return bn},[]),w.exports.useEffect(function(){Yt(zt,tt,Rt)},[tt,Rt]),w.exports.useEffect(function(){_t&&rt("normal"),ne&&!Qt.current&&rt("loading")},[r]);var Zt=He(a,N,F,re({},"".concat(a,"-error"),_t)),ht=_t&&m?m:tt,xn={crossOrigin:V,decoding:B,draggable:Q,loading:H,referrerPolicy:G,sizes:ee,srcSet:X,useMap:Z,alt:i,className:He("".concat(a,"-img"),re({},"".concat(a,"-img-placeholder"),p===!0),T),style:fe({height:x},_)};return $e(Tn,{children:[$e("div",{...le,className:Zt,onClick:Rt?Lt:M,style:fe({width:v,height:x},L),children:[I("img",{...xn,ref:Kt,..._t&&m?{src:m}:{onLoad:pn,onError:ot,src:r},width:v,height:x}),wt==="loading"&&I("div",{"aria-hidden":"true",className:"".concat(a,"-placeholder"),children:p}),Ce&&Rt&&I("div",{className:He("".concat(a,"-mask"),ke),style:{display:((n=xn.style)===null||n===void 0?void 0:n.display)==="none"?"none":void 0},children:Ce})]}),!Nt&&Rt&&I(H7,{"aria-hidden":!bt,visible:bt,prefixCls:d,onClose:Tt,mousePosition:qe,src:ht,alt:i,getContainer:Ee,icons:De,scaleStep:Ke,rootClassName:F,...Ue})]})};Z_.PreviewGroup=Dde;Z_.displayName="Image";var Vde={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 Ude=Vde;var K7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Ude})})};K7.displayName="RotateLeftOutlined";const jde=w.exports.forwardRef(K7);var Hde={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 Kde=Hde;var W7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Kde})})};W7.displayName="RotateRightOutlined";const Wde=w.exports.forwardRef(W7);var Gde={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 qde=Gde;var G7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:qde})})};G7.displayName="ZoomInOutlined";const Zde=w.exports.forwardRef(G7);var Xde={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 Yde=Xde;var q7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Yde})})};q7.displayName="ZoomOutOutlined";const Qde=w.exports.forwardRef(q7);var Jde=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Z7={rotateLeft:I(jde,{}),rotateRight:I(Wde,{}),zoomIn:I(Zde,{}),zoomOut:I(Qde,{}),close:I(_p,{}),left:I(n7,{}),right:I(K_,{})},efe=function(t){var n=t.previewPrefixCls,r=t.preview,i=Jde(t,["previewPrefixCls","preview"]),o=w.exports.useContext(On),s=o.getPrefixCls,a=s("image-preview",n),u=s(),d=w.exports.useMemo(function(){if(r===!1)return r;var p=nn(r)==="object"?r:{};return ze(ze({},p),{transitionName:$a(u,"zoom",p.transitionName),maskTransitionName:$a(u,"fade",p.maskTransitionName)})},[r]);return I(Z_.PreviewGroup,{preview:d,previewPrefixCls:a,icons:Z7,...i})};const tfe=efe;var YO=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},X7=function(t){var n=t.prefixCls,r=t.preview,i=YO(t,["prefixCls","preview"]),o=w.exports.useContext(On),s=o.getPrefixCls,a=o.locale,u=a===void 0?gs:a,d=o.getPopupContainer,p=s("image",n),m=s(),v=u.Image||gs.Image,x=w.exports.useMemo(function(){if(r===!1)return r;var _=nn(r)==="object"?r:{},P=_.getContainer,k=YO(_,["getContainer"]);return ze(ze({mask:$e("div",{className:"".concat(p,"-mask-info"),children:[I(lT,{}),v==null?void 0:v.preview]}),icons:Z7},k),{getContainer:P||d,transitionName:$a(m,"zoom",_.transitionName),maskTransitionName:$a(m,"fade",_.maskTransitionName)})},[r,v]);return I(Z_,{prefixCls:p,preview:x,...i})};X7.PreviewGroup=tfe;const nfe=X7;var rfe=function(t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=t.prefixCls,a=t.className,u=a===void 0?"":a,d=i("input-group",s),p=He(d,(n={},re(n,"".concat(d,"-lg"),t.size==="large"),re(n,"".concat(d,"-sm"),t.size==="small"),re(n,"".concat(d,"-compact"),t.compact),re(n,"".concat(d,"-rtl"),o==="rtl"),n),u),m=w.exports.useContext(ga),v=w.exports.useMemo(function(){return ze(ze({},m),{isFormItemInput:!1})},[m]);return I("span",{className:p,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur,children:I(ga.Provider,{value:v,children:t.children})})};const ife=rfe;function o1(e){return!!(e.addonBefore||e.addonAfter)}function Y7(e){return!!(e.prefix||e.suffix||e.allowClear)}function QO(e,t,n,r){if(!!n){var i=t;if(t.type==="click"){var o=e.cloneNode(!0);i=Object.create(t,{target:{value:o},currentTarget:{value:o}}),o.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 ofe(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 JO(e){return typeof e>"u"||e===null?"":String(e)}var afe=function(t){var n=t.inputElement,r=t.prefixCls,i=t.prefix,o=t.suffix,s=t.addonBefore,a=t.addonAfter,u=t.className,d=t.style,p=t.affixWrapperClassName,m=t.groupClassName,v=t.wrapperClassName,x=t.disabled,_=t.readOnly,P=t.focused,k=t.triggerFocus,T=t.allowClear,M=t.value,O=t.handleReset,N=t.hidden,L=w.exports.useRef(null),F=function(oe){var he;(he=L.current)!==null&&he!==void 0&&he.contains(oe.target)&&(k==null||k())},V=function(){var oe;if(!T)return null;var he=!x&&!_&&M,_e="".concat(r,"-clear-icon"),be=nn(T)==="object"&&T!==null&&T!==void 0&&T.clearIcon?T.clearIcon:"\u2716";return I("span",{onClick:O,onMouseDown:function(Te){return Te.preventDefault()},className:He(_e,(oe={},re(oe,"".concat(_e,"-hidden"),!he),re(oe,"".concat(_e,"-has-suffix"),!!o),oe)),role:"button",tabIndex:-1,children:be})},B=w.exports.cloneElement(n,{value:M,hidden:N});if(Y7(t)){var H,G="".concat(r,"-affix-wrapper"),ee=He(G,(H={},re(H,"".concat(G,"-disabled"),x),re(H,"".concat(G,"-focused"),P),re(H,"".concat(G,"-readonly"),_),re(H,"".concat(G,"-input-with-clear-btn"),o&&T&&M),H),!o1(t)&&u,p),X=(o||T)&&$e("span",{className:"".concat(r,"-suffix"),children:[V(),o]});B=$e("span",{className:ee,style:d,hidden:!o1(t)&&N,onClick:F,ref:L,children:[i&&I("span",{className:"".concat(r,"-prefix"),children:i}),w.exports.cloneElement(n,{style:null,value:M,hidden:null}),X]})}if(o1(t)){var Z="".concat(r,"-group"),Q="".concat(Z,"-addon"),le=He("".concat(r,"-wrapper"),Z,v),ne=He("".concat(r,"-group-wrapper"),u,m);return I("span",{className:ne,style:d,hidden:N,children:$e("span",{className:le,children:[s&&I("span",{className:Q,children:s}),w.exports.cloneElement(B,{style:null,hidden:null}),a&&I("span",{className:Q,children:a})]})})}return B},sfe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName"],lfe=w.exports.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,o=e.onBlur,s=e.onPressEnter,a=e.onKeyDown,u=e.prefixCls,d=u===void 0?"rc-input":u,p=e.disabled,m=e.htmlSize,v=e.className,x=e.maxLength,_=e.suffix,P=e.showCount,k=e.type,T=k===void 0?"text":k,M=e.inputClassName,O=Rn(e,sfe),N=ki(e.defaultValue,{value:e.value}),L=Le(N,2),F=L[0],V=L[1],B=w.exports.useState(!1),H=Le(B,2),G=H[0],ee=H[1],X=w.exports.useRef(null),Z=function(xe){X.current&&ofe(X.current,xe)};w.exports.useImperativeHandle(t,function(){return{focus:Z,blur:function(){var xe;(xe=X.current)===null||xe===void 0||xe.blur()},setSelectionRange:function(xe,Te,Ee){var Ce;(Ce=X.current)===null||Ce===void 0||Ce.setSelectionRange(xe,Te,Ee)},select:function(){var xe;(xe=X.current)===null||xe===void 0||xe.select()},input:X.current}}),w.exports.useEffect(function(){ee(function(be){return be&&p?!1:be})},[p]);var Q=function(xe){e.value===void 0&&V(xe.target.value),X.current&&QO(X.current,xe,r)},le=function(xe){s&&xe.key==="Enter"&&s(xe),a==null||a(xe)},ne=function(xe){ee(!0),i==null||i(xe)},se=function(xe){ee(!1),o==null||o(xe)},oe=function(xe){V(""),Z(),X.current&&QO(X.current,xe,r)},he=function(){var xe=Ci(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName","htmlSize"]);return I("input",{autoComplete:n,...xe,onChange:Q,onFocus:ne,onBlur:se,onKeyDown:le,className:He(d,re({},"".concat(d,"-disabled"),p),M,!o1(e)&&!Y7(e)&&v),ref:X,size:m,type:T})},_e=function(){var xe=Number(x)>0;if(_||P){var Te=JO(F),Ee=Pt(Te).length,Ce=nn(P)==="object"?P.formatter({value:Te,count:Ee,maxLength:x}):"".concat(Ee).concat(xe?" / ".concat(x):"");return $e(Tn,{children:[!!P&&I("span",{className:He("".concat(d,"-show-count-suffix"),re({},"".concat(d,"-show-count-has-suffix"),!!_)),children:Ce}),_]})}return null};return I(afe,{...O,prefixCls:d,className:v,inputElement:he(),handleReset:oe,value:JO(F),focused:G,triggerFocus:Z,suffix:_e(),disabled:p})});function Q7(e,t){var n=w.exports.useRef([]),r=function(){n.current.push(setTimeout(function(){var o,s,a,u;((o=e.current)===null||o===void 0?void 0:o.input)&&((s=e.current)===null||s===void 0?void 0:s.input.getAttribute("type"))==="password"&&((a=e.current)===null||a===void 0?void 0:a.input.hasAttribute("value"))&&((u=e.current)===null||u===void 0||u.input.removeAttribute("value"))}))};return w.exports.useEffect(function(){return t&&r(),function(){return n.current.forEach(function(i){i&&clearTimeout(i)})}},[]),r}function ufe(e){return!!(e.prefix||e.suffix||e.allowClear)}var cfe=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 dfe(e){return typeof e>"u"||e===null?"":String(e)}function HC(e,t,n,r){if(!!n){var i=t;if(t.type==="click"){var o=e.cloneNode(!0);i=Object.create(t,{target:{value:o},currentTarget:{value:o}}),o.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 ffe(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 hfe=w.exports.forwardRef(function(e,t){var n,r,i,o=e.prefixCls,s=e.bordered,a=s===void 0?!0:s,u=e.status,d=e.size,p=e.disabled,m=e.onBlur,v=e.onFocus,x=e.suffix,_=e.allowClear,P=e.addonAfter,k=e.addonBefore,T=e.className,M=e.onChange,O=cfe(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","onChange"]),N=Un.useContext(On),L=N.getPrefixCls,F=N.direction,V=N.input,B=L("input",o),H=w.exports.useRef(null),G=xf(B,F),ee=G.compactSize,X=G.compactItemClassnames,Z=Un.useContext(Hs),Q=ee||d||Z,le=Un.useContext(Il),ne=p!=null?p:le,se=w.exports.useContext(ga),oe=se.status,he=se.hasFeedback,_e=se.feedbackIcon,be=Cp(oe,u),xe=ufe(e)||!!he,Te=w.exports.useRef(xe);w.exports.useEffect(function(){xe&&Te.current,Te.current=xe},[xe]);var Ee=Q7(H,!0),Ce=function(lt){Ee(),m==null||m(lt)},ke=function(lt){Ee(),v==null||v(lt)},De=function(lt){Ee(),M==null||M(lt)},Ke=(he||x)&&$e(Tn,{children:[x,he&&_e]}),Ue;return nn(_)==="object"&&(_==null?void 0:_.clearIcon)?Ue=_:_&&(Ue={clearIcon:I(yf,{})}),I(lfe,{ref:Zo(t,H),prefixCls:B,autoComplete:V==null?void 0:V.autoComplete,...O,disabled:ne||void 0,onBlur:Ce,onFocus:ke,suffix:Ke,allowClear:Ue,className:He(T,X),onChange:De,addonAfter:P&&I(rp,{children:I(mv,{override:!0,status:!0,children:P})}),addonBefore:k&&I(rp,{children:I(mv,{override:!0,status:!0,children:k})}),inputClassName:He((n={},re(n,"".concat(B,"-sm"),Q==="small"),re(n,"".concat(B,"-lg"),Q==="large"),re(n,"".concat(B,"-rtl"),F==="rtl"),re(n,"".concat(B,"-borderless"),!a),n),!xe&&Vs(B,be)),affixWrapperClassName:He((r={},re(r,"".concat(B,"-affix-wrapper-sm"),Q==="small"),re(r,"".concat(B,"-affix-wrapper-lg"),Q==="large"),re(r,"".concat(B,"-affix-wrapper-rtl"),F==="rtl"),re(r,"".concat(B,"-affix-wrapper-borderless"),!a),r),Vs("".concat(B,"-affix-wrapper"),be,he)),wrapperClassName:He(re({},"".concat(B,"-group-rtl"),F==="rtl")),groupClassName:He((i={},re(i,"".concat(B,"-group-wrapper-sm"),Q==="small"),re(i,"".concat(B,"-group-wrapper-lg"),Q==="large"),re(i,"".concat(B,"-group-wrapper-rtl"),F==="rtl"),i),Vs("".concat(B,"-group-wrapper"),be,he))})});const dT=hfe;var pfe={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 mfe=pfe;var J7=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:mfe})})};J7.displayName="EyeInvisibleOutlined";const gfe=w.exports.forwardRef(J7);var vfe=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},yfe=function(t){return t?I(lT,{}):I(gfe,{})},xfe={click:"onClick",hover:"onMouseOver"},bfe=w.exports.forwardRef(function(e,t){var n=e.visibilityToggle,r=n===void 0?!0:n,i=nn(r)==="object"&&r.visible!==void 0,o=w.exports.useState(function(){return i?r.visible:!1}),s=Le(o,2),a=s[0],u=s[1],d=w.exports.useRef(null);w.exports.useEffect(function(){i&&u(r.visible)},[i,r]);var p=Q7(d),m=function(){var P=e.disabled;P||(a&&p(),u(function(k){var T,M=!k;return nn(r)==="object"&&((T=r.onVisibleChange)===null||T===void 0||T.call(r,M)),M}))},v=function(P){var k,T=e.action,M=T===void 0?"click":T,O=e.iconRender,N=O===void 0?yfe:O,L=xfe[M]||"",F=N(a),V=(k={},re(k,L,m),re(k,"className","".concat(P,"-icon")),re(k,"key","passwordIcon"),re(k,"onMouseDown",function(H){H.preventDefault()}),re(k,"onMouseUp",function(H){H.preventDefault()}),k);return w.exports.cloneElement(w.exports.isValidElement(F)?F:I("span",{children:F}),V)},x=function(P){var k=P.getPrefixCls,T=e.className,M=e.prefixCls,O=e.inputPrefixCls,N=e.size,L=vfe(e,["className","prefixCls","inputPrefixCls","size"]),F=k("input",O),V=k("input-password",M),B=r&&v(V),H=He(V,T,re({},"".concat(V,"-").concat(N),!!N)),G=ze(ze({},Ci(L,["suffix","iconRender","visibilityToggle"])),{type:a?"text":"password",className:H,prefixCls:F,suffix:B});return N&&(G.size=N),I(dT,{ref:Zo(t,d),...G})};return I(zc,{children:x})});const _fe=bfe;var wfe=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},Cfe=w.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.inputPrefixCls,o=e.className,s=e.size,a=e.suffix,u=e.enterButton,d=u===void 0?!1:u,p=e.addonAfter,m=e.loading,v=e.disabled,x=e.onSearch,_=e.onChange,P=e.onCompositionStart,k=e.onCompositionEnd,T=wfe(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),M=w.exports.useContext(On),O=M.getPrefixCls,N=M.direction,L=w.exports.useContext(Hs),F=w.exports.useRef(!1),V=O("input-search",r),B=O("input",i),H=xf(V,N),G=H.compactSize,ee=G||s||L,X=w.exports.useRef(null),Z=function(ke){ke&&ke.target&&ke.type==="click"&&x&&x(ke.target.value,ke),_&&_(ke)},Q=function(ke){var De;document.activeElement===((De=X.current)===null||De===void 0?void 0:De.input)&&ke.preventDefault()},le=function(ke){var De,Ke;x&&x((Ke=(De=X.current)===null||De===void 0?void 0:De.input)===null||Ke===void 0?void 0:Ke.value,ke)},ne=function(ke){F.current||m||le(ke)},se=typeof d=="boolean"?I(WI,{}):null,oe="".concat(V,"-button"),he,_e=d||{},be=_e.type&&_e.type.__ANT_BUTTON===!0;be||_e.type==="button"?he=ui(_e,ze({onMouseDown:Q,onClick:function(ke){var De,Ke;(Ke=(De=_e==null?void 0:_e.props)===null||De===void 0?void 0:De.onClick)===null||Ke===void 0||Ke.call(De,ke),le(ke)},key:"enterButton"},be?{className:oe,size:ee}:{})):he=I($n,{className:oe,type:d?"primary":void 0,size:ee,disabled:v,onMouseDown:Q,onClick:le,loading:m,icon:se,children:d},"enterButton"),p&&(he=[he,ui(p,{key:"addonAfter"})]);var xe=He(V,(n={},re(n,"".concat(V,"-rtl"),N==="rtl"),re(n,"".concat(V,"-").concat(ee),!!ee),re(n,"".concat(V,"-with-button"),!!d),n),o),Te=function(ke){F.current=!0,P==null||P(ke)},Ee=function(ke){F.current=!1,k==null||k(ke)};return I(dT,{ref:Zo(X,t),onPressEnter:ne,...T,size:ee,onCompositionStart:Te,onCompositionEnd:Ee,prefixCls:B,addonAfter:he,suffix:a,onChange:Z,className:xe,disabled:v})});const Sfe=Cfe;var Efe=`
|
|
|
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;
|
|
|
`,Pfe=["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"],KC={},Qa;function Ife(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&&KC[n])return KC[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),s=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=Pfe.map(function(d){return"".concat(d,":").concat(r.getPropertyValue(d))}).join(";"),u={sizingStyle:a,paddingSize:o,borderSize:s,boxSizing:i};return t&&n&&(KC[n]=u),u}function Tfe(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;Qa||(Qa=document.createElement("textarea"),Qa.setAttribute("tab-index","-1"),Qa.setAttribute("aria-hidden","true"),document.body.appendChild(Qa)),e.getAttribute("wrap")?Qa.setAttribute("wrap",e.getAttribute("wrap")):Qa.removeAttribute("wrap");var i=Ife(e,t),o=i.paddingSize,s=i.borderSize,a=i.boxSizing,u=i.sizingStyle;Qa.setAttribute("style","".concat(u,";").concat(Efe)),Qa.value=e.value||e.placeholder||"";var d=void 0,p=void 0,m,v=Qa.scrollHeight;if(a==="border-box"?v+=s:a==="content-box"&&(v-=o),n!==null||r!==null){Qa.value=" ";var x=Qa.scrollHeight-o;n!==null&&(d=x*n,a==="border-box"&&(d=d+o+s),v=Math.max(d,v)),r!==null&&(p=x*r,a==="border-box"&&(p=p+o+s),m=v>p?"":"hidden",v=Math.min(p,v))}var _={height:v,overflowY:m,resize:"none"};return d&&(_.minHeight=d),p&&(_.maxHeight=p),_}var kfe=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],WC=0,GC=1,qC=2,Mfe=w.exports.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-textarea":n;e.onPressEnter;var i=e.defaultValue,o=e.value,s=e.autoSize,a=e.onResize,u=e.className,d=e.style,p=e.disabled,m=e.onChange;e.onInternalAutoSize;var v=Rn(e,kfe),x=ki(i,{value:o,postState:function(Ee){return Ee!=null?Ee:""}}),_=Le(x,2),P=_[0],k=_[1],T=function(Ee){k(Ee.target.value),m==null||m(Ee)},M=w.exports.useRef();w.exports.useImperativeHandle(t,function(){return{textArea:M.current}});var O=w.exports.useMemo(function(){return s&&nn(s)==="object"?[s.minRows,s.maxRows]:[]},[s]),N=Le(O,2),L=N[0],F=N[1],V=!!s,B=function(){try{if(document.activeElement===M.current){var Ee=M.current,Ce=Ee.selectionStart,ke=Ee.selectionEnd,De=Ee.scrollTop;M.current.setSelectionRange(Ce,ke),M.current.scrollTop=De}}catch{}},H=w.exports.useState(qC),G=Le(H,2),ee=G[0],X=G[1],Z=w.exports.useState(),Q=Le(Z,2),le=Q[0],ne=Q[1],se=function(){X(WC)};wi(function(){V&&se()},[o,L,F,V]),wi(function(){if(ee===WC)X(GC);else if(ee===GC){var Te=Tfe(M.current,!1,L,F);X(qC),ne(Te)}else B()},[ee]);var oe=w.exports.useRef(),he=function(){ar.cancel(oe.current)},_e=function(Ee){ee===qC&&(a==null||a(Ee),s&&(he(),oe.current=ar(function(){se()})))};w.exports.useEffect(function(){return he},[]);var be=V?le:null,xe=fe(fe({},d),be);return(ee===WC||ee===GC)&&(xe.overflowY="hidden",xe.overflowX="hidden"),I(_u,{onResize:_e,disabled:!(s||a),children:I("textarea",{...v,ref:M,style:xe,className:He(r,u,re({},"".concat(r,"-disabled"),p)),disabled:p,value:P,onChange:T})})}),Rfe=function(e){ci(n,e);var t=di(n);function n(r){var i;Nr(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 a=i.props.onChange;i.setValue(s.target.value),a&&a(s)},i.handleKeyDown=function(s){var a=i.props,u=a.onPressEnter,d=a.onKeyDown;s.keyCode===13&&u&&u(s),d&&d(s)};var o=typeof r.value>"u"||r.value===null?r.defaultValue:r.value;return i.state={value:o},i}return Lr(n,[{key:"setValue",value:function(i,o){"value"in this.props||this.setState({value:i},o)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return I(Mfe,{...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}(w.exports.Component),Afe=Yo("text","input");function Dfe(e){return!!(e.addonBefore||e.addonAfter)}var Ofe=function(e){ci(n,e);var t=di(n);function n(){return Nr(this,n),t.apply(this,arguments)}return Lr(n,[{key:"renderClearIcon",value:function(i){var o,s=this.props,a=s.value,u=s.disabled,d=s.readOnly,p=s.handleReset,m=s.suffix,v=!u&&!d&&a,x="".concat(i,"-clear-icon");return I(yf,{onClick:p,onMouseDown:function(P){return P.preventDefault()},className:He((o={},re(o,"".concat(x,"-hidden"),!v),re(o,"".concat(x,"-has-suffix"),!!m),o),x),role:"button"})}},{key:"renderTextAreaWithClearIcon",value:function(i,o,s){var a,u=this.props,d=u.value,p=u.allowClear,m=u.className,v=u.style,x=u.direction,_=u.bordered,P=u.hidden,k=u.status,T=s.status,M=s.hasFeedback;if(!p)return ui(o,{value:d});var O=He("".concat(i,"-affix-wrapper"),"".concat(i,"-affix-wrapper-textarea-with-clear-btn"),Vs("".concat(i,"-affix-wrapper"),Cp(T,k),M),(a={},re(a,"".concat(i,"-affix-wrapper-rtl"),x==="rtl"),re(a,"".concat(i,"-affix-wrapper-borderless"),!_),re(a,"".concat(m),!Dfe(this.props)&&m),a));return $e("span",{className:O,style:v,hidden:P,children:[ui(o,{style:null,value:d}),this.renderClearIcon(i)]})}},{key:"render",value:function(){var i=this;return I(ga.Consumer,{children:function(o){var s=i.props,a=s.prefixCls,u=s.inputType,d=s.element;if(u===Afe[0])return i.renderTextAreaWithClearIcon(a,d,o)}})}}]),n}(w.exports.Component);const Nfe=Ofe;var Lfe=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 eV(e,t){return Pt(e||"").slice(0,t).join("")}function e5(e,t,n,r){var i=n;return e?i=eV(n,r):Pt(t||"").length<n.length&&Pt(n||"").length>r&&(i=t),i}var Ffe=w.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.bordered,o=i===void 0?!0:i,s=e.showCount,a=s===void 0?!1:s,u=e.maxLength,d=e.className,p=e.style,m=e.size,v=e.disabled,x=e.onCompositionStart,_=e.onCompositionEnd,P=e.onChange,k=e.status,T=Lfe(e,["prefixCls","bordered","showCount","maxLength","className","style","size","disabled","onCompositionStart","onCompositionEnd","onChange","status"]),M=w.exports.useContext(On),O=M.getPrefixCls,N=M.direction,L=w.exports.useContext(Hs),F=w.exports.useContext(Il),V=v!=null?v:F,B=w.exports.useContext(ga),H=B.status,G=B.hasFeedback,ee=B.isFormItemInput,X=B.feedbackIcon,Z=Cp(H,k),Q=w.exports.useRef(null),le=w.exports.useRef(null),ne=w.exports.useState(!1),se=Le(ne,2),oe=se[0],he=se[1],_e=w.exports.useRef(),be=w.exports.useRef(0),xe=ki(T.defaultValue,{value:T.value}),Te=Le(xe,2),Ee=Te[0],Ce=Te[1],ke=T.hidden,De=function(nt,qe){T.value===void 0&&(Ce(nt),qe==null||qe())},Ke=Number(u)>0,Ue=function(nt){he(!0),_e.current=Ee,be.current=nt.currentTarget.selectionStart,x==null||x(nt)},tt=function(nt){var qe;he(!1);var dt=nt.currentTarget.value;if(Ke){var _t=be.current>=u+1||be.current===((qe=_e.current)===null||qe===void 0?void 0:qe.length);dt=e5(_t,_e.current,dt,u)}dt!==Ee&&(De(dt),HC(nt.currentTarget,nt,P,dt)),_==null||_(nt)},lt=function(nt){var qe=nt.target.value;if(!oe&&Ke){var dt=nt.target.selectionStart>=u+1||nt.target.selectionStart===qe.length||!nt.target.selectionStart;qe=e5(dt,Ee,qe,u)}De(qe),HC(nt.currentTarget,nt,P,qe)},St=function(nt){var qe,dt,_t;De(""),(qe=Q.current)===null||qe===void 0||qe.focus(),HC((_t=(dt=Q.current)===null||dt===void 0?void 0:dt.resizableTextArea)===null||_t===void 0?void 0:_t.textArea,nt,P)},We=O("input",r);w.exports.useImperativeHandle(t,function(){var ut;return{resizableTextArea:(ut=Q.current)===null||ut===void 0?void 0:ut.resizableTextArea,focus:function(qe){var dt,_t;ffe((_t=(dt=Q.current)===null||dt===void 0?void 0:dt.resizableTextArea)===null||_t===void 0?void 0:_t.textArea,qe)},blur:function(){var qe;return(qe=Q.current)===null||qe===void 0?void 0:qe.blur()}}});var bt=I(Rfe,{...Ci(T,["allowClear"]),disabled:V,className:He((n={},re(n,"".concat(We,"-borderless"),!o),re(n,d,d&&!a),re(n,"".concat(We,"-sm"),L==="small"||m==="small"),re(n,"".concat(We,"-lg"),L==="large"||m==="large"),n),Vs(We,Z)),style:a?{resize:p==null?void 0:p.resize}:p,prefixCls:We,onCompositionStart:Ue,onChange:lt,onCompositionEnd:tt,ref:Q}),Qe=dfe(Ee);!oe&&Ke&&(T.value===null||T.value===void 0)&&(Qe=eV(Qe,u));var mt=I(Nfe,{disabled:V,...T,prefixCls:We,direction:N,inputType:"text",value:Qe,element:bt,handleReset:St,ref:le,bordered:o,status:k,style:a?void 0:p});if(a||G){var ct,wt=Pt(Qe).length,rt="";return nn(a)==="object"?rt=a.formatter({value:Qe,count:wt,maxLength:u}):rt="".concat(wt).concat(Ke?" / ".concat(u):""),$e("div",{hidden:ke,className:He("".concat(We,"-textarea"),(ct={},re(ct,"".concat(We,"-textarea-rtl"),N==="rtl"),re(ct,"".concat(We,"-textarea-show-count"),a),re(ct,"".concat(We,"-textarea-in-form-item"),ee),ct),Vs("".concat(We,"-textarea"),Z,G),d),style:p,"data-count":rt,children:[mt,G&&I("span",{className:"".concat(We,"-textarea-suffix"),children:X})]})}return mt});const tV=Ffe;var Jv=dT;Jv.Group=ife;Jv.Search=Sfe;Jv.TextArea=tV;Jv.Password=_fe;const nV=Jv;var zfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};const $fe=zfe;var rV=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:$fe})})};rV.displayName="UpOutlined";const Bfe=w.exports.forwardRef(rV);function K3(){return typeof BigInt=="function"}function Wd(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"0",i=r.split("."),o=i[0]||"0",s=i[1]||"0";o==="0"&&s==="0"&&(n=!1);var a=n?"-":"";return{negative:n,negativeStr:a,trimStr:r,integerStr:o,decimalStr:s,fullStr:"".concat(a).concat(r)}}function fT(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function vv(e){var t=String(e);if(fT(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&hT(t)?t.length-t.indexOf(".")-1:0}function X_(e){var t=String(e);if(fT(e)){if(e>Number.MAX_SAFE_INTEGER)return String(K3()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(K3()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(vv(t))}return Wd(t).fullStr}function hT(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}function t5(e){var t=typeof e=="number"?X_(e):Wd(e).fullStr,n=t.includes(".");return n?Wd(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var Vfe=function(){function e(t){if(Nr(this,e),this.origin="",this.number=void 0,this.empty=void 0,!t&&t!==0||!String(t).trim()){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Lr(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=Number(n);if(Number.isNaN(r))return this;var i=this.number+r;if(i>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(i<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(vv(this.number),vv(r));return new e(i.toFixed(o))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===(n==null?void 0:n.toNumber())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":X_(this.number):this.origin}}]),e}(),Ufe=function(){function e(t){if(Nr(this,e),this.origin="",this.negative=void 0,this.integer=void 0,this.decimal=void 0,this.decimalLen=void 0,this.empty=void 0,this.nan=void 0,!t&&t!==0||!String(t).trim()){this.empty=!0;return}if(this.origin=String(t),t==="-"){this.nan=!0;return}var n=t;if(fT(n)&&(n=Number(n)),n=typeof n=="string"?n:X_(n),hT(n)){var r=Wd(n);this.negative=r.negative;var i=r.trimStr.split(".");this.integer=BigInt(i[0]);var o=i[1]||"0";this.decimal=BigInt(o),this.decimalLen=o.length}else this.nan=!0}return Lr(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(r)}},{key:"negate",value:function(){var n=new e(this.toString());return n.negative=!n.negative,n}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=new e(n);if(r.isInvalidate())return this;var i=Math.max(this.getDecimalStr().length,r.getDecimalStr().length),o=this.alignDecimal(i),s=r.alignDecimal(i),a=(o+s).toString(),u=Wd(a),d=u.negativeStr,p=u.trimStr,m="".concat(d).concat(p.padStart(i+1,"0"));return new e("".concat(m.slice(0,-i),".").concat(m.slice(-i)))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===(n==null?void 0:n.toString())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":Wd("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}();function As(e){return K3()?new Ufe(e):new Vfe(e)}function a1(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var i=Wd(e),o=i.negativeStr,s=i.integerStr,a=i.decimalStr,u="".concat(t).concat(a),d="".concat(o).concat(s);if(n>=0){var p=Number(a[n]);if(p>=5&&!r){var m=As(e).add("".concat(o,"0.").concat("0".repeat(n)).concat(10-p));return a1(m.toString(),t,n,r)}return n===0?d:"".concat(d).concat(t).concat(a.padEnd(n,"0").slice(0,n))}return u===".0"?d:"".concat(d).concat(u)}var jfe=200,Hfe=600;function Kfe(e){var t=e.prefixCls,n=e.upNode,r=e.downNode,i=e.upDisabled,o=e.downDisabled,s=e.onStep,a=w.exports.useRef(),u=w.exports.useRef();u.current=s;var d=function(k,T){k.preventDefault(),u.current(T);function M(){u.current(T),a.current=setTimeout(M,jfe)}a.current=setTimeout(M,Hfe)},p=function(){clearTimeout(a.current)};if(w.exports.useEffect(function(){return p},[]),TI())return null;var m="".concat(t,"-handler"),v=He(m,"".concat(m,"-up"),re({},"".concat(m,"-up-disabled"),i)),x=He(m,"".concat(m,"-down"),re({},"".concat(m,"-down-disabled"),o)),_={unselectable:"on",role:"button",onMouseUp:p,onMouseLeave:p};return $e("div",{className:"".concat(m,"-wrap"),children:[I("span",{..._,onMouseDown:function(k){d(k,!0)},"aria-label":"Increase Value","aria-disabled":i,className:v,children:n||I("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})}),I("span",{..._,onMouseDown:function(k){d(k,!1)},"aria-label":"Decrease Value","aria-disabled":o,className:x,children:r||I("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})})]})}function Wfe(e,t){var n=w.exports.useRef(null);function r(){try{var o=e.selectionStart,s=e.selectionEnd,a=e.value,u=a.substring(0,o),d=a.substring(s);n.current={start:o,end:s,value:a,beforeTxt:u,afterTxt:d}}catch{}}function i(){if(e&&n.current&&t)try{var o=e.value,s=n.current,a=s.beforeTxt,u=s.afterTxt,d=s.start,p=o.length;if(o.endsWith(u))p=o.length-n.current.afterTxt.length;else if(o.startsWith(a))p=a.length;else{var m=a[d-1],v=o.indexOf(m,d-1);v!==-1&&(p=v+1)}e.setSelectionRange(p,p)}catch(x){Dr(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(x.message))}}return[r,i]}const Gfe=function(){var e=w.exports.useRef(0),t=function(){ar.cancel(e.current)};return w.exports.useEffect(function(){return t},[]),function(n){t(),e.current=ar(function(){n()})}};var qfe=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],n5=function(t,n){return t||n.isEmpty()?n.toString():n.toNumber()},r5=function(t){var n=As(t);return n.isInvalidate()?null:n},iV=w.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=r===void 0?"rc-input-number":r,o=e.className,s=e.style,a=e.min,u=e.max,d=e.step,p=d===void 0?1:d,m=e.defaultValue,v=e.value,x=e.disabled,_=e.readOnly,P=e.upHandler,k=e.downHandler,T=e.keyboard,M=e.controls,O=M===void 0?!0:M,N=e.stringMode,L=e.parser,F=e.formatter,V=e.precision,B=e.decimalSeparator,H=e.onChange,G=e.onInput,ee=e.onPressEnter,X=e.onStep,Z=Rn(e,qfe),Q="".concat(i,"-input"),le=w.exports.useRef(null),ne=w.exports.useState(!1),se=Le(ne,2),oe=se[0],he=se[1],_e=w.exports.useRef(!1),be=w.exports.useRef(!1),xe=w.exports.useRef(!1),Te=w.exports.useState(function(){return As(v!=null?v:m)}),Ee=Le(Te,2),Ce=Ee[0],ke=Ee[1];function De(Tt){v===void 0&&ke(Tt)}var Ke=w.exports.useCallback(function(Tt,Kt){if(!Kt)return V>=0?V:Math.max(vv(Tt),vv(p))},[V,p]),Ue=w.exports.useCallback(function(Tt){var Kt=String(Tt);if(L)return L(Kt);var Zt=Kt;return B&&(Zt=Zt.replace(B,".")),Zt.replace(/[^\w.-]+/g,"")},[L,B]),tt=w.exports.useRef(""),lt=w.exports.useCallback(function(Tt,Kt){if(F)return F(Tt,{userTyping:Kt,input:String(tt.current)});var Zt=typeof Tt=="number"?X_(Tt):Tt;if(!Kt){var ht=Ke(Zt,Kt);if(hT(Zt)&&(B||ht>=0)){var xn=B||".";Zt=a1(Zt,xn,ht)}}return Zt},[F,Ke,B]),St=w.exports.useState(function(){var Tt=m!=null?m:v;return Ce.isInvalidate()&&["string","number"].includes(nn(Tt))?Number.isNaN(Tt)?"":Tt:lt(Ce.toString(),!1)}),We=Le(St,2),bt=We[0],Qe=We[1];tt.current=bt;function mt(Tt,Kt){Qe(lt(Tt.isInvalidate()?Tt.toString(!1):Tt.toString(!Kt),Kt))}var ct=w.exports.useMemo(function(){return r5(u)},[u,V]),wt=w.exports.useMemo(function(){return r5(a)},[a,V]),rt=w.exports.useMemo(function(){return!ct||!Ce||Ce.isInvalidate()?!1:ct.lessEquals(Ce)},[ct,Ce]),ut=w.exports.useMemo(function(){return!wt||!Ce||Ce.isInvalidate()?!1:Ce.lessEquals(wt)},[wt,Ce]),nt=Wfe(le.current,oe),qe=Le(nt,2),dt=qe[0],_t=qe[1],Dt=function(Kt){return ct&&!Kt.lessEquals(ct)?ct:wt&&!wt.lessEquals(Kt)?wt:null},Nt=function(Kt){return!Dt(Kt)},jt=function(Kt,Zt){var ht=Kt,xn=Nt(ht)||ht.isEmpty();if(!ht.isEmpty()&&!Zt&&(ht=Dt(ht)||ht,xn=!0),!_&&!x&&xn){var bn=ht.toString(),tn=Ke(bn,Zt);return tn>=0&&(ht=As(a1(bn,".",tn)),Nt(ht)||(ht=As(a1(bn,".",tn,!0)))),ht.equals(Ce)||(De(ht),H==null||H(ht.isEmpty()?null:n5(N,ht)),v===void 0&&mt(ht,Zt)),ht}return Ce},Ve=Gfe(),Ze=function Tt(Kt){if(dt(),Qe(Kt),!be.current){var Zt=Ue(Kt),ht=As(Zt);ht.isNaN()||jt(ht,!0)}G==null||G(Kt),Ve(function(){var xn=Kt;L||(xn=Kt.replace(/。/g,".")),xn!==Kt&&Tt(xn)})},Yt=function(){be.current=!0},sn=function(){be.current=!1,Ze(le.current.value)},Gt=function(Kt){Ze(Kt.target.value)},zt=function(Kt){var Zt;if(!(Kt&&rt||!Kt&&ut)){_e.current=!1;var ht=As(xe.current?t5(p):p);Kt||(ht=ht.negate());var xn=(Ce||As(0)).add(ht.toString()),bn=jt(xn,!1);X==null||X(n5(N,bn),{offset:xe.current?t5(p):p,type:Kt?"up":"down"}),(Zt=le.current)===null||Zt===void 0||Zt.focus()}},Rt=function(Kt){var Zt=As(Ue(bt)),ht=Zt;Zt.isNaN()?ht=Ce:ht=jt(Zt,Kt),v!==void 0?mt(Ce,!1):ht.isNaN()||mt(ht,!1)},Qt=function(){_e.current=!0},pn=function(Kt){var Zt=Kt.which,ht=Kt.shiftKey;_e.current=!0,ht?xe.current=!0:xe.current=!1,Zt===kt.ENTER&&(be.current||(_e.current=!1),Rt(!1),ee==null||ee(Kt)),T!==!1&&!be.current&&[kt.UP,kt.DOWN].includes(Zt)&&(zt(kt.UP===Zt),Kt.preventDefault())},ot=function(){_e.current=!1,xe.current=!1},Lt=function(){Rt(!1),he(!1),_e.current=!1};return Pg(function(){Ce.isInvalidate()||mt(Ce,!1)},[V]),Pg(function(){var Tt=As(v);ke(Tt);var Kt=As(Ue(bt));(!Tt.equals(Kt)||!_e.current||F)&&mt(Tt,_e.current)},[v]),Pg(function(){F&&_t()},[bt]),$e("div",{className:He(i,o,(n={},re(n,"".concat(i,"-focused"),oe),re(n,"".concat(i,"-disabled"),x),re(n,"".concat(i,"-readonly"),_),re(n,"".concat(i,"-not-a-number"),Ce.isNaN()),re(n,"".concat(i,"-out-of-range"),!Ce.isInvalidate()&&!Nt(Ce)),n)),style:s,onFocus:function(){he(!0)},onBlur:Lt,onKeyDown:pn,onKeyUp:ot,onCompositionStart:Yt,onCompositionEnd:sn,onBeforeInput:Qt,children:[O&&I(Kfe,{prefixCls:i,upNode:P,downNode:k,upDisabled:rt,downDisabled:ut,onStep:zt}),I("div",{className:"".concat(Q,"-wrap"),children:I("input",{autoComplete:"off",role:"spinbutton","aria-valuemin":a,"aria-valuemax":u,"aria-valuenow":Ce.isInvalidate()?null:Ce.toString(),step:p,...Z,ref:Zo(le,t),className:Q,value:bt,onChange:Gt,disabled:x,readOnly:_})})]})});iV.displayName="InputNumber";var Zfe=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},Xfe=w.exports.forwardRef(function(e,t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=w.exports.useContext(Hs),a=w.exports.useState(!1),u=Le(a,2),d=u[0],p=u[1],m=w.exports.useRef(null);w.exports.useImperativeHandle(t,function(){return m.current});var v=e.className,x=e.size,_=e.disabled,P=e.prefixCls,k=e.addonBefore,T=e.addonAfter,M=e.prefix,O=e.bordered,N=O===void 0?!0:O,L=e.readOnly,F=e.status,V=e.controls,B=Zfe(e,["className","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),H=i("input-number",P),G=xf(H,o),ee=G.compactSize,X=G.compactItemClassnames,Z=I(Bfe,{className:"".concat(H,"-handler-up-inner")}),Q=I(KI,{className:"".concat(H,"-handler-down-inner")}),le=typeof V=="boolean"?V:void 0;nn(V)==="object"&&(Z=typeof V.upIcon>"u"?Z:I("span",{className:"".concat(H,"-handler-up-inner"),children:V.upIcon}),Q=typeof V.downIcon>"u"?Q:I("span",{className:"".concat(H,"-handler-down-inner"),children:V.downIcon}));var ne=w.exports.useContext(ga),se=ne.hasFeedback,oe=ne.status,he=ne.isFormItemInput,_e=ne.feedbackIcon,be=Cp(oe,F),xe=ee||x||s,Te=w.exports.useContext(Il),Ee=_!=null?_:Te,Ce=He((n={},re(n,"".concat(H,"-lg"),xe==="large"),re(n,"".concat(H,"-sm"),xe==="small"),re(n,"".concat(H,"-rtl"),o==="rtl"),re(n,"".concat(H,"-borderless"),!N),re(n,"".concat(H,"-in-form-item"),he),n),Vs(H,be),X,v),ke=I(iV,{ref:m,disabled:Ee,className:Ce,upHandler:Z,downHandler:Q,prefixCls:H,readOnly:L,controls:le,...B});if(M!=null||se){var De,Ke=He("".concat(H,"-affix-wrapper"),Vs("".concat(H,"-affix-wrapper"),be,se),(De={},re(De,"".concat(H,"-affix-wrapper-focused"),d),re(De,"".concat(H,"-affix-wrapper-disabled"),e.disabled),re(De,"".concat(H,"-affix-wrapper-sm"),s==="small"),re(De,"".concat(H,"-affix-wrapper-lg"),s==="large"),re(De,"".concat(H,"-affix-wrapper-rtl"),o==="rtl"),re(De,"".concat(H,"-affix-wrapper-readonly"),L),re(De,"".concat(H,"-affix-wrapper-borderless"),!N),re(De,"".concat(v),!(k||T)&&v),De));ke=$e("div",{className:Ke,style:e.style,onMouseUp:function(){return m.current.focus()},children:[M&&I("span",{className:"".concat(H,"-prefix"),children:M}),ui(ke,{style:null,value:e.value,onFocus:function(ct){var wt;p(!0),(wt=e.onFocus)===null||wt===void 0||wt.call(e,ct)},onBlur:function(ct){var wt;p(!1),(wt=e.onBlur)===null||wt===void 0||wt.call(e,ct)}}),se&&I("span",{className:"".concat(H,"-suffix"),children:_e})]})}if(k!=null||T!=null){var Ue,tt="".concat(H,"-group"),lt="".concat(tt,"-addon"),St=k?I("div",{className:lt,children:k}):null,We=T?I("div",{className:lt,children:T}):null,bt=He("".concat(H,"-wrapper"),tt,re({},"".concat(tt,"-rtl"),o==="rtl")),Qe=He("".concat(H,"-group-wrapper"),(Ue={},re(Ue,"".concat(H,"-group-wrapper-sm"),s==="small"),re(Ue,"".concat(H,"-group-wrapper-lg"),s==="large"),re(Ue,"".concat(H,"-group-wrapper-rtl"),o==="rtl"),Ue),Vs("".concat(H,"-group-wrapper"),be,se),v);ke=I("div",{className:Qe,style:e.style,children:$e("div",{className:bt,children:[St&&I(rp,{children:I(mv,{status:!0,override:!0,children:St})}),ui(ke,{style:null,disabled:Ee}),We&&I(rp,{children:I(mv,{status:!0,override:!0,children:We})})]})})}return ke});const oV=Xfe;var Yfe={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 Qfe=Yfe;var aV=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Qfe})})};aV.displayName="DoubleLeftOutlined";const Jfe=w.exports.forwardRef(aV);var ehe={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 the=ehe;var sV=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:the})})};sV.displayName="DoubleRightOutlined";const nhe=w.exports.forwardRef(sV);var jm=function(t){var n,r="".concat(t.rootPrefixCls,"-item"),i=He(r,"".concat(r,"-").concat(t.page),(n={},re(n,"".concat(r,"-active"),t.active),re(n,"".concat(r,"-disabled"),!t.page),re(n,t.className,!!t.className),n)),o=function(){t.onClick(t.page)},s=function(u){t.onKeyPress(u,t.onClick,t.page)};return I("li",{title:t.showTitle?t.page:null,className:i,onClick:o,onKeyPress:s,tabIndex:"0",children:t.itemRender(t.page,"page",I("a",{rel:"nofollow",children:t.page}))})};const Cd={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40};var lV=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.state={goInputText:""},r.buildOptionText=function(a){return"".concat(a," ").concat(r.props.locale.items_per_page)},r.changeSize=function(a){r.props.changeSize(Number(a))},r.handleChange=function(a){r.setState({goInputText:a.target.value})},r.handleBlur=function(a){var u=r.props,d=u.goButton,p=u.quickGo,m=u.rootPrefixCls,v=r.state.goInputText;d||v===""||(r.setState({goInputText:""}),!(a.relatedTarget&&(a.relatedTarget.className.indexOf("".concat(m,"-item-link"))>=0||a.relatedTarget.className.indexOf("".concat(m,"-item"))>=0))&&p(r.getValidValue()))},r.go=function(a){var u=r.state.goInputText;u!==""&&(a.keyCode===Cd.ENTER||a.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Lr(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,o=i.pageSize,s=i.pageSizeOptions;return s.some(function(a){return a.toString()===o.toString()})?s:s.concat([o.toString()]).sort(function(a,u){var d=isNaN(Number(a))?0:Number(a),p=isNaN(Number(u))?0:Number(u);return d-p})}},{key:"render",value:function(){var i=this,o=this.props,s=o.pageSize,a=o.locale,u=o.rootPrefixCls,d=o.changeSize,p=o.quickGo,m=o.goButton,v=o.selectComponentClass,x=o.buildOptionText,_=o.selectPrefixCls,P=o.disabled,k=this.state.goInputText,T="".concat(u,"-options"),M=v,O=null,N=null,L=null;if(!d&&!p)return null;var F=this.getPageSizeOptions();if(d&&M){var V=F.map(function(B,H){return I(M.Option,{value:B.toString(),children:(x||i.buildOptionText)(B)},H)});O=I(M,{disabled:P,prefixCls:_,showSearch:!1,className:"".concat(T,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(s||F[0]).toString(),onChange:this.changeSize,getPopupContainer:function(H){return H.parentNode},"aria-label":a.page_size,defaultOpen:!1,children:V})}return p&&(m&&(L=typeof m=="boolean"?I("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:P,className:"".concat(T,"-quick-jumper-button"),children:a.jump_to_confirm}):I("span",{onClick:this.go,onKeyUp:this.go,children:m})),N=$e("div",{className:"".concat(T,"-quick-jumper"),children:[a.jump_to,I("input",{disabled:P,type:"text",value:k,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":a.page}),a.page,L]})),$e("li",{className:"".concat(T),children:[O,N]})}}]),n}(Un.Component);lV.defaultProps={pageSizeOptions:["10","20","50","100"]};const rhe={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 W3(){}function i5(e){var t=Number(e);return typeof t=="number"&&!isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ihe(e,t,n){return n}function Hu(e,t,n){var r=typeof e>"u"?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var uV=function(e){ci(n,e);var t=di(n);function n(r){var i;Nr(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(Hu(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(d,p){var m=i.props.prefixCls,v=d||I("button",{type:"button","aria-label":p,className:"".concat(m,"-item-link")});return typeof d=="function"&&(v=Un.createElement(d,fe({},i.props))),v},i.savePaginationNode=function(d){i.paginationNode=d},i.isValid=function(d){var p=i.props.total;return i5(d)&&d!==i.state.current&&i5(p)&&p>0},i.shouldDisplayQuickJumper=function(){var d=i.props,p=d.showQuickJumper,m=d.total,v=i.state.pageSize;return m<=v?!1:p},i.handleKeyDown=function(d){(d.keyCode===Cd.ARROW_UP||d.keyCode===Cd.ARROW_DOWN)&&d.preventDefault()},i.handleKeyUp=function(d){var p=i.getValidValue(d),m=i.state.currentInputValue;p!==m&&i.setState({currentInputValue:p}),d.keyCode===Cd.ENTER?i.handleChange(p):d.keyCode===Cd.ARROW_UP?i.handleChange(p-1):d.keyCode===Cd.ARROW_DOWN&&i.handleChange(p+1)},i.handleBlur=function(d){var p=i.getValidValue(d);i.handleChange(p)},i.changePageSize=function(d){var p=i.state.current,m=Hu(d,i.state,i.props);p=p>m?m:p,m===0&&(p=i.state.current),typeof d=="number"&&("pageSize"in i.props||i.setState({pageSize:d}),"current"in i.props||i.setState({current:p,currentInputValue:p})),i.props.onShowSizeChange(p,d),"onChange"in i.props&&i.props.onChange&&i.props.onChange(p,d)},i.handleChange=function(d){var p=i.props,m=p.disabled,v=p.onChange,x=i.state,_=x.pageSize,P=x.current,k=x.currentInputValue;if(i.isValid(d)&&!m){var T=Hu(void 0,i.state,i.props),M=d;return d>T?M=T:d<1&&(M=1),"current"in i.props||i.setState({current:M}),M!==k&&i.setState({currentInputValue:M}),v(M,_),M}return P},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<Hu(void 0,i.state,i.props)},i.runIfEnter=function(d,p){if(d.key==="Enter"||d.charCode===13){for(var m=arguments.length,v=new Array(m>2?m-2:0),x=2;x<m;x++)v[x-2]=arguments[x];p.apply(void 0,v)}},i.runIfEnterPrev=function(d){i.runIfEnter(d,i.prev)},i.runIfEnterNext=function(d){i.runIfEnter(d,i.next)},i.runIfEnterJumpPrev=function(d){i.runIfEnter(d,i.jumpPrev)},i.runIfEnterJumpNext=function(d){i.runIfEnter(d,i.jumpNext)},i.handleGoTO=function(d){(d.keyCode===Cd.ENTER||d.type==="click")&&i.handleChange(i.state.currentInputValue)};var o=r.onChange!==W3,s="current"in r;s&&!o&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var a=r.defaultCurrent;"current"in r&&(a=r.current);var u=r.defaultPageSize;return"pageSize"in r&&(u=r.pageSize),a=Math.min(a,Hu(u,void 0,r)),i.state={current:a,currentInputValue:a,pageSize:u},i}return Lr(n,[{key:"componentDidUpdate",value:function(i,o){var s=this.props.prefixCls;if(o.current!==this.state.current&&this.paginationNode){var a=this.paginationNode.querySelector(".".concat(s,"-item-").concat(o.current));a&&document.activeElement===a&&a.blur()}}},{key:"getValidValue",value:function(i){var o=i.target.value,s=Hu(void 0,this.state,this.props),a=this.state.currentInputValue,u;return o===""?u=o:isNaN(Number(o))?u=a:o>=s?u=s:u=Number(o),u}},{key:"getShowSizeChanger",value:function(){var i=this.props,o=i.showSizeChanger,s=i.total,a=i.totalBoundaryShowSizeChanger;return typeof o<"u"?o:s>a}},{key:"renderPrev",value:function(i){var o=this.props,s=o.prevIcon,a=o.itemRender,u=a(i,"prev",this.getItemIcon(s,"prev page")),d=!this.hasPrev();return w.exports.isValidElement(u)?w.exports.cloneElement(u,{disabled:d}):u}},{key:"renderNext",value:function(i){var o=this.props,s=o.nextIcon,a=o.itemRender,u=a(i,"next",this.getItemIcon(s,"next page")),d=!this.hasNext();return w.exports.isValidElement(u)?w.exports.cloneElement(u,{disabled:d}):u}},{key:"render",value:function(){var i=this,o=this.props,s=o.prefixCls,a=o.className,u=o.style,d=o.disabled,p=o.hideOnSinglePage,m=o.total,v=o.locale,x=o.showQuickJumper,_=o.showLessItems,P=o.showTitle,k=o.showTotal,T=o.simple,M=o.itemRender,O=o.showPrevNextJumpers,N=o.jumpPrevIcon,L=o.jumpNextIcon,F=o.selectComponentClass,V=o.selectPrefixCls,B=o.pageSizeOptions,H=this.state,G=H.current,ee=H.pageSize,X=H.currentInputValue;if(p===!0&&m<=ee)return null;var Z=Hu(void 0,this.state,this.props),Q=[],le=null,ne=null,se=null,oe=null,he=null,_e=x&&x.goButton,be=_?1:2,xe=G-1>0?G-1:0,Te=G+1<Z?G+1:Z,Ee=Object.keys(this.props).reduce(function(ct,wt){return(wt.substr(0,5)==="data-"||wt.substr(0,5)==="aria-"||wt==="role")&&(ct[wt]=i.props[wt]),ct},{}),Ce=k&&I("li",{className:"".concat(s,"-total-text"),children:k(m,[m===0?0:(G-1)*ee+1,G*ee>m?m:G*ee])});if(T)return _e&&(typeof _e=="boolean"?he=I("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:v.jump_to_confirm}):he=I("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:_e}),he=I("li",{title:P?"".concat(v.jump_to).concat(G,"/").concat(Z):null,className:"".concat(s,"-simple-pager"),children:he})),$e("ul",{className:He(s,"".concat(s,"-simple"),re({},"".concat(s,"-disabled"),d),a),style:u,ref:this.savePaginationNode,...Ee,children:[Ce,I("li",{title:P?v.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:He("".concat(s,"-prev"),re({},"".concat(s,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev(),children:this.renderPrev(xe)}),$e("li",{title:P?"".concat(G,"/").concat(Z):null,className:"".concat(s,"-simple-pager"),children:[I("input",{type:"text",value:X,disabled:d,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),I("span",{className:"".concat(s,"-slash"),children:"/"}),Z]}),I("li",{title:P?v.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:He("".concat(s,"-next"),re({},"".concat(s,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext(),children:this.renderNext(Te)}),he]});if(Z<=3+be*2){var ke={locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:P,itemRender:M};Z||Q.push(w.exports.createElement(jm,{...ke,key:"noPager",page:1,className:"".concat(s,"-item-disabled")}));for(var De=1;De<=Z;De+=1){var Ke=G===De;Q.push(w.exports.createElement(jm,{...ke,key:De,page:De,active:Ke}))}}else{var Ue=_?v.prev_3:v.prev_5,tt=_?v.next_3:v.next_5;O&&(le=I("li",{title:P?Ue:null,onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:He("".concat(s,"-jump-prev"),re({},"".concat(s,"-jump-prev-custom-icon"),!!N)),children:M(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(N,"prev page"))},"prev"),ne=I("li",{title:P?tt:null,tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:He("".concat(s,"-jump-next"),re({},"".concat(s,"-jump-next-custom-icon"),!!L)),children:M(this.getJumpNextPage(),"jump-next",this.getItemIcon(L,"next page"))},"next")),oe=I(jm,{locale:v,last:!0,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:Z,active:!1,showTitle:P,itemRender:M},Z),se=I(jm,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:1,active:!1,showTitle:P,itemRender:M},1);var lt=Math.max(1,G-be),St=Math.min(G+be,Z);G-1<=be&&(St=1+be*2),Z-G<=be&&(lt=Z-be*2);for(var We=lt;We<=St;We+=1){var bt=G===We;Q.push(I(jm,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:We,active:bt,showTitle:P,itemRender:M},We))}G-1>=be*2&&G!==1+2&&(Q[0]=w.exports.cloneElement(Q[0],{className:"".concat(s,"-item-after-jump-prev")}),Q.unshift(le)),Z-G>=be*2&&G!==Z-2&&(Q[Q.length-1]=w.exports.cloneElement(Q[Q.length-1],{className:"".concat(s,"-item-before-jump-next")}),Q.push(ne)),lt!==1&&Q.unshift(se),St!==Z&&Q.push(oe)}var Qe=!this.hasPrev()||!Z,mt=!this.hasNext()||!Z;return $e("ul",{className:He(s,a,re({},"".concat(s,"-disabled"),d)),style:u,ref:this.savePaginationNode,...Ee,children:[Ce,I("li",{title:P?v.prev_page:null,onClick:this.prev,tabIndex:Qe?null:0,onKeyPress:this.runIfEnterPrev,className:He("".concat(s,"-prev"),re({},"".concat(s,"-disabled"),Qe)),"aria-disabled":Qe,children:this.renderPrev(xe)}),Q,I("li",{title:P?v.next_page:null,onClick:this.next,tabIndex:mt?null:0,onKeyPress:this.runIfEnterNext,className:He("".concat(s,"-next"),re({},"".concat(s,"-disabled"),mt)),"aria-disabled":mt,children:this.renderNext(Te)}),I(lV,{disabled:d,locale:v,rootPrefixCls:s,selectComponentClass:F,selectPrefixCls:V,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:G,pageSize:ee,pageSizeOptions:B,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:_e})]})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s={};if("current"in i&&(s.current=i.current,i.current!==o.current&&(s.currentInputValue=s.current)),"pageSize"in i&&i.pageSize!==o.pageSize){var a=o.current,u=Hu(i.pageSize,o,i);a=a>u?u:a,"current"in i||(s.current=a,s.currentInputValue=a),s.pageSize=i.pageSize}return s}}]),n}(Un.Component);uV.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:W3,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:W3,locale:rhe,style:{},itemRender:ihe,totalBoundaryShowSizeChanger:50};var cV=function(t){return I(vu,{...t,size:"small"})},dV=function(t){return I(vu,{...t,size:"middle"})};cV.Option=vu.Option;dV.Option=vu.Option;var ohe=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},ahe=function(t){var n=t.prefixCls,r=t.selectPrefixCls,i=t.className,o=t.size,s=t.locale,a=t.selectComponentClass,u=t.responsive,d=t.showSizeChanger,p=ohe(t,["prefixCls","selectPrefixCls","className","size","locale","selectComponentClass","responsive","showSizeChanger"]),m=z9(u),v=m.xs,x=w.exports.useContext(On),_=x.getPrefixCls,P=x.direction,k=x.pagination,T=k===void 0?{}:k,M=_("pagination",n),O=d!=null?d:T.showSizeChanger,N=function(){var F=I("span",{className:"".concat(M,"-item-ellipsis"),children:"\u2022\u2022\u2022"}),V=I("button",{className:"".concat(M,"-item-link"),type:"button",tabIndex:-1,children:I(n7,{})}),B=I("button",{className:"".concat(M,"-item-link"),type:"button",tabIndex:-1,children:I(K_,{})}),H=I("a",{className:"".concat(M,"-item-link"),children:$e("div",{className:"".concat(M,"-item-container"),children:[I(Jfe,{className:"".concat(M,"-item-link-icon")}),F]})}),G=I("a",{className:"".concat(M,"-item-link"),children:$e("div",{className:"".concat(M,"-item-container"),children:[I(nhe,{className:"".concat(M,"-item-link-icon")}),F]})});if(P==="rtl"){var ee=[B,V];V=ee[0],B=ee[1];var X=[G,H];H=X[0],G=X[1]}return{prevIcon:V,nextIcon:B,jumpPrevIcon:H,jumpNextIcon:G}};return I(bp,{componentName:"Pagination",defaultLocale:k$,children:function(L){var F,V=ze(ze({},L),s),B=o==="small"||!!(v&&!o&&u),H=_("select",r),G=He((F={},re(F,"".concat(M,"-mini"),B),re(F,"".concat(M,"-rtl"),P==="rtl"),F),i);return I(uV,{...N(),...p,prefixCls:M,selectPrefixCls:H,className:G,selectComponentClass:a||(B?cV:dV),locale:V,showSizeChanger:O})}})};const she=ahe;var lhe=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};Yo("small","default","large");var s1=null;function uhe(e,t){var n=t.indicator,r="".concat(e,"-dot");return n===null?null:Ro(n)?ui(n,{className:He(n.props.className,r)}):Ro(s1)?ui(s1,{className:He(s1.props.className,r)}):$e("span",{className:He(r,"".concat(e,"-dot-spin")),children:[I("i",{className:"".concat(e,"-dot-item")}),I("i",{className:"".concat(e,"-dot-item")}),I("i",{className:"".concat(e,"-dot-item")}),I("i",{className:"".concat(e,"-dot-item")})]})}function che(e,t){return!!e&&!!t&&!isNaN(Number(t))}var dhe=function(t){var n=t.spinPrefixCls,r=t.spinning,i=r===void 0?!0:r,o=t.delay,s=t.className,a=t.size,u=a===void 0?"default":a,d=t.tip,p=t.wrapperClassName,m=t.style,v=t.children,x=lhe(t,["spinPrefixCls","spinning","delay","className","size","tip","wrapperClassName","style","children"]),_=w.exports.useState(function(){return i&&!che(i,o)}),P=Le(_,2),k=P[0],T=P[1];w.exports.useEffect(function(){var N=nce(function(){T(i)},o);return N(),function(){var L;(L=N==null?void 0:N.cancel)===null||L===void 0||L.call(N)}},[o,i]);var M=function(){return typeof v<"u"},O=function(L){var F,V=L.direction,B=He(n,(F={},re(F,"".concat(n,"-sm"),u==="small"),re(F,"".concat(n,"-lg"),u==="large"),re(F,"".concat(n,"-spinning"),k),re(F,"".concat(n,"-show-text"),!!d),re(F,"".concat(n,"-rtl"),V==="rtl"),F),s),H=Ci(x,["indicator","prefixCls"]),G=$e("div",{...H,style:m,className:B,"aria-live":"polite","aria-busy":k,children:[uhe(n,t),d?I("div",{className:"".concat(n,"-text"),children:d}):null]});if(M()){var ee=He("".concat(n,"-container"),re({},"".concat(n,"-blur"),k));return $e("div",{...H,className:He("".concat(n,"-nested-loading"),p),children:[k&&I("div",{children:G},"loading"),I("div",{className:ee,children:v},"container")]})}return G};return I(zc,{children:O})},fV=function(t){var n=t.prefixCls,r=w.exports.useContext(On),i=r.getPrefixCls,o=i("spin",n),s=ze(ze({},t),{spinPrefixCls:o});return I(dhe,{...s})};fV.setDefaultIndicator=function(e){s1=e};const vs=fV;function o5(e){return!!(e&&!!e.then)}var fhe=function(t){var n=w.exports.useRef(!1),r=w.exports.useRef(null),i=vl(!1),o=Le(i,2),s=o[0],a=o[1],u=t.close,d=function(){u==null||u.apply(void 0,arguments)};w.exports.useEffect(function(){var k=null;return t.autoFocus&&(k=setTimeout(function(){var T;(T=r.current)===null||T===void 0||T.focus()})),function(){k&&clearTimeout(k)}},[]);var p=function(T){!o5(T)||(a(!0),T.then(function(){a(!1,!0),d.apply(void 0,arguments),n.current=!1},function(M){console.error(M),a(!1,!0),n.current=!1}))},m=function(T){var M=t.actionFn;if(!n.current){if(n.current=!0,!M){d();return}var O;if(t.emitEvent){if(O=M(T),t.quitOnNullishReturnValue&&!o5(O)){n.current=!1,d(T);return}}else if(M.length)O=M(u),n.current=!1;else if(O=M(),!O){d();return}p(O)}},v=t.type,x=t.children,_=t.prefixCls,P=t.buttonProps;return I($n,{...f7(v),onClick:m,loading:s,prefixCls:_,...P,ref:r,children:x})};const a5=fhe;var hhe=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},G3,phe=function(t){G3={x:t.pageX,y:t.pageY},setTimeout(function(){G3=null},100)};p7()&&document.documentElement.addEventListener("click",phe,!0);var mhe=function(t){var n,r,i=w.exports.useContext(On),o=i.getPopupContainer,s=i.getPrefixCls,a=i.direction,u=function(Q){var le=t.onCancel;le==null||le(Q)},d=function(Q){var le=t.onOk;le==null||le(Q)},p=t.prefixCls,m=t.footer,v=t.visible,x=t.open,_=x===void 0?!1:x,P=t.wrapClassName,k=t.centered,T=t.getContainer,M=t.closeIcon,O=t.focusTriggerAfterClose,N=O===void 0?!0:O,L=t.width,F=L===void 0?520:L,V=hhe(t,["prefixCls","footer","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose","width"]),B=s("modal",p),H=s(),G=I(bp,{componentName:"Modal",defaultLocale:R$(),children:function(Z){var Q=t.okText,le=t.okType,ne=le===void 0?"primary":le,se=t.cancelText,oe=t.confirmLoading,he=oe===void 0?!1:oe;return $e(Tn,{children:[I($n,{onClick:u,...t.cancelButtonProps,children:se||Z.cancelText}),I($n,{...f7(ne),loading:he,onClick:d,...t.okButtonProps,children:Q!=null?Q:Z.okText})]})}}),ee=I("span",{className:"".concat(B,"-close-x"),children:M||I(_p,{className:"".concat(B,"-close-icon")})}),X=He(P,(n={},re(n,"".concat(B,"-centered"),!!k),re(n,"".concat(B,"-wrap-rtl"),a==="rtl"),n));return I(rp,{children:I(mv,{status:!0,override:!0,children:I(uT,{width:F,...V,getContainer:T===void 0?o:T,prefixCls:B,wrapClassName:X,footer:m===void 0?G:m,visible:_||v,mousePosition:(r=V.mousePosition)!==null&&r!==void 0?r:G3,onClose:u,closeIcon:ee,focusTriggerAfterClose:N,transitionName:$a(H,"zoom",t.transitionName),maskTransitionName:$a(H,"fade",t.maskTransitionName)})})})};const hV=mhe;var ghe=function(t){var n=t.icon,r=t.onCancel,i=t.onOk,o=t.close,s=t.zIndex,a=t.afterClose,u=t.visible,d=t.open,p=t.keyboard,m=t.centered,v=t.getContainer,x=t.maskStyle,_=t.okText,P=t.okButtonProps,k=t.cancelText,T=t.cancelButtonProps,M=t.direction,O=t.prefixCls,N=t.wrapClassName,L=t.rootPrefixCls,F=t.iconPrefixCls,V=t.bodyStyle,B=t.closable,H=B===void 0?!1:B,G=t.closeIcon,ee=t.modalRender,X=t.focusTriggerAfterClose,Z=t.okType||"primary",Q="".concat(O,"-confirm"),le="okCancel"in t?t.okCancel:!0,ne=t.width||416,se=t.style||{},oe=t.mask===void 0?!0:t.mask,he=t.maskClosable===void 0?!1:t.maskClosable,_e=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",be=He(Q,"".concat(Q,"-").concat(t.type),re({},"".concat(Q,"-rtl"),M==="rtl"),t.className),xe=le&&I(a5,{actionFn:r,close:o,autoFocus:_e==="cancel",buttonProps:T,prefixCls:"".concat(L,"-btn"),children:k});return I(wp,{prefixCls:L,iconPrefixCls:F,direction:M,children:I(hV,{prefixCls:O,className:be,wrapClassName:He(re({},"".concat(Q,"-centered"),!!t.centered),N),onCancel:function(){return o==null?void 0:o({triggerCancel:!0})},open:d||u,title:"",footer:"",transitionName:$a(L,"zoom",t.transitionName),maskTransitionName:$a(L,"fade",t.maskTransitionName),mask:oe,maskClosable:he,maskStyle:x,style:se,bodyStyle:V,width:ne,zIndex:s,afterClose:a,keyboard:p,centered:m,getContainer:v,closable:H,closeIcon:G,modalRender:ee,focusTriggerAfterClose:X,children:$e("div",{className:"".concat(Q,"-body-wrapper"),children:[$e("div",{className:"".concat(Q,"-body"),children:[n,t.title===void 0?null:I("span",{className:"".concat(Q,"-title"),children:t.title}),I("div",{className:"".concat(Q,"-content"),children:t.content})]}),$e("div",{className:"".concat(Q,"-btns"),children:[xe,I(a5,{type:Z,actionFn:i,close:o,autoFocus:_e==="ok",buttonProps:P,prefixCls:"".concat(L,"-btn"),children:_})]})]})})})};const pV=ghe;var vhe=[];const Sh=vhe;var yhe=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},mV="";function xhe(){return mV}function e0(e){var t=document.createDocumentFragment(),n=ze(ze({},e),{close:s,open:!0}),r;function i(){for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];var m=d.some(function(_){return _&&_.triggerCancel});e.onCancel&&m&&e.onCancel.apply(e,[function(){}].concat(Pt(d.slice(1))));for(var v=0;v<Sh.length;v++){var x=Sh[v];if(x===s){Sh.splice(v,1);break}}Y$(t)}function o(u){var d=u.okText,p=u.cancelText,m=u.prefixCls,v=yhe(u,["okText","cancelText","prefixCls"]);clearTimeout(r),r=setTimeout(function(){var x=R$(),_=II(),P=_.getPrefixCls,k=_.getIconPrefixCls,T=P(void 0,xhe()),M=m||"".concat(T,"-modal"),O=k();X$(I(pV,{...v,prefixCls:M,rootPrefixCls:T,iconPrefixCls:O,okText:d||(v.okCancel?x.okText:x.justOkText),cancelText:p||x.cancelText}),t)})}function s(){for(var u=this,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];n=ze(ze({},n),{open:!1,afterClose:function(){typeof e.afterClose=="function"&&e.afterClose(),i.apply(u,p)}}),n.visible&&delete n.visible,o(n)}function a(u){typeof u=="function"?n=u(n):n=ze(ze({},n),u),o(n)}return o(n),Sh.push(s),{destroy:s,update:a}}function gV(e){return ze(ze({icon:I(L_,{}),okCancel:!1},e),{type:"warning"})}function vV(e){return ze(ze({icon:I(PI,{}),okCancel:!1},e),{type:"info"})}function yV(e){return ze(ze({icon:I(SI,{}),okCancel:!1},e),{type:"success"})}function xV(e){return ze(ze({icon:I(EI,{}),okCancel:!1},e),{type:"error"})}function bV(e){return ze(ze({icon:I(L_,{}),okCancel:!0},e),{type:"confirm"})}function bhe(e){var t=e.rootPrefixCls;mV=t}function _he(){var e=w.exports.useState([]),t=Le(e,2),n=t[0],r=t[1],i=w.exports.useCallback(function(o){return r(function(s){return[].concat(Pt(s),[o])}),function(){r(function(s){return s.filter(function(a){return a!==o})})}},[]);return[n,i]}var whe=function(t,n){var r=t.afterClose,i=t.config,o=w.exports.useState(!0),s=Le(o,2),a=s[0],u=s[1],d=w.exports.useState(i),p=Le(d,2),m=p[0],v=p[1],x=w.exports.useContext(On),_=x.direction,P=x.getPrefixCls,k=P("modal"),T=P(),M=function(){u(!1);for(var N=arguments.length,L=new Array(N),F=0;F<N;F++)L[F]=arguments[F];var V=L.some(function(B){return B&&B.triggerCancel});m.onCancel&&V&&m.onCancel.apply(m,[function(){}].concat(Pt(L.slice(1))))};return w.exports.useImperativeHandle(n,function(){return{destroy:M,update:function(N){v(function(L){return ze(ze({},L),N)})}}}),I(bp,{componentName:"Modal",defaultLocale:gs.Modal,children:function(O){return I(pV,{prefixCls:k,rootPrefixCls:T,...m,close:M,open:a,afterClose:r,okText:m.okText||(m.okCancel?O.okText:O.justOkText),direction:_,cancelText:m.cancelText||O.cancelText})}})};const Che=w.exports.forwardRef(whe);var s5=0,She=w.exports.memo(w.exports.forwardRef(function(e,t){var n=_he(),r=Le(n,2),i=r[0],o=r[1];return w.exports.useImperativeHandle(t,function(){return{patchElement:o}},[]),I(Tn,{children:i})}));function Ehe(){var e=w.exports.useRef(null),t=w.exports.useState([]),n=Le(t,2),r=n[0],i=n[1];w.exports.useEffect(function(){if(r.length){var a=Pt(r);a.forEach(function(u){u()}),i([])}},[r]);var o=w.exports.useCallback(function(a){return function(d){var p;s5+=1;var m=w.exports.createRef(),v,x=I(Che,{config:a(d),ref:m,afterClose:function(){v==null||v()}},"modal-".concat(s5));return v=(p=e.current)===null||p===void 0?void 0:p.patchElement(x),{destroy:function(){function P(){var k;(k=m.current)===null||k===void 0||k.destroy()}m.current?P():i(function(k){return[].concat(Pt(k),[P])})},update:function(P){function k(){var T;(T=m.current)===null||T===void 0||T.update(P)}m.current?k():i(function(T){return[].concat(Pt(T),[k])})}}}},[]),s=w.exports.useMemo(function(){return{info:o(vV),success:o(yV),error:o(xV),warning:o(gV),confirm:o(bV)}},[]);return[s,I(She,{ref:e})]}function _V(e){return e0(gV(e))}var kl=hV;kl.useModal=Ehe;kl.info=function(t){return e0(vV(t))};kl.success=function(t){return e0(yV(t))};kl.error=function(t){return e0(xV(t))};kl.warning=_V;kl.warn=_V;kl.confirm=function(t){return e0(bV(t))};kl.destroyAll=function(){for(;Sh.length;){var t=Sh.pop();t&&t()}};kl.config=bhe;const t0=kl;var Phe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};const Ihe=Phe;var The=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},khe={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},Mhe=w.exports.forwardRef(function(e,t){var n=function(p){var m=p.keyCode;m===kt.ENTER&&p.preventDefault()},r=function(p){var m=p.keyCode,v=e.onClick;m===kt.ENTER&&v&&v()},i=e.style,o=e.noStyle,s=e.disabled,a=The(e,["style","noStyle","disabled"]),u={};return o||(u=ze({},khe)),s&&(u.pointerEvents="none"),u=ze(ze({},u),i),I("div",{role:"button",tabIndex:0,ref:t,...a,onKeyDown:n,onKeyUp:r,style:u})});const l5=Mhe;var Rhe={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ahe=function(){var t=w.exports.useRef([]),n=w.exports.useRef(null);return w.exports.useEffect(function(){var r=Date.now(),i=!1;t.current.forEach(function(o){if(!!o){i=!0;var s=o.style;s.transitionDuration=".3s, .3s, .3s, .06s",n.current&&r-n.current<100&&(s.transitionDuration="0s, 0s")}}),i&&(n.current=Date.now())}),t.current},u5=0,Dhe=Mo();function Ohe(){var e;return Dhe?(e=u5,u5+=1):e="TEST_OR_SSR",e}const Nhe=function(e){var t=w.exports.useState(),n=Le(t,2),r=n[0],i=n[1];return w.exports.useEffect(function(){i("rc_progress_".concat(Ohe()))},[]),e||r};var Lhe=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function c5(e){return+e.replace("%","")}function d5(e){var t=e!=null?e:[];return Array.isArray(t)?t:[t]}var Hm=100,ZC=function(t,n,r,i,o,s,a,u,d,p){var m=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,v=r/100*360*((360-s)/360),x=s===0?0:{bottom:0,top:180,left:90,right:-90}[a],_=(100-i)/100*n;return d==="round"&&i!==100&&(_+=p/2,_>=n&&(_=n-.01)),{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:_+m,transform:"rotate(".concat(o+v+x,"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}},pT=function(t){var n=t.id,r=t.prefixCls,i=t.steps,o=t.strokeWidth,s=t.trailWidth,a=t.gapDegree,u=a===void 0?0:a,d=t.gapPosition,p=t.trailColor,m=t.strokeLinecap,v=t.style,x=t.className,_=t.strokeColor,P=t.percent,k=Rn(t,Lhe),T=Nhe(n),M="".concat(T,"-gradient"),O=Hm/2-o/2,N=Math.PI*2*O,L=u>0?90+u/2:-90,F=N*((360-u)/360),V=nn(i)==="object"?i:{count:i,space:2},B=V.count,H=V.space,G=ZC(N,F,0,100,L,u,d,p,m,o),ee=d5(P),X=d5(_),Z=X.find(function(se){return se&&nn(se)==="object"}),Q=Ahe(),le=function(){var oe=0;return ee.map(function(he,_e){var be=X[_e]||X[X.length-1],xe=be&&nn(be)==="object"?"url(#".concat(M,")"):void 0,Te=ZC(N,F,oe,he,L,u,d,be,m,o);return oe+=he,I("circle",{className:"".concat(r,"-circle-path"),r:O,cx:0,cy:0,stroke:xe,strokeLinecap:m,strokeWidth:o,opacity:he===0?0:1,style:Te,ref:function(Ce){Q[_e]=Ce}},_e)}).reverse()},ne=function(){var oe=Math.round(B*(ee[0]/100)),he=100/B,_e=0;return new Array(B).fill(null).map(function(be,xe){var Te=xe<=oe-1?X[0]:p,Ee=Te&&nn(Te)==="object"?"url(#".concat(M,")"):void 0,Ce=ZC(N,F,_e,he,L,u,d,Te,"butt",o,H);return _e+=(F-Ce.strokeDashoffset+H)*100/F,I("circle",{className:"".concat(r,"-circle-path"),r:O,cx:0,cy:0,stroke:Ee,strokeWidth:o,opacity:1,style:Ce,ref:function(De){Q[xe]=De}},xe)})};return $e("svg",{className:He("".concat(r,"-circle"),x),viewBox:"".concat(-Hm/2," ").concat(-Hm/2," ").concat(Hm," ").concat(Hm),style:v,id:n,role:"presentation",...k,children:[Z&&I("defs",{children:I("linearGradient",{id:M,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:Object.keys(Z).sort(function(se,oe){return c5(se)-c5(oe)}).map(function(se,oe){return I("stop",{offset:se,stopColor:Z[se]},oe)})})}),!B&&I("circle",{className:"".concat(r,"-circle-trail"),r:O,cx:0,cy:0,stroke:p,strokeLinecap:m,strokeWidth:s||o,style:G}),B?ne():le()]})};pT.defaultProps=Rhe;pT.displayName="Circle";function Gd(e){return!e||e<0?0:e>100?100:e}function wb(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 Fhe(e){var t=e.percent,n=e.success,r=e.successPercent,i=Gd(wb({success:n,successPercent:r}));return[i,Gd(Gd(t)-i)]}function zhe(e){var t=e.success,n=t===void 0?{}:t,r=e.strokeColor,i=n.strokeColor;return[i||Oh.green,r||null]}var $he=function(t){var n=t.prefixCls,r=t.width,i=t.strokeWidth,o=t.trailColor,s=o===void 0?null:o,a=t.strokeLinecap,u=a===void 0?"round":a,d=t.gapPosition,p=t.gapDegree,m=t.type,v=t.children,x=t.success,_=r||120,P={width:_,height:_,fontSize:_*.15+6},k=i||6,T=d||m==="dashboard"&&"bottom"||void 0,M=function(){if(p||p===0)return p;if(m==="dashboard")return 75},O=Object.prototype.toString.call(t.strokeColor)==="[object Object]",N=zhe({success:x,strokeColor:t.strokeColor}),L=He("".concat(n,"-inner"),re({},"".concat(n,"-circle-gradient"),O));return $e("div",{className:L,style:P,children:[I(pT,{percent:Fhe(t),strokeWidth:k,trailWidth:k,strokeColor:N,strokeLinecap:u,trailColor:s,prefixCls:n,gapDegree:M(),gapPosition:T}),v]})};const Bhe=$he;var Vhe=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},Uhe=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,o=r.value;return"".concat(o," ").concat(i,"%")}).join(", ")},jhe=function(t,n){var r=t.from,i=r===void 0?Oh.blue:r,o=t.to,s=o===void 0?Oh.blue:o,a=t.direction,u=a===void 0?n==="rtl"?"to left":"to right":a,d=Vhe(t,["from","to","direction"]);if(Object.keys(d).length!==0){var p=Uhe(d);return{backgroundImage:"linear-gradient(".concat(u,", ").concat(p,")")}}return{backgroundImage:"linear-gradient(".concat(u,", ").concat(i,", ").concat(s,")")}},Hhe=function(t){var n=t.prefixCls,r=t.direction,i=t.percent,o=t.strokeWidth,s=t.size,a=t.strokeColor,u=t.strokeLinecap,d=u===void 0?"round":u,p=t.children,m=t.trailColor,v=m===void 0?null:m,x=t.success,_=a&&typeof a!="string"?jhe(a,r):{background:a},P=d==="square"||d==="butt"?0:void 0,k={backgroundColor:v||void 0,borderRadius:P},T=ze({width:"".concat(Gd(i),"%"),height:o||(s==="small"?6:8),borderRadius:P},_),M=wb(t),O={width:"".concat(Gd(M),"%"),height:o||(s==="small"?6:8),borderRadius:P,backgroundColor:x==null?void 0:x.strokeColor},N=M!==void 0?I("div",{className:"".concat(n,"-success-bg"),style:O}):null;return $e(Tn,{children:[I("div",{className:"".concat(n,"-outer"),children:$e("div",{className:"".concat(n,"-inner"),style:k,children:[I("div",{className:"".concat(n,"-bg"),style:T}),N]})}),p]})};const Khe=Hhe;var Whe=function(t){for(var n=t.size,r=t.steps,i=t.percent,o=i===void 0?0:i,s=t.strokeWidth,a=s===void 0?8:s,u=t.strokeColor,d=t.trailColor,p=d===void 0?null:d,m=t.prefixCls,v=t.children,x=Math.round(r*(o/100)),_=n==="small"?2:14,P=new Array(r),k=0;k<r;k++){var T=Array.isArray(u)?u[k]:u;P[k]=I("div",{className:He("".concat(m,"-steps-item"),re({},"".concat(m,"-steps-item-active"),k<=x-1)),style:{backgroundColor:k<=x-1?T:p,width:_,height:a}},k)}return $e("div",{className:"".concat(m,"-steps-outer"),children:[P,v]})};const Ghe=Whe;var qhe=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};Yo("line","circle","dashboard");var Zhe=Yo("normal","exception","active","success"),Xhe=function(t){var n,r=t.prefixCls,i=t.className,o=t.steps,s=t.strokeColor,a=t.percent,u=a===void 0?0:a,d=t.size,p=d===void 0?"default":d,m=t.showInfo,v=m===void 0?!0:m,x=t.type,_=x===void 0?"line":x,P=qhe(t,["prefixCls","className","steps","strokeColor","percent","size","showInfo","type"]);function k(){var Z=wb(t);return parseInt(Z!==void 0?Z.toString():u.toString(),10)}function T(){var Z=t.status;return!Zhe.includes(Z)&&k()>=100?"success":Z||"normal"}function M(Z,Q){var le=t.format,ne=wb(t);if(!v)return null;var se,oe=le||function(_e){return"".concat(_e,"%")},he=_==="line";return le||Q!=="exception"&&Q!=="success"?se=oe(Gd(u),Gd(ne)):Q==="exception"?se=he?I(yf,{}):I(_p,{}):Q==="success"&&(se=he?I(O_,{}):I(HI,{})),I("span",{className:"".concat(Z,"-text"),title:typeof se=="string"?se:void 0,children:se})}var O=w.exports.useContext(On),N=O.getPrefixCls,L=O.direction,F=N("progress",r),V=T(),B=M(F,V),H=Array.isArray(s)?s[0]:s,G=typeof s=="string"||Array.isArray(s)?s:void 0,ee;_==="line"?ee=o?I(Ghe,{...t,strokeColor:G,prefixCls:F,steps:o,children:B}):I(Khe,{...t,strokeColor:H,prefixCls:F,direction:L,children:B}):(_==="circle"||_==="dashboard")&&(ee=I(Bhe,{...t,strokeColor:H,prefixCls:F,progressStatus:V,children:B}));var X=He(F,(n={},re(n,"".concat(F,"-").concat(_==="dashboard"&&"circle"||o&&"steps"||_),!0),re(n,"".concat(F,"-status-").concat(V),!0),re(n,"".concat(F,"-show-info"),v),re(n,"".concat(F,"-").concat(p),p),re(n,"".concat(F,"-rtl"),L==="rtl"),n),i);return I("div",{...Ci(P,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"]),className:X,role:"progressbar",children:ee})};const Yhe=Xhe;var _f=w.exports.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function q3(e,t,n){return(e-t)/(n-t)}function mT(e,t,n,r){var i=q3(t,n,r),o={};switch(e){case"rtl":o.right="".concat(i*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(i*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(i*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(i*100,"%"),o.transform="translateX(-50%)";break}return o}function Eh(e,t){return Array.isArray(e)?e[t]:e}var Qhe=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],Jhe=w.exports.forwardRef(function(e,t){var n,r,i=e.prefixCls,o=e.value,s=e.valueIndex,a=e.onStartMove,u=e.style,d=e.render,p=e.dragging,m=e.onOffsetChange,v=Rn(e,Qhe),x=w.exports.useContext(_f),_=x.min,P=x.max,k=x.direction,T=x.disabled,M=x.range,O=x.tabIndex,N=x.ariaLabelForHandle,L=x.ariaLabelledByForHandle,F=x.ariaValueTextFormatterForHandle,V="".concat(i,"-handle"),B=function(Z){T||a(Z,s)},H=function(Z){if(!T){var Q=null;switch(Z.which||Z.keyCode){case kt.LEFT:Q=k==="ltr"||k==="btt"?-1:1;break;case kt.RIGHT:Q=k==="ltr"||k==="btt"?1:-1;break;case kt.UP:Q=k!=="ttb"?1:-1;break;case kt.DOWN:Q=k!=="ttb"?-1:1;break;case kt.HOME:Q="min";break;case kt.END:Q="max";break;case kt.PAGE_UP:Q=2;break;case kt.PAGE_DOWN:Q=-2;break}Q!==null&&(Z.preventDefault(),m(Q,s))}},G=mT(k,o,_,P),ee=I("div",{ref:t,className:He(V,(n={},re(n,"".concat(V,"-").concat(s+1),M),re(n,"".concat(V,"-dragging"),p),n)),style:fe(fe({},G),u),onMouseDown:B,onTouchStart:B,onKeyDown:H,tabIndex:T?null:Eh(O,s),role:"slider","aria-valuemin":_,"aria-valuemax":P,"aria-valuenow":o,"aria-disabled":T,"aria-label":Eh(N,s),"aria-labelledby":Eh(L,s),"aria-valuetext":(r=Eh(F,s))===null||r===void 0?void 0:r(o),...v});return d&&(ee=d(ee,{index:s,prefixCls:i,value:o,dragging:p})),ee}),epe=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],tpe=w.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,s=e.values,a=e.handleRender,u=e.draggingIndex,d=Rn(e,epe),p=w.exports.useRef({});return w.exports.useImperativeHandle(t,function(){return{focus:function(v){var x;(x=p.current[v])===null||x===void 0||x.focus()}}}),I(Tn,{children:s.map(function(m,v){return I(Jhe,{ref:function(_){_?p.current[v]=_:delete p.current[v]},dragging:u===v,prefixCls:n,style:Eh(r,v),value:m,valueIndex:v,onStartMove:i,onOffsetChange:o,render:a,...d},v)})})});function f5(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function npe(e,t,n,r,i,o,s,a,u){var d=w.exports.useState(null),p=Le(d,2),m=p[0],v=p[1],x=w.exports.useState(-1),_=Le(x,2),P=_[0],k=_[1],T=w.exports.useState(n),M=Le(T,2),O=M[0],N=M[1],L=w.exports.useState(n),F=Le(L,2),V=F[0],B=F[1],H=w.exports.useRef(null),G=w.exports.useRef(null);w.exports.useEffect(function(){P===-1&&N(n)},[n,P]),w.exports.useEffect(function(){return function(){document.removeEventListener("mousemove",H.current),document.removeEventListener("mouseup",G.current),document.removeEventListener("touchmove",H.current),document.removeEventListener("touchend",G.current)}},[]);var ee=function(se,oe){O.some(function(he,_e){return he!==se[_e]})&&(oe!==void 0&&v(oe),N(se),s(se))},X=function(se,oe){if(se===-1){var he=V[0],_e=V[V.length-1],be=r-he,xe=i-_e,Te=oe*(i-r);Te=Math.max(Te,be),Te=Math.min(Te,xe);var Ee=o(he+Te);Te=Ee-he;var Ce=V.map(function(Ue){return Ue+Te});ee(Ce)}else{var ke=(i-r)*oe,De=Pt(O);De[se]=V[se];var Ke=u(De,ke,se,"dist");ee(Ke.values,Ke.value)}},Z=w.exports.useRef(X);Z.current=X;var Q=function(se,oe){se.stopPropagation();var he=n[oe];k(oe),v(he),B(n);var _e=f5(se),be=_e.pageX,xe=_e.pageY,Te=function(ke){ke.preventDefault();var De=f5(ke),Ke=De.pageX,Ue=De.pageY,tt=Ke-be,lt=Ue-xe,St=e.current.getBoundingClientRect(),We=St.width,bt=St.height,Qe;switch(t){case"btt":Qe=-lt/bt;break;case"ttb":Qe=lt/bt;break;case"rtl":Qe=-tt/We;break;default:Qe=tt/We}Z.current(oe,Qe)},Ee=function Ce(ke){ke.preventDefault(),document.removeEventListener("mouseup",Ce),document.removeEventListener("mousemove",Te),document.removeEventListener("touchend",Ce),document.removeEventListener("touchmove",Te),H.current=null,G.current=null,k(-1),a()};document.addEventListener("mouseup",Ee),document.addEventListener("mousemove",Te),document.addEventListener("touchend",Ee),document.addEventListener("touchmove",Te),H.current=Te,G.current=Ee},le=w.exports.useMemo(function(){var ne=Pt(n).sort(function(oe,he){return oe-he}),se=Pt(O).sort(function(oe,he){return oe-he});return ne.every(function(oe,he){return oe===se[he]})?O:n},[n,O]);return[P,m,le,Q]}function rpe(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,o=e.index,s=e.onStartMove,a=w.exports.useContext(_f),u=a.direction,d=a.min,p=a.max,m=a.disabled,v=a.range,x="".concat(t,"-track"),_=q3(r,d,p),P=q3(i,d,p),k=function(O){!m&&s&&s(O,-1)},T={};switch(u){case"rtl":T.right="".concat(_*100,"%"),T.width="".concat(P*100-_*100,"%");break;case"btt":T.bottom="".concat(_*100,"%"),T.height="".concat(P*100-_*100,"%");break;case"ttb":T.top="".concat(_*100,"%"),T.height="".concat(P*100-_*100,"%");break;default:T.left="".concat(_*100,"%"),T.width="".concat(P*100-_*100,"%")}return I("div",{className:He(x,v&&"".concat(x,"-").concat(o+1)),style:fe(fe({},T),n),onMouseDown:k,onTouchStart:k})}function ipe(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,o=e.onStartMove,s=w.exports.useContext(_f),a=s.included,u=s.range,d=s.min,p=w.exports.useMemo(function(){if(!u){if(r.length===0)return[];var m=i!=null?i:d,v=r[0];return[{start:Math.min(m,v),end:Math.max(m,v)}]}for(var x=[],_=0;_<r.length-1;_+=1)x.push({start:r[_],end:r[_+1]});return x},[r,u,i,d]);return a?p.map(function(m,v){var x=m.start,_=m.end;return I(rpe,{index:v,prefixCls:t,style:Eh(n,v),start:x,end:_,onStartMove:o},v)}):null}function ope(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,o=e.onClick,s=w.exports.useContext(_f),a=s.min,u=s.max,d=s.direction,p=s.includedStart,m=s.includedEnd,v=s.included,x="".concat(t,"-text"),_=mT(d,i,a,u);return I("span",{className:He(x,re({},"".concat(x,"-active"),v&&p<=i&&i<=m)),style:fe(fe({},_),n),onMouseDown:function(k){k.stopPropagation()},onClick:function(){o(i)},children:r})}function ape(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i="".concat(t,"-mark");return n.length?I("div",{className:i,children:n.map(function(o){var s=o.value,a=o.style,u=o.label;return I(ope,{prefixCls:i,style:a,value:s,onClick:r,children:u},s)})}):null}function spe(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,o=w.exports.useContext(_f),s=o.min,a=o.max,u=o.direction,d=o.included,p=o.includedStart,m=o.includedEnd,v="".concat(t,"-dot"),x=d&&p<=n&&n<=m,_=fe(fe({},mT(u,n,s,a)),typeof r=="function"?r(n):r);return x&&(_=fe(fe({},_),typeof i=="function"?i(n):i)),I("span",{className:He(v,re({},"".concat(v,"-active"),x)),style:_})}function lpe(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,o=e.activeStyle,s=w.exports.useContext(_f),a=s.min,u=s.max,d=s.step,p=w.exports.useMemo(function(){var m=new Set;if(n.forEach(function(x){m.add(x.value)}),r&&d!==null)for(var v=a;v<=u;)m.add(v),v+=d;return Array.from(m)},[a,u,d,r,n]);return I("div",{className:"".concat(t,"-step"),children:p.map(function(m){return I(spe,{prefixCls:t,value:m,style:i,activeStyle:o},m)})})}function upe(e,t,n,r,i,o){var s=w.exports.useCallback(function(x){var _=isFinite(x)?x:e;return _=Math.min(t,x),_=Math.max(e,_),_},[e,t]),a=w.exports.useCallback(function(x){if(n!==null){var _=e+Math.round((s(x)-e)/n)*n,P=function(O){return(String(O).split(".")[1]||"").length},k=Math.max(P(n),P(t),P(e)),T=Number(_.toFixed(k));return e<=T&&T<=t?T:null}return null},[n,e,t,s]),u=w.exports.useCallback(function(x){var _=s(x),P=r.map(function(M){return M.value});n!==null&&P.push(a(x)),P.push(e,t);var k=P[0],T=t-e;return P.forEach(function(M){var O=Math.abs(_-M);O<=T&&(k=M,T=O)}),k},[e,t,r,n,s,a]),d=function x(_,P,k){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof P=="number"){var M,O=_[k],N=O+P,L=[];r.forEach(function(G){L.push(G.value)}),L.push(e,t),L.push(a(O));var F=P>0?1:-1;T==="unit"?L.push(a(O+F*n)):L.push(a(N)),L=L.filter(function(G){return G!==null}).filter(function(G){return P<0?G<=O:G>=O}),T==="unit"&&(L=L.filter(function(G){return G!==O}));var V=T==="unit"?O:N;M=L[0];var B=Math.abs(M-V);if(L.forEach(function(G){var ee=Math.abs(G-V);ee<B&&(M=G,B=ee)}),M===void 0)return P<0?e:t;if(T==="dist")return M;if(Math.abs(P)>1){var H=Pt(_);return H[k]=M,x(H,P-F,k,T)}return M}else{if(P==="min")return e;if(P==="max")return t}},p=function(_,P,k){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",M=_[k],O=d(_,P,k,T);return{value:O,changed:O!==M}},m=function(_){return o===null&&_===0||typeof o=="number"&&_<o},v=function(_,P,k){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",M=_.map(u),O=M[k],N=d(M,P,k,T);if(M[k]=N,i===!1){var L=o||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 o=="number"||o===null){for(var F=k+1;F<M.length;F+=1)for(var V=!0;m(M[F]-M[F-1])&&V;){var B=p(M,1,F);M[F]=B.value,V=B.changed}for(var H=k;H>0;H-=1)for(var G=!0;m(M[H]-M[H-1])&&G;){var ee=p(M,-1,H-1);M[H-1]=ee.value,G=ee.changed}for(var X=M.length-1;X>0;X-=1)for(var Z=!0;m(M[X]-M[X-1])&&Z;){var Q=p(M,-1,X-1);M[X-1]=Q.value,Z=Q.changed}for(var le=0;le<M.length-1;le+=1)for(var ne=!0;m(M[le+1]-M[le])&≠){var se=p(M,1,le+1);M[le+1]=se.value,ne=se.changed}}return{value:M[k],values:M}};return[u,v]}var cpe=w.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=r===void 0?"rc-slider":r,o=e.className,s=e.style,a=e.disabled,u=a===void 0?!1:a,d=e.autoFocus,p=e.onFocus,m=e.onBlur,v=e.min,x=v===void 0?0:v,_=e.max,P=_===void 0?100:_,k=e.step,T=k===void 0?1:k,M=e.value,O=e.defaultValue,N=e.range,L=e.count,F=e.onChange,V=e.onBeforeChange,B=e.onAfterChange,H=e.allowCross,G=H===void 0?!0:H,ee=e.pushable,X=ee===void 0?!1:ee,Z=e.draggableTrack,Q=e.reverse,le=e.vertical,ne=e.included,se=ne===void 0?!0:ne,oe=e.startPoint,he=e.trackStyle,_e=e.handleStyle,be=e.railStyle,xe=e.dotStyle,Te=e.activeDotStyle,Ee=e.marks,Ce=e.dots,ke=e.handleRender,De=e.tabIndex,Ke=De===void 0?0:De,Ue=e.ariaLabelForHandle,tt=e.ariaLabelledByForHandle,lt=e.ariaValueTextFormatterForHandle,St=w.exports.useRef(),We=w.exports.useRef(),bt=w.exports.useMemo(function(){return le?Q?"ttb":"btt":Q?"rtl":"ltr"},[Q,le]),Qe=w.exports.useMemo(function(){return isFinite(x)?x:0},[x]),mt=w.exports.useMemo(function(){return isFinite(P)?P:100},[P]),ct=w.exports.useMemo(function(){return T!==null&&T<=0?1:T},[T]),wt=w.exports.useMemo(function(){return X===!0?ct:X>=0?X:!1},[X,ct]),rt=w.exports.useMemo(function(){var ye=Object.keys(Ee||{});return ye.map(function(q){var J=Ee[q],pe={value:Number(q)};return J&&nn(J)==="object"&&!w.exports.isValidElement(J)&&("label"in J||"style"in J)?(pe.style=J.style,pe.label=J.label):pe.label=J,pe}).filter(function(q){var J=q.label;return J||typeof J=="number"}).sort(function(q,J){return q.value-J.value})},[Ee]),ut=upe(Qe,mt,ct,rt,G,wt),nt=Le(ut,2),qe=nt[0],dt=nt[1],_t=ki(O,{value:M}),Dt=Le(_t,2),Nt=Dt[0],jt=Dt[1],Ve=w.exports.useMemo(function(){var ye=Nt==null?[]:Array.isArray(Nt)?Nt:[Nt],q=Le(ye,1),J=q[0],pe=J===void 0?Qe:J,ce=Nt===null?[]:[pe];if(N){if(ce=Pt(ye),L||Nt===void 0){var we=L>=0?L+1:2;for(ce=ce.slice(0,we);ce.length<we;){var Ae;ce.push((Ae=ce[ce.length-1])!==null&&Ae!==void 0?Ae:Qe)}}ce.sort(function(Pe,Me){return Pe-Me})}return ce.forEach(function(Pe,Me){ce[Me]=qe(Pe)}),ce},[Nt,N,Qe,L,qe]),Ze=w.exports.useRef(Ve);Ze.current=Ve;var Yt=function(q){return N?q:q[0]},sn=function(q){var J=Pt(q).sort(function(pe,ce){return pe-ce});F&&!rf(J,Ze.current)&&F(Yt(J)),jt(J)},Gt=function(q){if(!u){var J=0,pe=mt-Qe;Ve.forEach(function(we,Ae){var Pe=Math.abs(q-we);Pe<=pe&&(pe=Pe,J=Ae)});var ce=Pt(Ve);ce[J]=q,N&&!Ve.length&&L===void 0&&ce.push(q),V==null||V(Yt(ce)),sn(ce),B==null||B(Yt(ce))}},zt=function(q){q.preventDefault();var J=We.current.getBoundingClientRect(),pe=J.width,ce=J.height,we=J.left,Ae=J.top,Pe=J.bottom,Me=J.right,Be=q.clientX,Je=q.clientY,et;switch(bt){case"btt":et=(Pe-Je)/ce;break;case"ttb":et=(Je-Ae)/ce;break;case"rtl":et=(Me-Be)/pe;break;default:et=(Be-we)/pe}var Ge=Qe+et*(mt-Qe);Gt(qe(Ge))},Rt=w.exports.useState(null),Qt=Le(Rt,2),pn=Qt[0],ot=Qt[1],Lt=function(q,J){if(!u){var pe=dt(Ve,q,J);V==null||V(Yt(Ve)),sn(pe.values),B==null||B(Yt(pe.values)),ot(pe.value)}};w.exports.useEffect(function(){if(pn!==null){var ye=Ve.indexOf(pn);ye>=0&&St.current.focus(ye)}ot(null)},[pn]);var Tt=w.exports.useMemo(function(){return Z&&ct===null?!1:Z},[Z,ct]),Kt=function(){B==null||B(Yt(Ze.current))},Zt=npe(We,bt,Ve,Qe,mt,qe,sn,Kt,dt),ht=Le(Zt,4),xn=ht[0],bn=ht[1],tn=ht[2],Bt=ht[3],gt=function(q,J){Bt(q,J),V==null||V(Yt(Ze.current))},xt=xn!==-1;w.exports.useEffect(function(){if(!xt){var ye=Ve.lastIndexOf(bn);St.current.focus(ye)}},[xt]);var Vt=w.exports.useMemo(function(){return Pt(tn).sort(function(ye,q){return ye-q})},[tn]),qt=w.exports.useMemo(function(){return N?[Vt[0],Vt[Vt.length-1]]:[Qe,Vt[0]]},[Vt,N,Qe]),vn=Le(qt,2),Fn=vn[0],tr=vn[1];w.exports.useImperativeHandle(t,function(){return{focus:function(){St.current.focus(0)},blur:function(){var q=document,J=q.activeElement;We.current.contains(J)&&(J==null||J.blur())}}}),w.exports.useEffect(function(){d&&St.current.focus(0)},[]);var nr=w.exports.useMemo(function(){return{min:Qe,max:mt,direction:bt,disabled:u,step:ct,included:se,includedStart:Fn,includedEnd:tr,range:N,tabIndex:Ke,ariaLabelForHandle:Ue,ariaLabelledByForHandle:tt,ariaValueTextFormatterForHandle:lt}},[Qe,mt,bt,u,ct,se,Fn,tr,N,Ke,Ue,tt,lt]);return I(_f.Provider,{value:nr,children:$e("div",{ref:We,className:He(i,o,(n={},re(n,"".concat(i,"-disabled"),u),re(n,"".concat(i,"-vertical"),le),re(n,"".concat(i,"-horizontal"),!le),re(n,"".concat(i,"-with-marks"),rt.length),n)),style:s,onMouseDown:zt,children:[I("div",{className:"".concat(i,"-rail"),style:be}),I(ipe,{prefixCls:i,style:he,values:Vt,startPoint:oe,onStartMove:Tt?gt:null}),I(lpe,{prefixCls:i,marks:rt,dots:Ce,style:xe,activeStyle:Te}),I(tpe,{ref:St,prefixCls:i,style:_e,values:tn,draggingIndex:xn,onStartMove:gt,onOffsetChange:Lt,onFocus:p,onBlur:m,handleRender:ke}),I(ape,{prefixCls:i,marks:rt,onClick:Gt})]})})}),dpe=w.exports.forwardRef(function(e,t){var n=e.open,r=w.exports.useRef(null),i=w.exports.useRef(null);function o(){ar.cancel(i.current),i.current=null}function s(){i.current=ar(function(){var a;(a=r.current)===null||a===void 0||a.forcePopupAlign(),i.current=null})}return w.exports.useEffect(function(){return n?s():o(),o},[n,e.title]),I($i,{ref:Zo(r,t),...e})});const fpe=dpe;var hpe=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},ppe=w.exports.forwardRef(function(e,t){var n=w.exports.useContext(On),r=n.getPrefixCls,i=n.direction,o=n.getPopupContainer,s=w.exports.useState({}),a=Le(s,2),u=a[0],d=a[1],p=function(B,H){d(function(G){return ze(ze({},G),re({},B,H))})},m=function(B,H){return B||(H?i==="rtl"?"left":"right":"top")},v=e.prefixCls,x=e.range,_=e.className,P=hpe(e,["prefixCls","range","className"]),k=r("slider",v),T=He(_,re({},"".concat(k,"-rtl"),i==="rtl"));i==="rtl"&&!P.vertical&&(P.reverse=!P.reverse);var M=w.exports.useMemo(function(){return x?nn(x)==="object"?[!0,x.draggableTrack]:[!0,!1]:[!1]},[x]),O=Le(M,2),N=O[0],L=O[1],F=function(B,H){var G,ee=H.index,X=H.dragging,Z=r(),Q=e.tooltip,le=Q===void 0?{}:Q,ne=e.vertical,se=ze({formatter:(G=e.tipFormatter)!==null&&G!==void 0?G:function(De){return typeof De=="number"?De.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},le),oe=se.open,he=se.placement,_e=se.getPopupContainer,be=se.prefixCls,xe=se.formatter,Te=xe?u[ee]||X:!1,Ee=oe||oe===void 0&&Te,Ce=ze(ze({},B.props),{onMouseEnter:function(){return p(ee,!0)},onMouseLeave:function(){return p(ee,!1)}}),ke=r("tooltip",be);return I(fpe,{prefixCls:ke,title:xe?xe(H.value):"",open:Ee,placement:m(he,ne),transitionName:"".concat(Z,"-zoom-down"),overlayClassName:"".concat(k,"-tooltip"),getPopupContainer:_e||o,children:w.exports.cloneElement(B,Ce)},ee)};return I(cpe,{...P,step:P.step,range:N,draggableTrack:L,className:T,ref:t,prefixCls:k,handleRender:F})});const mpe=ppe;function gpe(e){return null}function vpe(e){return null}var ype="RC_TABLE_KEY";function wV(e){return e==null?[]:Array.isArray(e)?e:[e]}function CV(e,t){if(!t&&typeof t!="number")return e;for(var n=wV(t),r=e,i=0;i<n.length;i+=1){if(!r)return null;var o=n[i];r=r[o]}return r}function Y_(e){var t=[],n={};return e.forEach(function(r){for(var i=r||{},o=i.key,s=i.dataIndex,a=o||wV(s).join("-")||ype;n[a];)a="".concat(a,"_next");n[a]=!0,t.push(a)}),t}function Z3(e){return e!=null}var SV=w.exports.createContext(!1);function xpe(){var e=w.exports.createContext(null),t=function(r){var i=r.value,o=r.children,s=w.exports.useRef(i);s.current=i;var a=w.exports.useState(function(){return{getValue:function(){return s.current},listeners:new Set}}),u=Le(a,1),d=u[0];return wi(function(){d.listeners.forEach(function(p){p(i)})},[i]),I(e.Provider,{value:d,children:o})};return{Context:e,Provider:t}}function bpe(e,t){var n=hv(t),r=w.exports.useContext(e==null?void 0:e.Context),i=r||{},o=i.listeners,s=i.getValue,a=w.exports.useState(function(){return n(r?s():null)}),u=Le(a,2),d=u[0],p=u[1];return wi(function(){if(!r)return;function m(v){p(function(x){var _=n(v);return rf(x,_)?x:_})}return o.add(m),function(){o.delete(m)}},[r]),d}var EV=xpe(),Q_=w.exports.createContext(null),PV=w.exports.createContext({renderWithProps:!1}),_pe=["colSpan","rowSpan","style","className"];function wpe(e,t,n,r){var i=e+t-1;return e<=r&&i>=n}function Cpe(e){return e&&nn(e)==="object"&&!Array.isArray(e)&&!w.exports.isValidElement(e)}function Spe(e){return typeof e=="string"?!0:vf(e)}var Epe=function(t){var n=t.ellipsis,r=t.rowType,i=t.children,o,s=n===!0?{showTitle:!0}:n;return s&&(s.showTitle||r==="header")&&(typeof i=="string"||typeof i=="number"?o=i.toString():w.exports.isValidElement(i)&&typeof i.props.children=="string"&&(o=i.props.children)),o};function Ppe(e,t){var n,r,i,o=e.prefixCls,s=e.className,a=e.record,u=e.index,d=e.renderIndex,p=e.dataIndex,m=e.render,v=e.children,x=e.component,_=x===void 0?"td":x,P=e.colSpan,k=e.rowSpan,T=e.fixLeft,M=e.fixRight,O=e.firstFixLeft,N=e.lastFixLeft,L=e.firstFixRight,F=e.lastFixRight,V=e.appendNode,B=e.additionalProps,H=B===void 0?{}:B,G=e.ellipsis,ee=e.align,X=e.rowType,Z=e.isSticky,Q=e.hovering,le=e.onHover,ne="".concat(o,"-cell"),se=w.exports.useContext(PV),oe=w.exports.useContext(SV),he=w.exports.useContext(Q_),_e=he.allColumnsFixedLeft,be=w.exports.useMemo(function(){if(Z3(v))return[v];var qe=CV(a,p),dt=qe,_t=void 0;if(m){var Dt=m(qe,a,d);Cpe(Dt)?(dt=Dt.children,_t=Dt.props,se.renderWithProps=!0):dt=Dt}return[dt,_t]},[se.renderWithProps?Math.random():0,v,p,se,a,m,d]),xe=Le(be,2),Te=xe[0],Ee=xe[1],Ce=Te;nn(Ce)==="object"&&!Array.isArray(Ce)&&!w.exports.isValidElement(Ce)&&(Ce=null),G&&(N||L)&&(Ce=I("span",{className:"".concat(ne,"-content"),children:Ce}));var ke=Ee||{},De=ke.colSpan,Ke=ke.rowSpan,Ue=ke.style,tt=ke.className,lt=Rn(ke,_pe),St=(n=De!==void 0?De:P)!==null&&n!==void 0?n:1,We=(r=Ke!==void 0?Ke:k)!==null&&r!==void 0?r:1;if(St===0||We===0)return null;var bt={},Qe=typeof T=="number"&&oe,mt=typeof M=="number"&&oe;Qe&&(bt.position="sticky",bt.left=T),mt&&(bt.position="sticky",bt.right=M);var ct={};ee&&(ct.textAlign=ee);var wt=function(dt){var _t;a&&le(u,u+We-1),H==null||(_t=H.onMouseEnter)===null||_t===void 0||_t.call(H,dt)},rt=function(dt){var _t;a&&le(-1,-1),H==null||(_t=H.onMouseLeave)===null||_t===void 0||_t.call(H,dt)},ut=Epe({rowType:X,ellipsis:G,children:Te}),nt=fe(fe(fe({title:ut},lt),H),{},{colSpan:St!==1?St:null,rowSpan:We!==1?We:null,className:He(ne,s,(i={},re(i,"".concat(ne,"-fix-left"),Qe&&oe),re(i,"".concat(ne,"-fix-left-first"),O&&oe),re(i,"".concat(ne,"-fix-left-last"),N&&oe),re(i,"".concat(ne,"-fix-left-all"),N&&_e&&oe),re(i,"".concat(ne,"-fix-right"),mt&&oe),re(i,"".concat(ne,"-fix-right-first"),L&&oe),re(i,"".concat(ne,"-fix-right-last"),F&&oe),re(i,"".concat(ne,"-ellipsis"),G),re(i,"".concat(ne,"-with-append"),V),re(i,"".concat(ne,"-fix-sticky"),(Qe||mt)&&Z&&oe),re(i,"".concat(ne,"-row-hover"),!Ee&&Q),i),H.className,tt),style:fe(fe(fe(fe({},H.style),ct),bt),Ue),onMouseEnter:wt,onMouseLeave:rt,ref:Spe(_)?t:null});return $e(_,{...nt,children:[V,Ce]})}var IV=w.exports.forwardRef(Ppe);IV.displayName="Cell";var Ipe=["expanded","className","hovering"],Tpe=w.exports.memo(IV,function(e,t){return t.shouldCellUpdate?Ipe.every(function(n){return e[n]===t[n]})&&!t.shouldCellUpdate(t.record,e.record):rf(e,t)}),n0=w.exports.forwardRef(function(e,t){var n=e.index,r=e.additionalProps,i=r===void 0?{}:r,o=e.colSpan,s=e.rowSpan,a=i.colSpan,u=i.rowSpan,d=o!=null?o:a,p=s!=null?s:u,m=bpe(EV,function(_){var P=wpe(n,p||1,_==null?void 0:_.startRow,_==null?void 0:_.endRow);return{onHover:_==null?void 0:_.onHover,hovering:P}}),v=m.onHover,x=m.hovering;return I(Tpe,{...e,colSpan:d,rowSpan:p,hovering:x,ref:t,onHover:v})});n0.displayName="WrappedCell";var Ml=w.exports.createContext(null);function gT(e,t,n,r,i){var o=n[e]||{},s=n[t]||{},a,u;o.fixed==="left"?a=r.left[e]:s.fixed==="right"&&(u=r.right[t]);var d=!1,p=!1,m=!1,v=!1,x=n[t+1],_=n[e-1];if(i==="rtl"){if(a!==void 0){var P=_&&_.fixed==="left";v=!P}else if(u!==void 0){var k=x&&x.fixed==="right";m=!k}}else if(a!==void 0){var T=x&&x.fixed==="left";d=!T}else if(u!==void 0){var M=_&&_.fixed==="right";p=!M}return{fixLeft:a,fixRight:u,lastFixLeft:d,firstFixRight:p,lastFixRight:m,firstFixLeft:v,isSticky:r.isSticky}}function TV(e){var t=e.cells,n=e.stickyOffsets,r=e.flattenColumns,i=e.rowComponent,o=e.cellComponent,s=e.onHeaderRow,a=e.index,u=w.exports.useContext(Ml),d=u.prefixCls,p=u.direction,m;s&&(m=s(t.map(function(x){return x.column}),a));var v=Y_(t.map(function(x){return x.column}));return I(i,{...m,children:t.map(function(x,_){var P=x.column,k=gT(x.colStart,x.colEnd,r,n,p),T;return P&&P.onHeaderCell&&(T=x.column.onHeaderCell(P)),w.exports.createElement(n0,{...x,ellipsis:P.ellipsis,align:P.align,component:o,prefixCls:d,key:v[_],...k,additionalProps:T,rowType:"header"})})})}TV.displayName="HeaderRow";function kpe(e){var t=[];function n(s,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[u]=t[u]||[];var d=a,p=s.filter(Boolean).map(function(m){var v={key:m.key,className:m.className||"",children:m.title,column:m,colStart:d},x=1,_=m.children;return _&&_.length>0&&(x=n(_,d,u+1).reduce(function(P,k){return P+k},0),v.hasSubColumns=!0),"colSpan"in m&&(x=m.colSpan),"rowSpan"in m&&(v.rowSpan=m.rowSpan),v.colSpan=x,v.colEnd=v.colStart+x-1,t[u].push(v),d+=x,x});return p}n(e,0);for(var r=t.length,i=function(a){t[a].forEach(function(u){!("rowSpan"in u)&&!u.hasSubColumns&&(u.rowSpan=r-a)})},o=0;o<r;o+=1)i(o);return t}function h5(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,o=w.exports.useContext(Ml),s=o.prefixCls,a=o.getComponent,u=w.exports.useMemo(function(){return kpe(n)},[n]),d=a(["header","wrapper"],"thead"),p=a(["header","row"],"tr"),m=a(["header","cell"],"th");return I(d,{className:"".concat(s,"-thead"),children:u.map(function(v,x){var _=I(TV,{flattenColumns:r,cells:v,stickyOffsets:t,rowComponent:p,cellComponent:m,onHeaderRow:i,index:x},x);return _})})}var kV=w.exports.createContext(null);function MV(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,o=e.className,s=e.expanded,a=e.colSpan,u=e.isEmpty,d=w.exports.useContext(Ml),p=d.scrollbarSize,m=w.exports.useContext(kV),v=m.fixHeader,x=m.fixColumn,_=m.componentWidth,P=m.horizonScroll;return w.exports.useMemo(function(){var k=n;return(u?P:x)&&(k=I("div",{style:{width:_-(v?p:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed"),children:_!==0&&k})),I(r,{className:o,style:{display:s?null:"none"},children:I(n0,{component:i,prefixCls:t,colSpan:a,children:k})})},[n,r,o,s,a,u,p,_,x,v,P])}var RV=w.exports.createContext(null);function AV(e){var t=e.className,n=e.style,r=e.record,i=e.index,o=e.renderIndex,s=e.rowKey,a=e.rowExpandable,u=e.expandedKeys,d=e.onRow,p=e.indent,m=p===void 0?0:p,v=e.rowComponent,x=e.cellComponent,_=e.childrenColumnName,P=w.exports.useContext(Ml),k=P.prefixCls,T=P.fixedInfoList,M=w.exports.useContext(Q_),O=M.flattenColumns,N=M.expandableType,L=M.expandRowByClick,F=M.onTriggerExpand,V=M.rowClassName,B=M.expandedRowClassName,H=M.indentSize,G=M.expandIcon,ee=M.expandedRowRender,X=M.expandIconColumnIndex,Z=w.exports.useState(!1),Q=Le(Z,2),le=Q[0],ne=Q[1],se=u&&u.has(e.recordKey);w.exports.useEffect(function(){se&&ne(!0)},[se]);var oe=N==="row"&&(!a||a(r)),he=N==="nest",_e=_&&r&&r[_],be=oe||he,xe=w.exports.useRef(F);xe.current=F;var Te=function(){xe.current.apply(xe,arguments)},Ee=d==null?void 0:d(r,i),Ce=function(We){var bt;L&&be&&Te(r,We);for(var Qe=arguments.length,mt=new Array(Qe>1?Qe-1:0),ct=1;ct<Qe;ct++)mt[ct-1]=arguments[ct];Ee==null||(bt=Ee.onClick)===null||bt===void 0||bt.call.apply(bt,[Ee,We].concat(mt))},ke;typeof V=="string"?ke=V:typeof V=="function"&&(ke=V(r,i,m));var De=Y_(O),Ke=I(v,{...Ee,"data-row-key":s,className:He(t,"".concat(k,"-row"),"".concat(k,"-row-level-").concat(m),ke,Ee&&Ee.className),style:fe(fe({},n),Ee?Ee.style:null),onClick:Ce,children:O.map(function(St,We){var bt=St.render,Qe=St.dataIndex,mt=St.className,ct=De[We],wt=T[We],rt;We===(X||0)&&he&&(rt=$e(Tn,{children:[I("span",{style:{paddingLeft:"".concat(H*m,"px")},className:"".concat(k,"-row-indent indent-level-").concat(m)}),G({prefixCls:k,expanded:se,expandable:_e,record:r,onExpand:Te})]}));var ut;return St.onCell&&(ut=St.onCell(r,i)),I(n0,{className:mt,ellipsis:St.ellipsis,align:St.align,component:x,prefixCls:k,record:r,index:i,renderIndex:o,dataIndex:Qe,render:bt,shouldCellUpdate:St.shouldCellUpdate,expanded:rt&&se,...wt,appendNode:rt,additionalProps:ut},ct)})}),Ue;if(oe&&(le||se)){var tt=ee(r,i,m+1,se),lt=B&&B(r,i,m);Ue=I(MV,{expanded:se,className:He("".concat(k,"-expanded-row"),"".concat(k,"-expanded-row-level-").concat(m+1),lt),prefixCls:k,component:v,cellComponent:x,colSpan:O.length,isEmpty:!1,children:tt})}return $e(Tn,{children:[Ke,Ue]})}AV.displayName="BodyRow";function DV(e,t,n,r,i,o){var s=[];s.push({record:e,indent:t,index:o});var a=i(e),u=r==null?void 0:r.has(a);if(e&&Array.isArray(e[n])&&u)for(var d=0;d<e[n].length;d+=1){var p=DV(e[n][d],t+1,n,r,i,d);s.push.apply(s,Pt(p))}return s}function Mpe(e,t,n,r){var i=w.exports.useMemo(function(){if(n!=null&&n.size){for(var o=[],s=0;s<(e==null?void 0:e.length);s+=1){var a=e[s];o.push.apply(o,Pt(DV(a,0,t,n,r,s)))}return o}return e==null?void 0:e.map(function(u,d){return{record:u,indent:0,index:d}})},[e,t,n,r]);return i}function Rpe(e){var t=e.columnKey,n=e.onColumnResize,r=w.exports.useRef();return w.exports.useEffect(function(){r.current&&n(t,r.current.offsetWidth)},[]),I(_u,{data:t,children:I("td",{ref:r,style:{padding:0,border:0,height:0},children:I("div",{style:{height:0,overflow:"hidden"},children:"\xA0"})})})}function Ape(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize;return I("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},children:I(_u.Collection,{onBatchResize:function(o){o.forEach(function(s){var a=s.data,u=s.size;r(a,u.offsetWidth)})},children:n.map(function(i){return I(Rpe,{columnKey:i,onColumnResize:r},i)})})})}function Dpe(e){var t=e.data,n=e.getRowKey,r=e.measureColumnWidth,i=e.expandedKeys,o=e.onRow,s=e.rowExpandable,a=e.emptyNode,u=e.childrenColumnName,d=w.exports.useContext(RV),p=d.onColumnResize,m=w.exports.useContext(Ml),v=m.prefixCls,x=m.getComponent,_=w.exports.useContext(Q_),P=_.flattenColumns,k=Mpe(t,u,i,n),T=w.exports.useRef({renderWithProps:!1}),M=w.exports.useState(-1),O=Le(M,2),N=O[0],L=O[1],F=w.exports.useState(-1),V=Le(F,2),B=V[0],H=V[1],G=w.exports.useCallback(function(X,Z){L(X),H(Z)},[]),ee=w.exports.useMemo(function(){var X=x(["body","wrapper"],"tbody"),Z=x(["body","row"],"tr"),Q=x(["body","cell"],"td"),le;t.length?le=k.map(function(se,oe){var he=se.record,_e=se.indent,be=se.index,xe=n(he,oe);return I(AV,{rowKey:xe,record:he,recordKey:xe,index:oe,renderIndex:be,rowComponent:Z,cellComponent:Q,expandedKeys:i,onRow:o,getRowKey:n,rowExpandable:s,childrenColumnName:u,indent:_e},xe)}):le=I(MV,{expanded:!0,className:"".concat(v,"-placeholder"),prefixCls:v,component:Z,cellComponent:Q,colSpan:P.length,isEmpty:!0,children:a});var ne=Y_(P);return $e(X,{className:"".concat(v,"-tbody"),children:[r&&I(Ape,{prefixCls:v,columnsKey:ne,onColumnResize:p}),le]})},[t,v,o,r,i,n,x,a,P,u,p,s,k]);return I(PV.Provider,{value:T.current,children:I(EV.Provider,{value:{startRow:N,endRow:B,onHover:G},children:ee})})}var OV=w.exports.memo(Dpe);OV.displayName="Body";var Ope=["expandable"],Mg="RC_TABLE_INTERNAL_COL_DEFINE";function Npe(e){var t=e.expandable,n=Rn(e,Ope),r;return"expandable"in e?r=fe(fe({},n),t):r=n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}var Sd={},Lpe=["children"],Fpe=["fixed"];function vT(e){return yo(e).filter(function(t){return w.exports.isValidElement(t)}).map(function(t){var n=t.key,r=t.props,i=r.children,o=Rn(r,Lpe),s=fe({key:n},o);return i&&(s.children=vT(i)),s})}function X3(e){return e.reduce(function(t,n){var r=n.fixed,i=r===!0?"left":r,o=n.children;return o&&o.length>0?[].concat(Pt(t),Pt(X3(o).map(function(s){return fe({fixed:i},s)}))):[].concat(Pt(t),[fe(fe({},n),{},{fixed:i})])},[])}function zpe(e){return e.map(function(t){var n=t.fixed,r=Rn(t,Fpe),i=n;return n==="left"?i="right":n==="right"&&(i="left"),fe({fixed:i},r)})}function $pe(e,t){var n=e.prefixCls,r=e.columns,i=e.children,o=e.expandable,s=e.expandedKeys,a=e.columnTitle,u=e.getRowKey,d=e.onTriggerExpand,p=e.expandIcon,m=e.rowExpandable,v=e.expandIconColumnIndex,x=e.direction,_=e.expandRowByClick,P=e.columnWidth,k=e.fixed,T=w.exports.useMemo(function(){return r||vT(i)},[r,i]),M=w.exports.useMemo(function(){if(o){var L,F=T.slice();if(!F.includes(Sd)){var V=v||0;V>=0&&F.splice(V,0,Sd)}var B=F.indexOf(Sd);F=F.filter(function(X,Z){return X!==Sd||Z===B});var H=T[B],G;(k==="left"||k)&&!v?G="left":(k==="right"||k)&&v===T.length?G="right":G=H?H.fixed:null;var ee=(L={},re(L,Mg,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),re(L,"title",a),re(L,"fixed",G),re(L,"className","".concat(n,"-row-expand-icon-cell")),re(L,"width",P),re(L,"render",function(Z,Q,le){var ne=u(Q,le),se=s.has(ne),oe=m?m(Q):!0,he=p({prefixCls:n,expanded:se,expandable:oe,record:Q,onExpand:d});return _?I("span",{onClick:function(be){return be.stopPropagation()},children:he}):he}),L);return F.map(function(X){return X===Sd?ee:X})}return T.filter(function(X){return X!==Sd})},[o,T,u,s,p,x]),O=w.exports.useMemo(function(){var L=M;return t&&(L=t(L)),L.length||(L=[{render:function(){return null}}]),L},[t,M,x]),N=w.exports.useMemo(function(){return x==="rtl"?zpe(X3(O)):X3(O)},[O,x]);return[O,N]}function NV(e){var t=w.exports.useRef(e),n=w.exports.useState({}),r=Le(n,2),i=r[1],o=w.exports.useRef(null),s=w.exports.useRef([]);function a(u){s.current.push(u);var d=Promise.resolve();o.current=d,d.then(function(){if(o.current===d){var p=s.current,m=t.current;s.current=[],p.forEach(function(v){t.current=v(t.current)}),o.current=null,m!==t.current&&i({})}})}return w.exports.useEffect(function(){return function(){o.current=null}},[]),[t.current,a]}function Bpe(e){var t=w.exports.useRef(e||null),n=w.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 o(){return t.current}return w.exports.useEffect(function(){return r},[]),[i,o]}function Vpe(e,t,n){var r=w.exports.useMemo(function(){for(var i=[],o=[],s=0,a=0,u=0;u<t;u+=1)if(n==="rtl"){o[u]=a,a+=e[u]||0;var d=t-u-1;i[d]=s,s+=e[d]||0}else{i[u]=s,s+=e[u]||0;var p=t-u-1;o[p]=a,a+=e[p]||0}return{left:i,right:o}},[e,t,n]);return r}var Upe=["columnType"];function LV(e){for(var t=e.colWidths,n=e.columns,r=e.columCount,i=[],o=r||n.length,s=!1,a=o-1;a>=0;a-=1){var u=t[a],d=n&&n[a],p=d&&d[Mg];if(u||p||s){var m=p||{};m.columnType;var v=Rn(m,Upe);i.unshift(I("col",{style:{width:u},...v},a)),s=!0}}return I("colgroup",{children:i})}function p5(e){var t=e.className,n=e.children;return I("div",{className:t,children:n})}var FV=w.exports.createContext({});function jpe(e){var t=e.className,n=e.index,r=e.children,i=e.colSpan,o=i===void 0?1:i,s=e.rowSpan,a=e.align,u=w.exports.useContext(Ml),d=u.prefixCls,p=u.direction,m=w.exports.useContext(FV),v=m.scrollColumnIndex,x=m.stickyOffsets,_=m.flattenColumns,P=n+o-1,k=P+1===v?o+1:o,T=gT(n,n+k-1,_,x,p);return I(n0,{className:t,index:n,component:"td",prefixCls:d,record:null,dataIndex:null,align:a,colSpan:k,rowSpan:s,render:function(){return r},...T})}var Hpe=["children"];function Kpe(e){var t=e.children,n=Rn(e,Hpe);return I("tr",{...n,children:t})}function J_(e){var t=e.children;return t}J_.Row=Kpe;J_.Cell=jpe;function ox(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,i=w.exports.useContext(Ml),o=i.prefixCls,s=r.length-1,a=r[s],u=w.exports.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:a!=null&&a.scrollbar?s:null}},[a,r,s,n]);return I(FV.Provider,{value:u,children:I("tfoot",{className:"".concat(o,"-summary"),children:t})})}var zV=J_;function Wpe(e){var t,n=e.prefixCls,r=e.record,i=e.onExpand,o=e.expanded,s=e.expandable,a="".concat(n,"-row-expand-icon");if(!s)return I("span",{className:He(a,"".concat(n,"-row-spaced"))});var u=function(p){i(r,p),p.stopPropagation()};return I("span",{className:He(a,(t={},re(t,"".concat(n,"-row-expanded"),o),re(t,"".concat(n,"-row-collapsed"),!o),t)),onClick:u})}function Gpe(e,t,n){var r=[];function i(o){(o||[]).forEach(function(s,a){r.push(t(s,a)),i(s[n])})}return i(e),r}var qpe=function(t,n){var r,i,o=t.scrollBodyRef,s=t.onScroll,a=t.offsetScroll,u=t.container,d=w.exports.useContext(Ml),p=d.prefixCls,m=((r=o.current)===null||r===void 0?void 0:r.scrollWidth)||0,v=((i=o.current)===null||i===void 0?void 0:i.clientWidth)||0,x=m&&v*(v/m),_=w.exports.useRef(),P=NV({scrollLeft:0,isHiddenScrollBar:!1}),k=Le(P,2),T=k[0],M=k[1],O=w.exports.useRef({delta:0,x:0}),N=w.exports.useState(!1),L=Le(N,2),F=L[0],V=L[1],B=function(){V(!1)},H=function(Q){Q.persist(),O.current.delta=Q.pageX-T.scrollLeft,O.current.x=0,V(!0),Q.preventDefault()},G=function(Q){var le,ne=Q||((le=window)===null||le===void 0?void 0:le.event),se=ne.buttons;if(!F||se===0){F&&V(!1);return}var oe=O.current.x+Q.pageX-O.current.x-O.current.delta;oe<=0&&(oe=0),oe+x>=v&&(oe=v-x),s({scrollLeft:oe/v*(m+2)}),O.current.x=Q.pageX},ee=function(){if(!!o.current){var Q=H3(o.current).top,le=Q+o.current.offsetHeight,ne=u===window?document.documentElement.scrollTop+window.innerHeight:H3(u).top+u.clientHeight;le-bb()<=ne||Q>=ne-a?M(function(se){return fe(fe({},se),{},{isHiddenScrollBar:!0})}):M(function(se){return fe(fe({},se),{},{isHiddenScrollBar:!1})})}},X=function(Q){M(function(le){return fe(fe({},le),{},{scrollLeft:Q/m*v||0})})};return w.exports.useImperativeHandle(n,function(){return{setScrollLeft:X}}),w.exports.useEffect(function(){var Z=la(document.body,"mouseup",B,!1),Q=la(document.body,"mousemove",G,!1);return ee(),function(){Z.remove(),Q.remove()}},[x,F]),w.exports.useEffect(function(){var Z=la(u,"scroll",ee,!1),Q=la(window,"resize",ee,!1);return function(){Z.remove(),Q.remove()}},[u]),w.exports.useEffect(function(){T.isHiddenScrollBar||M(function(Z){var Q=o.current;return Q?fe(fe({},Z),{},{scrollLeft:Q.scrollLeft/Q.scrollWidth*Q.clientWidth}):Z})},[T.isHiddenScrollBar]),m<=v||!x||T.isHiddenScrollBar?null:I("div",{style:{height:bb(),width:v,bottom:a},className:"".concat(p,"-sticky-scroll"),children:I("div",{onMouseDown:H,ref:_,className:He("".concat(p,"-sticky-scroll-bar"),re({},"".concat(p,"-sticky-scroll-bar-active"),F)),style:{width:"".concat(x,"px"),transform:"translate3d(".concat(T.scrollLeft,"px, 0, 0)")}})})};const Zpe=w.exports.forwardRef(qpe);var m5=Mo()?window:null;function Xpe(e,t){var n=nn(e)==="object"?e:{},r=n.offsetHeader,i=r===void 0?0:r,o=n.offsetSummary,s=o===void 0?0:o,a=n.offsetScroll,u=a===void 0?0:a,d=n.getContainer,p=d===void 0?function(){return m5}:d,m=p()||m5;return w.exports.useMemo(function(){var v=!!e;return{isSticky:v,stickyClassName:v?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:s,offsetScroll:u,container:m}},[u,i,s,t,m])}var Ype=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Qpe(e,t){return w.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 Y3=w.exports.forwardRef(function(e,t){var n=e.className,r=e.noData,i=e.columns,o=e.flattenColumns,s=e.colWidths,a=e.columCount,u=e.stickyOffsets,d=e.direction,p=e.fixHeader,m=e.stickyTopOffset,v=e.stickyBottomOffset,x=e.stickyClassName,_=e.onScroll,P=e.maxContentScroll,k=e.children,T=Rn(e,Ype),M=w.exports.useContext(Ml),O=M.prefixCls,N=M.scrollbarSize,L=M.isSticky,F=L&&!p?0:N,V=w.exports.useRef(null),B=w.exports.useCallback(function(ne){nb(t,ne),nb(V,ne)},[]);w.exports.useEffect(function(){var ne;function se(oe){var he=oe.currentTarget,_e=oe.deltaX;_e&&(_({currentTarget:he,scrollLeft:he.scrollLeft+_e}),oe.preventDefault())}return(ne=V.current)===null||ne===void 0||ne.addEventListener("wheel",se),function(){var oe;(oe=V.current)===null||oe===void 0||oe.removeEventListener("wheel",se)}},[]);var H=w.exports.useMemo(function(){return o.every(function(ne){return ne.width>=0})},[o]),G=o[o.length-1],ee={fixed:G?G.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(O,"-cell-scrollbar")}}},X=w.exports.useMemo(function(){return F?[].concat(Pt(i),[ee]):i},[F,i]),Z=w.exports.useMemo(function(){return F?[].concat(Pt(o),[ee]):o},[F,o]),Q=w.exports.useMemo(function(){var ne=u.right,se=u.left;return fe(fe({},u),{},{left:d==="rtl"?[].concat(Pt(se.map(function(oe){return oe+F})),[0]):se,right:d==="rtl"?ne:[].concat(Pt(ne.map(function(oe){return oe+F})),[0]),isSticky:L})},[F,u,L]),le=Qpe(s,a);return I("div",{style:fe({overflow:"hidden"},L?{top:m,bottom:v}:{}),ref:B,className:He(n,re({},x,!!x)),children:$e("table",{style:{tableLayout:"fixed",visibility:r||le?null:"hidden"},children:[(!r||!P||H)&&I(LV,{colWidths:le?[].concat(Pt(le),[F]):[],columCount:a+1,columns:Z}),k(fe(fe({},T),{},{stickyOffsets:Q,columns:X,flattenColumns:Z}))]})})});Y3.displayName="FixedHolder";var Jpe=[],eme={},l1="rc-table-internal-hook",tme=w.exports.memo(function(e){var t=e.children;return t},function(e,t){return rf(e.props,t.props)?e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight:!1});function wf(e){var t,n=e.prefixCls,r=e.className,i=e.rowClassName,o=e.style,s=e.data,a=e.rowKey,u=e.scroll,d=e.tableLayout,p=e.direction,m=e.title,v=e.footer,x=e.summary,_=e.id,P=e.showHeader,k=e.components,T=e.emptyText,M=e.onRow,O=e.onHeaderRow,N=e.internalHooks,L=e.transformColumns,F=e.internalRefs,V=e.sticky,B=s||Jpe,H=!!B.length,G=w.exports.useCallback(function(Wn,rr){return CV(k||{},Wn)||rr},[k]),ee=w.exports.useMemo(function(){return typeof a=="function"?a:function(Wn){var rr=Wn&&Wn[a];return rr}},[a]),X=Npe(e),Z=X.expandIcon,Q=X.expandedRowKeys,le=X.defaultExpandedRowKeys,ne=X.defaultExpandAllRows,se=X.expandedRowRender,oe=X.columnTitle,he=X.onExpand,_e=X.onExpandedRowsChange,be=X.expandRowByClick,xe=X.rowExpandable,Te=X.expandIconColumnIndex,Ee=X.expandedRowClassName,Ce=X.childrenColumnName,ke=X.indentSize,De=Z||Wpe,Ke=Ce||"children",Ue=w.exports.useMemo(function(){return se?"row":e.expandable&&N===l1&&e.expandable.__PARENT_RENDER_ICON__||B.some(function(Wn){return Wn&&nn(Wn)==="object"&&Wn[Ke]})?"nest":!1},[!!se,B]),tt=w.exports.useState(function(){return le||(ne?Gpe(B,ee,Ke):[])}),lt=Le(tt,2),St=lt[0],We=lt[1],bt=w.exports.useMemo(function(){return new Set(Q||St||[])},[Q,St]),Qe=w.exports.useCallback(function(Wn){var rr=ee(Wn,B.indexOf(Wn)),Ur,Ui=bt.has(rr);Ui?(bt.delete(rr),Ur=Pt(bt)):Ur=[].concat(Pt(bt),[rr]),We(Ur),he&&he(!Ui,Wn),_e&&_e(Ur)},[ee,bt,B,he,_e]),mt=w.exports.useState(0),ct=Le(mt,2),wt=ct[0],rt=ct[1],ut=$pe(fe(fe(fe({},e),X),{},{expandable:!!se,columnTitle:oe,expandedKeys:bt,getRowKey:ee,onTriggerExpand:Qe,expandIcon:De,expandIconColumnIndex:Te,direction:p}),N===l1?L:null),nt=Le(ut,2),qe=nt[0],dt=nt[1],_t=w.exports.useMemo(function(){return{columns:qe,flattenColumns:dt}},[qe,dt]),Dt=w.exports.useRef(),Nt=w.exports.useRef(),jt=w.exports.useRef(),Ve=w.exports.useRef(),Ze=w.exports.useRef(),Yt=w.exports.useState(!1),sn=Le(Yt,2),Gt=sn[0],zt=sn[1],Rt=w.exports.useState(!1),Qt=Le(Rt,2),pn=Qt[0],ot=Qt[1],Lt=NV(new Map),Tt=Le(Lt,2),Kt=Tt[0],Zt=Tt[1],ht=Y_(dt),xn=ht.map(function(Wn){return Kt.get(Wn)}),bn=w.exports.useMemo(function(){return xn},[xn.join("_")]),tn=Vpe(bn,dt.length,p),Bt=u&&Z3(u.y),gt=u&&Z3(u.x)||Boolean(X.fixed),xt=gt&&dt.some(function(Wn){var rr=Wn.fixed;return rr}),Vt=w.exports.useRef(),qt=Xpe(V,n),vn=qt.isSticky,Fn=qt.offsetHeader,tr=qt.offsetSummary,nr=qt.offsetScroll,ye=qt.stickyClassName,q=qt.container,J=x==null?void 0:x(B),pe=(Bt||vn)&&w.exports.isValidElement(J)&&J.type===J_&&J.props.fixed,ce,we,Ae;Bt&&(we={overflowY:"scroll",maxHeight:u.y}),gt&&(ce={overflowX:"auto"},Bt||(we={overflowY:"hidden"}),Ae={width:(u==null?void 0:u.x)===!0?"auto":u==null?void 0:u.x,minWidth:"100%"});var Pe=w.exports.useCallback(function(Wn,rr){LI(Dt.current)&&Zt(function(Ur){if(Ur.get(Wn)!==rr){var Ui=new Map(Ur);return Ui.set(Wn,rr),Ui}return Ur})},[]),Me=Bpe(null),Be=Le(Me,2),Je=Be[0],et=Be[1];function Ge(Wn,rr){!rr||(typeof rr=="function"?rr(Wn):rr.scrollLeft!==Wn&&(rr.scrollLeft=Wn))}var Ut=function(rr){var Ur=rr.currentTarget,Ui=rr.scrollLeft,Gs=p==="rtl",Jo=typeof Ui=="number"?Ui:Ur.scrollLeft,Rl=Ur||eme;if(!et()||et()===Rl){var bs;Je(Rl),Ge(Jo,Nt.current),Ge(Jo,jt.current),Ge(Jo,Ze.current),Ge(Jo,(bs=Vt.current)===null||bs===void 0?void 0:bs.setScrollLeft)}if(Ur){var Pr=Ur.scrollWidth,_s=Ur.clientWidth;if(Pr===_s){zt(!1),ot(!1);return}Gs?(zt(-Jo<Pr-_s),ot(-Jo>0)):(zt(Jo>0),ot(Jo<Pr-_s))}},Mt=function(){gt&&jt.current?Ut({currentTarget:jt.current}):(zt(!1),ot(!1))},at=function(rr){var Ur=rr.width;Ur!==wt&&(Mt(),rt(Dt.current?Dt.current.offsetWidth:Ur))},$t=w.exports.useRef(!1);w.exports.useEffect(function(){$t.current&&Mt()},[gt,s,qe.length]),w.exports.useEffect(function(){$t.current=!0},[]);var Xt=w.exports.useState(0),En=Le(Xt,2),hn=En[0],Pn=En[1],Gn=w.exports.useState(!0),lr=Le(Gn,2),Zr=lr[0],hr=lr[1];w.exports.useEffect(function(){jt.current instanceof Element?Pn(OO(jt.current).width):Pn(OO(Ve.current).width),hr(V3("position","sticky"))},[]),w.exports.useEffect(function(){N===l1&&F&&(F.body.current=jt.current)});var Vr=G(["table"],"table"),Nn=w.exports.useMemo(function(){return d||(xt?(u==null?void 0:u.x)==="max-content"?"auto":"fixed":Bt||vn||dt.some(function(Wn){var rr=Wn.ellipsis;return rr})?"fixed":"auto")},[Bt,xt,dt,d,vn]),An,zn={colWidths:bn,columCount:dt.length,stickyOffsets:tn,onHeaderRow:O,fixHeader:Bt,scroll:u},ri=w.exports.useMemo(function(){return H?null:typeof T=="function"?T():T},[H,T]),Er=I(OV,{data:B,measureColumnWidth:Bt||gt||vn,expandedKeys:bt,rowExpandable:xe,getRowKey:ee,onRow:M,emptyNode:ri,childrenColumnName:Ke}),Xn=I(LV,{colWidths:dt.map(function(Wn){var rr=Wn.width;return rr}),columns:dt}),Kn=G(["body"]);if(Bt||vn){var or;typeof Kn=="function"?(or=Kn(B,{scrollbarSize:hn,ref:jt,onScroll:Ut}),zn.colWidths=dt.map(function(Wn,rr){var Ur=Wn.width,Ui=rr===qe.length-1?Ur-hn:Ur;return typeof Ui=="number"&&!Number.isNaN(Ui)?Ui:(Dr(!1,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):or=I("div",{style:fe(fe({},ce),we),onScroll:Ut,ref:jt,className:He("".concat(n,"-body")),children:$e(Vr,{style:fe(fe({},Ae),{},{tableLayout:Nn}),children:[Xn,Er,!pe&&J&&I(ox,{stickyOffsets:tn,flattenColumns:dt,children:J})]})});var Tr=fe(fe(fe({noData:!B.length,maxContentScroll:gt&&u.x==="max-content"},zn),_t),{},{direction:p,stickyClassName:ye,onScroll:Ut});An=$e(Tn,{children:[P!==!1&&I(Y3,{...Tr,stickyTopOffset:Fn,className:"".concat(n,"-header"),ref:Nt,children:function(Wn){return $e(Tn,{children:[I(h5,{...Wn}),pe==="top"&&I(ox,{...Wn,children:J})]})}}),or,pe&&pe!=="top"&&I(Y3,{...Tr,stickyBottomOffset:tr,className:"".concat(n,"-summary"),ref:Ze,children:function(Wn){return I(ox,{...Wn,children:J})}}),vn&&I(Zpe,{ref:Vt,offsetScroll:nr,scrollBodyRef:jt,onScroll:Ut,container:q})]})}else An=I("div",{style:fe(fe({},ce),we),className:He("".concat(n,"-content")),onScroll:Ut,ref:jt,children:$e(Vr,{style:fe(fe({},Ae),{},{tableLayout:Nn}),children:[Xn,P!==!1&&I(h5,{...zn,..._t}),Er,J&&I(ox,{stickyOffsets:tn,flattenColumns:dt,children:J})]})});var Mr=gu(e,{aria:!0,data:!0}),Xr=I("div",{className:He(n,r,(t={},re(t,"".concat(n,"-rtl"),p==="rtl"),re(t,"".concat(n,"-ping-left"),Gt),re(t,"".concat(n,"-ping-right"),pn),re(t,"".concat(n,"-layout-fixed"),d==="fixed"),re(t,"".concat(n,"-fixed-header"),Bt),re(t,"".concat(n,"-fixed-column"),xt),re(t,"".concat(n,"-scroll-horizontal"),gt),re(t,"".concat(n,"-has-fix-left"),dt[0]&&dt[0].fixed),re(t,"".concat(n,"-has-fix-right"),dt[dt.length-1]&&dt[dt.length-1].fixed==="right"),t)),style:o,id:_,ref:Dt,...Mr,children:$e(tme,{pingLeft:Gt,pingRight:pn,props:fe(fe({},e),{},{stickyOffsets:tn,mergedExpandedKeys:bt}),children:[m&&I(p5,{className:"".concat(n,"-title"),children:m(B)}),I("div",{ref:Ve,className:"".concat(n,"-container"),children:An}),v&&I(p5,{className:"".concat(n,"-footer"),children:v(B)})]})});gt&&(Xr=I(_u,{onResize:at,children:Xr}));var Oo=w.exports.useMemo(function(){return{prefixCls:n,getComponent:G,scrollbarSize:hn,direction:p,fixedInfoList:dt.map(function(Wn,rr){return gT(rr,rr,dt,tn,p)}),isSticky:vn}},[n,G,hn,p,dt,tn,vn]),Eu=w.exports.useMemo(function(){return fe(fe({},_t),{},{tableLayout:Nn,rowClassName:i,expandedRowClassName:Ee,expandIcon:De,expandableType:Ue,expandRowByClick:be,expandedRowRender:se,onTriggerExpand:Qe,expandIconColumnIndex:Te,indentSize:ke,allColumnsFixedLeft:_t.flattenColumns.every(function(Wn){return Wn.fixed==="left"})})},[_t,Nn,i,Ee,De,Ue,be,se,Qe,Te,ke]),Pf=w.exports.useMemo(function(){return{componentWidth:wt,fixHeader:Bt,fixColumn:xt,horizonScroll:gt}},[wt,Bt,xt,gt]),xs=w.exports.useMemo(function(){return{onColumnResize:Pe}},[Pe]);return I(SV.Provider,{value:Zr,children:I(Ml.Provider,{value:Oo,children:I(Q_.Provider,{value:Eu,children:I(kV.Provider,{value:Pf,children:I(RV.Provider,{value:xs,children:Xr})})})})})}wf.EXPAND_COLUMN=Sd;wf.Column=vpe;wf.ColumnGroup=gpe;wf.Summary=zV;wf.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};function nme(e){return null}function rme(e){return null}function ime(e){return function(n){var r,i=n.prefixCls,o=n.onExpand,s=n.record,a=n.expanded,u=n.expandable,d="".concat(i,"-row-expand-icon");return I("button",{type:"button",onClick:function(m){o(s,m),m.stopPropagation()},className:He(d,(r={},re(r,"".concat(d,"-spaced"),!u),re(r,"".concat(d,"-expanded"),u&&a),re(r,"".concat(d,"-collapsed"),u&&!a),r)),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function ip(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 ew(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}function tw(e,t){return typeof e=="function"?e(t):e}function ome(e,t){var n=tw(e,t);return Object.prototype.toString.call(n)==="[object Object]"?"":n}var ame={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 sme=ame;var $V=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:sme})})};$V.displayName="FilterFilled";const lme=w.exports.forwardRef($V);function ume(){this.__data__=[],this.size=0}var cme=ume;function dme(e,t){return e===t||e!==e&&t!==t}var BV=dme,fme=BV;function hme(e,t){for(var n=e.length;n--;)if(fme(e[n][0],t))return n;return-1}var nw=hme,pme=nw,mme=Array.prototype,gme=mme.splice;function vme(e){var t=this.__data__,n=pme(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():gme.call(t,n,1),--this.size,!0}var yme=vme,xme=nw;function bme(e){var t=this.__data__,n=xme(t,e);return n<0?void 0:t[n][1]}var _me=bme,wme=nw;function Cme(e){return wme(this.__data__,e)>-1}var Sme=Cme,Eme=nw;function Pme(e,t){var n=this.__data__,r=Eme(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Ime=Pme,Tme=cme,kme=yme,Mme=_me,Rme=Sme,Ame=Ime;function Ep(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])}}Ep.prototype.clear=Tme;Ep.prototype.delete=kme;Ep.prototype.get=Mme;Ep.prototype.has=Rme;Ep.prototype.set=Ame;var rw=Ep,Dme=rw;function Ome(){this.__data__=new Dme,this.size=0}var Nme=Ome;function Lme(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Fme=Lme;function zme(e){return this.__data__.get(e)}var $me=zme;function Bme(e){return this.__data__.has(e)}var Vme=Bme,Ume=Zv,jme=W_,Hme="[object AsyncFunction]",Kme="[object Function]",Wme="[object GeneratorFunction]",Gme="[object Proxy]";function qme(e){if(!jme(e))return!1;var t=Ume(e);return t==Kme||t==Wme||t==Hme||t==Gme}var VV=qme,Zme=Tl,Xme=Zme["__core-js_shared__"],Yme=Xme,XC=Yme,g5=function(){var e=/[^.]+$/.exec(XC&&XC.keys&&XC.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Qme(e){return!!g5&&g5 in e}var Jme=Qme,ege=Function.prototype,tge=ege.toString;function nge(e){if(e!=null){try{return tge.call(e)}catch{}try{return e+""}catch{}}return""}var UV=nge,rge=VV,ige=Jme,oge=W_,age=UV,sge=/[\\^$.*+?()[\]{}|]/g,lge=/^\[object .+?Constructor\]$/,uge=Function.prototype,cge=Object.prototype,dge=uge.toString,fge=cge.hasOwnProperty,hge=RegExp("^"+dge.call(fge).replace(sge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pge(e){if(!oge(e)||ige(e))return!1;var t=rge(e)?hge:lge;return t.test(age(e))}var mge=pge;function gge(e,t){return e==null?void 0:e[t]}var vge=gge,yge=mge,xge=vge;function bge(e,t){var n=xge(e,t);return yge(n)?n:void 0}var Pp=bge,_ge=Pp,wge=Tl,Cge=_ge(wge,"Map"),yT=Cge,Sge=Pp,Ege=Sge(Object,"create"),iw=Ege,v5=iw;function Pge(){this.__data__=v5?v5(null):{},this.size=0}var Ige=Pge;function Tge(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kge=Tge,Mge=iw,Rge="__lodash_hash_undefined__",Age=Object.prototype,Dge=Age.hasOwnProperty;function Oge(e){var t=this.__data__;if(Mge){var n=t[e];return n===Rge?void 0:n}return Dge.call(t,e)?t[e]:void 0}var Nge=Oge,Lge=iw,Fge=Object.prototype,zge=Fge.hasOwnProperty;function $ge(e){var t=this.__data__;return Lge?t[e]!==void 0:zge.call(t,e)}var Bge=$ge,Vge=iw,Uge="__lodash_hash_undefined__";function jge(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Vge&&t===void 0?Uge:t,this}var Hge=jge,Kge=Ige,Wge=kge,Gge=Nge,qge=Bge,Zge=Hge;function Ip(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])}}Ip.prototype.clear=Kge;Ip.prototype.delete=Wge;Ip.prototype.get=Gge;Ip.prototype.has=qge;Ip.prototype.set=Zge;var Xge=Ip,y5=Xge,Yge=rw,Qge=yT;function Jge(){this.size=0,this.__data__={hash:new y5,map:new(Qge||Yge),string:new y5}}var eve=Jge;function tve(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var nve=tve,rve=nve;function ive(e,t){var n=e.__data__;return rve(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ow=ive,ove=ow;function ave(e){var t=ove(this,e).delete(e);return this.size-=t?1:0,t}var sve=ave,lve=ow;function uve(e){return lve(this,e).get(e)}var cve=uve,dve=ow;function fve(e){return dve(this,e).has(e)}var hve=fve,pve=ow;function mve(e,t){var n=pve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var gve=mve,vve=eve,yve=sve,xve=cve,bve=hve,_ve=gve;function Tp(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])}}Tp.prototype.clear=vve;Tp.prototype.delete=yve;Tp.prototype.get=xve;Tp.prototype.has=bve;Tp.prototype.set=_ve;var jV=Tp,wve=rw,Cve=yT,Sve=jV,Eve=200;function Pve(e,t){var n=this.__data__;if(n instanceof wve){var r=n.__data__;if(!Cve||r.length<Eve-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Sve(r)}return n.set(e,t),this.size=n.size,this}var Ive=Pve,Tve=rw,kve=Nme,Mve=Fme,Rve=$me,Ave=Vme,Dve=Ive;function kp(e){var t=this.__data__=new Tve(e);this.size=t.size}kp.prototype.clear=kve;kp.prototype.delete=Mve;kp.prototype.get=Rve;kp.prototype.has=Ave;kp.prototype.set=Dve;var Ove=kp,Nve="__lodash_hash_undefined__";function Lve(e){return this.__data__.set(e,Nve),this}var Fve=Lve;function zve(e){return this.__data__.has(e)}var $ve=zve,Bve=jV,Vve=Fve,Uve=$ve;function Cb(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Bve;++t<n;)this.add(e[t])}Cb.prototype.add=Cb.prototype.push=Vve;Cb.prototype.has=Uve;var jve=Cb;function Hve(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 Kve=Hve;function Wve(e,t){return e.has(t)}var Gve=Wve,qve=jve,Zve=Kve,Xve=Gve,Yve=1,Qve=2;function Jve(e,t,n,r,i,o){var s=n&Yve,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var d=o.get(e),p=o.get(t);if(d&&p)return d==t&&p==e;var m=-1,v=!0,x=n&Qve?new qve:void 0;for(o.set(e,t),o.set(t,e);++m<a;){var _=e[m],P=t[m];if(r)var k=s?r(P,_,m,t,e,o):r(_,P,m,e,t,o);if(k!==void 0){if(k)continue;v=!1;break}if(x){if(!Zve(t,function(T,M){if(!Xve(x,M)&&(_===T||i(_,T,n,r,o)))return x.push(M)})){v=!1;break}}else if(!(_===P||i(_,P,n,r,o))){v=!1;break}}return o.delete(e),o.delete(t),v}var HV=Jve,e0e=Tl,t0e=e0e.Uint8Array,n0e=t0e;function r0e(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var i0e=r0e;function o0e(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var a0e=o0e,x5=nT,b5=n0e,s0e=BV,l0e=HV,u0e=i0e,c0e=a0e,d0e=1,f0e=2,h0e="[object Boolean]",p0e="[object Date]",m0e="[object Error]",g0e="[object Map]",v0e="[object Number]",y0e="[object RegExp]",x0e="[object Set]",b0e="[object String]",_0e="[object Symbol]",w0e="[object ArrayBuffer]",C0e="[object DataView]",_5=x5?x5.prototype:void 0,YC=_5?_5.valueOf:void 0;function S0e(e,t,n,r,i,o,s){switch(n){case C0e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w0e:return!(e.byteLength!=t.byteLength||!o(new b5(e),new b5(t)));case h0e:case p0e:case v0e:return s0e(+e,+t);case m0e:return e.name==t.name&&e.message==t.message;case y0e:case b0e:return e==t+"";case g0e:var a=u0e;case x0e:var u=r&d0e;if(a||(a=c0e),e.size!=t.size&&!u)return!1;var d=s.get(e);if(d)return d==t;r|=f0e,s.set(e,t);var p=l0e(a(e),a(t),r,i,o,s);return s.delete(e),p;case _0e:if(YC)return YC.call(e)==YC.call(t)}return!1}var E0e=S0e;function P0e(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var I0e=P0e,T0e=I0e,k0e=rT;function M0e(e,t,n){var r=t(e);return k0e(e)?r:T0e(r,n(e))}var R0e=M0e;function A0e(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}var D0e=A0e;function O0e(){return[]}var N0e=O0e,L0e=D0e,F0e=N0e,z0e=Object.prototype,$0e=z0e.propertyIsEnumerable,w5=Object.getOwnPropertySymbols,B0e=w5?function(e){return e==null?[]:(e=Object(e),L0e(w5(e),function(t){return $0e.call(e,t)}))}:F0e,V0e=B0e;function U0e(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var j0e=U0e,H0e=Zv,K0e=Xv,W0e="[object Arguments]";function G0e(e){return K0e(e)&&H0e(e)==W0e}var q0e=G0e,C5=q0e,Z0e=Xv,KV=Object.prototype,X0e=KV.hasOwnProperty,Y0e=KV.propertyIsEnumerable,Q0e=C5(function(){return arguments}())?C5:function(e){return Z0e(e)&&X0e.call(e,"callee")&&!Y0e.call(e,"callee")},J0e=Q0e,Sb={exports:{}};function eye(){return!1}var tye=eye;(function(e,t){var n=Tl,r=tye,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===i,a=s?n.Buffer:void 0,u=a?a.isBuffer:void 0,d=u||r;e.exports=d})(Sb,Sb.exports);var nye=9007199254740991,rye=/^(?:0|[1-9]\d*)$/;function iye(e,t){var n=typeof e;return t=t==null?nye:t,!!t&&(n=="number"||n!="symbol"&&rye.test(e))&&e>-1&&e%1==0&&e<t}var oye=iye,aye=9007199254740991;function sye(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aye}var WV=sye,lye=Zv,uye=WV,cye=Xv,dye="[object Arguments]",fye="[object Array]",hye="[object Boolean]",pye="[object Date]",mye="[object Error]",gye="[object Function]",vye="[object Map]",yye="[object Number]",xye="[object Object]",bye="[object RegExp]",_ye="[object Set]",wye="[object String]",Cye="[object WeakMap]",Sye="[object ArrayBuffer]",Eye="[object DataView]",Pye="[object Float32Array]",Iye="[object Float64Array]",Tye="[object Int8Array]",kye="[object Int16Array]",Mye="[object Int32Array]",Rye="[object Uint8Array]",Aye="[object Uint8ClampedArray]",Dye="[object Uint16Array]",Oye="[object Uint32Array]",ti={};ti[Pye]=ti[Iye]=ti[Tye]=ti[kye]=ti[Mye]=ti[Rye]=ti[Aye]=ti[Dye]=ti[Oye]=!0;ti[dye]=ti[fye]=ti[Sye]=ti[hye]=ti[Eye]=ti[pye]=ti[mye]=ti[gye]=ti[vye]=ti[yye]=ti[xye]=ti[bye]=ti[_ye]=ti[wye]=ti[Cye]=!1;function Nye(e){return cye(e)&&uye(e.length)&&!!ti[lye(e)]}var Lye=Nye;function Fye(e){return function(t){return e(t)}}var zye=Fye,Q3={exports:{}};(function(e,t){var n=b7,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(Q3,Q3.exports);var $ye=Lye,Bye=zye,S5=Q3.exports,E5=S5&&S5.isTypedArray,Vye=E5?Bye(E5):$ye,GV=Vye,Uye=j0e,jye=J0e,Hye=rT,Kye=Sb.exports,Wye=oye,Gye=GV,qye=Object.prototype,Zye=qye.hasOwnProperty;function Xye(e,t){var n=Hye(e),r=!n&&jye(e),i=!n&&!r&&Kye(e),o=!n&&!r&&!i&&Gye(e),s=n||r||i||o,a=s?Uye(e.length,String):[],u=a.length;for(var d in e)(t||Zye.call(e,d))&&!(s&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Wye(d,u)))&&a.push(d);return a}var Yye=Xye,Qye=Object.prototype;function Jye(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Qye;return e===n}var exe=Jye;function txe(e,t){return function(n){return e(t(n))}}var nxe=txe,rxe=nxe,ixe=rxe(Object.keys,Object),oxe=ixe,axe=exe,sxe=oxe,lxe=Object.prototype,uxe=lxe.hasOwnProperty;function cxe(e){if(!axe(e))return sxe(e);var t=[];for(var n in Object(e))uxe.call(e,n)&&n!="constructor"&&t.push(n);return t}var dxe=cxe,fxe=VV,hxe=WV;function pxe(e){return e!=null&&hxe(e.length)&&!fxe(e)}var mxe=pxe,gxe=Yye,vxe=dxe,yxe=mxe;function xxe(e){return yxe(e)?gxe(e):vxe(e)}var bxe=xxe,_xe=R0e,wxe=V0e,Cxe=bxe;function Sxe(e){return _xe(e,Cxe,wxe)}var Exe=Sxe,P5=Exe,Pxe=1,Ixe=Object.prototype,Txe=Ixe.hasOwnProperty;function kxe(e,t,n,r,i,o){var s=n&Pxe,a=P5(e),u=a.length,d=P5(t),p=d.length;if(u!=p&&!s)return!1;for(var m=u;m--;){var v=a[m];if(!(s?v in t:Txe.call(t,v)))return!1}var x=o.get(e),_=o.get(t);if(x&&_)return x==t&&_==e;var P=!0;o.set(e,t),o.set(t,e);for(var k=s;++m<u;){v=a[m];var T=e[v],M=t[v];if(r)var O=s?r(M,T,v,t,e,o):r(T,M,v,e,t,o);if(!(O===void 0?T===M||i(T,M,n,r,o):O)){P=!1;break}k||(k=v=="constructor")}if(P&&!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)&&(P=!1)}return o.delete(e),o.delete(t),P}var Mxe=kxe,Rxe=Pp,Axe=Tl,Dxe=Rxe(Axe,"DataView"),Oxe=Dxe,Nxe=Pp,Lxe=Tl,Fxe=Nxe(Lxe,"Promise"),zxe=Fxe,$xe=Pp,Bxe=Tl,Vxe=$xe(Bxe,"Set"),Uxe=Vxe,jxe=Pp,Hxe=Tl,Kxe=jxe(Hxe,"WeakMap"),Wxe=Kxe,J3=Oxe,eE=yT,tE=zxe,nE=Uxe,rE=Wxe,qV=Zv,Mp=UV,I5="[object Map]",Gxe="[object Object]",T5="[object Promise]",k5="[object Set]",M5="[object WeakMap]",R5="[object DataView]",qxe=Mp(J3),Zxe=Mp(eE),Xxe=Mp(tE),Yxe=Mp(nE),Qxe=Mp(rE),Ed=qV;(J3&&Ed(new J3(new ArrayBuffer(1)))!=R5||eE&&Ed(new eE)!=I5||tE&&Ed(tE.resolve())!=T5||nE&&Ed(new nE)!=k5||rE&&Ed(new rE)!=M5)&&(Ed=function(e){var t=qV(e),n=t==Gxe?e.constructor:void 0,r=n?Mp(n):"";if(r)switch(r){case qxe:return R5;case Zxe:return I5;case Xxe:return T5;case Yxe:return k5;case Qxe:return M5}return t});var Jxe=Ed,QC=Ove,e1e=HV,t1e=E0e,n1e=Mxe,A5=Jxe,D5=rT,O5=Sb.exports,r1e=GV,i1e=1,N5="[object Arguments]",L5="[object Array]",ax="[object Object]",o1e=Object.prototype,F5=o1e.hasOwnProperty;function a1e(e,t,n,r,i,o){var s=D5(e),a=D5(t),u=s?L5:A5(e),d=a?L5:A5(t);u=u==N5?ax:u,d=d==N5?ax:d;var p=u==ax,m=d==ax,v=u==d;if(v&&O5(e)){if(!O5(t))return!1;s=!0,p=!1}if(v&&!p)return o||(o=new QC),s||r1e(e)?e1e(e,t,n,r,i,o):t1e(e,t,u,n,r,i,o);if(!(n&i1e)){var x=p&&F5.call(e,"__wrapped__"),_=m&&F5.call(t,"__wrapped__");if(x||_){var P=x?e.value():e,k=_?t.value():t;return o||(o=new QC),i(P,k,n,r,o)}}return v?(o||(o=new QC),n1e(e,t,n,r,i,o)):!1}var s1e=a1e,l1e=s1e,z5=Xv;function ZV(e,t,n,r,i){return e===t?!0:e==null||t==null||!z5(e)&&!z5(t)?e!==e&&t!==t:l1e(e,t,n,r,ZV,i)}var u1e=ZV,c1e=u1e;function d1e(e,t){return c1e(e,t)}var $5=d1e;function XV(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var f1e=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],YV=function(t,n){var r=t.className,i=t.style,o=t.motion,s=t.motionNodes,a=t.motionType,u=t.onMotionStart,d=t.onMotionEnd,p=t.active,m=t.treeNodeRequiredProps,v=Rn(t,f1e),x=w.exports.useState(!0),_=Le(x,2),P=_[0],k=_[1],T=w.exports.useContext(oT),M=T.prefixCls,O=w.exports.useRef(!1),N=function(){O.current||d(),O.current=!0};return w.exports.useEffect(function(){s&&a==="hide"&&P&&k(!1)},[s]),w.exports.useEffect(function(){return s&&u(),function(){s&&N()}},[]),s?I(Xo,{ref:n,visible:P,...o,motionAppear:a==="show",onAppearEnd:N,onLeaveEnd:N,children:function(L,F){var V=L.className,B=L.style;return I("div",{ref:F,className:He("".concat(M,"-treenode-motion"),V),style:B,children:s.map(function(H){var G=ze({},(XV(H.data),H.data)),ee=H.title,X=H.key,Z=H.isStart,Q=H.isEnd;delete G.children;var le=Tg(X,m);return w.exports.createElement(of,{...G,...le,title:ee,active:p,data:H.data,key:X,isStart:Z,isEnd:Q})})})}}):I(of,{domRef:n,className:r,style:i,...v,active:p})};YV.displayName="MotionTreeNode";var h1e=w.exports.forwardRef(YV);function p1e(){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(o,s){var a=new Map;o.forEach(function(d){a.set(d,!0)});var u=s.filter(function(d){return!a.has(d)});return u.length===1?u[0]:null}return n<r?{add:!0,key:i(e,t)}:{add:!1,key:i(t,e)}}function B5(e,t,n){var r=e.findIndex(function(a){return a.key===n}),i=e[r+1],o=t.findIndex(function(a){return a.key===n});if(i){var s=t.findIndex(function(a){return a.key===i.key});return t.slice(o+1,s)}return t.slice(o+1)}var m1e=["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"],V5={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},g1e=function(){},af="RC_TREE_MOTION_".concat(Math.random()),iE={key:af},QV={key:af,level:0,index:0,pos:"0",node:iE,nodes:[iE]},U5={parent:null,children:[],pos:QV.pos,data:iE,title:null,key:af,isStart:[],isEnd:[]};function j5(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function H5(e){var t=e.key,n=e.pos;return Yv(t,n)}function v1e(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 JV=w.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var i=e.expandedKeys,o=e.selectedKeys,s=e.checkedKeys,a=e.loadedKeys,u=e.loadingKeys,d=e.halfCheckedKeys,p=e.keyEntities,m=e.disabled,v=e.dragging,x=e.dragOverNodeKey,_=e.dropPosition,P=e.motion,k=e.height,T=e.itemHeight,M=e.virtual,O=e.focusable,N=e.activeItem,L=e.focused,F=e.tabIndex,V=e.onKeyDown,B=e.onFocus,H=e.onBlur,G=e.onActiveChange,ee=e.onListChangeStart,X=e.onListChangeEnd,Z=Rn(e,m1e),Q=w.exports.useRef(null),le=w.exports.useRef(null);w.exports.useImperativeHandle(t,function(){return{scrollTo:function(nt){Q.current.scrollTo(nt)},getIndentWidth:function(){return le.current.offsetWidth}}});var ne=w.exports.useState(i),se=Le(ne,2),oe=se[0],he=se[1],_e=w.exports.useState(r),be=Le(_e,2),xe=be[0],Te=be[1],Ee=w.exports.useState(r),Ce=Le(Ee,2),ke=Ce[0],De=Ce[1],Ke=w.exports.useState([]),Ue=Le(Ke,2),tt=Ue[0],lt=Ue[1],St=w.exports.useState(null),We=Le(St,2),bt=We[0],Qe=We[1],mt=w.exports.useRef(r);mt.current=r;function ct(){var ut=mt.current;Te(ut),De(ut),lt([]),Qe(null),X()}w.exports.useEffect(function(){he(i);var ut=p1e(oe,i);if(ut.key!==null)if(ut.add){var nt=xe.findIndex(function(jt){var Ve=jt.key;return Ve===ut.key}),qe=j5(B5(xe,r,ut.key),M,k,T),dt=xe.slice();dt.splice(nt+1,0,U5),De(dt),lt(qe),Qe("show")}else{var _t=r.findIndex(function(jt){var Ve=jt.key;return Ve===ut.key}),Dt=j5(B5(r,xe,ut.key),M,k,T),Nt=r.slice();Nt.splice(_t+1,0,U5),De(Nt),lt(Dt),Qe("hide")}else xe!==r&&(Te(r),De(r))},[i,r]),w.exports.useEffect(function(){v||ct()},[v]);var wt=P?ke:r,rt={expandedKeys:i,selectedKeys:o,loadedKeys:a,loadingKeys:u,checkedKeys:s,halfCheckedKeys:d,dragOverNodeKey:x,dropPosition:_,keyEntities:p};return $e(Tn,{children:[L&&N&&I("span",{style:V5,"aria-live":"assertive",children:v1e(N)}),I("div",{children:I("input",{style:V5,disabled:O===!1||m,tabIndex:O!==!1?F:null,onKeyDown:V,onFocus:B,onBlur:H,value:"",onChange:g1e,"aria-label":"for screen reader"})}),I("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0},children:I("div",{className:"".concat(n,"-indent"),children:I("div",{ref:le,className:"".concat(n,"-indent-unit")})})}),I($I,{...Z,data:wt,itemKey:H5,height:k,fullHeight:!1,virtual:M,itemHeight:T,prefixCls:"".concat(n,"-list"),ref:Q,onVisibleChange:function(nt,qe){var dt=new Set(nt),_t=qe.filter(function(Dt){return!dt.has(Dt)});_t.some(function(Dt){return H5(Dt)===af})&&ct()},children:function(ut){var nt=ut.pos,qe=ze({},(XV(ut.data),ut.data)),dt=ut.title,_t=ut.key,Dt=ut.isStart,Nt=ut.isEnd,jt=Yv(_t,nt);delete qe.key,delete qe.children;var Ve=Tg(jt,rt);return I(h1e,{...qe,...Ve,title:dt,active:!!N&&_t===N.key,pos:nt,data:ut.data,isStart:Dt,isEnd:Nt,motion:P,motionNodes:_t===af?tt:null,motionType:bt,onMotionStart:ee,onMotionEnd:ct,treeNodeRequiredProps:rt,onMouseMove:function(){G(null)}})}})]})});JV.displayName="NodeList";function y1e(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 I("div",{style:i})}var x1e=10,aw=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),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:xb()},r.dragStartMousePosition=null,r.dragNode=void 0,r.currentMouseOverDroppableNodeKey=null,r.listRef=w.exports.createRef(),r.onNodeDragStart=function(a,u){var d=r.state,p=d.expandedKeys,m=d.keyEntities,v=r.props.onDragStart,x=u.props.eventKey;r.dragNode=u,r.dragStartMousePosition={x:a.clientX,y:a.clientY};var _=il(p,x);r.setState({draggingNodeKey:x,dragChildrenKeys:fce(x,m),indent:r.listRef.current.getIndentWidth()}),r.setExpandedKeys(_),window.addEventListener("dragend",r.onWindowDragEnd),v==null||v({event:a,node:Fi(u.props)})},r.onNodeDragEnter=function(a,u){var d=r.state,p=d.expandedKeys,m=d.keyEntities,v=d.dragChildrenKeys,x=d.flattenNodes,_=d.indent,P=r.props,k=P.onDragEnter,T=P.onExpand,M=P.allowDrop,O=P.direction,N=u.props,L=N.pos,F=N.eventKey,V=Vn(r),B=V.dragNode;if(r.currentMouseOverDroppableNodeKey!==F&&(r.currentMouseOverDroppableNodeKey=F),!B){r.resetDragState();return}var H=TO(a,B,u,_,r.dragStartMousePosition,M,x,m,p,O),G=H.dropPosition,ee=H.dropLevelOffset,X=H.dropTargetKey,Z=H.dropContainerKey,Q=H.dropTargetPos,le=H.dropAllowed,ne=H.dragOverNodeKey;if(v.indexOf(X)!==-1||!le){r.resetDragState();return}if(r.delayedDragEnterLogic||(r.delayedDragEnterLogic={}),Object.keys(r.delayedDragEnterLogic).forEach(function(se){clearTimeout(r.delayedDragEnterLogic[se])}),B.props.eventKey!==u.props.eventKey&&(a.persist(),r.delayedDragEnterLogic[L]=window.setTimeout(function(){if(r.state.draggingNodeKey!==null){var se=Pt(p),oe=m[u.props.eventKey];oe&&(oe.children||[]).length&&(se=Gl(p,u.props.eventKey)),"expandedKeys"in r.props||r.setExpandedKeys(se),T==null||T(se,{node:Fi(u.props),expanded:!0,nativeEvent:a.nativeEvent})}},800)),B.props.eventKey===X&&ee===0){r.resetDragState();return}r.setState({dragOverNodeKey:ne,dropPosition:G,dropLevelOffset:ee,dropTargetKey:X,dropContainerKey:Z,dropTargetPos:Q,dropAllowed:le}),k==null||k({event:a,node:Fi(u.props),expandedKeys:p})},r.onNodeDragOver=function(a,u){var d=r.state,p=d.dragChildrenKeys,m=d.flattenNodes,v=d.keyEntities,x=d.expandedKeys,_=d.indent,P=r.props,k=P.onDragOver,T=P.allowDrop,M=P.direction,O=Vn(r),N=O.dragNode;if(!!N){var L=TO(a,N,u,_,r.dragStartMousePosition,T,m,v,x,M),F=L.dropPosition,V=L.dropLevelOffset,B=L.dropTargetKey,H=L.dropContainerKey,G=L.dropAllowed,ee=L.dropTargetPos,X=L.dragOverNodeKey;p.indexOf(B)!==-1||!G||(N.props.eventKey===B&&V===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():F===r.state.dropPosition&&V===r.state.dropLevelOffset&&B===r.state.dropTargetKey&&H===r.state.dropContainerKey&&ee===r.state.dropTargetPos&&G===r.state.dropAllowed&&X===r.state.dragOverNodeKey||r.setState({dropPosition:F,dropLevelOffset:V,dropTargetKey:B,dropContainerKey:H,dropTargetPos:ee,dropAllowed:G,dragOverNodeKey:X}),k==null||k({event:a,node:Fi(u.props)}))}},r.onNodeDragLeave=function(a,u){r.currentMouseOverDroppableNodeKey===u.props.eventKey&&!a.currentTarget.contains(a.relatedTarget)&&(r.resetDragState(),r.currentMouseOverDroppableNodeKey=null);var d=r.props.onDragLeave;d==null||d({event:a,node:Fi(u.props)})},r.onWindowDragEnd=function(a){r.onNodeDragEnd(a,null,!0),window.removeEventListener("dragend",r.onWindowDragEnd)},r.onNodeDragEnd=function(a,u){var d=r.props.onDragEnd;r.setState({dragOverNodeKey:null}),r.cleanDragState(),d==null||d({event:a,node:Fi(u.props)}),r.dragNode=null,window.removeEventListener("dragend",r.onWindowDragEnd)},r.onNodeDrop=function(a,u){var d,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,m=r.state,v=m.dragChildrenKeys,x=m.dropPosition,_=m.dropTargetKey,P=m.dropTargetPos,k=m.dropAllowed;if(!!k){var T=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),_!==null){var M=fe(fe({},Tg(_,r.getTreeNodeRequiredProps())),{},{active:((d=r.getActiveItem())===null||d===void 0?void 0:d.key)===_,data:r.state.keyEntities[_].node}),O=v.indexOf(_)!==-1;Dr(!O,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var N=aT(P),L={event:a,node:Fi(M),dragNode:r.dragNode?Fi(r.dragNode.props):null,dragNodesKeys:[r.dragNode.props.eventKey].concat(v),dropToGap:x!==0,dropPosition:x+Number(N[N.length-1])};p||T==null||T(L),r.dragNode=null}}},r.cleanDragState=function(){var a=r.state.draggingNodeKey;a!==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(a,u){var d=r.state,p=d.expandedKeys,m=d.flattenNodes,v=u.expanded,x=u.key,_=u.isLeaf;if(!(_||a.shiftKey||a.metaKey||a.ctrlKey)){var P=m.filter(function(T){return T.key===x})[0],k=Fi(fe(fe({},Tg(x,r.getTreeNodeRequiredProps())),{},{data:P.data}));r.setExpandedKeys(v?il(p,x):Gl(p,x)),r.onNodeExpand(a,k)}},r.onNodeClick=function(a,u){var d=r.props,p=d.onClick,m=d.expandAction;m==="click"&&r.triggerExpandActionExpand(a,u),p==null||p(a,u)},r.onNodeDoubleClick=function(a,u){var d=r.props,p=d.onDoubleClick,m=d.expandAction;m==="doubleClick"&&r.triggerExpandActionExpand(a,u),p==null||p(a,u)},r.onNodeSelect=function(a,u){var d=r.state.selectedKeys,p=r.state,m=p.keyEntities,v=p.fieldNames,x=r.props,_=x.onSelect,P=x.multiple,k=u.selected,T=u[v.key],M=!k;M?P?d=Gl(d,T):d=[T]:d=il(d,T);var O=d.map(function(N){var L=m[N];return L?L.node:null}).filter(function(N){return N});r.setUncontrolledState({selectedKeys:d}),_==null||_(d,{event:"select",selected:M,node:u,selectedNodes:O,nativeEvent:a.nativeEvent})},r.onNodeCheck=function(a,u,d){var p=r.state,m=p.keyEntities,v=p.checkedKeys,x=p.halfCheckedKeys,_=r.props,P=_.checkStrictly,k=_.onCheck,T=u.key,M,O={event:"check",node:u,checked:d,nativeEvent:a.nativeEvent};if(P){var N=d?Gl(v,T):il(v,T),L=il(x,T);M={checked:N,halfChecked:L},O.checkedNodes=N.map(function(ee){return m[ee]}).filter(function(ee){return ee}).map(function(ee){return ee.node}),r.setUncontrolledState({checkedKeys:N})}else{var F=uu([].concat(Pt(v),[T]),!0,m),V=F.checkedKeys,B=F.halfCheckedKeys;if(!d){var H=new Set(V);H.delete(T);var G=uu(Array.from(H),{checked:!1,halfCheckedKeys:B},m);V=G.checkedKeys,B=G.halfCheckedKeys}M=V,O.checkedNodes=[],O.checkedNodesPositions=[],O.halfCheckedKeys=B,V.forEach(function(ee){var X=m[ee];if(!!X){var Z=X.node,Q=X.pos;O.checkedNodes.push(Z),O.checkedNodesPositions.push({node:Z,pos:Q})}}),r.setUncontrolledState({checkedKeys:V},!1,{halfCheckedKeys:B})}k==null||k(M,O)},r.onNodeLoad=function(a){var u=a.key,d=new Promise(function(p,m){r.setState(function(v){var x=v.loadedKeys,_=x===void 0?[]:x,P=v.loadingKeys,k=P===void 0?[]:P,T=r.props,M=T.loadData,O=T.onLoad;if(!M||_.indexOf(u)!==-1||k.indexOf(u)!==-1)return null;var N=M(a);return N.then(function(){var L=r.state.loadedKeys,F=Gl(L,u);O==null||O(F,{event:"load",node:a}),r.setUncontrolledState({loadedKeys:F}),r.setState(function(V){return{loadingKeys:il(V.loadingKeys,u)}}),p()}).catch(function(L){if(r.setState(function(V){return{loadingKeys:il(V.loadingKeys,u)}}),r.loadingRetryTimes[u]=(r.loadingRetryTimes[u]||0)+1,r.loadingRetryTimes[u]>=x1e){var F=r.state.loadedKeys;Dr(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Gl(F,u)}),p()}m(L)}),{loadingKeys:Gl(k,u)}})});return d.catch(function(){}),d},r.onNodeMouseEnter=function(a,u){var d=r.props.onMouseEnter;d==null||d({event:a,node:u})},r.onNodeMouseLeave=function(a,u){var d=r.props.onMouseLeave;d==null||d({event:a,node:u})},r.onNodeContextMenu=function(a,u){var d=r.props.onRightClick;d&&(a.preventDefault(),d({event:a,node:u}))},r.onFocus=function(){var a=r.props.onFocus;r.setState({focused:!0});for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];a==null||a.apply(void 0,d)},r.onBlur=function(){var a=r.props.onBlur;r.setState({focused:!1}),r.onActiveChange(null);for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];a==null||a.apply(void 0,d)},r.getTreeNodeRequiredProps=function(){var a=r.state,u=a.expandedKeys,d=a.selectedKeys,p=a.loadedKeys,m=a.loadingKeys,v=a.checkedKeys,x=a.halfCheckedKeys,_=a.dragOverNodeKey,P=a.dropPosition,k=a.keyEntities;return{expandedKeys:u||[],selectedKeys:d||[],loadedKeys:p||[],loadingKeys:m||[],checkedKeys:v||[],halfCheckedKeys:x||[],dragOverNodeKey:_,dropPosition:P,keyEntities:k}},r.setExpandedKeys=function(a){var u=r.state,d=u.treeData,p=u.fieldNames,m=BC(d,a,p);r.setUncontrolledState({expandedKeys:a,flattenNodes:m},!0)},r.onNodeExpand=function(a,u){var d=r.state.expandedKeys,p=r.state,m=p.listChanging,v=p.fieldNames,x=r.props,_=x.onExpand,P=x.loadData,k=u.expanded,T=u[v.key];if(!m){var M=d.indexOf(T),O=!k;if(Dr(k&&M!==-1||!k&&M===-1,"Expand state not sync with index check"),O?d=Gl(d,T):d=il(d,T),r.setExpandedKeys(d),_==null||_(d,{node:u,expanded:O,nativeEvent:a.nativeEvent}),O&&P){var N=r.onNodeLoad(u);N&&N.then(function(){var L=BC(r.state.treeData,d,v);r.setUncontrolledState({flattenNodes:L})}).catch(function(){var L=r.state.expandedKeys,F=il(L,T);r.setExpandedKeys(F)})}}},r.onListChangeStart=function(){r.setUncontrolledState({listChanging:!0})},r.onListChangeEnd=function(){setTimeout(function(){r.setUncontrolledState({listChanging:!1})})},r.onActiveChange=function(a){var u=r.state.activeKey,d=r.props.onActiveChange;u!==a&&(r.setState({activeKey:a}),a!==null&&r.scrollTo({key:a}),d==null||d(a))},r.getActiveItem=function(){var a=r.state,u=a.activeKey,d=a.flattenNodes;return u===null?null:d.find(function(p){var m=p.key;return m===u})||null},r.offsetActiveKey=function(a){var u=r.state,d=u.flattenNodes,p=u.activeKey,m=d.findIndex(function(_){var P=_.key;return P===p});m===-1&&a<0&&(m=d.length),m=(m+a+d.length)%d.length;var v=d[m];if(v){var x=v.key;r.onActiveChange(x)}else r.onActiveChange(null)},r.onKeyDown=function(a){var u=r.state,d=u.activeKey,p=u.expandedKeys,m=u.checkedKeys,v=u.fieldNames,x=r.props,_=x.onKeyDown,P=x.checkable,k=x.selectable;switch(a.which){case kt.UP:{r.offsetActiveKey(-1),a.preventDefault();break}case kt.DOWN:{r.offsetActiveKey(1),a.preventDefault();break}}var T=r.getActiveItem();if(T&&T.data){var M=r.getTreeNodeRequiredProps(),O=T.data.isLeaf===!1||!!(T.data[v.children]||[]).length,N=Fi(fe(fe({},Tg(d,M)),{},{data:T.data,active:!0}));switch(a.which){case kt.LEFT:{O&&p.includes(d)?r.onNodeExpand({},N):T.parent&&r.onActiveChange(T.parent.key),a.preventDefault();break}case kt.RIGHT:{O&&!p.includes(d)?r.onNodeExpand({},N):T.children&&T.children.length&&r.onActiveChange(T.children[0].key),a.preventDefault();break}case kt.ENTER:case kt.SPACE:{P&&!N.disabled&&N.checkable!==!1&&!N.disableCheckbox?r.onNodeCheck({},N,!m.includes(d)):!P&&k&&!N.disabled&&N.selectable!==!1&&r.onNodeSelect({},N);break}}}_==null||_(a)},r.setUncontrolledState=function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var p=!1,m=!0,v={};Object.keys(a).forEach(function(x){if(x in r.props){m=!1;return}p=!0,v[x]=a[x]}),p&&(!u||m)&&r.setState(fe(fe({},v),d))}},r.scrollTo=function(a){r.listRef.current.scrollTo(a)},r}return Lr(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,o=this.state,s=o.focused,a=o.flattenNodes,u=o.keyEntities,d=o.draggingNodeKey,p=o.activeKey,m=o.dropLevelOffset,v=o.dropContainerKey,x=o.dropTargetKey,_=o.dropPosition,P=o.dragOverNodeKey,k=o.indent,T=this.props,M=T.prefixCls,O=T.className,N=T.style,L=T.showLine,F=T.focusable,V=T.tabIndex,B=V===void 0?0:V,H=T.selectable,G=T.showIcon,ee=T.icon,X=T.switcherIcon,Z=T.draggable,Q=T.checkable,le=T.checkStrictly,ne=T.disabled,se=T.motion,oe=T.loadData,he=T.filterTreeNode,_e=T.height,be=T.itemHeight,xe=T.virtual,Te=T.titleRender,Ee=T.dropIndicatorRender,Ce=T.onContextMenu,ke=T.onScroll,De=T.direction,Ke=T.rootClassName,Ue=T.rootStyle,tt=gu(this.props,{aria:!0,data:!0}),lt;return Z&&(nn(Z)==="object"?lt=Z:typeof Z=="function"?lt={nodeDraggable:Z}:lt={}),I(oT.Provider,{value:{prefixCls:M,selectable:H,showIcon:G,icon:ee,switcherIcon:X,draggable:lt,draggingNodeKey:d,checkable:Q,checkStrictly:le,disabled:ne,keyEntities:u,dropLevelOffset:m,dropContainerKey:v,dropTargetKey:x,dropPosition:_,dragOverNodeKey:P,indent:k,direction:De,dropIndicatorRender:Ee,loadData:oe,filterTreeNode:he,titleRender:Te,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:I("div",{role:"tree",className:He(M,O,Ke,(i={},re(i,"".concat(M,"-show-line"),L),re(i,"".concat(M,"-focused"),s),re(i,"".concat(M,"-active-focused"),p!==null),i)),style:Ue,children:I(JV,{ref:this.listRef,prefixCls:M,style:N,data:a,disabled:ne,selectable:H,checkable:!!Q,motion:se,dragging:d!==null,height:_e,itemHeight:be,virtual:xe,focusable:F,focused:s,tabIndex:B,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ce,onScroll:ke,...this.getTreeNodeRequiredProps(),...tt})})})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a={prevProps:i};function u(F){return!s&&F in i||s&&s[F]!==i[F]}var d,p=o.fieldNames;if(u("fieldNames")&&(p=xb(i.fieldNames),a.fieldNames=p),u("treeData")?d=i.treeData:u("children")&&(Dr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=I7(i.children)),d){a.treeData=d;var m=q_(d,{fieldNames:p});a.keyEntities=fe(re({},af,QV),m.keyEntities)}var v=a.keyEntities||o.keyEntities;if(u("expandedKeys")||s&&u("autoExpandParent"))a.expandedKeys=i.autoExpandParent||!s&&i.defaultExpandParent?U3(i.expandedKeys,v):i.expandedKeys;else if(!s&&i.defaultExpandAll){var x=fe({},v);delete x[af],a.expandedKeys=Object.keys(x).map(function(F){return x[F].key})}else!s&&i.defaultExpandedKeys&&(a.expandedKeys=i.autoExpandParent||i.defaultExpandParent?U3(i.defaultExpandedKeys,v):i.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,d||a.expandedKeys){var _=BC(d||o.treeData,a.expandedKeys||o.expandedKeys,p);a.flattenNodes=_}if(i.selectable&&(u("selectedKeys")?a.selectedKeys=kO(i.selectedKeys,i):!s&&i.defaultSelectedKeys&&(a.selectedKeys=kO(i.defaultSelectedKeys,i))),i.checkable){var P;if(u("checkedKeys")?P=$C(i.checkedKeys)||{}:!s&&i.defaultCheckedKeys?P=$C(i.defaultCheckedKeys)||{}:d&&(P=$C(i.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),P){var k=P,T=k.checkedKeys,M=T===void 0?[]:T,O=k.halfCheckedKeys,N=O===void 0?[]:O;if(!i.checkStrictly){var L=uu(M,!0,v);M=L.checkedKeys,N=L.halfCheckedKeys}a.checkedKeys=M,a.halfCheckedKeys=N}}return u("loadedKeys")&&(a.loadedKeys=i.loadedKeys),a}}]),n}(w.exports.Component);aw.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:y1e,allowDrop:function(){return!0},expandAction:!1};aw.TreeNode=of;var b1e={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 _1e=b1e;var eU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:_1e})})};eU.displayName="HolderOutlined";const w1e=w.exports.forwardRef(eU);var K5=4;function C1e(e){var t,n=e.dropPosition,r=e.dropLevelOffset,i=e.prefixCls,o=e.indent,s=e.direction,a=s===void 0?"ltr":s,u=a==="ltr"?"left":"right",d=a==="ltr"?"right":"left",p=(t={},re(t,u,-r*o+K5),re(t,d,0),t);switch(n){case-1:p.top=-3;break;case 1:p.bottom=-3;break;default:p.bottom=-3,p[u]=o+K5;break}return I("div",{style:p,className:"".concat(i,"-drop-indicator")})}var S1e={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 E1e=S1e;var tU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:E1e})})};tU.displayName="CaretDownFilled";const P1e=w.exports.forwardRef(tU);var I1e={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 T1e=I1e;var nU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:T1e})})};nU.displayName="FileOutlined";const rU=w.exports.forwardRef(nU);var k1e={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 M1e=k1e;var iU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:M1e})})};iU.displayName="MinusSquareOutlined";const R1e=w.exports.forwardRef(iU);var A1e={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 D1e=A1e;var oU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:D1e})})};oU.displayName="PlusSquareOutlined";const O1e=w.exports.forwardRef(oU);function aU(e,t,n,r){var i=r.isLeaf,o=r.expanded,s=r.loading;if(s)return I(Mc,{className:"".concat(e,"-switcher-loading-icon")});var a;if(n&&nn(n)==="object"&&(a=n.showLeafIcon),i){if(!n)return null;if(typeof a!="boolean"&&!!a){var u=typeof a=="function"?a(r):a,d="".concat(e,"-switcher-line-custom-icon");return Ro(u)?ui(u,{className:He(u.props.className||"",d)}):u}return a?I(rU,{className:"".concat(e,"-switcher-line-icon")}):I("span",{className:"".concat(e,"-switcher-leaf-line")})}var p="".concat(e,"-switcher-icon"),m=typeof t=="function"?t(r):t;return Ro(m)?ui(m,{className:He(m.props.className||"",p)}):m||(n?o?I(R1e,{className:"".concat(e,"-switcher-line-icon")}):I(O1e,{className:"".concat(e,"-switcher-line-icon")}):I(P1e,{className:p}))}var N1e=w.exports.forwardRef(function(e,t){var n,r=w.exports.useContext(On),i=r.getPrefixCls,o=r.direction,s=r.virtual,a=e.prefixCls,u=e.className,d=e.showIcon,p=d===void 0?!1:d,m=e.showLine,v=e.switcherIcon,x=e.blockNode,_=x===void 0?!1:x,P=e.children,k=e.checkable,T=k===void 0?!1:k,M=e.selectable,O=M===void 0?!0:M,N=e.draggable,L=e.motion,F=L===void 0?ze(ze({},np),{motionAppear:!1}):L,V=i("tree",a),B=ze(ze({},e),{checkable:T,selectable:O,showIcon:p,motion:F,blockNode:_,showLine:Boolean(m),dropIndicatorRender:C1e}),H=w.exports.useMemo(function(){if(!N)return!1;var G={};switch(nn(N)){case"function":G.nodeDraggable=N;break;case"object":G=ze({},N);break}return G.icon!==!1&&(G.icon=G.icon||I(w1e,{})),G},[N]);return I(aw,{itemHeight:20,ref:t,virtual:s,...B,prefixCls:V,className:He((n={},re(n,"".concat(V,"-icon-hide"),!p),re(n,"".concat(V,"-block-node"),_),re(n,"".concat(V,"-unselectable"),!O),re(n,"".concat(V,"-rtl"),o==="rtl"),n),u),direction:o,checkable:T&&I("span",{className:"".concat(V,"-checkbox-inner")}),selectable:O,switcherIcon:function(ee){return aU(V,v,m,ee)},draggable:H,children:P})});const sU=N1e;var L1e={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 F1e=L1e;var lU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:F1e})})};lU.displayName="FolderOpenOutlined";const z1e=w.exports.forwardRef(lU);var $1e={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 B1e=$1e;var uU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:B1e})})};uU.displayName="FolderOutlined";const V1e=w.exports.forwardRef(uU);var Yl;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(Yl||(Yl={}));function xT(e,t){function n(r){var i=r.key,o=r.children;t(i,r)!==!1&&xT(o||[],t)}e.forEach(n)}function U1e(e){var t=e.treeData,n=e.expandedKeys,r=e.startKey,i=e.endKey,o=[],s=Yl.None;if(r&&r===i)return[r];if(!r||!i)return[];function a(u){return u===r||u===i}return xT(t,function(u){if(s===Yl.End)return!1;if(a(u)){if(o.push(u),s===Yl.None)s=Yl.Start;else if(s===Yl.Start)return s=Yl.End,!1}else s===Yl.Start&&o.push(u);return n.includes(u)}),o}function JC(e,t){var n=Pt(t),r=[];return xT(e,function(i,o){var s=n.indexOf(i);return s!==-1&&(r.push(o),n.splice(s,1)),!!n.length}),r}var W5=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 j1e(e){var t=e.isLeaf,n=e.expanded;return t?I(rU,{}):n?I(z1e,{}):I(V1e,{})}function G5(e){var t=e.treeData,n=e.children;return t||I7(n)}var H1e=function(t,n){var r=t.defaultExpandAll,i=t.defaultExpandParent,o=t.defaultExpandedKeys,s=W5(t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]),a=w.exports.useRef(),u=w.exports.useRef(),d=function(){var se=q_(G5(s)),oe=se.keyEntities,he;return r?he=Object.keys(oe):i?he=U3(s.expandedKeys||o||[],oe):he=s.expandedKeys||o,he},p=w.exports.useState(s.selectedKeys||s.defaultSelectedKeys||[]),m=Le(p,2),v=m[0],x=m[1],_=w.exports.useState(function(){return d()}),P=Le(_,2),k=P[0],T=P[1];w.exports.useEffect(function(){"selectedKeys"in s&&x(s.selectedKeys)},[s.selectedKeys]),w.exports.useEffect(function(){"expandedKeys"in s&&T(s.expandedKeys)},[s.expandedKeys]);var M=function(se,oe){var he;return"expandedKeys"in s||T(se),(he=s.onExpand)===null||he===void 0?void 0:he.call(s,se,oe)},O=function(se,oe){var he,_e=s.multiple,be=oe.node,xe=oe.nativeEvent,Te=be.key,Ee=Te===void 0?"":Te,Ce=G5(s),ke=ze(ze({},oe),{selected:!0}),De=(xe==null?void 0:xe.ctrlKey)||(xe==null?void 0:xe.metaKey),Ke=xe==null?void 0:xe.shiftKey,Ue;_e&&De?(Ue=se,a.current=Ee,u.current=Ue,ke.selectedNodes=JC(Ce,Ue)):_e&&Ke?(Ue=Array.from(new Set([].concat(Pt(u.current||[]),Pt(U1e({treeData:Ce,expandedKeys:k,startKey:Ee,endKey:a.current}))))),ke.selectedNodes=JC(Ce,Ue)):(Ue=[Ee],a.current=Ee,u.current=Ue,ke.selectedNodes=JC(Ce,Ue)),(he=s.onSelect)===null||he===void 0||he.call(s,Ue,ke),"selectedKeys"in s||x(Ue)},N=w.exports.useContext(On),L=N.getPrefixCls,F=N.direction,V=s.prefixCls,B=s.className,H=s.showIcon,G=H===void 0?!0:H,ee=s.expandAction,X=ee===void 0?"click":ee,Z=W5(s,["prefixCls","className","showIcon","expandAction"]),Q=L("tree",V),le=He("".concat(Q,"-directory"),re({},"".concat(Q,"-directory-rtl"),F==="rtl"),B);return I(sU,{icon:j1e,ref:n,blockNode:!0,...Z,showIcon:G,expandAction:X,prefixCls:Q,className:le,expandedKeys:k,selectedKeys:v,onSelect:O,onExpand:M})},K1e=w.exports.forwardRef(H1e);const W1e=K1e;var bT=sU;bT.DirectoryTree=W1e;bT.TreeNode=of;const G1e=bT;function q1e(e){var t=w.exports.useRef(e),n=GI();return[function(){return t.current},function(r){t.current=r,n()}]}function q5(e){var t=e.value,n=e.onChange,r=e.filterSearch,i=e.tablePrefixCls,o=e.locale;return r?I("div",{className:"".concat(i,"-filter-dropdown-search"),children:I(nV,{prefix:I(WI,{}),placeholder:o.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,className:"".concat(i,"-filter-dropdown-search-input")})}):null}var Z1e=function(t){var n=t.keyCode;n===kt.ENTER&&t.stopPropagation()},X1e=function(t){return I("div",{className:t.className,onClick:function(r){return r.stopPropagation()},onKeyDown:Z1e,children:t.children})};const Y1e=X1e;function Q1e(e){return e.some(function(t){var n=t.children;return n})}function cU(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function dU(e){var t=e.filters,n=e.prefixCls,r=e.filteredKeys,i=e.filterMultiple,o=e.searchValue,s=e.filterSearch;return t.map(function(a,u){var d=String(a.value);if(a.children)return{key:d||u,label:a.text,popupClassName:"".concat(n,"-dropdown-submenu"),children:dU({filters:a.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:o,filterSearch:s})};var p=i?bc:S7,m={key:a.value!==void 0?d:u,label:$e(Tn,{children:[I(p,{checked:r.includes(d)}),I("span",{children:a.text})]})};return o.trim()?typeof s=="function"?s(o,a)?m:null:cU(o,a.text)?m:null:m})}function J1e(e){var t,n=e.tablePrefixCls,r=e.prefixCls,i=e.column,o=e.dropdownPrefixCls,s=e.columnKey,a=e.filterMultiple,u=e.filterMode,d=u===void 0?"menu":u,p=e.filterSearch,m=p===void 0?!1:p,v=e.filterState,x=e.triggerFilter,_=e.locale,P=e.children,k=e.getPopupContainer,T=i.filterDropdownOpen,M=i.onFilterDropdownOpenChange,O=i.filterDropdownVisible,N=i.onFilterDropdownVisibleChange,L=i.filterResetToDefaultFilteredValue,F=i.defaultFilteredValue,V=w.exports.useState(!1),B=Le(V,2),H=B[0],G=B[1],ee=!!(v&&(((t=v.filteredKeys)===null||t===void 0?void 0:t.length)||v.forceFiltered)),X=function(Ze){G(Ze),M==null||M(Ze),N==null||N(Ze)},Z;typeof T=="boolean"?Z=T:Z=typeof O=="boolean"?O:H;var Q=v==null?void 0:v.filteredKeys,le=q1e(Q||[]),ne=Le(le,2),se=ne[0],oe=ne[1],he=function(Ze){var Yt=Ze.selectedKeys;oe(Yt)},_e=function(Ze,Yt){var sn=Yt.node,Gt=Yt.checked;he(a?{selectedKeys:Ze}:{selectedKeys:Gt&&sn.key?[sn.key]:[]})};w.exports.useEffect(function(){!H||he({selectedKeys:Q||[]})},[Q]);var be=w.exports.useState([]),xe=Le(be,2),Te=xe[0],Ee=xe[1],Ce=function(Ze){Ee(Ze)},ke=w.exports.useState(""),De=Le(ke,2),Ke=De[0],Ue=De[1],tt=function(Ze){var Yt=Ze.target.value;Ue(Yt)};w.exports.useEffect(function(){H||Ue("")},[H]);var lt=function(Ze){var Yt=Ze&&Ze.length?Ze:null;if(Yt===null&&(!v||!v.filteredKeys)||$5(Yt,v==null?void 0:v.filteredKeys))return null;x({column:i,key:s,filteredKeys:Yt})},St=function(){X(!1),lt(se())},We=function(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1},Yt=Ze.confirm,sn=Ze.closeDropdown;Yt&<([]),sn&&X(!1),Ue(""),oe(L?(F||[]).map(function(Gt){return String(Gt)}):[])},bt=function(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},Yt=Ze.closeDropdown;Yt&&X(!1),lt(se())},Qe=function(Ze){Ze&&Q!==void 0&&oe(Q||[]),X(Ze),!Ze&&!i.filterDropdown&&St()},mt=He(re({},"".concat(o,"-menu-without-submenu"),!Q1e(i.filters||[]))),ct=function(Ze){if(Ze.target.checked){var Yt=Fh(i==null?void 0:i.filters).map(function(sn){return String(sn)});oe(Yt)}else oe([])},wt=function Ve(Ze){var Yt=Ze.filters;return(Yt||[]).map(function(sn,Gt){var zt=String(sn.value),Rt={title:sn.text,key:sn.value!==void 0?zt:Gt};return sn.children&&(Rt.children=Ve({filters:sn.children})),Rt})},rt=function Ve(Ze){var Yt;return ze(ze({},Ze),{text:Ze.title,value:Ze.key,children:((Yt=Ze.children)===null||Yt===void 0?void 0:Yt.map(function(sn){return Ve(sn)}))||[]})},ut;if(typeof i.filterDropdown=="function")ut=i.filterDropdown({prefixCls:"".concat(o,"-custom"),setSelectedKeys:function(Ze){return he({selectedKeys:Ze})},selectedKeys:se(),confirm:bt,clearFilters:We,filters:i.filters,visible:Z,close:function(){X(!1)}});else if(i.filterDropdown)ut=i.filterDropdown;else{var nt=se()||[],qe=function(){return(i.filters||[]).length===0?I(dl,{image:dl.PRESENTED_IMAGE_SIMPLE,description:_.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):d==="tree"?$e(Tn,{children:[I(q5,{filterSearch:m,value:Ke,onChange:tt,tablePrefixCls:n,locale:_}),$e("div",{className:"".concat(n,"-filter-dropdown-tree"),children:[a?I(bc,{checked:nt.length===Fh(i.filters).length,indeterminate:nt.length>0&&nt.length<Fh(i.filters).length,className:"".concat(n,"-filter-dropdown-checkall"),onChange:ct,children:_.filterCheckall}):null,I(G1e,{checkable:!0,selectable:!1,blockNode:!0,multiple:a,checkStrictly:!a,className:"".concat(o,"-menu"),onCheck:_e,checkedKeys:nt,selectedKeys:nt,showIcon:!1,treeData:wt({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Ke.trim()?function(Ze){return typeof m=="function"?m(Ke,rt(Ze)):cU(Ke,Ze.title)}:void 0})]})]}):$e(Tn,{children:[I(q5,{filterSearch:m,value:Ke,onChange:tt,tablePrefixCls:n,locale:_}),I(u7,{selectable:!0,multiple:a,prefixCls:"".concat(o,"-menu"),className:mt,onSelect:he,onDeselect:he,selectedKeys:nt,getPopupContainer:k,openKeys:Te,onOpenChange:Ce,items:dU({filters:i.filters||[],filterSearch:m,prefixCls:r,filteredKeys:se(),filterMultiple:a,searchValue:Ke})})]})},dt=function(){return L?$5((F||[]).map(function(Ze){return String(Ze)}),nt):nt.length===0};ut=$e(Tn,{children:[qe(),$e("div",{className:"".concat(r,"-dropdown-btns"),children:[I($n,{type:"link",size:"small",disabled:dt(),onClick:function(){return We()},children:_.filterReset}),I($n,{type:"primary",size:"small",onClick:St,children:_.filterConfirm})]})]})}i.filterDropdown&&(ut=I(l7,{selectable:void 0,children:ut}));var _t=function(){return I(Y1e,{className:"".concat(r,"-dropdown"),children:ut})},Dt;typeof i.filterIcon=="function"?Dt=i.filterIcon(ee):i.filterIcon?Dt=i.filterIcon:Dt=I(lme,{});var Nt=w.exports.useContext(On),jt=Nt.direction;return $e("div",{className:"".concat(r,"-column"),children:[I("span",{className:"".concat(n,"-column-title"),children:P}),I(qv,{dropdownRender:_t,trigger:["click"],open:Z,onOpenChange:Qe,getPopupContainer:k,placement:jt==="rtl"?"bottomLeft":"bottomRight",children:I("span",{role:"button",tabIndex:-1,className:He("".concat(r,"-trigger"),{active:ee}),onClick:function(Ze){Ze.stopPropagation()},children:Dt})})]})}function oE(e,t,n){var r=[];return(e||[]).forEach(function(i,o){var s,a=ew(o,n);if(i.filters||"filterDropdown"in i||"onFilter"in i)if("filteredValue"in i){var u=i.filteredValue;"filterDropdown"in i||(u=(s=u==null?void 0:u.map(String))!==null&&s!==void 0?s:u),r.push({column:i,key:ip(i,a),filteredKeys:u,forceFiltered:i.filtered})}else r.push({column:i,key:ip(i,a),filteredKeys:t&&i.defaultFilteredValue?i.defaultFilteredValue:void 0,forceFiltered:i.filtered});"children"in i&&(r=[].concat(Pt(r),Pt(oE(i.children,t,a))))}),r}function fU(e,t,n,r,i,o,s,a){return n.map(function(u,d){var p=ew(d,a),m=u.filterMultiple,v=m===void 0?!0:m,x=u.filterMode,_=u.filterSearch,P=u;if(P.filters||P.filterDropdown){var k=ip(P,p),T=r.find(function(M){var O=M.key;return k===O});P=ze(ze({},P),{title:function(O){return I(J1e,{tablePrefixCls:e,prefixCls:"".concat(e,"-filter"),dropdownPrefixCls:t,column:P,columnKey:k,filterState:T,filterMultiple:v,filterMode:x,filterSearch:_,triggerFilter:i,locale:s,getPopupContainer:o,children:tw(u.title,O)})}})}return"children"in P&&(P=ze(ze({},P),{children:fU(e,t,P.children,r,i,o,s,p)})),P})}function Fh(e){var t=[];return(e||[]).forEach(function(n){var r=n.value,i=n.children;t.push(r),i&&(t=[].concat(Pt(t),Pt(Fh(i))))}),t}function Z5(e){var t={};return e.forEach(function(n){var r=n.key,i=n.filteredKeys,o=n.column,s=o.filters,a=o.filterDropdown;if(a)t[r]=i||null;else if(Array.isArray(i)){var u=Fh(s);t[r]=u.filter(function(d){return i.includes(String(d))})}else t[r]=null}),t}function X5(e,t){return t.reduce(function(n,r){var i=r.column,o=i.onFilter,s=i.filters,a=r.filteredKeys;return o&&a&&a.length?n.filter(function(u){return a.some(function(d){var p=Fh(s),m=p.findIndex(function(x){return String(x)===String(d)}),v=m!==-1?p[m]:d;return o(v,u)})}):n},e)}function ebe(e){var t=e.prefixCls,n=e.dropdownPrefixCls,r=e.mergedColumns,i=e.onFilterChange,o=e.getPopupContainer,s=e.locale,a=w.exports.useState(function(){return oE(r,!0)}),u=Le(a,2),d=u[0],p=u[1],m=w.exports.useMemo(function(){var P=oE(r,!1),k=!0;return P.forEach(function(T){var M=T.filteredKeys;M!==void 0&&(k=!1)}),k?d:P},[r,d]),v=w.exports.useMemo(function(){return Z5(m)},[m]),x=function(k){var T=m.filter(function(M){var O=M.key;return O!==k.key});T.push(k),p(T),i(Z5(T),T)},_=function(k){return fU(t,n,k,m,x,o,s)};return[_,m,v]}function tbe(e,t,n){var r=w.exports.useRef({});function i(o){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let u=function(d){d.forEach(function(p,m){var v=n(p,m);s.set(v,p),p&&nn(p)==="object"&&t in p&&u(p[t]||[])})};var a=u,s=new Map;u(e),r.current={data:e,childrenColumnName:t,kvMap:s,getRowKey:n}}return r.current.kvMap.get(o)}return[i]}var nbe=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},hU=10;function rbe(e,t){var n={current:t.current,pageSize:t.pageSize},r=e&&nn(e)==="object"?e:{};return Object.keys(r).forEach(function(i){var o=t[i];typeof o!="function"&&(n[i]=o)}),n}function ibe(){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(o){var s=i[o];s!==void 0&&(e[o]=s)})}),e}function obe(e,t,n){var r=t&&nn(t)==="object"?t:{},i=r.total,o=i===void 0?0:i,s=nbe(r,["total"]),a=w.exports.useState(function(){return{current:"defaultCurrent"in s?s.defaultCurrent:1,pageSize:"defaultPageSize"in s?s.defaultPageSize:hU}}),u=Le(a,2),d=u[0],p=u[1],m=ibe(d,s,{total:o>0?o:e}),v=Math.ceil((o||e)/m.pageSize);m.current>v&&(m.current=v||1);var x=function(k,T){p({current:k!=null?k:1,pageSize:T||m.pageSize})},_=function(k,T){var M;t&&((M=t.onChange)===null||M===void 0||M.call(t,k,T)),x(k,T),n(k,T||(m==null?void 0:m.pageSize))};return t===!1?[{},function(){}]:[ze(ze({},m),{onChange:_}),x]}var Gu={},aE="SELECT_ALL",sE="SELECT_INVERT",lE="SELECT_NONE",Y5=[];function pU(e,t){var n=[];return(e||[]).forEach(function(r){n.push(r),r&&nn(r)==="object"&&t in r&&(n=[].concat(Pt(n),Pt(pU(r[t],t))))}),n}function abe(e,t){var n=e||{},r=n.preserveSelectedRowKeys,i=n.selectedRowKeys,o=n.defaultSelectedRowKeys,s=n.getCheckboxProps,a=n.onChange,u=n.onSelect,d=n.onSelectAll,p=n.onSelectInvert,m=n.onSelectNone,v=n.onSelectMultiple,x=n.columnWidth,_=n.type,P=n.selections,k=n.fixed,T=n.renderCell,M=n.hideSelectAll,O=n.checkStrictly,N=O===void 0?!0:O,L=t.prefixCls,F=t.data,V=t.pageData,B=t.getRecordByKey,H=t.getRowKey,G=t.expandType,ee=t.childrenColumnName,X=t.locale,Z=t.getPopupContainer,Q=ki(i||o||Y5,{value:i}),le=Le(Q,2),ne=le[0],se=le[1],oe=w.exports.useRef(new Map),he=w.exports.useCallback(function(rt){if(r){var ut=new Map;rt.forEach(function(nt){var qe=B(nt);!qe&&oe.current.has(nt)&&(qe=oe.current.get(nt)),ut.set(nt,qe)}),oe.current=ut}},[B,r]);w.exports.useEffect(function(){he(ne)},[ne]);var _e=w.exports.useMemo(function(){return N?{keyEntities:null}:q_(F,{externalGetKey:H,childrenPropName:ee})},[F,H,N,ee]),be=_e.keyEntities,xe=w.exports.useMemo(function(){return pU(V,ee)},[V,ee]),Te=w.exports.useMemo(function(){var rt=new Map;return xe.forEach(function(ut,nt){var qe=H(ut,nt),dt=(s?s(ut):null)||{};rt.set(qe,dt)}),rt},[xe,H,s]),Ee=w.exports.useCallback(function(rt){var ut;return!!(!((ut=Te.get(H(rt)))===null||ut===void 0)&&ut.disabled)},[Te,H]),Ce=w.exports.useMemo(function(){if(N)return[ne||[],[]];var rt=uu(ne,!0,be,Ee),ut=rt.checkedKeys,nt=rt.halfCheckedKeys;return[ut||[],nt]},[ne,N,be,Ee]),ke=Le(Ce,2),De=ke[0],Ke=ke[1],Ue=w.exports.useMemo(function(){var rt=_==="radio"?De.slice(0,1):De;return new Set(rt)},[De,_]),tt=w.exports.useMemo(function(){return _==="radio"?new Set:new Set(Ke)},[Ke,_]),lt=w.exports.useState(null),St=Le(lt,2),We=St[0],bt=St[1];w.exports.useEffect(function(){e||se(Y5)},[!!e]);var Qe=w.exports.useCallback(function(rt,ut){var nt,qe;he(rt),r?(nt=rt,qe=rt.map(function(dt){return oe.current.get(dt)})):(nt=[],qe=[],rt.forEach(function(dt){var _t=B(dt);_t!==void 0&&(nt.push(dt),qe.push(_t))})),se(nt),a==null||a(nt,qe,{type:ut})},[se,B,a,r]),mt=w.exports.useCallback(function(rt,ut,nt,qe){if(u){var dt=nt.map(function(_t){return B(_t)});u(B(rt),ut,dt,qe)}Qe(nt,"single")},[u,B,Qe]),ct=w.exports.useMemo(function(){if(!P||M)return null;var rt=P===!0?[aE,sE,lE]:P;return rt.map(function(ut){return ut===aE?{key:"all",text:X.selectionAll,onSelect:function(){Qe(F.map(function(qe,dt){return H(qe,dt)}).filter(function(qe){var dt=Te.get(qe);return!(dt!=null&&dt.disabled)||Ue.has(qe)}),"all")}}:ut===sE?{key:"invert",text:X.selectInvert,onSelect:function(){var qe=new Set(Ue);V.forEach(function(_t,Dt){var Nt=H(_t,Dt),jt=Te.get(Nt);jt!=null&&jt.disabled||(qe.has(Nt)?qe.delete(Nt):qe.add(Nt))});var dt=Array.from(qe);p&&p(dt),Qe(dt,"invert")}}:ut===lE?{key:"none",text:X.selectNone,onSelect:function(){m==null||m(),Qe(Array.from(Ue).filter(function(qe){var dt=Te.get(qe);return dt==null?void 0:dt.disabled}),"none")}}:ut}).map(function(ut){return ze(ze({},ut),{onSelect:function(){for(var qe,dt,_t=arguments.length,Dt=new Array(_t),Nt=0;Nt<_t;Nt++)Dt[Nt]=arguments[Nt];(dt=ut.onSelect)===null||dt===void 0||(qe=dt).call.apply(qe,[ut].concat(Dt)),bt(null)}})})},[P,Ue,V,H,p,Qe]),wt=w.exports.useCallback(function(rt){var ut;if(!e)return rt.filter(function(tn){return tn!==Gu});var nt=Pt(rt),qe=new Set(Ue),dt=xe.map(H).filter(function(tn){return!Te.get(tn).disabled}),_t=dt.every(function(tn){return qe.has(tn)}),Dt=dt.some(function(tn){return qe.has(tn)}),Nt=function(){var Bt=[];_t?dt.forEach(function(xt){qe.delete(xt),Bt.push(xt)}):dt.forEach(function(xt){qe.has(xt)||(qe.add(xt),Bt.push(xt))});var gt=Array.from(qe);d==null||d(!_t,gt.map(function(xt){return B(xt)}),Bt.map(function(xt){return B(xt)})),Qe(gt,"all"),bt(null)},jt;if(_!=="radio"){var Ve;if(ct){var Ze={getPopupContainer:Z,items:ct.map(function(tn,Bt){var gt=tn.key,xt=tn.text,Vt=tn.onSelect;return{key:gt||Bt,onClick:function(){Vt==null||Vt(dt)},label:xt}})};Ve=I("div",{className:"".concat(L,"-selection-extra"),children:I(qv,{menu:Ze,getPopupContainer:Z,children:I("span",{children:I(KI,{})})})})}var Yt=xe.map(function(tn,Bt){var gt=H(tn,Bt),xt=Te.get(gt)||{};return ze({checked:qe.has(gt)},xt)}).filter(function(tn){var Bt=tn.disabled;return Bt}),sn=!!Yt.length&&Yt.length===xe.length,Gt=sn&&Yt.every(function(tn){var Bt=tn.checked;return Bt}),zt=sn&&Yt.some(function(tn){var Bt=tn.checked;return Bt});jt=!M&&$e("div",{className:"".concat(L,"-selection"),children:[I(bc,{checked:sn?Gt:!!xe.length&&_t,indeterminate:sn?!Gt&&zt:!_t&&Dt,onChange:Nt,disabled:xe.length===0||sn,"aria-label":Ve?"Custom selection":"Select all",skipGroup:!0}),Ve]})}var Rt;_==="radio"?Rt=function(Bt,gt,xt){var Vt=H(gt,xt),qt=qe.has(Vt);return{node:I(S7,{...Te.get(Vt),checked:qt,onClick:function(Fn){return Fn.stopPropagation()},onChange:function(Fn){qe.has(Vt)||mt(Vt,!0,[Vt],Fn.nativeEvent)}}),checked:qt}}:Rt=function(Bt,gt,xt){var Vt,qt=H(gt,xt),vn=qe.has(qt),Fn=tt.has(qt),tr=Te.get(qt),nr;return G==="nest"?nr=Fn:nr=(Vt=tr==null?void 0:tr.indeterminate)!==null&&Vt!==void 0?Vt:Fn,{node:I(bc,{...tr,indeterminate:nr,checked:vn,skipGroup:!0,onClick:function(q){return q.stopPropagation()},onChange:function(q){var J=q.nativeEvent,pe=J.shiftKey,ce=-1,we=-1;if(pe&&N){var Ae=new Set([We,qt]);dt.some(function(Xt,En){if(Ae.has(Xt))if(ce===-1)ce=En;else return we=En,!0;return!1})}if(we!==-1&&ce!==we&&N){var Pe=dt.slice(ce,we+1),Me=[];vn?Pe.forEach(function(Xt){qe.has(Xt)&&(Me.push(Xt),qe.delete(Xt))}):Pe.forEach(function(Xt){qe.has(Xt)||(Me.push(Xt),qe.add(Xt))});var Be=Array.from(qe);v==null||v(!vn,Be.map(function(Xt){return B(Xt)}),Me.map(function(Xt){return B(Xt)})),Qe(Be,"multiple")}else{var Je=De;if(N){var et=vn?il(Je,qt):Gl(Je,qt);mt(qt,!vn,et,J)}else{var Ge=uu([].concat(Pt(Je),[qt]),!0,be,Ee),Ut=Ge.checkedKeys,Mt=Ge.halfCheckedKeys,at=Ut;if(vn){var $t=new Set(Ut);$t.delete(qt),at=uu(Array.from($t),{checked:!1,halfCheckedKeys:Mt},be,Ee).checkedKeys}mt(qt,!vn,at,J)}}bt(vn?null:qt)}}),checked:vn}};var Qt=function(Bt,gt,xt){var Vt=Rt(Bt,gt,xt),qt=Vt.node,vn=Vt.checked;return T?T(vn,gt,xt,qt):qt};if(!nt.includes(Gu))if(nt.findIndex(function(tn){var Bt;return((Bt=tn[Mg])===null||Bt===void 0?void 0:Bt.columnType)==="EXPAND_COLUMN"})===0){var pn=nt,ot=dI(pn),Lt=ot[0],Tt=ot.slice(1);nt=[Lt,Gu].concat(Pt(Tt))}else nt=[Gu].concat(Pt(nt));var Kt=nt.indexOf(Gu);nt=nt.filter(function(tn,Bt){return tn!==Gu||Bt===Kt});var Zt=nt[Kt-1],ht=nt[Kt+1],xn=k;xn===void 0&&((ht==null?void 0:ht.fixed)!==void 0?xn=ht.fixed:(Zt==null?void 0:Zt.fixed)!==void 0&&(xn=Zt.fixed)),xn&&Zt&&((ut=Zt[Mg])===null||ut===void 0?void 0:ut.columnType)==="EXPAND_COLUMN"&&Zt.fixed===void 0&&(Zt.fixed=xn);var bn=re({fixed:xn,width:x,className:"".concat(L,"-selection-column"),title:e.columnTitle||jt,render:Qt},Mg,{className:"".concat(L,"-selection-col")});return nt.map(function(tn){return tn===Gu?bn:tn})},[H,xe,e,De,Ue,tt,x,ct,G,We,Te,v,mt,Ee]);return[wt,Ue]}var sbe={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 lbe=sbe;var mU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:lbe})})};mU.displayName="CaretDownOutlined";const ube=w.exports.forwardRef(mU);var cbe={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 dbe=cbe;var gU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:dbe})})};gU.displayName="CaretUpOutlined";const fbe=w.exports.forwardRef(gU);var u1="ascend",e2="descend";function Eb(e){return nn(e.sorter)==="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function Q5(e){return typeof e=="function"?e:e&&nn(e)==="object"&&e.compare?e.compare:!1}function hbe(e,t){return t?e[e.indexOf(t)+1]:e[0]}function uE(e,t,n){var r=[];function i(o,s){r.push({column:o,key:ip(o,s),multiplePriority:Eb(o),sortOrder:o.sortOrder})}return(e||[]).forEach(function(o,s){var a=ew(s,n);o.children?("sortOrder"in o&&i(o,a),r=[].concat(Pt(r),Pt(uE(o.children,t,a)))):o.sorter&&("sortOrder"in o?i(o,a):t&&o.defaultSortOrder&&r.push({column:o,key:ip(o,a),multiplePriority:Eb(o),sortOrder:o.defaultSortOrder}))}),r}function vU(e,t,n,r,i,o,s,a){return(t||[]).map(function(u,d){var p=ew(d,a),m=u;if(m.sorter){var v=m.sortDirections||i,x=m.showSorterTooltip===void 0?s:m.showSorterTooltip,_=ip(m,p),P=n.find(function(G){var ee=G.key;return ee===_}),k=P?P.sortOrder:null,T=hbe(v,k),M=v.includes(u1)&&I(fbe,{className:He("".concat(e,"-column-sorter-up"),{active:k===u1}),role:"presentation"}),O=v.includes(e2)&&I(ube,{className:He("".concat(e,"-column-sorter-down"),{active:k===e2}),role:"presentation"}),N=o||{},L=N.cancelSort,F=N.triggerAsc,V=N.triggerDesc,B=L;T===e2?B=V:T===u1&&(B=F);var H=nn(x)==="object"?x:{title:B};m=ze(ze({},m),{className:He(m.className,re({},"".concat(e,"-column-sort"),k)),title:function(ee){var X=$e("div",{className:"".concat(e,"-column-sorters"),children:[I("span",{className:"".concat(e,"-column-title"),children:tw(u.title,ee)}),I("span",{className:He("".concat(e,"-column-sorter"),re({},"".concat(e,"-column-sorter-full"),!!(M&&O))),children:$e("span",{className:"".concat(e,"-column-sorter-inner"),children:[M,O]})})]});return x?I($i,{...H,children:X}):X},onHeaderCell:function(ee){var X=u.onHeaderCell&&u.onHeaderCell(ee)||{},Z=X.onClick,Q=X.onKeyDown;X.onClick=function(se){r({column:u,key:_,sortOrder:T,multiplePriority:Eb(u)}),Z==null||Z(se)},X.onKeyDown=function(se){se.keyCode===kt.ENTER&&(r({column:u,key:_,sortOrder:T,multiplePriority:Eb(u)}),Q==null||Q(se))};var le=ome(u.title,{}),ne=le==null?void 0:le.toString();return k?X["aria-sort"]=k==="ascend"?"ascending":"descending":X["aria-label"]=ne||"",X.className=He(X.className,"".concat(e,"-column-has-sorters")),X.tabIndex=0,u.ellipsis&&(X.title=(le!=null?le:"").toString()),X}})}return"children"in m&&(m=ze(ze({},m),{children:vU(e,m.children,n,r,i,o,s,p)})),m})}function J5(e){var t=e.column,n=e.sortOrder;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function eN(e){var t=e.filter(function(n){var r=n.sortOrder;return r}).map(J5);return t.length===0&&e.length?ze(ze({},J5(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function cE(e,t,n){var r=t.slice().sort(function(s,a){return a.multiplePriority-s.multiplePriority}),i=e.slice(),o=r.filter(function(s){var a=s.column.sorter,u=s.sortOrder;return Q5(a)&&u});return o.length?i.sort(function(s,a){for(var u=0;u<o.length;u+=1){var d=o[u],p=d.column.sorter,m=d.sortOrder,v=Q5(p);if(v&&m){var x=v(s,a,m);if(x!==0)return m===u1?x:-x}}return 0}).map(function(s){var a=s[n];return a?ze(ze({},s),re({},n,cE(a,t,n))):s}):i}function pbe(e){var t=e.prefixCls,n=e.mergedColumns,r=e.onSorterChange,i=e.sortDirections,o=e.tableLocale,s=e.showSorterTooltip,a=w.exports.useState(uE(n,!0)),u=Le(a,2),d=u[0],p=u[1],m=w.exports.useMemo(function(){var k=!0,T=uE(n,!1);if(!T.length)return d;var M=[];function O(L){k?M.push(L):M.push(ze(ze({},L),{sortOrder:null}))}var N=null;return T.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,d]),v=w.exports.useMemo(function(){var k=m.map(function(T){var M=T.column,O=T.sortOrder;return{column:M,order:O}});return{sortColumns:k,sortColumn:k[0]&&k[0].column,sortOrder:k[0]&&k[0].order}},[m]);function x(k){var T;k.multiplePriority===!1||!m.length||m[0].multiplePriority===!1?T=[k]:T=[].concat(Pt(m.filter(function(M){var O=M.key;return O!==k.key})),[k]),p(T),r(eN(T),T)}var _=function(T){return vU(t,T,m,x,i,o,s)},P=function(){return eN(m)};return[_,m,v,P]}function yU(e,t){return e.map(function(n){var r=ze({},n);return r.title=tw(n.title,t),"children"in r&&(r.children=yU(r.children,t)),r})}function mbe(e){var t=w.exports.useCallback(function(n){return yU(n,e)},[e]);return[t]}var gbe=[];function vbe(e,t){var n,r=e.prefixCls,i=e.className,o=e.style,s=e.size,a=e.bordered,u=e.dropdownPrefixCls,d=e.dataSource,p=e.pagination,m=e.rowSelection,v=e.rowKey,x=v===void 0?"key":v,_=e.rowClassName,P=e.columns,k=e.children,T=e.childrenColumnName,M=e.onChange,O=e.getPopupContainer,N=e.loading,L=e.expandIcon,F=e.expandable,V=e.expandedRowRender,B=e.expandIconColumnIndex,H=e.indentSize,G=e.scroll,ee=e.sortDirections,X=e.locale,Z=e.showSorterTooltip,Q=Z===void 0?!0:Z;[["filterDropdownVisible","filterDropdownOpen"],["onFilterDropdownVisibleChange","onFilterDropdownOpenChange"]].forEach(function(et){var Ge=Le(et,2);Ge[0],Ge[1]});var le=w.exports.useMemo(function(){return P||vT(k)},[P,k]),ne=w.exports.useMemo(function(){return le.some(function(et){return et.responsive})},[le]),se=z9(ne),oe=w.exports.useMemo(function(){var et=new Set(Object.keys(se).filter(function(Ge){return se[Ge]}));return le.filter(function(Ge){return!Ge.responsive||Ge.responsive.some(function(Ut){return et.has(Ut)})})},[le,se]),he=Ci(e,["className","style","columns"]),_e=w.exports.useContext(Hs),be=w.exports.useContext(On),xe=be.locale,Te=xe===void 0?gs:xe,Ee=be.renderEmpty,Ce=be.direction,ke=s||_e,De=ze(ze({},Te.Table),X),Ke=d||gbe,Ue=w.exports.useContext(On),tt=Ue.getPrefixCls,lt=tt("table",r),St=tt("dropdown",u),We=ze({childrenColumnName:T,expandIconColumnIndex:B},F),bt=We.childrenColumnName,Qe=bt===void 0?"children":bt,mt=w.exports.useMemo(function(){return Ke.some(function(et){return et==null?void 0:et[Qe]})?"nest":V||F&&F.expandedRowRender?"row":null},[Ke]),ct={body:w.exports.useRef()},wt=w.exports.useMemo(function(){return typeof x=="function"?x:function(et){return et==null?void 0:et[x]}},[x]),rt=tbe(Ke,Qe,wt),ut=Le(rt,1),nt=ut[0],qe={},dt=function(Ge,Ut){var Mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,at=ze(ze({},qe),Ge);Mt&&(qe.resetPagination(),at.pagination.current&&(at.pagination.current=1),p&&p.onChange&&p.onChange(1,at.pagination.pageSize)),G&&G.scrollToFirstRowOnChange!==!1&&ct.body.current&&Vie(0,{getContainer:function(){return ct.body.current}}),M==null||M(at.pagination,at.filters,at.sorter,{currentDataSource:X5(cE(Ke,at.sorterStates,Qe),at.filterStates),action:Ut})},_t=function(Ge,Ut){dt({sorter:Ge,sorterStates:Ut},"sort",!1)},Dt=pbe({prefixCls:lt,mergedColumns:oe,onSorterChange:_t,sortDirections:ee||["ascend","descend"],tableLocale:De,showSorterTooltip:Q}),Nt=Le(Dt,4),jt=Nt[0],Ve=Nt[1],Ze=Nt[2],Yt=Nt[3],sn=w.exports.useMemo(function(){return cE(Ke,Ve,Qe)},[Ke,Ve]);qe.sorter=Yt(),qe.sorterStates=Ve;var Gt=function(Ge,Ut){dt({filters:Ge,filterStates:Ut},"filter",!0)},zt=ebe({prefixCls:lt,locale:De,dropdownPrefixCls:St,mergedColumns:oe,onFilterChange:Gt,getPopupContainer:O}),Rt=Le(zt,3),Qt=Rt[0],pn=Rt[1],ot=Rt[2],Lt=X5(sn,pn);qe.filters=ot,qe.filterStates=pn;var Tt=w.exports.useMemo(function(){var et={};return Object.keys(ot).forEach(function(Ge){ot[Ge]!==null&&(et[Ge]=ot[Ge])}),ze(ze({},Ze),{filters:et})},[Ze,ot]),Kt=mbe(Tt),Zt=Le(Kt,1),ht=Zt[0],xn=function(Ge,Ut){dt({pagination:ze(ze({},qe.pagination),{current:Ge,pageSize:Ut})},"paginate")},bn=obe(Lt.length,p,xn),tn=Le(bn,2),Bt=tn[0],gt=tn[1];qe.pagination=p===!1?{}:rbe(p,Bt),qe.resetPagination=gt;var xt=w.exports.useMemo(function(){if(p===!1||!Bt.pageSize)return Lt;var et=Bt.current,Ge=et===void 0?1:et,Ut=Bt.total,Mt=Bt.pageSize,at=Mt===void 0?hU:Mt;return Lt.length<Ut?Lt.length>at?Lt.slice((Ge-1)*at,Ge*at):Lt:Lt.slice((Ge-1)*at,Ge*at)},[!!p,Lt,Bt&&Bt.current,Bt&&Bt.pageSize,Bt&&Bt.total]),Vt=abe(m,{prefixCls:lt,data:Lt,pageData:xt,getRowKey:wt,getRecordByKey:nt,expandType:mt,childrenColumnName:Qe,locale:De,getPopupContainer:O}),qt=Le(Vt,2),vn=qt[0],Fn=qt[1],tr=function(Ge,Ut,Mt){var at;return typeof _=="function"?at=He(_(Ge,Ut,Mt)):at=He(_),He(re({},"".concat(lt,"-row-selected"),Fn.has(wt(Ge,Ut))),at)};We.__PARENT_RENDER_ICON__=We.expandIcon,We.expandIcon=We.expandIcon||L||ime(De),mt==="nest"&&We.expandIconColumnIndex===void 0?We.expandIconColumnIndex=m?1:0:We.expandIconColumnIndex>0&&m&&(We.expandIconColumnIndex-=1),typeof We.indentSize!="number"&&(We.indentSize=typeof H=="number"?H:15);var nr=w.exports.useCallback(function(et){return ht(vn(Qt(jt(et))))},[jt,Qt,vn]),ye,q;if(p!==!1&&(Bt==null?void 0:Bt.total)){var J;Bt.size?J=Bt.size:J=ke==="small"||ke==="middle"?"small":void 0;var pe=function(Ge){return I(she,{...Bt,className:He("".concat(lt,"-pagination ").concat(lt,"-pagination-").concat(Ge),Bt.className),size:J})},ce=Ce==="rtl"?"left":"right",we=Bt.position;if(we!==null&&Array.isArray(we)){var Ae=we.find(function(et){return et.includes("top")}),Pe=we.find(function(et){return et.includes("bottom")}),Me=we.every(function(et){return"".concat(et)==="none"});!Ae&&!Pe&&!Me&&(q=pe(ce)),Ae&&(ye=pe(Ae.toLowerCase().replace("top",""))),Pe&&(q=pe(Pe.toLowerCase().replace("bottom","")))}else q=pe(ce)}var Be;typeof N=="boolean"?Be={spinning:N}:nn(N)==="object"&&(Be=ze({spinning:!0},N));var Je=He("".concat(lt,"-wrapper"),re({},"".concat(lt,"-wrapper-rtl"),Ce==="rtl"),i);return I("div",{ref:t,className:Je,style:o,children:$e(vs,{spinning:!1,...Be,children:[ye,I(wf,{...he,columns:oe,direction:Ce,expandable:We,prefixCls:lt,className:He((n={},re(n,"".concat(lt,"-middle"),ke==="middle"),re(n,"".concat(lt,"-small"),ke==="small"),re(n,"".concat(lt,"-bordered"),a),re(n,"".concat(lt,"-empty"),Ke.length===0),n)),data:xt,rowKey:wt,rowClassName:tr,emptyText:X&&X.emptyText||(Ee||UI)("Table"),internalHooks:l1,internalRefs:ct,transformColumns:nr}),q]})})}var ybe=w.exports.forwardRef(vbe),Cu=ybe;Cu.SELECTION_COLUMN=Gu;Cu.EXPAND_COLUMN=wf.EXPAND_COLUMN;Cu.SELECTION_ALL=aE;Cu.SELECTION_INVERT=sE;Cu.SELECTION_NONE=lE;Cu.Column=nme;Cu.ColumnGroup=rme;Cu.Summary=zV;const xU=Cu;var xbe={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 bbe=xbe;var bU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:bbe})})};bU.displayName="DeleteOutlined";const _be=w.exports.forwardRef(bU);var _U=w.exports.createContext(null),wU=w.exports.createContext(null);function wbe(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Cbe(e){var t=e||{},n=t.label,r=t.value,i=t.children,o=r||"value";return{_title:n?[n]:["title","label"],value:o,key:o,children:i||"children"}}function dE(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function Sbe(e,t){var n=[];function r(i){i.forEach(function(o){var s=o[t.children];s&&(n.push(o[t.value]),r(s))})}return r(e),n}function tN(e){return e==null}var Ebe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Pbe=function(t,n){var r=XB(),i=r.prefixCls,o=r.multiple,s=r.searchValue,a=r.toggleOpen,u=r.open,d=r.notFoundContent,p=w.exports.useContext(wU),m=p.virtual,v=p.listHeight,x=p.listItemHeight,_=p.treeData,P=p.fieldNames,k=p.onSelect,T=p.dropdownMatchSelectWidth,M=p.treeExpandAction,O=w.exports.useContext(_U),N=O.checkable,L=O.checkedKeys,F=O.halfCheckedKeys,V=O.treeExpandedKeys,B=O.treeDefaultExpandAll,H=O.treeDefaultExpandedKeys,G=O.onTreeExpand,ee=O.treeIcon,X=O.showTreeIcon,Z=O.switcherIcon,Q=O.treeLine,le=O.treeNodeFilterProp,ne=O.loadData,se=O.treeLoadedKeys,oe=O.treeMotion,he=O.onTreeLoad,_e=O.keyEntities,be=w.exports.useRef(),xe=Vv(function(){return _},[u,_],function(_t,Dt){return Dt[0]&&_t[1]!==Dt[1]}),Te=w.exports.useMemo(function(){return N?{checked:L,halfChecked:F}:null},[N,L,F]);w.exports.useEffect(function(){if(u&&!o&&L.length){var _t;(_t=be.current)===null||_t===void 0||_t.scrollTo({key:L[0]})}},[u]);var Ee=String(s).toLowerCase(),Ce=function(Dt){return Ee?String(Dt[le]).toLowerCase().includes(Ee):!1},ke=w.exports.useState(H),De=Le(ke,2),Ke=De[0],Ue=De[1],tt=w.exports.useState(null),lt=Le(tt,2),St=lt[0],We=lt[1],bt=w.exports.useMemo(function(){return V?Pt(V):s?St:Ke},[Ke,St,V,s]);w.exports.useEffect(function(){s&&We(Sbe(_,P))},[s]);var Qe=function(Dt){Ue(Dt),We(Dt),G&&G(Dt)},mt=function(Dt){Dt.preventDefault()},ct=function(Dt,Nt){var jt=Nt.node;N&&dE(jt)||(k(jt.key,{selected:!L.includes(jt.key)}),o||a(!1))},wt=w.exports.useState(null),rt=Le(wt,2),ut=rt[0],nt=rt[1],qe=_e[ut];if(w.exports.useImperativeHandle(n,function(){var _t;return{scrollTo:(_t=be.current)===null||_t===void 0?void 0:_t.scrollTo,onKeyDown:function(Nt){var jt,Ve=Nt.which;switch(Ve){case kt.UP:case kt.DOWN:case kt.LEFT:case kt.RIGHT:(jt=be.current)===null||jt===void 0||jt.onKeyDown(Nt);break;case kt.ENTER:{if(qe){var Ze=(qe==null?void 0:qe.node)||{},Yt=Ze.selectable,sn=Ze.value;Yt!==!1&&ct(null,{node:{key:ut},selected:!L.includes(sn)})}break}case kt.ESC:a(!1)}},onKeyUp:function(){}}}),xe.length===0)return I("div",{role:"listbox",className:"".concat(i,"-empty"),onMouseDown:mt,children:d});var dt={fieldNames:P};return se&&(dt.loadedKeys=se),bt&&(dt.expandedKeys=bt),$e("div",{onMouseDown:mt,children:[qe&&u&&I("span",{style:Ebe,"aria-live":"assertive",children:qe.node.value}),I(aw,{ref:be,focusable:!1,prefixCls:"".concat(i,"-tree"),treeData:xe,height:v,itemHeight:x,virtual:m!==!1&&T!==!1,multiple:o,icon:ee,showIcon:X,switcherIcon:Z,showLine:Q,loadData:s?null:ne,motion:oe,activeKey:ut,checkable:N,checkStrictly:!0,checkedKeys:Te,selectedKeys:N?[]:L,defaultExpandAll:B,...dt,onActiveChange:nt,onSelect:ct,onCheck:ct,onExpand:Qe,onLoad:he,filterTreeNode:Ce,expandAction:M})]})},CU=w.exports.forwardRef(Pbe);CU.displayName="OptionList";var _T=function(){return null},SU="SHOW_ALL",wT="SHOW_PARENT",sw="SHOW_CHILD";function nN(e,t,n,r){var i=new Set(e);return t===sw?e.filter(function(o){var s=n[o];return!(s&&s.children&&s.children.some(function(a){var u=a.node;return i.has(u[r.value])})&&s.children.every(function(a){var u=a.node;return dE(u)||i.has(u[r.value])}))}):t===wT?e.filter(function(o){var s=n[o],a=s?s.parent:null;return!(a&&!dE(a.node)&&i.has(a.key))}):e}var Ibe=["children","value"];function EU(e){return yo(e).map(function(t){if(!w.exports.isValidElement(t)||!t.type)return null;var n=t,r=n.key,i=n.props,o=i.children,s=i.value,a=Rn(i,Ibe),u=fe({key:r,value:s},a),d=EU(o);return d.length&&(u.children=d),u}).filter(function(t){return t})}function fE(e){if(!e)return e;var t=fe({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Dr(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Tbe(e,t,n,r,i,o){var s=null,a=null;function u(){function d(p){var m=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(x,_){var P="".concat(m,"-").concat(_),k=x[o.value],T=n.includes(k),M=d(x[o.children]||[],P,T),O=I(_T,{...x,children:M.map(function(L){return L.node})});if(t===k&&(s=O),T){var N={pos:P,node:O,children:M};return v||a.push(N),N}return null}).filter(function(x){return x})}a||(a=[],d(r),a.sort(function(p,m){var v=p.node.props.value,x=m.node.props.value,_=n.indexOf(v),P=n.indexOf(x);return _-P}))}Object.defineProperty(e,"triggerNode",{get:function(){return Dr(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),u(),s}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return Dr(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),u(),i?a:a.map(function(p){var m=p.node;return m})}})}function kbe(e,t){var n=t.id,r=t.pId,i=t.rootPId,o={},s=[],a=e.map(function(u){var d=fe({},u),p=d[n];return o[p]=d,d.key=d.key||p,d});return a.forEach(function(u){var d=u[r],p=o[d];p&&(p.children=p.children||[],p.children.push(u)),(d===i||!p&&i===null)&&s.push(u)}),s}function Mbe(e,t,n){return w.exports.useMemo(function(){return e?n?kbe(e,fe({id:"id",pId:"pId",rootPId:null},n!==!0?n:{})):e:EU(t)},[t,n,e])}const Rbe=function(e){var t=w.exports.useRef({valueLabels:new Map});return w.exports.useMemo(function(){var n=t.current.valueLabels,r=new Map,i=e.map(function(o){var s,a=o.value,u=(s=o.label)!==null&&s!==void 0?s:n.get(a);return r.set(a,u),fe(fe({},o),{},{label:u})});return t.current.valueLabels=r,[i]},[e])};function rN(e){var t=w.exports.useRef();t.current=e;var n=w.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}const Abe=function(e,t){return w.exports.useMemo(function(){var n=q_(e,{fieldNames:t,initWrapper:function(i){return fe(fe({},i),{},{valueEntities:new Map})},processEntity:function(i,o){var s=i.node[t.value];o.valueEntities.set(s,i)}});return n},[e,t])},Dbe=function(e,t,n,r){return w.exports.useMemo(function(){var i=e.map(function(u){var d=u.value;return d}),o=t.map(function(u){var d=u.value;return d}),s=i.filter(function(u){return!r[u]});if(n){var a=uu(i,!0,r);i=a.checkedKeys,o=a.halfCheckedKeys}return[Array.from(new Set([].concat(Pt(s),Pt(i)))),o]},[e,t,n,r])},Obe=function(e,t,n){var r=n.treeNodeFilterProp,i=n.filterTreeNode,o=n.fieldNames,s=o.children;return w.exports.useMemo(function(){if(!t||i===!1)return e;var a;if(typeof i=="function")a=i;else{var u=t.toUpperCase();a=function(m,v){var x=v[r];return String(x).toUpperCase().includes(u)}}function d(p){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return p.map(function(v){var x=v[s],_=m||a(t,fE(v)),P=d(x||[],_);return _||P.length?fe(fe({},v),{},re({isLeaf:void 0},s,P)):null}).filter(function(v){return v})}return d(e)},[e,t,s,r,i])};var Nbe=["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 Lbe(e){return!e||nn(e)!=="object"}var Fbe=w.exports.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tree-select":r,o=e.value,s=e.defaultValue,a=e.onChange,u=e.onSelect,d=e.onDeselect,p=e.searchValue,m=e.inputValue,v=e.onSearch,x=e.autoClearSearchValue,_=x===void 0?!0:x,P=e.filterTreeNode,k=e.treeNodeFilterProp,T=k===void 0?"value":k,M=e.showCheckedStrategy,O=M===void 0?sw:M,N=e.treeNodeLabelProp,L=e.multiple,F=e.treeCheckable,V=e.treeCheckStrictly,B=e.labelInValue,H=e.fieldNames,G=e.treeDataSimpleMode,ee=e.treeData,X=e.children,Z=e.loadData,Q=e.treeLoadedKeys,le=e.onTreeLoad,ne=e.treeDefaultExpandAll,se=e.treeExpandedKeys,oe=e.treeDefaultExpandedKeys,he=e.onTreeExpand,_e=e.treeExpandAction,be=e.virtual,xe=e.listHeight,Te=xe===void 0?200:xe,Ee=e.listItemHeight,Ce=Ee===void 0?20:Ee,ke=e.onDropdownVisibleChange,De=e.dropdownMatchSelectWidth,Ke=De===void 0?!0:De,Ue=e.treeLine,tt=e.treeIcon,lt=e.showTreeIcon,St=e.switcherIcon,We=e.treeMotion,bt=Rn(e,Nbe),Qe=b9(n),mt=F&&!V,ct=F||V,wt=V||B,rt=ct||L,ut=ki(s,{value:o}),nt=Le(ut,2),qe=nt[0],dt=nt[1],_t=w.exports.useMemo(function(){return Cbe(H)},[JSON.stringify(H)]),Dt=ki("",{value:p!==void 0?p:m,postState:function(we){return we||""}}),Nt=Le(Dt,2),jt=Nt[0],Ve=Nt[1],Ze=function(we){Ve(we),v==null||v(we)},Yt=Mbe(ee,X,G),sn=Abe(Yt,_t),Gt=sn.keyEntities,zt=sn.valueEntities,Rt=w.exports.useCallback(function(ce){var we=[],Ae=[];return ce.forEach(function(Pe){zt.has(Pe)?Ae.push(Pe):we.push(Pe)}),{missingRawValues:we,existRawValues:Ae}},[zt]),Qt=Obe(Yt,jt,{fieldNames:_t,treeNodeFilterProp:T,filterTreeNode:P}),pn=w.exports.useCallback(function(ce){if(ce){if(N)return ce[N];for(var we=_t._title,Ae=0;Ae<we.length;Ae+=1){var Pe=ce[we[Ae]];if(Pe!==void 0)return Pe}}},[_t,N]),ot=w.exports.useCallback(function(ce){var we=wbe(ce);return we.map(function(Ae){return Lbe(Ae)?{value:Ae}:Ae})},[]),Lt=w.exports.useCallback(function(ce){var we=ot(ce);return we.map(function(Ae){var Pe=Ae.label,Me=Ae.value,Be=Ae.halfChecked,Je,et=zt.get(Me);if(et){var Ge;Pe=(Ge=Pe)!==null&&Ge!==void 0?Ge:pn(et.node),Je=et.node.disabled}else if(Pe===void 0){var Ut=ot(qe).find(function(Mt){return Mt.value===Me});Pe=Ut.label}return{label:Pe,value:Me,halfChecked:Be,disabled:Je}})},[zt,pn,ot,qe]),Tt=w.exports.useMemo(function(){return ot(qe)},[ot,qe]),Kt=w.exports.useMemo(function(){var ce=[],we=[];return Tt.forEach(function(Ae){Ae.halfChecked?we.push(Ae):ce.push(Ae)}),[ce,we]},[Tt]),Zt=Le(Kt,2),ht=Zt[0],xn=Zt[1],bn=w.exports.useMemo(function(){return ht.map(function(ce){return ce.value})},[ht]),tn=Dbe(ht,xn,mt,Gt),Bt=Le(tn,2),gt=Bt[0],xt=Bt[1],Vt=w.exports.useMemo(function(){var ce=nN(gt,O,Gt,_t),we=ce.map(function(Be){var Je,et,Ge;return(Je=(et=Gt[Be])===null||et===void 0||(Ge=et.node)===null||Ge===void 0?void 0:Ge[_t.value])!==null&&Je!==void 0?Je:Be}),Ae=we.map(function(Be){var Je=ht.find(function(et){return et.value===Be});return{value:Be,label:Je==null?void 0:Je.label}}),Pe=Lt(Ae),Me=Pe[0];return!rt&&Me&&tN(Me.value)&&tN(Me.label)?[]:Pe.map(function(Be){var Je;return fe(fe({},Be),{},{label:(Je=Be.label)!==null&&Je!==void 0?Je:Be.value})})},[_t,rt,gt,ht,Lt,O,Gt]),qt=Rbe(Vt),vn=Le(qt,1),Fn=vn[0],tr=rN(function(ce,we,Ae){var Pe=Lt(ce);if(dt(Pe),_&&Ve(""),a){var Me=ce;if(mt){var Be=nN(ce,O,Gt,_t);Me=Be.map(function(hn){var Pn=zt.get(hn);return Pn?Pn.node[_t.value]:hn})}var Je=we||{triggerValue:void 0,selected:void 0},et=Je.triggerValue,Ge=Je.selected,Ut=Me;if(V){var Mt=xn.filter(function(hn){return!Me.includes(hn.value)});Ut=[].concat(Pt(Ut),Pt(Mt))}var at=Lt(Ut),$t={preValue:ht,triggerValue:et},Xt=!0;(V||Ae==="selection"&&!Ge)&&(Xt=!1),Tbe($t,et,ce,Yt,Xt,_t),ct?$t.checked=Ge:$t.selected=Ge;var En=wt?at:at.map(function(hn){return hn.value});a(rt?En:En[0],wt?null:at.map(function(hn){return hn.label}),$t)}}),nr=w.exports.useCallback(function(ce,we){var Ae,Pe=we.selected,Me=we.source,Be=Gt[ce],Je=Be==null?void 0:Be.node,et=(Ae=Je==null?void 0:Je[_t.value])!==null&&Ae!==void 0?Ae:ce;if(!rt)tr([et],{selected:!0,triggerValue:et},"option");else{var Ge=Pe?[].concat(Pt(bn),[et]):gt.filter(function(Pn){return Pn!==et});if(mt){var Ut=Rt(Ge),Mt=Ut.missingRawValues,at=Ut.existRawValues,$t=at.map(function(Pn){return zt.get(Pn).key}),Xt;if(Pe){var En=uu($t,!0,Gt);Xt=En.checkedKeys}else{var hn=uu($t,{checked:!1,halfCheckedKeys:xt},Gt);Xt=hn.checkedKeys}Ge=[].concat(Pt(Mt),Pt(Xt.map(function(Pn){return Gt[Pn].node[_t.value]})))}tr(Ge,{selected:Pe,triggerValue:et},Me||"option")}Pe||!rt?u==null||u(et,fE(Je)):d==null||d(et,fE(Je))},[Rt,zt,Gt,_t,rt,bn,tr,mt,u,d,gt,xt]),ye=w.exports.useCallback(function(ce){if(ke){var we={};Object.defineProperty(we,"documentClickClose",{get:function(){return Dr(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),ke(ce,we)}},[ke]),q=rN(function(ce,we){var Ae=ce.map(function(Pe){return Pe.value});if(we.type==="clear"){tr(Ae,{},"selection");return}we.values.length&&nr(we.values[0].value,{selected:!1,source:"selection"})}),J=w.exports.useMemo(function(){return{virtual:be,dropdownMatchSelectWidth:Ke,listHeight:Te,listItemHeight:Ce,treeData:Qt,fieldNames:_t,onSelect:nr,treeExpandAction:_e}},[be,Ke,Te,Ce,Qt,_t,nr,_e]),pe=w.exports.useMemo(function(){return{checkable:ct,loadData:Z,treeLoadedKeys:Q,onTreeLoad:le,checkedKeys:gt,halfCheckedKeys:xt,treeDefaultExpandAll:ne,treeExpandedKeys:se,treeDefaultExpandedKeys:oe,onTreeExpand:he,treeIcon:tt,treeMotion:We,showTreeIcon:lt,switcherIcon:St,treeLine:Ue,treeNodeFilterProp:T,keyEntities:Gt}},[ct,Z,Q,le,gt,xt,ne,se,oe,he,tt,We,lt,St,Ue,T,Gt]);return I(wU.Provider,{value:J,children:I(_U.Provider,{value:pe,children:I(x9,{ref:t,...bt,id:Qe,prefixCls:i,mode:rt?"multiple":void 0,displayValues:Fn,onDisplayValuesChange:q,searchValue:jt,onSearch:Ze,OptionList:CU,emptyOptions:!Yt.length,onDropdownVisibleChange:ye,dropdownMatchSelectWidth:Ke})})})}),r0=Fbe;r0.TreeNode=_T;r0.SHOW_ALL=SU;r0.SHOW_PARENT=wT;r0.SHOW_CHILD=sw;var zbe=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},$be=function(t,n){var r,i=t.prefixCls,o=t.size,s=t.disabled,a=t.bordered,u=a===void 0?!0:a,d=t.className,p=t.treeCheckable,m=t.multiple,v=t.listHeight,x=v===void 0?256:v,_=t.listItemHeight,P=_===void 0?26:_,k=t.placement,T=t.notFoundContent,M=t.switcherIcon,O=t.treeLine,N=t.getPopupContainer,L=t.dropdownClassName,F=t.popupClassName,V=t.treeIcon,B=V===void 0?!1:V,H=t.transitionName,G=t.choiceTransitionName,ee=G===void 0?"":G,X=t.status,Z=t.showArrow,Q=t.treeExpandAction,le=zbe(t,["prefixCls","size","disabled","bordered","className","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","dropdownClassName","popupClassName","treeIcon","transitionName","choiceTransitionName","status","showArrow","treeExpandAction"]),ne=w.exports.useContext(On),se=ne.getPopupContainer,oe=ne.getPrefixCls,he=ne.renderEmpty,_e=ne.direction,be=ne.virtual,xe=ne.dropdownMatchSelectWidth,Te=w.exports.useContext(Hs),Ee=oe("select",i),Ce=oe("select-tree",i),ke=oe("tree-select",i),De=xf(Ee,_e),Ke=De.compactSize,Ue=De.compactItemClassnames,tt=He(F||L,"".concat(ke,"-dropdown"),re({},"".concat(ke,"-dropdown-rtl"),_e==="rtl")),lt=!!(p||m),St=Z!==void 0?Z:le.loading||!lt,We=w.exports.useContext(ga),bt=We.status,Qe=We.hasFeedback,mt=We.isFormItemInput,ct=We.feedbackIcon,wt=Cp(bt,X),rt=O9(ze(ze({},le),{multiple:lt,showArrow:St,hasFeedback:Qe,feedbackIcon:ct,prefixCls:Ee})),ut=rt.suffixIcon,nt=rt.removeIcon,qe=rt.clearIcon,dt;T!==void 0?dt=T:dt=(he||UI)("Select");var _t=Ci(le,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),Dt=function(){return k!==void 0?k:_e==="rtl"?"bottomRight":"bottomLeft"},Nt=Ke||o||Te,jt=w.exports.useContext(Il),Ve=s!=null?s:jt,Ze=He(!i&&ke,(r={},re(r,"".concat(Ee,"-lg"),Nt==="large"),re(r,"".concat(Ee,"-sm"),Nt==="small"),re(r,"".concat(Ee,"-rtl"),_e==="rtl"),re(r,"".concat(Ee,"-borderless"),!u),re(r,"".concat(Ee,"-in-form-item"),mt),r),Vs(Ee,wt,Qe),Ue,d),Yt=oe();return I(r0,{virtual:be,dropdownMatchSelectWidth:xe,disabled:Ve,..._t,ref:n,prefixCls:Ee,className:Ze,listHeight:x,listItemHeight:P,treeCheckable:p&&I("span",{className:"".concat(Ee,"-tree-checkbox-inner")}),treeLine:!!O,inputIcon:ut,multiple:m,placement:Dt(),removeIcon:nt,clearIcon:qe,switcherIcon:function(Gt){return aU(Ce,M,O,Gt)},showTreeIcon:B,notFoundContent:dt,getPopupContainer:N||se,treeMotion:null,dropdownClassName:tt,choiceTransitionName:$a(Yt,"",ee),transitionName:$a(Yt,k9(k),H),showArrow:Qe||Z,treeExpandAction:Q})},Bbe=w.exports.forwardRef($be),i0=Bbe;i0.TreeNode=_T;i0.SHOW_ALL=SU;i0.SHOW_PARENT=wT;i0.SHOW_CHILD=sw;const PU=i0;var Vbe={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 Ube=Vbe;var IU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Ube})})};IU.displayName="CopyOutlined";const jbe=w.exports.forwardRef(IU);var Hbe={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 Kbe=Hbe;var TU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:Kbe})})};TU.displayName="EditOutlined";const Wbe=w.exports.forwardRef(TU);var Gbe=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()}},qbe=Gbe,iN={"text/plain":"Text","text/html":"Url",default:"Text"},Zbe="Copy to clipboard: #{key}, Enter";function Xbe(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Ybe(e,t){var n,r,i,o,s,a,u=!1;t||(t={}),n=t.debug||!1;try{i=qbe(),o=document.createRange(),s=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.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 m=iN[t.format]||iN.default;window.clipboardData.setData(m,e)}else p.clipboardData.clearData(),p.clipboardData.setData(t.format,e);t.onCopy&&(p.preventDefault(),t.onCopy(p.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");u=!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),u=!0}catch(m){n&&console.error("unable to copy using clipboardData: ",m),n&&console.error("falling back to prompt"),r=Xbe("message"in t?t.message:Zbe),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return u}var Qbe=Ybe,Jbe={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 e_e=Jbe;var kU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:e_e})})};kU.displayName="EnterOutlined";const t_e=w.exports.forwardRef(kU);var n_e=function(t){var n=t.prefixCls,r=t["aria-label"],i=t.className,o=t.style,s=t.direction,a=t.maxLength,u=t.autoSize,d=u===void 0?!0:u,p=t.value,m=t.onSave,v=t.onCancel,x=t.onEnd,_=t.component,P=t.enterIcon,k=P===void 0?I(t_e,{}):P,T=w.exports.useRef(null),M=w.exports.useRef(!1),O=w.exports.useRef(),N=w.exports.useState(p),L=Le(N,2),F=L[0],V=L[1];w.exports.useEffect(function(){V(p)},[p]),w.exports.useEffect(function(){if(T.current&&T.current.resizableTextArea){var se=T.current.resizableTextArea.textArea;se.focus();var oe=se.value.length;se.setSelectionRange(oe,oe)}},[]);var B=function(oe){var he=oe.target;V(he.value.replace(/[\n\r]/g,""))},H=function(){M.current=!0},G=function(){M.current=!1},ee=function(oe){var he=oe.keyCode;M.current||(O.current=he)},X=function(){m(F.trim())},Z=function(oe){var he=oe.keyCode,_e=oe.ctrlKey,be=oe.altKey,xe=oe.metaKey,Te=oe.shiftKey;O.current===he&&!M.current&&!_e&&!be&&!xe&&!Te&&(he===kt.ENTER?(X(),x==null||x()):he===kt.ESC&&v())},Q=function(){X()},le=_?"".concat(n,"-").concat(_):"",ne=He(n,"".concat(n,"-edit-content"),re({},"".concat(n,"-rtl"),s==="rtl"),i,le);return $e("div",{className:ne,style:o,children:[I(tV,{ref:T,maxLength:a,value:F,onChange:B,onKeyDown:ee,onKeyUp:Z,onCompositionStart:H,onCompositionEnd:G,onBlur:Q,"aria-label":r,rows:1,autoSize:d}),k!==null?ui(k,{className:"".concat(n,"-edit-content-confirm")}):null]})};const r_e=n_e;function t2(e,t){return w.exports.useMemo(function(){var n=!!e;return[n,ze(ze({},t),n&&nn(e)==="object"?e:null)]},[e])}var i_e=function(t,n){var r=w.exports.useRef(!1);w.exports.useEffect(function(){r.current?t():r.current=!0},n)};const o_e=i_e;var a_e=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},s_e=w.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.component,i=r===void 0?"article":r,o=e.className,s=e.setContentRef,a=e.children,u=e.direction,d=a_e(e,["prefixCls","component","className","setContentRef","children","direction"]),p=w.exports.useContext(On),m=p.getPrefixCls,v=p.direction,x=u!=null?u:v,_=t;s&&(_=Zo(t,s));var P=m("typography",n),k=He(P,re({},"".concat(P,"-rtl"),x==="rtl"),o);return I(i,{className:k,ref:_,...d,children:a})});const MU=s_e;function RU(e){var t=nn(e);return t==="string"||t==="number"}function l_e(e){var t=0;return e.forEach(function(n){RU(n)?t+=String(n).length:t+=1}),t}function oN(e,t){for(var n=0,r=[],i=0;i<e.length;i+=1){if(n===t)return r;var o=e[i],s=RU(o),a=s?String(o).length:1,u=n+a;if(u>t){var d=t-n;return r.push(String(o).slice(0,d)),r}r.push(o),n=u}return e}var u_e=0,sx=1,aN=2,n2=3,sN=4,c_e=function(t){var n=t.enabledMeasure,r=t.children,i=t.text,o=t.width,s=t.fontSize,a=t.rows,u=t.onEllipsis,d=w.exports.useState([0,0,0]),p=Le(d,2),m=Le(p[0],3),v=m[0],x=m[1],_=m[2],P=p[1],k=w.exports.useState(u_e),T=Le(k,2),M=T[0],O=T[1],N=w.exports.useState(0),L=Le(N,2),F=L[0],V=L[1],B=w.exports.useRef(null),H=w.exports.useRef(null),G=w.exports.useMemo(function(){return yo(i)},[i]),ee=w.exports.useMemo(function(){return l_e(G)},[G]),X=w.exports.useMemo(function(){return!n||M!==n2?r(G,!1):r(oN(G,x),x<ee)},[n,M,r,G,x,ee]);wi(function(){n&&o&&s&&ee&&(O(sx),P([0,Math.ceil(ee/2),ee]))},[n,o,s,i,ee,a]),wi(function(){var ne;M===sx&&V(((ne=B.current)===null||ne===void 0?void 0:ne.offsetHeight)||0)},[M]),wi(function(){var ne,se;if(F){if(M===sx){var oe=((ne=H.current)===null||ne===void 0?void 0:ne.offsetHeight)||0,he=a*F;oe<=he?(O(sN),u(!1)):O(aN)}else if(M===aN)if(v!==_){var _e=((se=H.current)===null||se===void 0?void 0:se.offsetHeight)||0,be=a*F,xe=v,Te=_;v===_-1?Te=v:_e<=be?xe=x:Te=x;var Ee=Math.ceil((xe+Te)/2);P([xe,Ee,Te])}else O(n2),u(!0)}},[M,v,_,a,F]);var Z={width:o,whiteSpace:"normal",margin:0,padding:0},Q=function(se,oe,he){return I("span",{"aria-hidden":!0,ref:oe,style:ze({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none",fontSize:Math.floor(s/2)*2},he),children:se})},le=function(se,oe){var he=oN(G,se);return Q(r(he,!0),oe,Z)};return $e(Tn,{children:[X,n&&M!==n2&&M!==sN&&$e(Tn,{children:[Q("lg",B,{wordBreak:"keep-all",whiteSpace:"nowrap"}),M===sx?Q(r(G,!1),H,Z):le(x,H)]})]})};const d_e=c_e;var f_e=function(t){var n=t.enabledEllipsis,r=t.isEllipsis,i=t.children,o=t.tooltipProps;return!(o!=null&&o.title)||!n?i:I($i,{open:r?void 0:!1,...o,children:i})};const h_e=f_e;var p_e=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 m_e(e,t){var n=e.mark,r=e.code,i=e.underline,o=e.delete,s=e.strong,a=e.keyboard,u=e.italic,d=t;function p(m,v){!m||(d=w.exports.createElement(v,{},d))}return p(s,"strong"),p(i,"u"),p(o,"del"),p(r,"code"),p(n,"mark"),p(a,"kbd"),p(u,"i"),d}function lx(e,t,n){return e===!0||e===void 0?t:e||n&&t}function lN(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}var g_e="...",v_e=w.exports.forwardRef(function(e,t){var n,r,i,o=e.prefixCls,s=e.className,a=e.style,u=e.type,d=e.disabled,p=e.children,m=e.ellipsis,v=e.editable,x=e.copyable,_=e.component,P=e.title,k=p_e(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),T=w.exports.useContext(On),M=T.getPrefixCls,O=T.direction,N=A$("Text")[0],L=w.exports.useRef(null),F=w.exports.useRef(null),V=M("typography",o),B=Ci(k,["mark","code","delete","underline","strong","keyboard","italic"]),H=t2(v),G=Le(H,2),ee=G[0],X=G[1],Z=ki(!1,{value:X.editing}),Q=Le(Z,2),le=Q[0],ne=Q[1],se=X.triggerType,oe=se===void 0?["icon"]:se,he=function(at){var $t;at&&(($t=X.onStart)===null||$t===void 0||$t.call(X)),ne(at)};o_e(function(){var Mt;le||(Mt=F.current)===null||Mt===void 0||Mt.focus()},[le]);var _e=function(at){at==null||at.preventDefault(),he(!0)},be=function(at){var $t;($t=X.onChange)===null||$t===void 0||$t.call(X,at),he(!1)},xe=function(){var at;(at=X.onCancel)===null||at===void 0||at.call(X),he(!1)},Te=t2(x),Ee=Le(Te,2),Ce=Ee[0],ke=Ee[1],De=w.exports.useState(!1),Ke=Le(De,2),Ue=Ke[0],tt=Ke[1],lt=w.exports.useRef(),St={};ke.format&&(St.format=ke.format);var We=function(){window.clearTimeout(lt.current)},bt=function(at){var $t;at==null||at.preventDefault(),at==null||at.stopPropagation(),Qbe(ke.text||String(p)||"",St),tt(!0),We(),lt.current=window.setTimeout(function(){tt(!1)},3e3),($t=ke.onCopy)===null||$t===void 0||$t.call(ke,at)};w.exports.useEffect(function(){return We},[]);var Qe=w.exports.useState(!1),mt=Le(Qe,2),ct=mt[0],wt=mt[1],rt=w.exports.useState(!1),ut=Le(rt,2),nt=ut[0],qe=ut[1],dt=w.exports.useState(!1),_t=Le(dt,2),Dt=_t[0],Nt=_t[1],jt=w.exports.useState(!1),Ve=Le(jt,2),Ze=Ve[0],Yt=Ve[1],sn=w.exports.useState(!1),Gt=Le(sn,2),zt=Gt[0],Rt=Gt[1],Qt=w.exports.useState(!0),pn=Le(Qt,2),ot=pn[0],Lt=pn[1],Tt=t2(m,{expandable:!1}),Kt=Le(Tt,2),Zt=Kt[0],ht=Kt[1],xn=Zt&&!Dt,bn=ht.rows,tn=bn===void 0?1:bn,Bt=w.exports.useMemo(function(){return!xn||ht.suffix!==void 0||ht.onEllipsis||ht.expandable||ee||Ce},[xn,ht,ee,Ce]);wi(function(){Zt&&!Bt&&(wt(V3("webkitLineClamp")),qe(V3("textOverflow")))},[Bt,Zt]);var gt=w.exports.useMemo(function(){return Bt?!1:tn===1?nt:ct},[Bt,nt,ct]),xt=xn&&(gt?zt:Ze),Vt=xn&&tn===1&>,qt=xn&&tn>1&>,vn=function(at){var $t;Nt(!0),($t=ht.onExpand)===null||$t===void 0||$t.call(ht,at)},Fn=w.exports.useState(0),tr=Le(Fn,2),nr=tr[0],ye=tr[1],q=w.exports.useState(0),J=Le(q,2),pe=J[0],ce=J[1],we=function(at,$t){var Xt=at.offsetWidth,En;ye(Xt),ce(parseInt((En=window.getComputedStyle)===null||En===void 0?void 0:En.call(window,$t).fontSize,10)||0)},Ae=function(at){var $t;Yt(at),Ze!==at&&(($t=ht.onEllipsis)===null||$t===void 0||$t.call(ht,at))};w.exports.useEffect(function(){var Mt=L.current;if(Zt&>&&Mt){var at=qt?Mt.offsetHeight<Mt.scrollHeight:Mt.offsetWidth<Mt.scrollWidth;zt!==at&&Rt(at)}},[Zt,gt,p,qt,ot]),w.exports.useEffect(function(){var Mt=L.current;if(!(typeof IntersectionObserver>"u"||!Mt||!gt||!xn)){var at=new IntersectionObserver(function(){Lt(!!Mt.offsetParent)});return at.observe(Mt),function(){at.disconnect()}}},[gt,xn]);var Pe={};ht.tooltip===!0?Pe={title:(n=X.text)!==null&&n!==void 0?n:p}:w.exports.isValidElement(ht.tooltip)?Pe={title:ht.tooltip}:nn(ht.tooltip)==="object"?Pe=ze({title:(r=X.text)!==null&&r!==void 0?r:p},ht.tooltip):Pe={title:ht.tooltip};var Me=w.exports.useMemo(function(){var Mt=function($t){return["string","number"].includes(nn($t))};if(!(!Zt||gt)){if(Mt(X.text))return X.text;if(Mt(p))return p;if(Mt(P))return P;if(Mt(Pe.title))return Pe.title}},[Zt,gt,P,Pe.title,xt]);if(le)return I(r_e,{value:(i=X.text)!==null&&i!==void 0?i:typeof p=="string"?p:"",onSave:be,onCancel:xe,onEnd:X.onEnd,prefixCls:V,className:s,style:a,direction:O,component:_,maxLength:X.maxLength,autoSize:X.autoSize,enterIcon:X.enterIcon});var Be=function(){var at=ht.expandable,$t=ht.symbol;if(!at)return null;var Xt;return $t?Xt=$t:Xt=N.expand,I("a",{className:"".concat(V,"-expand"),onClick:vn,"aria-label":N.expand,children:Xt},"expand")},Je=function(){if(!!ee){var at=X.icon,$t=X.tooltip,Xt=yo($t)[0]||N.edit,En=typeof Xt=="string"?Xt:"";return oe.includes("icon")?I($i,{title:$t===!1?"":Xt,children:I(l5,{ref:F,className:"".concat(V,"-edit"),onClick:_e,"aria-label":En,children:at||I(Wbe,{role:"button"})})},"edit"):null}},et=function(){if(!!Ce){var at=ke.tooltips,$t=ke.icon,Xt=lN(at),En=lN($t),hn=Ue?lx(Xt[1],N.copied):lx(Xt[0],N.copy),Pn=Ue?N.copied:N.copy,Gn=typeof hn=="string"?hn:Pn;return I($i,{title:hn,children:I(l5,{className:He("".concat(V,"-copy"),Ue&&"".concat(V,"-copy-success")),onClick:bt,"aria-label":Gn,children:Ue?lx(En[1],I(HI,{}),!0):lx(En[0],I(jbe,{}),!0)})},"copy")}},Ge=function(at){return[at&&Be(),Je(),et()]},Ut=function(at){return[at&&I("span",{"aria-hidden":!0,children:g_e},"ellipsis"),ht.suffix,Ge(at)]};return I(_u,{onResize:we,disabled:!xn||gt,children:function(Mt){var at;return I(h_e,{tooltipProps:Pe,enabledEllipsis:xn,isEllipsis:xt,children:I(MU,{className:He((at={},re(at,"".concat(V,"-").concat(u),u),re(at,"".concat(V,"-disabled"),d),re(at,"".concat(V,"-ellipsis"),Zt),re(at,"".concat(V,"-single-line"),xn&&tn===1),re(at,"".concat(V,"-ellipsis-single-line"),Vt),re(at,"".concat(V,"-ellipsis-multiple-line"),qt),at),s),prefixCls:o,style:ze(ze({},a),{WebkitLineClamp:qt?tn:void 0}),component:_,ref:Zo(Mt,L,t),direction:O,onClick:oe.includes("text")?_e:void 0,"aria-label":Me==null?void 0:Me.toString(),title:P,...B,children:I(d_e,{enabledMeasure:xn&&!gt,text:p,rows:tn,width:nr,fontSize:pe,onEllipsis:Ae,children:function($t,Xt){var En=$t;$t.length&&Xt&&Me&&(En=I("span",{"aria-hidden":!0,children:En},"show-content"));var hn=m_e(e,$e(Tn,{children:[En,Ut(Xt)]}));return hn}})})})}})});const lw=v_e;var y_e=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},x_e=w.exports.forwardRef(function(e,t){var n=e.ellipsis,r=e.rel,i=y_e(e,["ellipsis","rel"]),o=ze(ze({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,I(lw,{...o,ref:t,ellipsis:!!n,component:"a"})});const b_e=x_e;var __e=w.exports.forwardRef(function(e,t){return I(lw,{ref:t,...e,component:"div"})});const w_e=__e;var C_e=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},S_e=function(t,n){var r=t.ellipsis,i=C_e(t,["ellipsis"]),o=w.exports.useMemo(function(){return r&&nn(r)==="object"?Ci(r,["expandable","rows"]):r},[r]);return I(lw,{ref:n,...i,ellipsis:o,component:"span"})};const E_e=w.exports.forwardRef(S_e);var P_e=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},I_e=Xae(1,2,3,4,5),T_e=w.exports.forwardRef(function(e,t){var n=e.level,r=n===void 0?1:n,i=P_e(e,["level"]),o;return I_e.includes(r)?o="h".concat(r):o="h1",I(lw,{ref:t,...i,component:o})});const k_e=T_e;var o0=MU;o0.Text=E_e;o0.Link=b_e;o0.Title=k_e;o0.Paragraph=w_e;const M_e=o0;function R_e(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 uN(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function A_e(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(o){o.total>0&&(o.percent=o.loaded/o.total*100),e.onProgress(o)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(i){var o=e.data[i];if(Array.isArray(o)){o.forEach(function(s){n.append("".concat(i,"[]"),s)});return}n.append(i,o)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(o){e.onError(o)},t.onload=function(){return t.status<200||t.status>=300?e.onError(R_e(e,t),uN(t)):e.onSuccess(uN(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 D_e=+new Date,O_e=0;function r2(){return"rc-upload-".concat(D_e,"-").concat(++O_e)}const i2=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(a.charAt(0)==="."){var u=r.toLowerCase(),d=a.toLowerCase(),p=[d];return(d===".jpg"||d===".jpeg")&&(p=[".jpg",".jpeg"]),p.some(function(m){return u.endsWith(m)})}return/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a?!0:/^\w+$/.test(a)?(Dr(!1,"Upload takes an invalidate 'accept' type '".concat(a,"'.Skip for check.")),!0):!1})}return!0};function N_e(e,t){var n=e.createReader(),r=[];function i(){n.readEntries(function(o){var s=Array.prototype.slice.apply(o);r=r.concat(s);var a=!s.length;a?t(r):i()})}i()}var L_e=function(t,n,r){var i=function o(s,a){s.path=a||"",s.isFile?s.file(function(u){r(u)&&(s.fullPath&&!u.webkitRelativePath&&(Object.defineProperties(u,{webkitRelativePath:{writable:!0}}),u.webkitRelativePath=s.fullPath.replace(/^\//,""),Object.defineProperties(u,{webkitRelativePath:{writable:!1}})),n([u]))}):s.isDirectory&&N_e(s,function(u){u.forEach(function(d){o(d,"".concat(a).concat(s.name,"/"))})})};t.forEach(function(o){i(o.webkitGetAsEntry())})},F_e=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],z_e=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.state={uid:r2()},r.reqs={},r.fileInput=void 0,r._isMounted=void 0,r.onChange=function(a){var u=r.props,d=u.accept,p=u.directory,m=a.target.files,v=Pt(m).filter(function(x){return!p||i2(x,d)});r.uploadFiles(v),r.reset()},r.onClick=function(a){var u=r.fileInput;if(!!u){var d=r.props,p=d.children,m=d.onClick;if(p&&p.type==="button"){var v=u.parentNode;v.focus(),v.querySelector("button").blur()}u.click(),m&&m(a)}},r.onKeyDown=function(a){a.key==="Enter"&&r.onClick(a)},r.onFileDrop=function(a){var u=r.props.multiple;if(a.preventDefault(),a.type!=="dragover")if(r.props.directory)L_e(Array.prototype.slice.call(a.dataTransfer.items),r.uploadFiles,function(p){return i2(p,r.props.accept)});else{var d=Pt(a.dataTransfer.files).filter(function(p){return i2(p,r.props.accept)});u===!1&&(d=d.slice(0,1)),r.uploadFiles(d)}},r.uploadFiles=function(a){var u=Pt(a),d=u.map(function(p){return p.uid=r2(),r.processFile(p,u)});Promise.all(d).then(function(p){var m=r.props.onBatchStart;m==null||m(p.map(function(v){var x=v.origin,_=v.parsedFile;return{file:x,parsedFile:_}})),p.filter(function(v){return v.parsedFile!==null}).forEach(function(v){r.post(v)})})},r.processFile=function(){var a=Fc(Zi().mark(function u(d,p){var m,v,x,_,P,k,T,M,O;return Zi().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(m=r.props.beforeUpload,v=d,!m){L.next=14;break}return L.prev=3,L.next=6,m(d,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:d,parsedFile:null,action:null,data:null});case 14:if(x=r.props.action,typeof x!="function"){L.next=21;break}return L.next=18,x(d);case 18:_=L.sent,L.next=22;break;case 21:_=x;case 22:if(P=r.props.data,typeof P!="function"){L.next=29;break}return L.next=26,P(d);case 26:k=L.sent,L.next=30;break;case 29:k=P;case 30:return T=(nn(v)==="object"||typeof v=="string")&&v?v:d,T instanceof File?M=T:M=new File([T],d.name,{type:d.type}),O=M,O.uid=d.uid,L.abrupt("return",{origin:d,data:k,parsedFile:O,action:_});case 35:case"end":return L.stop()}},u,null,[[3,9]])}));return function(u,d){return a.apply(this,arguments)}}(),r.saveFileInput=function(a){r.fileInput=a},r}return Lr(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(i){var o=this,s=i.data,a=i.origin,u=i.action,d=i.parsedFile;if(!!this._isMounted){var p=this.props,m=p.onStart,v=p.customRequest,x=p.name,_=p.headers,P=p.withCredentials,k=p.method,T=a.uid,M=v||A_e,O={action:u,filename:x,data:s,file:d,headers:_,withCredentials:P,method:k||"post",onProgress:function(L){var F=o.props.onProgress;F==null||F(L,d)},onSuccess:function(L,F){var V=o.props.onSuccess;V==null||V(L,d,F),delete o.reqs[T]},onError:function(L,F){var V=o.props.onError;V==null||V(L,F,d),delete o.reqs[T]}};m(a),this.reqs[T]=M(O)}}},{key:"reset",value:function(){this.setState({uid:r2()})}},{key:"abort",value:function(i){var o=this.reqs;if(i){var s=i.uid?i.uid:i;o[s]&&o[s].abort&&o[s].abort(),delete o[s]}else Object.keys(o).forEach(function(a){o[a]&&o[a].abort&&o[a].abort(),delete o[a]})}},{key:"render",value:function(){var i,o=this.props,s=o.component,a=o.prefixCls,u=o.className,d=o.disabled,p=o.id,m=o.style,v=o.multiple,x=o.accept,_=o.capture,P=o.children,k=o.directory,T=o.openFileDialogOnClick,M=o.onMouseEnter,O=o.onMouseLeave,N=Rn(o,F_e),L=He((i={},re(i,a,!0),re(i,"".concat(a,"-disabled"),d),re(i,u,u),i)),F=k?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},V=d?{}:{onClick:T?this.onClick:function(){},onKeyDown:T?this.onKeyDown:function(){},onMouseEnter:M,onMouseLeave:O,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return $e(s,{...V,className:L,role:"button",style:m,children:[w.exports.createElement("input",{...gu(N,{aria:!0,data:!0}),id:p,type:"file",ref:this.saveFileInput,onClick:function(H){return H.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:x,...F,multiple:v,onChange:this.onChange,..._!=null?{capture:_}:{}}),P]})}}]),n}(w.exports.Component);function o2(){}var hE=function(e){ci(n,e);var t=di(n);function n(){var r;Nr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.uploader=void 0,r.saveUploader=function(a){r.uploader=a},r}return Lr(n,[{key:"abort",value:function(i){this.uploader.abort(i)}},{key:"render",value:function(){return I(z_e,{...this.props,ref:this.saveUploader})}}]),n}(w.exports.Component);hE.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:o2,onError:o2,onSuccess:o2,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var $_e={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 B_e=$_e;var AU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:B_e})})};AU.displayName="FileTwoTone";const V_e=w.exports.forwardRef(AU);var U_e={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 j_e=U_e;var DU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:j_e})})};DU.displayName="PaperClipOutlined";const H_e=w.exports.forwardRef(DU);var K_e={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 W_e=K_e;var OU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:W_e})})};OU.displayName="PictureTwoTone";const G_e=w.exports.forwardRef(OU);function ux(e){return ze(ze({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function cx(e,t){var n=Pt(t),r=n.findIndex(function(i){var o=i.uid;return o===e.uid});return r===-1?n.push(e):n[r]=e,n}function a2(e,t){var n=e.uid!==void 0?"uid":"name";return t.filter(function(r){return r[n]===e[n]})[0]}function q_e(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 Z_e=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]},NU=function(t){return t.indexOf("image/")===0},X_e=function(t){if(t.type&&!t.thumbUrl)return NU(t.type);var n=t.thumbUrl||t.url||"",r=Z_e(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)},Ku=200;function Y_e(e){return new Promise(function(t){if(!e.type||!NU(e.type)){t("");return}var n=document.createElement("canvas");n.width=Ku,n.height=Ku,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(Ku,"px; height: ").concat(Ku,"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,a=i.height,u=Ku,d=Ku,p=0,m=0;s>a?(d=a*(Ku/s),m=-(d-u)/2):(u=s*(Ku/a),p=-(u-d)/2),r.drawImage(i,p,m,u,d);var v=n.toDataURL();document.body.removeChild(n),t(v)},i.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){var o=new FileReader;o.addEventListener("load",function(){o.result&&(i.src=o.result)}),o.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var Q_e={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 LU=Q_e;var FU=function(t,n){return I(Qn,{...fe(fe({},t),{},{ref:n,icon:LU})})};FU.displayName="DownloadOutlined";const J_e=w.exports.forwardRef(FU);var ewe=w.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.className,o=e.style,s=e.locale,a=e.listType,u=e.file,d=e.items,p=e.progress,m=e.iconRender,v=e.actionIconRender,x=e.itemRender,_=e.isImgUrl,P=e.showPreviewIcon,k=e.showRemoveIcon,T=e.showDownloadIcon,M=e.previewIcon,O=e.removeIcon,N=e.downloadIcon,L=e.onPreview,F=e.onDownload,V=e.onClose,B,H,G=u.status,ee=w.exports.useState(G),X=Le(ee,2),Z=X[0],Q=X[1];w.exports.useEffect(function(){G!=="removed"&&Q(G)},[G]);var le=w.exports.useState(!1),ne=Le(le,2),se=ne[0],oe=ne[1],he=w.exports.useRef(null);w.exports.useEffect(function(){return he.current=setTimeout(function(){oe(!0)},300),function(){he.current&&clearTimeout(he.current)}},[]);var _e="".concat(r,"-span"),be=m(u),xe=I("div",{className:"".concat(r,"-text-icon"),children:be});if(a==="picture"||a==="picture-card")if(Z==="uploading"||!u.thumbUrl&&!u.url){var Te,Ee=He((Te={},re(Te,"".concat(r,"-list-item-thumbnail"),!0),re(Te,"".concat(r,"-list-item-file"),Z!=="uploading"),Te));xe=I("div",{className:Ee,children:be})}else{var Ce,ke=_!=null&&_(u)?I("img",{src:u.thumbUrl||u.url,alt:u.name,className:"".concat(r,"-list-item-image"),crossOrigin:u.crossOrigin}):be,De=He((Ce={},re(Ce,"".concat(r,"-list-item-thumbnail"),!0),re(Ce,"".concat(r,"-list-item-file"),_&&!_(u)),Ce));xe=I("a",{className:De,onClick:function(jt){return L(u,jt)},href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",children:ke})}var Ke=He((n={},re(n,"".concat(r,"-list-item"),!0),re(n,"".concat(r,"-list-item-").concat(Z),!0),re(n,"".concat(r,"-list-item-list-type-").concat(a),!0),n)),Ue=typeof u.linkProps=="string"?JSON.parse(u.linkProps):u.linkProps,tt=k?v((typeof O=="function"?O(u):O)||I(_be,{}),function(){return V(u)},r,s.removeFile):null,lt=T&&Z==="done"?v((typeof N=="function"?N(u):N)||I(J_e,{}),function(){return F(u)},r,s.downloadFile):null,St=a!=="picture-card"&&$e("span",{className:He("".concat(r,"-list-item-card-actions"),{picture:a==="picture"}),children:[lt,tt]},"download-delete"),We=He("".concat(r,"-list-item-name")),bt=u.url?[I("a",{target:"_blank",rel:"noopener noreferrer",className:We,title:u.name,...Ue,href:u.url,onClick:function(jt){return L(u,jt)},children:u.name},"view"),St]:[I("span",{className:We,onClick:function(jt){return L(u,jt)},title:u.name,children:u.name},"view"),St],Qe={pointerEvents:"none",opacity:.5},mt=P?I("a",{href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:u.url||u.thumbUrl?void 0:Qe,onClick:function(jt){return L(u,jt)},title:s.previewFile,children:typeof M=="function"?M(u):M||I(lT,{})}):null,ct=a==="picture-card"&&Z!=="uploading"&&$e("span",{className:"".concat(r,"-list-item-actions"),children:[mt,Z==="done"&<,tt]}),wt;u.response&&typeof u.response=="string"?wt=u.response:wt=((B=u.error)===null||B===void 0?void 0:B.statusText)||((H=u.error)===null||H===void 0?void 0:H.message)||s.uploadError;var rt=$e("span",{className:_e,children:[xe,bt]}),ut=w.exports.useContext(On),nt=ut.getPrefixCls,qe=nt(),dt=$e("div",{className:Ke,children:[I("div",{className:"".concat(r,"-list-item-info"),children:rt}),ct,se&&I(Xo,{motionName:"".concat(qe,"-fade"),visible:Z==="uploading",motionDeadline:2e3,children:function(Nt){var jt=Nt.className,Ve="percent"in u?I(Yhe,{...p,type:"line",percent:u.percent}):null;return I("div",{className:He("".concat(r,"-list-item-progress"),jt),children:Ve})}})]}),_t=He("".concat(r,"-list-").concat(a,"-container"),i),Dt=Z==="error"?I($i,{title:wt,getPopupContainer:function(jt){return jt.parentNode},children:dt}):dt;return I("div",{className:_t,style:o,ref:t,children:x?x(Dt,u,d,{download:F.bind(null,u),preview:L.bind(null,u),remove:V.bind(null,u)}):Dt})});const twe=ewe;var uw=ze({},np);delete uw.onAppearEnd;delete uw.onEnterEnd;delete uw.onLeaveEnd;var nwe=function(t,n){var r,i=t.listType,o=i===void 0?"text":i,s=t.previewFile,a=s===void 0?Y_e:s,u=t.onPreview,d=t.onDownload,p=t.onRemove,m=t.locale,v=t.iconRender,x=t.isImageUrl,_=x===void 0?X_e:x,P=t.prefixCls,k=t.items,T=k===void 0?[]:k,M=t.showPreviewIcon,O=M===void 0?!0:M,N=t.showRemoveIcon,L=N===void 0?!0:N,F=t.showDownloadIcon,V=F===void 0?!1:F,B=t.removeIcon,H=t.previewIcon,G=t.downloadIcon,ee=t.progress,X=ee===void 0?{strokeWidth:2,showInfo:!1}:ee,Z=t.appendAction,Q=t.appendActionVisible,le=Q===void 0?!0:Q,ne=t.itemRender,se=GI(),oe=w.exports.useState(!1),he=Le(oe,2),_e=he[0],be=he[1];w.exports.useEffect(function(){o!=="picture"&&o!=="picture-card"||(T||[]).forEach(function(Qe){typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(Qe.originFileObj instanceof File||Qe.originFileObj instanceof Blob)||Qe.thumbUrl!==void 0||(Qe.thumbUrl="",a&&a(Qe.originFileObj).then(function(mt){Qe.thumbUrl=mt||"",se()}))})},[o,T,a]),w.exports.useEffect(function(){be(!0)},[]);var xe=function(mt,ct){if(!!u)return ct==null||ct.preventDefault(),u(mt)},Te=function(mt){typeof d=="function"?d(mt):mt.url&&window.open(mt.url)},Ee=function(mt){p==null||p(mt)},Ce=function(mt){if(v)return v(mt,o);var ct=mt.status==="uploading",wt=_&&_(mt)?I(G_e,{}):I(V_e,{}),rt=ct?I(Mc,{}):I(H_e,{});return o==="picture"?rt=ct?I(Mc,{}):wt:o==="picture-card"&&(rt=ct?m.uploading:wt),rt},ke=function(mt,ct,wt,rt){var ut={type:"text",size:"small",title:rt,onClick:function(dt){ct(),Ro(mt)&&mt.props.onClick&&mt.props.onClick(dt)},className:"".concat(wt,"-list-item-card-actions-btn")};if(Ro(mt)){var nt=ui(mt,ze(ze({},mt.props),{onClick:function(){}}));return I($n,{...ut,icon:nt})}return I($n,{...ut,children:I("span",{children:mt})})};w.exports.useImperativeHandle(n,function(){return{handlePreview:xe,handleDownload:Te}});var De=w.exports.useContext(On),Ke=De.getPrefixCls,Ue=De.direction,tt=Ke("upload",P),lt=He((r={},re(r,"".concat(tt,"-list"),!0),re(r,"".concat(tt,"-list-").concat(o),!0),re(r,"".concat(tt,"-list-rtl"),Ue==="rtl"),r)),St=Pt(T.map(function(Qe){return{key:Qe.uid,file:Qe}})),We=o==="picture-card"?"animate-inline":"animate",bt={motionDeadline:2e3,motionName:"".concat(tt,"-").concat(We),keys:St,motionAppear:_e};return o!=="picture-card"&&(bt=ze(ze({},uw),bt)),$e("div",{className:lt,children:[I(_I,{...bt,component:!1,children:function(Qe){var mt=Qe.key,ct=Qe.file,wt=Qe.className,rt=Qe.style;return I(twe,{locale:m,prefixCls:tt,className:wt,style:rt,file:ct,items:T,progress:X,listType:o,isImgUrl:_,showPreviewIcon:O,showRemoveIcon:L,showDownloadIcon:V,removeIcon:B,previewIcon:H,downloadIcon:G,iconRender:Ce,actionIconRender:ke,itemRender:ne,onPreview:xe,onDownload:Te,onClose:Ee},mt)}}),Z&&I(Xo,{...bt,visible:le,forceRender:!0,children:function(Qe){var mt=Qe.className,ct=Qe.style;return ui(Z,function(wt){return{className:He(wt.className,mt),style:ze(ze(ze({},ct),{pointerEvents:mt?"none":void 0}),wt.style)}})}})]})},rwe=w.exports.forwardRef(nwe);const iwe=rwe;var owe=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(p){try{d(r.next(p))}catch(m){s(m)}}function u(p){try{d(r.throw(p))}catch(m){s(m)}}function d(p){p.done?o(p.value):i(p.value).then(a,u)}d((r=r.apply(e,t||[])).next())})},lg="__LIST_IGNORE_".concat(Date.now(),"__"),awe=function(t,n){var r,i=t.fileList,o=t.defaultFileList,s=t.onRemove,a=t.showUploadList,u=a===void 0?!0:a,d=t.listType,p=d===void 0?"text":d,m=t.onPreview,v=t.onDownload,x=t.onChange,_=t.onDrop,P=t.previewFile,k=t.disabled,T=t.locale,M=t.iconRender,O=t.isImageUrl,N=t.progress,L=t.prefixCls,F=t.className,V=t.type,B=V===void 0?"select":V,H=t.children,G=t.style,ee=t.itemRender,X=t.maxCount,Z=t.data,Q=Z===void 0?{}:Z,le=t.multiple,ne=le===void 0?!1:le,se=t.action,oe=se===void 0?"":se,he=t.accept,_e=he===void 0?"":he,be=t.supportServerRender,xe=be===void 0?!0:be,Te=w.exports.useContext(Il),Ee=k!=null?k:Te,Ce=ki(o||[],{value:i,postState:function(Rt){return Rt!=null?Rt:[]}}),ke=Le(Ce,2),De=ke[0],Ke=ke[1],Ue=w.exports.useState("drop"),tt=Le(Ue,2),lt=tt[0],St=tt[1],We=w.exports.useRef(null);w.exports.useMemo(function(){var zt=Date.now();(i||[]).forEach(function(Rt,Qt){!Rt.uid&&!Object.isFrozen(Rt)&&(Rt.uid="__AUTO__".concat(zt,"_").concat(Qt,"__"))})},[i]);var bt=function(Rt,Qt,pn){var ot=Pt(Qt);X===1?ot=ot.slice(-1):X&&(ot=ot.slice(0,X)),Cl.exports.flushSync(function(){Ke(ot)});var Lt={file:Rt,fileList:ot};pn&&(Lt.event=pn),x==null||x(Lt)},Qe=function(Rt,Qt){return owe(void 0,void 0,void 0,Zi().mark(function pn(){var ot,Lt,Tt,Kt;return Zi().wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(ot=t.beforeUpload,Lt=t.transformFile,Tt=Rt,!ot){ht.next=13;break}return ht.next=5,ot(Rt,Qt);case 5:if(Kt=ht.sent,Kt!==!1){ht.next=8;break}return ht.abrupt("return",!1);case 8:if(delete Rt[lg],Kt!==lg){ht.next=12;break}return Object.defineProperty(Rt,lg,{value:!0,configurable:!0}),ht.abrupt("return",!1);case 12:nn(Kt)==="object"&&Kt&&(Tt=Kt);case 13:if(!Lt){ht.next=17;break}return ht.next=16,Lt(Tt);case 16:Tt=ht.sent;case 17:return ht.abrupt("return",Tt);case 18:case"end":return ht.stop()}},pn)}))},mt=function(Rt){var Qt=Rt.filter(function(Lt){return!Lt.file[lg]});if(!!Qt.length){var pn=Qt.map(function(Lt){return ux(Lt.file)}),ot=Pt(De);pn.forEach(function(Lt){ot=cx(Lt,ot)}),pn.forEach(function(Lt,Tt){var Kt=Lt;if(Qt[Tt].parsedFile)Lt.status="uploading";else{var Zt=Lt.originFileObj,ht;try{ht=new File([Zt],Zt.name,{type:Zt.type})}catch{ht=new Blob([Zt],{type:Zt.type}),ht.name=Zt.name,ht.lastModifiedDate=new Date,ht.lastModified=new Date().getTime()}ht.uid=Lt.uid,Kt=ht}bt(Kt,ot)})}},ct=function(Rt,Qt,pn){try{typeof Rt=="string"&&(Rt=JSON.parse(Rt))}catch{}if(!!a2(Qt,De)){var ot=ux(Qt);ot.status="done",ot.percent=100,ot.response=Rt,ot.xhr=pn;var Lt=cx(ot,De);bt(ot,Lt)}},wt=function(Rt,Qt){if(!!a2(Qt,De)){var pn=ux(Qt);pn.status="uploading",pn.percent=Rt.percent;var ot=cx(pn,De);bt(pn,ot,Rt)}},rt=function(Rt,Qt,pn){if(!!a2(pn,De)){var ot=ux(pn);ot.error=Rt,ot.response=Qt,ot.status="error";var Lt=cx(ot,De);bt(ot,Lt)}},ut=function(Rt){var Qt;Promise.resolve(typeof s=="function"?s(Rt):s).then(function(pn){var ot;if(pn!==!1){var Lt=q_e(Rt,De);Lt&&(Qt=ze(ze({},Rt),{status:"removed"}),De==null||De.forEach(function(Tt){var Kt=Qt.uid!==void 0?"uid":"name";Tt[Kt]===Qt[Kt]&&!Object.isFrozen(Tt)&&(Tt.status="removed")}),(ot=We.current)===null||ot===void 0||ot.abort(Qt),bt(Qt,Lt))}})},nt=function(Rt){St(Rt.type),Rt.type==="drop"&&(_==null||_(Rt))};w.exports.useImperativeHandle(n,function(){return{onBatchStart:mt,onSuccess:ct,onProgress:wt,onError:rt,fileList:De,upload:We.current}});var qe=w.exports.useContext(On),dt=qe.getPrefixCls,_t=qe.direction,Dt=dt("upload",L),Nt=ze(ze({onBatchStart:mt,onError:rt,onProgress:wt,onSuccess:ct},t),{data:Q,multiple:ne,action:oe,accept:_e,supportServerRender:xe,prefixCls:Dt,disabled:Ee,beforeUpload:Qe,onChange:void 0});delete Nt.className,delete Nt.style,(!H||Ee)&&delete Nt.id;var jt=function(Rt,Qt){return u?I(bp,{componentName:"Upload",defaultLocale:gs.Upload,children:function(pn){var ot=typeof u=="boolean"?{}:u,Lt=ot.showRemoveIcon,Tt=ot.showPreviewIcon,Kt=ot.showDownloadIcon,Zt=ot.removeIcon,ht=ot.previewIcon,xn=ot.downloadIcon;return I(iwe,{prefixCls:Dt,listType:p,items:De,previewFile:P,onPreview:m,onDownload:v,onRemove:ut,showRemoveIcon:!Ee&&Lt,showPreviewIcon:Tt,showDownloadIcon:Kt,removeIcon:Zt,previewIcon:ht,downloadIcon:xn,iconRender:M,locale:ze(ze({},pn),T),isImageUrl:O,progress:N,appendAction:Rt,appendActionVisible:Qt,itemRender:ee})}}):Rt};if(B==="drag"){var Ve,Ze=He(Dt,(Ve={},re(Ve,"".concat(Dt,"-drag"),!0),re(Ve,"".concat(Dt,"-drag-uploading"),De.some(function(zt){return zt.status==="uploading"})),re(Ve,"".concat(Dt,"-drag-hover"),lt==="dragover"),re(Ve,"".concat(Dt,"-disabled"),Ee),re(Ve,"".concat(Dt,"-rtl"),_t==="rtl"),Ve),F);return $e("span",{children:[I("div",{className:Ze,onDrop:nt,onDragOver:nt,onDragLeave:nt,style:G,children:I(hE,{...Nt,ref:We,className:"".concat(Dt,"-btn"),children:I("div",{className:"".concat(Dt,"-drag-container"),children:H})})}),jt()]})}var Yt=He(Dt,(r={},re(r,"".concat(Dt,"-select"),!0),re(r,"".concat(Dt,"-select-").concat(p),!0),re(r,"".concat(Dt,"-disabled"),Ee),re(r,"".concat(Dt,"-rtl"),_t==="rtl"),r)),sn=function(Rt){return I("div",{className:Yt,style:Rt,children:I(hE,{...Nt,ref:We})})},Gt=sn(H?void 0:{display:"none"});return p==="picture-card"?I("span",{className:He("".concat(Dt,"-picture-card-wrapper"),F),children:jt(Gt,!!H)}):$e("span",{className:F,children:[Gt,jt()]})},swe=w.exports.forwardRef(awe);const zU=swe;var lwe=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},uwe=w.exports.forwardRef(function(e,t){var n=e.style,r=e.height,i=lwe(e,["style","height"]);return I(zU,{ref:t,...i,type:"drag",style:ze(ze({},n),{height:r})})});const cwe=uwe;var CT=zU;CT.Dragger=cwe;CT.LIST_IGNORE=lg;const dwe=CT,ST=({onClick:e,disabled:t})=>I($n,{block:!0,className:"mt-2",onClick:e,disabled:t,children:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B"});function fwe(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 hwe(e,t,n){n===void 0&&(n={});for(var r=0,i=e;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:e};return fwe(a,t,n)}function $U(e,t,n){if(e!==null)for(var r,i,o,s,a,u,d,p=0,m=0,v,x=e.type,_=x==="FeatureCollection",P=x==="Feature",k=_?e.features.length:1,T=0;T<k;T++){d=_?e.features[T].geometry:P?e.geometry:e,v=d?d.type==="GeometryCollection":!1,a=v?d.geometries.length:1;for(var M=0;M<a;M++){var O=0,N=0;if(s=v?d.geometries[M]:d,s!==null){u=s.coordinates;var L=s.type;switch(p=n&&(L==="Polygon"||L==="MultiPolygon")?1:0,L){case null:break;case"Point":if(t(u,m,T,O,N)===!1)return!1;m++,O++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(t(u[r],m,T,O,N)===!1)return!1;m++,L==="MultiPoint"&&O++}L==="LineString"&&O++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-p;i++){if(t(u[r][i],m,T,O,N)===!1)return!1;m++}L==="MultiLineString"&&O++,L==="Polygon"&&N++}L==="Polygon"&&O++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(N=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-p;o++){if(t(u[r][i][o],m,T,O,N)===!1)return!1;m++}N++}O++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if($U(s.geometries[r],t,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function pE(e){var t=[1/0,1/0,-1/0,-1/0];return $U(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}pE.default=pE;var Rp={exports:{}};Rp.exports=BU;Rp.exports.parse=BU;Rp.exports.stringify=VU;var cN=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,dN=new RegExp("^"+cN.source+"(\\s"+cN.source+"){1,}");function BU(e){var t=e.split(";"),n=t.pop(),r=(t.shift()||"").split("=").pop(),i=0;function o(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 a(){o(/^\s*/)}function u(){a();for(var M=0,O=[],N=[O],L=O,F;F=o(/^(\()/)||o(/^(\))/)||o(/^(,)/)||o(dN);){if(F==="(")N.push(L),L=[],N[N.length-1].push(L),M++;else if(F===")"){if(L.length===0||(L=N.pop(),!L))return null;if(M--,M===0)break}else if(F===",")L=[],N[N.length-1].push(L);else if(!F.split(/\s/g).some(isNaN))Array.prototype.push.apply(L,F.split(/\s/g).map(parseFloat));else return null;a()}return M!==0?null:O}function d(){for(var M=[],O,N;N=o(dN)||o(/^(,)/);)N===","?(M.push(O),O=[]):N.split(/\s/g).some(isNaN)||(O||(O=[]),Array.prototype.push.apply(O,N.split(/\s/g).map(parseFloat))),a();if(O)M.push(O);else return null;return M.length?M:null}function p(){if(!o(/^(point(\sz)?)/i)||(a(),!o(/^(\()/)))return null;var M=d();return!M||(a(),!o(/^(\))/))?null:{type:"Point",coordinates:M[0]}}function m(){if(!o(/^(multipoint)/i))return null;a();var M=n.substring(n.indexOf("(")+1,n.length-1).replace(/\(/g,"").replace(/\)/g,"");n="MULTIPOINT ("+M+")";var O=u();return O?(a(),{type:"MultiPoint",coordinates:O}):null}function v(){if(!o(/^(multilinestring)/i))return null;a();var M=u();return M?(a(),{type:"MultiLineString",coordinates:M}):null}function x(){if(!o(/^(linestring(\sz)?)/i)||(a(),!o(/^(\()/)))return null;var M=d();return!M||!o(/^(\))/)?null:{type:"LineString",coordinates:M}}function _(){if(!o(/^(polygon(\sz)?)/i))return null;a();var M=u();return M?{type:"Polygon",coordinates:M}:null}function P(){if(!o(/^(multipolygon)/i))return null;a();var M=u();return M?{type:"MultiPolygon",coordinates:M}:null}function k(){var M=[],O;if(!o(/^(geometrycollection)/i)||(a(),!o(/^(\()/)))return null;for(;O=T();)M.push(O),a(),o(/^(,)/),a();return o(/^(\))/)?{type:"GeometryCollection",geometries:M}:null}function T(){return p()||x()||_()||m()||v()||P()||k()}return s(T())}function VU(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(o).join(", ")}function i(s){return s.map(r).map(o).join(", ")}function o(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(VU).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}}const{Text:pwe}=M_e,xl=({text:e,className:t,classNameText:n,type:r="secondary"})=>I("div",{className:da("mb-1",t),children:I(pwe,{type:r,className:da("uppercase text-xs",n),children:e})}),{TreeNode:fN}=PU,mwe=e=>e.reduce((t,n)=>(t[n.id]=n,t[n.id].type="ao",n.rayons&&n.rayons.forEach(r=>{t[r.id]=r,t[r.id].type="rayon"}),t),{}),cw=()=>Vi(["regions"],async()=>{const{data:e}=await Mi.get("https://postamates.spatialsystems.ru/api/ao_rayons/");return e},{select:e=>({raw:e,normalized:mwe(e)}),refetchOnWindowFocus:!1,refetchOnMount:!1}),ET=({disabled:e,value:t,onChange:n})=>{const{map:r}=WP(),{data:i,isInitialLoading:o}=cw();return $e("div",{children:[I(xl,{text:"\u0410\u041E / \u0440\u0430\u0439\u043E\u043D"}),I(PU,{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:u=>{if(!u)return;const d=i.normalized[u],p=Rp.exports(d.polygon),m=hwe(p.coordinates[0]),v=pE(m);n({id:u,geometry:m,type:d.type}),r.fitBounds([[v[0],v[1]],[v[2],v[3]]],{padding:20})},loading:o,treeNodeFilterProp:"title",onClear:()=>n(null),notFoundContent:I(dl,{image:dl.PRESENTED_IMAGE_SIMPLE,description:"\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E"}),disabled:e,children:i==null?void 0:i.raw.map(u=>{var d;return I(fN,{value:u.id,title:u.name,children:(d=u.rayons)==null?void 0:d.map(p=>I(fN,{value:p.id,title:p.name},p.id))},u.id)})})]})},UU=(e,t,n)=>{if(!t||!n)return!1;const r={};return n.forEach(i=>{r[i]=e[i][0]!==t[i][0]||e[i][1]!==t[i][1]}),r},tu=({value:e})=>I("span",{className:"text-grey text-xs bg-white-background-light",children:e}),hN=(e,t)=>{if(Array.isArray(t)){const[n,r]=t;return{...e,[n]:I(tu,{value:n}),[r]:I(tu,{value:r})}}else return{...e,[t]:I(tu,{value:t})}},a0=({title:e,value:t,onChange:n,onAfterChange:r,min:i=0,max:o=100,range:s=!1,step:a=1,disabled:u=!1,onMouseEnter:d,onMouseLeave:p,showZeroMark:m=!1})=>{const v={[i]:I(tu,{value:i}),[o]:I(tu,{value:o})},[x,_]=w.exports.useState(t),[P,k]=w.exports.useState(hN(v,t));w.exports.useEffect(()=>{_(t),k(hN(v,t))},[t]);const T=N=>{if(Array.isArray(N)){const[L,F]=N;k({...v,[L]:I(tu,{value:L}),[F]:I(tu,{value:F})})}else k({...v,[N]:I(tu,{value:N})});r==null||r(N)},M=N=>{_(N),n==null||n(N)},O=m?{...P,0:I(tu,{value:0})}:P;return $e("div",{onMouseEnter:d,onMouseLeave:p,children:[I(xl,{text:e}),I(mpe,{range:s,value:x,marks:O,onChange:M,onAfterChange:T,min:i,max:o,step:a,disabled:u})]})},ia=({filterRange:e,disabled:t,fullRange:n,title:r,filterKey:i,dynamicKey:o})=>{const{setFilterWithKey:s}=va(),a=u=>s(u,i);return w.exports.useEffect(()=>{if(!n)return;const u=n[0],d=n[1],p=e[0]===Hd[`${i}__gt`]&&e[1]===Hd[`${i}__lt`],m=e[0]===void 0&&e[1]===void 0||e[0]===0&&e[1]===0;(p||m&&o)&&s([u,d],i)},[n]),I(a0,{title:r,value:e,onAfterChange:a,min:n[0],max:n[1],range:!0,disabled:t})};var gwe=w.exports.createContext({});const jU=gwe;var dx=2,pN=.16,vwe=.05,ywe=.05,xwe=.15,HU=5,KU=4,bwe=[{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 mN(e){var t=e.r,n=e.g,r=e.b,i=ob(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function fx(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ab(t,n,r,!1))}function _we(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 gN(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-dx*t:Math.round(e.h)+dx*t:r=n?Math.round(e.h)+dx*t:Math.round(e.h)-dx*t,r<0?r+=360:r>=360&&(r-=360),r}function vN(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-pN*t:t===KU?r=e.s+pN:r=e.s+vwe*t,r>1&&(r=1),n&&t===HU&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function yN(e,t,n){var r;return n?r=e.v+ywe*t:r=e.v-xwe*t,r>1&&(r=1),Number(r.toFixed(2))}function mE(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Fs(e),i=HU;i>0;i-=1){var o=mN(r),s=fx(Fs({h:gN(o,i,!0),s:vN(o,i,!0),v:yN(o,i,!0)}));n.push(s)}n.push(fx(r));for(var a=1;a<=KU;a+=1){var u=mN(r),d=fx(Fs({h:gN(u,a),s:vN(u,a),v:yN(u,a)}));n.push(d)}return t.theme==="dark"?bwe.map(function(p){var m=p.index,v=p.opacity,x=fx(_we(Fs(t.backgroundColor||"#141414"),Fs(n[m]),v*100));return x}):n}var s2={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"},l2={},u2={};Object.keys(s2).forEach(function(e){l2[e]=mE(s2[e]),l2[e].primary=l2[e][5],u2[e]=mE(s2[e],{theme:"dark",backgroundColor:"#141414"}),u2[e].primary=u2[e][5]});function wwe(e,t){Dr(e,"[@ant-design/icons] ".concat(t))}function xN(e){return nn(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(nn(e.icon)==="object"||typeof e.icon=="function")}function bN(){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 gE(e,t,n){return n?Un.createElement(e.tag,fe(fe({key:t},bN(e.attrs)),n),(e.children||[]).map(function(r,i){return gE(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Un.createElement(e.tag,fe({key:t},bN(e.attrs)),(e.children||[]).map(function(r,i){return gE(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function WU(e){return mE(e)[0]}function GU(e){return e?Array.isArray(e)?e:[e]:[]}var Cwe=`
|
|
|
.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);
|
|
|
}
|
|
|
}
|
|
|
`,Swe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Cwe,n=w.exports.useContext(jU),r=n.csp,i=n.prefixCls,o=t;i&&(o=o.replace(/anticon/g,i)),w.exports.useEffect(function(){jv(o,"@ant-design-icons",{prepend:!0,csp:r})},[])},Ewe=["icon","className","onClick","style","primaryColor","secondaryColor"],Rg={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Pwe(e){var t=e.primaryColor,n=e.secondaryColor;Rg.primaryColor=t,Rg.secondaryColor=n||WU(t),Rg.calculated=!!n}function Iwe(){return fe({},Rg)}var dw=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,s=t.primaryColor,a=t.secondaryColor,u=Rn(t,Ewe),d=Rg;if(s&&(d={primaryColor:s,secondaryColor:a||WU(s)}),Swe(),wwe(xN(n),"icon should be icon definiton, but got ".concat(n)),!xN(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=fe(fe({},p),{},{icon:p.icon(d.primaryColor,d.secondaryColor)})),gE(p.icon,"svg-".concat(p.name),fe({className:r,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u))};dw.displayName="IconReact";dw.getTwoToneColors=Iwe;dw.setTwoToneColors=Pwe;const PT=dw;function qU(e){var t=GU(e),n=Le(t,2),r=n[0],i=n[1];return PT.setTwoToneColors({primaryColor:r,secondaryColor:i})}function Twe(){var e=PT.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var kwe=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];qU("#1890ff");var fw=w.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,o=e.spin,s=e.rotate,a=e.tabIndex,u=e.onClick,d=e.twoToneColor,p=Rn(e,kwe),m=w.exports.useContext(jU),v=m.prefixCls,x=v===void 0?"anticon":v,_=m.rootClassName,P=He(_,x,(n={},re(n,"".concat(x,"-").concat(i.name),!!i.name),re(n,"".concat(x,"-spin"),!!o||i.name==="loading"),n),r),k=a;k===void 0&&u&&(k=-1);var T=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,M=GU(d),O=Le(M,2),N=O[0],L=O[1];return I("span",{...fe(fe({role:"img","aria-label":i.name},p),{},{ref:t,tabIndex:k,onClick:u,className:P}),children:I(PT,{icon:i,primaryColor:N,secondaryColor:L,style:T})})});fw.displayName="AntdIcon";fw.getTwoToneColor=Twe;fw.setTwoToneColor=qU;const Qo=fw;var ZU=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:Ihe})})};ZU.displayName="ArrowRightOutlined";const XU=w.exports.forwardRef(ZU);var YU=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:wB})})};YU.displayName="CheckCircleOutlined";const QU=w.exports.forwardRef(YU);var JU=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:SB})})};JU.displayName="CloseCircleOutlined";const Mwe=w.exports.forwardRef(JU);var ej=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:PB})})};ej.displayName="CloseOutlined";const Rwe=w.exports.forwardRef(ej);var tj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:LU})})};tj.displayName="DownloadOutlined";const Awe=w.exports.forwardRef(tj);var Dwe={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 Owe=Dwe;var nj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:Owe})})};nj.displayName="FullscreenExitOutlined";const Nwe=w.exports.forwardRef(nj);var Lwe={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 Fwe=Lwe;var rj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:Fwe})})};rj.displayName="FullscreenOutlined";const zwe=w.exports.forwardRef(rj);var $we={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888.3 757.4h-53.8c-4.2 0-7.7 3.5-7.7 7.7v61.8H197.1V197.1h629.8v61.8c0 4.2 3.5 7.7 7.7 7.7h53.8c4.2 0 7.7-3.4 7.7-7.7V158.7c0-17-13.7-30.7-30.7-30.7H158.7c-17 0-30.7 13.7-30.7 30.7v706.6c0 17 13.7 30.7 30.7 30.7h706.6c17 0 30.7-13.7 30.7-30.7V765.1c0-4.3-3.5-7.7-7.7-7.7zM902 476H588v-76c0-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-76h314c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"import",theme:"outlined"};const Bwe=$we;var ij=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:Bwe})})};ij.displayName="ImportOutlined";const Vwe=w.exports.forwardRef(ij);var oj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:kB})})};oj.displayName="InfoCircleOutlined";const aj=w.exports.forwardRef(oj);var sj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:q$})})};sj.displayName="LoadingOutlined";const IT=w.exports.forwardRef(sj);var Uwe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};const jwe=Uwe;var lj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:jwe})})};lj.displayName="LogoutOutlined";const Hwe=w.exports.forwardRef(lj);var uj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:r7})})};uj.displayName="RightOutlined";const Kwe=w.exports.forwardRef(uj);var cj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:A9})})};cj.displayName="SearchOutlined";const TT=w.exports.forwardRef(cj);var Wwe={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 Gwe=Wwe;var dj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:Gwe})})};dj.displayName="SettingOutlined";const qwe=w.exports.forwardRef(dj);var Zwe={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 Xwe=Zwe;var fj=function(t,n){return I(Qo,{...fe(fe({},t),{},{ref:n,icon:Xwe})})};fj.displayName="UploadOutlined";const Ywe=w.exports.forwardRef(fj),Qwe=({onClose:e})=>{const{filters:t,ranges:n,setFilterWithKey:r}=va(),{data:i}=oI(),o=w.exports.useMemo(()=>sv(i),[i]),s=w.exports.useMemo(()=>{let u=0;return ms.map(d=>{Qh(t,n,d).result&&(u+=1)}),u},[t,n]),a=()=>{ms.map(u=>{r(n[u],u)})};return $e("div",{className:"ml-4 bg-white rounded-xl z-20 mt-[5vh] shadow-2xl",style:{maxHeight:"90vh",width:"350px",maxWidth:"450px"},children:[$e("div",{className:"flex items-center justify-between font-semibold p-4 border-0 border-b border-solid border-gray-300",children:["\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u043D\u044B\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B",I(Rwe,{onClick:e})]}),$e("div",{style:{maxHeight:"calc(90vh - 150px)"},className:"overflow-y-scroll py-3 px-6",children:[I(ll,{bordered:!1,expandIconPosition:"end",style:{background:"none"},className:"filter_group my-4",children:I(ll.Panel,{header:I(xl,{type:"primary",text:"\u041E\u0431\u0449\u0438\u0435",classNameText:"text-black"}),forceRender:!0,children:$e("div",{className:"mt-4 mb-12",children:[I("div",{children:I(ia,{filterRange:[t.doors__gt,t.doors__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u043E\u0432 \u0432 \u0436\u0438\u043B\u043E\u043C \u0434\u043E\u043C\u0435",fullRange:n.doors||[0,0],filterKey:"doors"})}),I("div",{children:I(ia,{filterRange:[t.flat_cnt__gt,t.flat_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440 \u0432 \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u0435 \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430",fullRange:n.flat_cnt||[0,0],filterKey:"flat_cnt"})})]})},"filter_common")}),I(ll,{bordered:!1,expandIconPosition:"end",style:{background:"none"},className:"filter_group my-4",children:I(ll.Panel,{header:I(xl,{type:"primary",text:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0432 \u043E\u043A\u0440\u0435\u0441\u0442\u043D\u043E\u0441\u0442\u0438 500\u043C",classNameText:"text-black"}),forceRender:!0,children:$e("div",{className:"mt-4 mb-12",children:[I("div",{children:I(ia,{filterRange:[t.rival_post_cnt__gt,t.rival_post_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0442\u0435\u0439",fullRange:n.rival_post_cnt||[0,0],filterKey:"rival_post_cnt"})}),I("div",{children:I(ia,{filterRange:[t.rival_pvz_cnt__gt,t.rival_pvz_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u041F\u0412\u0417",fullRange:n.rival_pvz_cnt||[0,0],filterKey:"rival_pvz_cnt"})}),I("div",{children:I(ia,{filterRange:[t.target_post_cnt__gt,t.target_post_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432 \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442",fullRange:n.target_post_cnt||[0,0],filterKey:"target_post_cnt"})}),I("div",{children:I(ia,{filterRange:[t.flats_cnt__gt,t.flats_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440 \u0432 \u043E\u043A\u0440\u0435\u0441\u0442\u043D\u043E\u0441\u0442\u0438",fullRange:n.flats_cnt||[0,0],filterKey:"flats_cnt"})}),I("div",{children:I(ia,{filterRange:[t.tc_cnt__gt,t.tc_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u0442\u043E\u0440\u0433\u043E\u0432\u044B\u0445 \u0446\u0435\u043D\u0442\u0440\u043E\u0432",fullRange:n.tc_cnt||[0,0],filterKey:"tc_cnt"})}),I("div",{children:I(ia,{filterRange:[t.culture_cnt__gt,t.culture_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u043A\u0443\u043B\u044C\u0442\u0443\u0440\u044B (\u0442\u0435\u0430\u0442\u0440\u044B, \u043C\u0443\u0437\u0435\u0439 \u0438 \u0442\u0434)",fullRange:n.culture_cnt||[0,0],filterKey:"culture_cnt"})}),I("div",{children:I(ia,{filterRange:[t.mfc_cnt__gt,t.mfc_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u041C\u0424\u0426",fullRange:n.mfc_cnt||[0,0],filterKey:"mfc_cnt"})}),I("div",{children:I(ia,{filterRange:[t.public_stop_cnt__gt,t.public_stop_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043E\u043A \u041E\u0422",fullRange:n.public_stop_cnt||[0,0],filterKey:"public_stop_cnt"})}),I("div",{children:I(ia,{filterRange:[t.supermarket_cnt__gt,t.supermarket_cnt__lt],title:"\u041A\u043E\u043B-\u0432\u043E \u0441\u0443\u043F\u0435\u0440\u043C\u0430\u0440\u043A\u0435\u0442\u043E\u0432",fullRange:n.supermarket_cnt||[0,0],filterKey:"supermarket_cnt"})}),I("div",{children:I(ia,{filterRange:[t.target_dist__gt,t.target_dist__lt],title:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430 \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442",fullRange:n.target_dist||[0,0],filterKey:"target_dist"})}),I("div",{children:I(ia,{filterRange:[t.metro_dist__gt,t.metro_dist__lt],title:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u043C\u0435\u0442\u0440\u043E",fullRange:n.metro_dist||[0,0],filterKey:"metro_dist"})})]})},"filter_dist")}),o.map(u=>I(ll,{bordered:!1,expandIconPosition:"end",style:{background:"none"},className:"filter_group my-4",children:I(ll.Panel,{header:I(xl,{type:"primary",text:Yz[u.name],classNameText:"text-black"}),forceRender:!0,children:I("div",{className:"mt-4 mb-12",children:u.groups.map(d=>I("div",{children:I(ia,{filterRange:[t[`d${d.id}__gt`],t[`d${d.id}__lt`]],title:d.name,fullRange:n[`d${d.id}`]||[0,0],filterKey:`d${d.id}`,dynamicKey:!0})},d.id))})},`filter_${u.id}`)},`filter_${u.id}`))]}),$e("div",{className:"flex items-center justify-between p-4 border-0 border-t border-solid border-gray-300",children:[$e("span",{children:["\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ",s]}),I("div",{className:"flex gap-2",children:I($n,{disabled:s===0,onClick:()=>a(),type:"secondary",children:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B"})})]})]})},Jwe=()=>{const{filters:e,ranges:t}=va(),n=w.exports.useMemo(()=>{let u=0;return ms.map(d=>{Qh(e,t,d).result&&(u+=1)}),u},[e,t]),r=()=>{const u=ms.map(d=>{if(Qh(e,t,d).result)return d}).filter(d=>!!d);return u.length===0?I("p",{className:"my-0.5 text-white",children:"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043E \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0430"}):I("ul",{className:"mb-0 max-w-[300px] pl-5",children:Object.keys(J1).map(d=>{const p=J1[d],m=[];if(u.map(v=>{p[v]&&m.push(p[v])}),m.length!==0)return $e("li",{className:"text-white",children:[I("span",{}),p.name+" ",$e("span",{className:"text-gray-400",children:["(",m.join(", "),")"]})]})})})},[i,o]=w.exports.useState(!1),s=u=>{o(u)},a=()=>I(Qwe,{onClose:()=>o(!1)});return I(qv,{trigger:"click",dropdownRender:()=>a(),onOpenChange:s,open:i,forceRender:!0,placement:"right",children:$e($n,{onClick:u=>u.stopPropagation(),className:"w-full text-left flex justify-between items-center border-0 p-0 mt-16",children:[$e("div",{className:"flex gap-2 items-center",children:["\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u043D\u044B\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B",I(bf,{content:r,trigger:"hover",placement:"rightBottom",className:"rounded-xl mt-0.5 bg-gray-200 p-1 flex justify-center items-center w-[22px] h-[22px] z-10 !text-black",color:"#000000cc",zIndex:4e3,children:n})]}),I(Kwe,{rotate:i?180:0,className:"mt-0.5 mr-1"})]})})},e4e=Object.entries(nI).map(([e,t])=>({value:t,label:t})),t4e=({disabled:e})=>{const{filters:{categories:t},setCategories:n}=va();return $e("div",{children:[I(xl,{text:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438"}),I(vu,{mode:"tags",style:{width:"100%"},placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438 \u043B\u043E\u043A\u0430\u0446\u0438\u0439",onChange:n,options:e4e,allowClear:!0,value:t,disabled:e})]})},n4e=({disabled:e,fullRange:t,isLoading:n})=>{const{filters:{prediction:r},setPrediction:i}=va(),o=s=>i(s);return w.exports.useEffect(()=>{if(!t)return;const s=t.prediction[0],a=t.prediction[1];r[0]===Hd.prediction[0]&&r[1]===Hd.prediction[1]&&i([s,a])},[t]),n?I("div",{className:"flex justify-center items-center",children:I(vs,{})}):I(a0,{title:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",value:r,onAfterChange:o,min:t.prediction[0],max:t.prediction[1],range:!0,disabled:e})},r4e=({onSelectedChange:e})=>{const{data:t,isInitialLoading:n}=Gee(),{data:r,isInitialLoading:i,isFetching:o}=qee(),{selection:{excluded:s}}=Pl();return w.exports.useEffect(()=>e(r-s.size),[r,s]),$e("div",{className:"flex items-center justify-between",children:[I("span",{children:"\u041E\u0442\u043E\u0431\u0440\u0430\u043D\u043E \u043B\u043E\u043A\u0430\u0446\u0438\u0439"}),n||i||o?I(vs,{}):I("span",{children:`${r-s.size} / ${t}`})]})},hw=({onSuccess:e})=>{const{toggleUpdateCounter:t}=bu(),n=ys();return NP({mutationFn:r=>Mi.put(`/api/${n}/update_status/?${r.toString()}`),onSuccess:()=>{t(),e==null||e()}})},i4e=({disabled:e})=>{const{filters:t,ranges:n}=va(),{prediction:r,categories:i,region:o}=t,{selection:s}=Pl(),a=ff(),[u,d]=w.exports.useState(!1),{mutate:p,isLoading:m,isSuccess:v}=hw({onSuccess:()=>{a.invalidateQueries(["table",1,t])}}),x=()=>{const P=new URLSearchParams({status:jn.onApproval,"prediction_current[]":r,"categories[]":i,"included[]":[...s.included],"excluded[]":[...s.excluded]});v_(P,t,n),o&&(o.type==="ao"&&P.append("district[]",o.id),o.type==="rayon"&&P.append("area[]",o.id)),p(P)};return $e(Tn,{children:[$e($n,{type:"primary",block:!0,className:"mt-2",onClick:()=>d(!0),disabled:e,children:[I("span",{className:"mr-1",children:"\u0412\u0437\u044F\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0442\u0443"}),I(XU,{})]}),$e(t0,{title:" ",centered:!0,open:u,onCancel:()=>d(!1),closable:!0,footer:(()=>v?[I($n,{type:"primary",onClick:()=>d(!1),children:"\u0425\u043E\u0440\u043E\u0448\u043E"},"ok-button")]:m?null:$e("div",{className:"flex items-center justify-center gap-x-4",children:[I($n,{onClick:()=>d(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"}),I($n,{type:"primary",onClick:x,children:"\u0414\u0430"})]}))(),children:[v?I(qB,{message:"\u0423\u0441\u043F\u0435\u0448\u043D\u043E",description:"\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0442\u043E\u0447\u043A\u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B \u043D\u0430 \u0441\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435. \u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043D\u0430 \u043D\u0438\u0445 \u043C\u043E\u0436\u043D\u043E \u0432\u043E \u0432\u0442\u043E\u0440\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435",type:"success",showIcon:!0}):I(xl,{text:"\u0423\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0432\u0437\u044F\u0442\u044C \u043E\u0442\u043E\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u043B\u043E\u043A\u0430\u0446\u0438\u0438 \u0432 \u0440\u0430\u0431\u043E\u0442\u0443?",className:"text-center"}),m&&I("div",{className:"flex justify-center py-2",children:I(vs,{tip:"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u043C \u043D\u0430 \u0441\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435...",size:"large"})})]})]})},o4e=()=>{var L;const e=Bee(),{reset:t}=Pl(),{ranges:n,filters:r,setRegion:i,setFilterWithKey:o,setPrediction:s,setCategories:a,setRanges:u}=va(),d=ys(),{data:p}=nte(d);w.exports.useEffect(()=>{const F=p==null?void 0:p.fullRange;!F||(ms.map(V=>{if(!n[V]&&!!F[V]){o(F[V],V);return}const B=n[V]&&F[V]&&n[V][0]!==F[V][0],H=n[V]&&F[V]&&n[V][1]!==F[V][1];(B||H)&&o(F[V],V)}),rI(F,n)&&s(F.prediction),u({...n,...F}))},[p]);const[m,v]=w.exports.useState(!1),x=F=>{v(F===0)},[_,P]=w.exports.useState(!1);w.exports.useEffect(()=>{const F=setTimeout(()=>P(!1),1500);return()=>clearTimeout(F)},[_]);const k=()=>{P(!0)},T=()=>{P(!1)},M=UU(r,n,["prediction"]),O=()=>{ms.map(F=>{o(n[F],F)}),s(n.prediction),a([]),i(null)},N=r.region||M.prediction||r.categories.length!==0;return $e("div",{className:"flex flex-col flex-1 justify-between",children:[$e("div",{children:[$e($i,{title:gee,placement:"right",open:e&&_,onMouseEnter:k,onMouseLeave:T,children:[$e("div",{className:"space-y-5",children:[I(ET,{disabled:e,value:(L=r.region)==null?void 0:L.id,onChange:i}),I(t4e,{disabled:e}),p!=null&&p.isLoading?I(vs,{}):$e(Tn,{children:[I(n4e,{disabled:e,fullRange:n,isLoading:!1}),I(Jwe,{})]})]}),N&&I(ST,{onClick:O,disabled:e})]}),e?I($n,{block:!0,className:"mt-2",onClick:t,children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0440\u0443\u0447\u043D\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435"}):null]}),$e("div",{children:[I(r4e,{onSelectedChange:x}),I(i4e,{disabled:m})]})]})},_N={region:null},a4e=e=>({filters:_N,setRegion:t=>e(n=>{n.filters.region=t}),clear:()=>e(t=>{t.filters=_N})}),Cf=Sl(Bv(El(a4e),{name:"postnet/on-approval-filters"})),s4e={[Cn.initial]:!0,[Cn.approve]:!0,[Cn.working]:!0,[Cn.filteredWorking]:!1,[Cn.cancelled]:!0,[Cn.pvz]:!0,[Cn.other]:!0},l4e=[Cn.pvz,Cn.other],u4e=e=>({isVisible:s4e,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)&&!l4e.includes(i)).forEach(i=>{n.isVisible[i]=!1})})}),Ks=Sl(Bv(El(u4e),{name:"postnet/layers-visibility"})),c4e=()=>{const{filters:{region:e},setRegion:t,clear:n}=Cf(),{isVisible:r,toggleVisibility:i,showLayers:o}=Ks(),s=e||!r[Cn.approve]||!r[Cn.working]||!r[Cn.cancelled],a=()=>{n(),o([Cn.approve,Cn.working,Cn.cancelled])};return $e("div",{className:"space-y-4",children:[I(ET,{value:e==null?void 0:e.id,onChange:t}),$e("div",{children:[I(xl,{text:"\u0421\u0442\u0430\u0442\u0443\u0441\u044B"}),$e("div",{className:"flex flex-col space-y-2",children:[I(bc,{onChange:()=>i(Cn.approve),checked:r[Cn.approve],children:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430"}),I(bc,{className:"!ml-0",onChange:()=>i(Cn.working),checked:r[Cn.working],children:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442"}),I(bc,{className:"!ml-0",onChange:()=>i(Cn.cancelled),checked:r[Cn.cancelled],children:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D"})]})]}),s&&I(ST,{onClick:a})]})},cu={region:null,deltaTraffic:[-1e4,1e4],factTraffic:[-100,0],age:[-1,0]},d4e={region:null,deltaTraffic:[-1e4,1e4],factTraffic:[-100,0],age:[-1,0]},f4e=e=>({filters:cu,ranges:d4e,setDeltaTraffic:t=>{e(n=>{n.filters.deltaTraffic=t})},setFactTraffic:t=>{e(n=>{n.filters.factTraffic=t})},setAge:t=>{e(n=>{n.filters.age=t})},setRegion:t=>e(n=>{n.filters.region=t}),setRanges:t=>e(n=>{n.ranges=t}),clear:t=>e(n=>{if(!t)return n.filters=cu,n;const{deltaTraffic:r,factTraffic:i,age:o}=t;n.filters={...cu,deltaTraffic:r,factTraffic:i,age:o}})}),$c=Sl(Bv(El(f4e),{name:"postnet/working-filters"})),h4e=({fullRange:e})=>{const{filters:{deltaTraffic:t},setDeltaTraffic:n}=$c(),r=i=>n(i);return w.exports.useEffect(()=>{const i=e.deltaTraffic[0],o=e.deltaTraffic[1];t[0]===cu.deltaTraffic[0]&&t[1]===cu.deltaTraffic[1]&&n([i,o])},[e,t]),I(a0,{title:"\u0420\u0430\u0441\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u0435 \u0444\u0430\u043A\u0442\u0430 \u0441 \u043F\u0440\u043E\u0433\u043D\u043E\u0437\u043E\u043C, %",value:t,onAfterChange:r,min:e.deltaTraffic[0],max:e.deltaTraffic[1],range:!0,showZeroMark:!0})},p4e=({fullRange:e})=>{const{filters:{factTraffic:t},setFactTraffic:n}=$c(),r=i=>n(i);return w.exports.useEffect(()=>{const i=e.factTraffic[0],o=e.factTraffic[1];t[0]===cu.factTraffic[0]&&t[1]===cu.factTraffic[1]&&n([i,o])},[e,t]),I(a0,{title:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",value:t,onAfterChange:r,min:e.factTraffic[0],max:e.factTraffic[1],range:!0})},m4e=({fullRange:e})=>{const{filters:{age:t},setAge:n}=$c(),r=i=>n(i);return w.exports.useEffect(()=>{const i=e.age[0],o=e.age[1];t[0]===cu.age[0]&&t[1]===cu.age[1]&&n([i,o])},[e,t]),I(a0,{title:"\u0417\u0440\u0435\u043B\u043E\u0441\u0442\u044C \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430, \u0434\u043D\u0435\u0439",value:t,onAfterChange:r,min:e.age[0],max:e.age[1],range:!0})},g4e=()=>{const e=ys();return Vi(["working-max-min"],async()=>{const{data:t}=await Mi.get(`/api/${e}/filters?status[]=${jn.working}`);return t},{select:t=>({deltaTraffic:[t.delta_current[0],t.delta_current[1]],factTraffic:[t.fact[0],t.fact[1]],age:[t.age_day[0],t.age_day[1]]})})},v4e=()=>{var x;const{filters:e,ranges:t,setRegion:n,setAge:r,setDeltaTraffic:i,setRanges:o,setFactTraffic:s,clear:a}=$c(),{data:u,isInitialLoading:d}=g4e();w.exports.useEffect(()=>{if(!u)return;const _=u;Dh(_.deltaTraffic,t,"deltaTraffic")&&i(u.deltaTraffic),Dh(_.factTraffic,t,"factTraffic")&&s(u.deltaTraffic),Dh(_.age,t,"age")&&r(u.deltaTraffic),o({..._})},[u]);const p=UU(e,u,["deltaTraffic","factTraffic","age"]),m=e.region||p.deltaTraffic||p.factTraffic||p.age,v=()=>a(u);return $e("div",{children:[I(ET,{value:(x=e.region)==null?void 0:x.id,onChange:n}),I("div",{className:"space-y-12 mt-4",children:d?I("div",{className:"flex justify-center items-center",children:I(vs,{})}):$e(Tn,{children:[I(h4e,{fullRange:u}),I(p4e,{fullRange:u}),I(m4e,{fullRange:u})]})}),m&&I(ST,{onClick:v})]})},y4e=({isOpened:e,onClose:t})=>{const{setImportMode:n}=Do(),[r,i]=w.exports.useState(!1),{data:o,isInitialLoading:s}=Zee(),[a,u]=w.exports.useState(!1),{mutateAsync:d}=Xee(),p=async()=>{i(!0);try{await d(),u(!0)}catch{}finally{i(!1)}},m=()=>a?[I($n,{type:"primary",onClick:()=>{t(),n(!1)},disabled:r,children:"\u0425\u043E\u0440\u043E\u0448\u043E"},"ok-button")]:[I($n,{type:"default",onClick:t,children:"\u041D\u0430\u0437\u0430\u0434"},"close-button"),I($n,{type:"primary",onClick:()=>p(),disabled:r,children:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C"},"ok-button")],v=()=>s?I(vs,{}):r?$e("div",{className:"flex flex-col justify-center gap-2 items-center",children:[I(vs,{indicator:I(IT,{style:{fontSize:32},spin:!0})}),"\u0414\u043E\u0431\u0430\u0432\u043B\u044F\u0435\u043C \u0442\u043E\u0447\u043A\u0438..."]}):a?$e("div",{className:"flex items-center justify-center font-bold gap-2",children:[I(QU,{style:{fontSize:24,color:"#52C41A"}}),"\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E ",o," \u043D\u043E\u0432\u044B\u0445 \u0442\u043E\u0447\u0435\u043A"]}):$e("div",{className:"flex flex-row gap-4",children:[I(aj,{style:{fontSize:24,color:"#FFC53D"}}),$e("div",{className:"flex flex-col gap-2",children:[I("p",{className:"font-bold mb-0",children:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435"}),$e("p",{children:["\u0412 \u0431\u0430\u0437\u0443 \u0434\u0430\u043D\u043D\u044B\u0445 \u0431\u0443\u0434\u0435\u0442 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E ",o," \u043D\u043E\u0432\u044B\u0445 \u0442\u043E\u0447\u0435\u043A."]})]})]});return I(t0,{open:e,title:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u0431\u0430\u0437\u0443",onCancel:t,width:400,footer:m(),children:v()})},x4e=({setFileId:e})=>{const t=w.exports.useRef(null),[n,r]=w.exports.useState(!0),i=async s=>{const{onSuccess:a,onError:u,file:d,onProgress:p}=s,m={onUploadProgress:v=>{const x=Math.floor(v.loaded/v.total*100);p({percent:x})}};try{const{id:v}=await Hee(d,m);a("Ok"),e(v)}catch{}},o=async()=>{const s=await jee();await Qz("template.xlsx",s)};return w.exports.useLayoutEffect(()=>{t&&t.current&&!n&&(t.current.click(),r(!0))},[n]),$e(Tn,{children:[I(dwe,{name:"file",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",customRequest:i,children:I($n,{icon:I(Ywe,{}),children:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B .xlsx"})}),I($n,{className:"p-0 text-xs text-grey underline",type:"text",onClick:o,children:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D"})]})},b4e=({report:e})=>$e(Tn,{children:[$e(sc,{className:da("p-1"),children:[I(Io,{className:"text-gray-600",span:12,children:"\u0412\u0441\u0435\u0433\u043E \u0442\u043E\u0447\u0435\u043A:"}),I(Io,{className:"font-semibold",span:12,children:e.total})]}),$e(sc,{className:da("p-1"),children:[I(Io,{className:"text-gray-600",span:12,children:"\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439:"}),I(Io,{className:"font-semibold text-[#2f54eb]",span:12,children:e.matched})]}),$e(sc,{className:da("p-1"),children:[I(Io,{className:"text-gray-600",span:12,children:"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u043D\u044B\u0435:"}),I(Io,{className:"font-semibold text-[#f5222d]",span:12,children:e.error})]}),$e(sc,{className:da("p-1"),children:[I(Io,{className:"text-gray-600",span:12,children:"\u041D\u043E\u0432\u044B\u0435:"}),I(Io,{className:"font-semibold text-[#52c41a]",span:12,children:e.unmatched})]})]}),_4e=({onClose:e,isOpened:t})=>{const[n,r]=w.exports.useState(),[i,o]=w.exports.useState(),[s,a]=w.exports.useState(!1),[u,d]=w.exports.useState(!1),[p,m]=w.exports.useState(!1),[v,x]=w.exports.useState("\u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u0443\u0435\u043C \u0442\u043E\u0447\u043A\u0438..."),{toggleUpdateCounter:_}=bu(),P=async()=>{a(!0);try{await Kee(n);const M=setInterval(async()=>{const O=await Wee();x(O.task_status),(O.task_status==="\u041F\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442 ML \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"||!t)&&(o(O.data),a(!1),_(),clearInterval(M))},2e3);_()}catch{m(!0),a(!1)}},k=()=>p?[I($n,{type:"primary",onClick:e,children:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},"error-button")]:u?[I($n,{type:"primary",onClick:e,children:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0432\u044B\u0431\u043E\u0440\u0443"},"finish-button")]:i?[I($n,{type:"primary",onClick:()=>d(!0),children:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043E\u0442\u0447\u0435\u0442"},"report-button")]:[I($n,{type:"primary",onClick:()=>P(),disabled:!n||s,children:"\u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C"},"ok-button")],T=()=>p?$e("div",{className:"flex items-center justify-center font-bold gap-2",children:[I(Mwe,{style:{fontSize:24,color:"#FF4D4F"}}),"\u041F\u0440\u0438 \u0438\u043C\u043F\u043E\u0440\u0442\u0435 \u0442\u043E\u0447\u0435\u043A \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430"]}):s?$e("div",{className:"flex flex-col justify-center gap-2 items-center",children:[I(vs,{indicator:I(IT,{style:{fontSize:64},spin:!0})}),v]}):u?I(b4e,{report:i}):i?$e("div",{className:"flex items-center justify-center font-bold gap-2",children:[I(QU,{style:{fontSize:24,color:"#52C41A"}}),"\u0422\u043E\u0447\u043A\u0438 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0438\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u044B"]}):I(x4e,{setFileId:r});return I(t0,{open:t,title:"\u0418\u043C\u043F\u043E\u0440\u0442 \u0442\u043E\u0447\u0435\u043A",onCancel:()=>{s||e()},width:400,footer:k(),children:T()})},w4e=()=>{const{mode:e,isImportMode:t,setImportMode:n}=Do(),[r,i]=w.exports.useState(!1),[o,s]=w.exports.useState(!1),a=()=>{n(!1)},u=()=>{n(!0),i(!0)},d=!0;return t?$e("div",{className:"flex flex-row flex-0 gap-2 border-t-[1px] border-b-[1px]",children:[I($n,{type:"default",onClick:a,children:"\u041E\u0442\u043C\u0435\u043D\u0430"}),I($n,{type:"primary",className:"flex-1",onClick:()=>s(!0),children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u0431\u0430\u0437\u0443"}),r&&I(_4e,{isOpened:r,onClose:()=>i(!1)}),o&&I(y4e,{isOpened:o,onClose:()=>s(!1)})]}):e===Gr.PENDING&&d&&I("div",{className:"flex flex-col flex-0 border-t-[1px] border-b-[1px]",children:$e($n,{type:"default",onClick:u,children:[I(Vwe,{}),"\u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C"]})})},C4e=w.exports.forwardRef(({isCollapsed:e},t)=>{const{mode:n}=Do(),r=()=>n===Gr.PENDING?I(o4e,{}):n===Gr.ON_APPROVAL?I(c4e,{}):I(v4e,{});return $e("div",{className:da("h-screen p-3 overflow-y-auto shrink-0 border-solid border-border border-0 border-r-[1px] flex flex-col transition-all pt-20",e?"basis-0 px-0 -translate-x-[320px]":"basis-[320px]"),ref:t,children:[I(w4e,{}),I("div",{className:"flex flex-col flex-1",children:r()})]})}),S4e=e=>({clickedPointConfig:null,setClickedPointConfig:(t,n=!1)=>{e(r=>{if(t===null)return r.clickedPointConfig=null,r;r.clickedPointConfig={id:t,shouldSelect:n}})}}),Su=Sl(El(S4e)),E4e=e=>({popup:null,setPopup:t=>{e(n=>{if(!t)return n.popup=null,n;n.popup=t})}}),Sf=Sl(El(E4e)),op=30,kT=e=>{Qz("postamates.xlsx",e)},P4e=({provider:e})=>{const[t,n]=w.exports.useState(!1);return e(t,()=>n(!1)),I($i,{title:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435",children:I($n,{onClick:i=>{i.stopPropagation(),n(!0)},loading:t,disabled:t,children:I(Awe,{})})})},I4e={isOpened:!1,fullScreen:!1},T4e=e=>({tableState:I4e,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})}}),s0=Sl(El(T4e));function hj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,eb(e,t)}function aa(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 wN=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),c2=function(){return Math.random().toString(36).substring(7).split("").join(".")},CN={INIT:"@@redux/INIT"+c2(),REPLACE:"@@redux/REPLACE"+c2(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c2()}};function k4e(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 pj(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(aa(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(aa(1));return n(pj)(e,t)}if(typeof e!="function")throw new Error(aa(2));var i=e,o=t,s=[],a=s,u=!1;function d(){a===s&&(a=s.slice())}function p(){if(u)throw new Error(aa(3));return o}function m(P){if(typeof P!="function")throw new Error(aa(4));if(u)throw new Error(aa(5));var k=!0;return d(),a.push(P),function(){if(!!k){if(u)throw new Error(aa(6));k=!1,d();var M=a.indexOf(P);a.splice(M,1),s=null}}}function v(P){if(!k4e(P))throw new Error(aa(7));if(typeof P.type>"u")throw new Error(aa(8));if(u)throw new Error(aa(9));try{u=!0,o=i(o,P)}finally{u=!1}for(var k=s=a,T=0;T<k.length;T++){var M=k[T];M()}return P}function x(P){if(typeof P!="function")throw new Error(aa(10));i=P,v({type:CN.REPLACE})}function _(){var P,k=m;return P={subscribe:function(M){if(typeof M!="object"||M===null)throw new Error(aa(11));function O(){M.next&&M.next(p())}O();var N=k(O);return{unsubscribe:N}}},P[wN]=function(){return this},P}return v({type:CN.INIT}),r={dispatch:v,subscribe:m,getState:p,replaceReducer:x},r[wN]=_,r}function SN(e,t){return function(){return t(e.apply(this,arguments))}}function EN(e,t){if(typeof e=="function")return SN(e,t);if(typeof e!="object"||e===null)throw new Error(aa(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=SN(i,t))}return n}function mj(){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 M4e(){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),o=function(){throw new Error(aa(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(u){return u(s)});return o=mj.apply(void 0,a)(i.dispatch),fe(fe({},i),{},{dispatch:o})}}}var gj=Un.createContext(null);function R4e(e){e()}var vj=R4e,A4e=function(t){return vj=t},D4e=function(){return vj};function O4e(){var e=D4e(),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=[],o=t;o;)i.push(o),o=o.next;return i},subscribe:function(i){var o=!0,s=n={callback:i,next:null,prev:n};return s.prev?s.prev.next=s:t=s,function(){!o||t===null||(o=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}var PN={notify:function(){},get:function(){return[]}};function yj(e,t){var n,r=PN;function i(m){return u(),r.subscribe(m)}function o(){r.notify()}function s(){p.onStateChange&&p.onStateChange()}function a(){return Boolean(n)}function u(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=O4e())}function d(){n&&(n(),n=void 0,r.clear(),r=PN)}var p={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:u,tryUnsubscribe:d,getListeners:function(){return r}};return p}var xj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.exports.useLayoutEffect:w.exports.useEffect;function N4e(e){var t=e.store,n=e.context,r=e.children,i=w.exports.useMemo(function(){var a=yj(t);return{store:t,subscription:a}},[t]),o=w.exports.useMemo(function(){return t.getState()},[t]);xj(function(){var a=i.subscription;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==t.getState()&&a.notifyNestedSubs(),function(){a.tryUnsubscribe(),a.onStateChange=null}},[i,o]);var s=n||gj;return I(s.Provider,{value:i,children:r})}var MT=y_.exports,L4e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},F4e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},z4e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bj={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},RT={};RT[MT.ForwardRef]=z4e;RT[MT.Memo]=bj;function IN(e){return MT.isMemo(e)?bj:RT[e.$$typeof]||L4e}var $4e=Object.defineProperty,B4e=Object.getOwnPropertyNames,TN=Object.getOwnPropertySymbols,V4e=Object.getOwnPropertyDescriptor,U4e=Object.getPrototypeOf,kN=Object.prototype;function _j(e,t,n){if(typeof t!="string"){if(kN){var r=U4e(t);r&&r!==kN&&_j(e,r,n)}var i=B4e(t);TN&&(i=i.concat(TN(t)));for(var o=IN(e),s=IN(t),a=0;a<i.length;++a){var u=i[a];if(!F4e[u]&&!(n&&n[u])&&!(s&&s[u])&&!(o&&o[u])){var d=V4e(t,u);try{$4e(e,u,d)}catch{}}}}return e}var MN=_j,wj={exports:{}},qr={};/** @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 pw=60103,mw=60106,l0=60107,u0=60108,c0=60114,d0=60109,f0=60110,h0=60112,p0=60113,AT=60120,m0=60115,g0=60116,Cj=60121,Sj=60122,Ej=60117,Pj=60129,Ij=60131;if(typeof Symbol=="function"&&Symbol.for){var fo=Symbol.for;pw=fo("react.element"),mw=fo("react.portal"),l0=fo("react.fragment"),u0=fo("react.strict_mode"),c0=fo("react.profiler"),d0=fo("react.provider"),f0=fo("react.context"),h0=fo("react.forward_ref"),p0=fo("react.suspense"),AT=fo("react.suspense_list"),m0=fo("react.memo"),g0=fo("react.lazy"),Cj=fo("react.block"),Sj=fo("react.server.block"),Ej=fo("react.fundamental"),Pj=fo("react.debug_trace_mode"),Ij=fo("react.legacy_hidden")}function Ws(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pw:switch(e=e.type,e){case l0:case c0:case u0:case p0:case AT:return e;default:switch(e=e&&e.$$typeof,e){case f0:case h0:case g0:case m0:case d0:return e;default:return t}}case mw:return t}}}var j4e=d0,H4e=pw,K4e=h0,W4e=l0,G4e=g0,q4e=m0,Z4e=mw,X4e=c0,Y4e=u0,Q4e=p0;qr.ContextConsumer=f0;qr.ContextProvider=j4e;qr.Element=H4e;qr.ForwardRef=K4e;qr.Fragment=W4e;qr.Lazy=G4e;qr.Memo=q4e;qr.Portal=Z4e;qr.Profiler=X4e;qr.StrictMode=Y4e;qr.Suspense=Q4e;qr.isAsyncMode=function(){return!1};qr.isConcurrentMode=function(){return!1};qr.isContextConsumer=function(e){return Ws(e)===f0};qr.isContextProvider=function(e){return Ws(e)===d0};qr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pw};qr.isForwardRef=function(e){return Ws(e)===h0};qr.isFragment=function(e){return Ws(e)===l0};qr.isLazy=function(e){return Ws(e)===g0};qr.isMemo=function(e){return Ws(e)===m0};qr.isPortal=function(e){return Ws(e)===mw};qr.isProfiler=function(e){return Ws(e)===c0};qr.isStrictMode=function(e){return Ws(e)===u0};qr.isSuspense=function(e){return Ws(e)===p0};qr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===l0||e===c0||e===Pj||e===u0||e===p0||e===AT||e===Ij||typeof e=="object"&&e!==null&&(e.$$typeof===g0||e.$$typeof===m0||e.$$typeof===d0||e.$$typeof===f0||e.$$typeof===h0||e.$$typeof===Ej||e.$$typeof===Cj||e[0]===Sj)};qr.typeOf=Ws;(function(e){e.exports=qr})(wj);var J4e=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],eCe=["reactReduxForwardedRef"],tCe=[],nCe=[null,null];function rCe(e,t){var n=e[1];return[t.payload,n+1]}function RN(e,t,n){xj(function(){return e.apply(void 0,t)},n)}function iCe(e,t,n,r,i,o,s){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,s())}function oCe(e,t,n,r,i,o,s,a,u,d){if(!!e){var p=!1,m=null,v=function(){if(!p){var P=t.getState(),k,T;try{k=r(P,i.current)}catch(M){T=M,m=M}T||(m=null),k===o.current?s.current||u():(o.current=k,a.current=k,s.current=!0,d({type:"STORE_UPDATED",payload:{error:T}}))}};n.onStateChange=v,n.trySubscribe(),v();var x=function(){if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,m)throw m};return x}}var aCe=function(){return[null,0]};function sCe(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,i=r===void 0?function(O){return"ConnectAdvanced("+O+")"}:r,o=n.methodName,s=o===void 0?"connectAdvanced":o,a=n.renderCountProp,u=a===void 0?void 0:a,d=n.shouldHandleStateChanges,p=d===void 0?!0:d,m=n.storeKey,v=m===void 0?"store":m;n.withRef;var x=n.forwardRef,_=x===void 0?!1:x,P=n.context,k=P===void 0?gj:P,T=uv(n,J4e),M=k;return function(N){var L=N.displayName||N.name||"Component",F=i(L),V=ze({},T,{getDisplayName:i,methodName:s,renderCountProp:u,shouldHandleStateChanges:p,storeKey:v,displayName:F,wrappedComponentName:L,WrappedComponent:N}),B=T.pure;function H(Q){return e(Q.dispatch,V)}var G=B?w.exports.useMemo:function(Q){return Q()};function ee(Q){var le=w.exports.useMemo(function(){var rt=Q.reactReduxForwardedRef,ut=uv(Q,eCe);return[Q.context,rt,ut]},[Q]),ne=le[0],se=le[1],oe=le[2],he=w.exports.useMemo(function(){return ne&&ne.Consumer&&wj.exports.isContextConsumer(Un.createElement(ne.Consumer,null))?ne:M},[ne,M]),_e=w.exports.useContext(he),be=Boolean(Q.store)&&Boolean(Q.store.getState)&&Boolean(Q.store.dispatch);Boolean(_e)&&Boolean(_e.store);var xe=be?Q.store:_e.store,Te=w.exports.useMemo(function(){return H(xe)},[xe]),Ee=w.exports.useMemo(function(){if(!p)return nCe;var rt=yj(xe,be?null:_e.subscription),ut=rt.notifyNestedSubs.bind(rt);return[rt,ut]},[xe,be,_e]),Ce=Ee[0],ke=Ee[1],De=w.exports.useMemo(function(){return be?_e:ze({},_e,{subscription:Ce})},[be,_e,Ce]),Ke=w.exports.useReducer(rCe,tCe,aCe),Ue=Ke[0],tt=Ue[0],lt=Ke[1];if(tt&&tt.error)throw tt.error;var St=w.exports.useRef(),We=w.exports.useRef(oe),bt=w.exports.useRef(),Qe=w.exports.useRef(!1),mt=G(function(){return bt.current&&oe===We.current?bt.current:Te(xe.getState(),oe)},[xe,tt,oe]);RN(iCe,[We,St,Qe,oe,mt,bt,ke]),RN(oCe,[p,xe,Ce,Te,We,St,Qe,bt,ke,lt],[xe,Ce,Te]);var ct=w.exports.useMemo(function(){return I(N,{...mt,ref:se})},[se,N,mt]),wt=w.exports.useMemo(function(){return p?I(he.Provider,{value:De,children:ct}):ct},[he,ct,De]);return wt}var X=B?Un.memo(ee):ee;if(X.WrappedComponent=N,X.displayName=ee.displayName=F,_){var Z=Un.forwardRef(function(le,ne){return I(X,{...le,reactReduxForwardedRef:ne})});return Z.displayName=F,Z.WrappedComponent=N,MN(Z,N)}return MN(X,N)}}function AN(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function d2(e,t){if(AN(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])||!AN(e[n[i]],t[n[i]]))return!1;return!0}function lCe(e,t){var n={},r=function(s){var a=e[s];typeof a=="function"&&(n[s]=function(){return t(a.apply(void 0,arguments))})};for(var i in e)r(i);return n}function DT(e){return function(n,r){var i=e(n,r);function o(){return i}return o.dependsOnOwnProps=!1,o}}function DN(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?Boolean(e.dependsOnOwnProps):e.length!==1}function Tj(e,t){return function(r,i){i.displayName;var o=function(a,u){return o.dependsOnOwnProps?o.mapToProps(a,u):o.mapToProps(a)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,u){o.mapToProps=e,o.dependsOnOwnProps=DN(e);var d=o(a,u);return typeof d=="function"&&(o.mapToProps=d,o.dependsOnOwnProps=DN(d),d=o(a,u)),d},o}}function uCe(e){return typeof e=="function"?Tj(e):void 0}function cCe(e){return e?void 0:DT(function(t){return{dispatch:t}})}function dCe(e){return e&&typeof e=="object"?DT(function(t){return lCe(e,t)}):void 0}const fCe=[uCe,cCe,dCe];function hCe(e){return typeof e=="function"?Tj(e):void 0}function pCe(e){return e?void 0:DT(function(){return{}})}const mCe=[hCe,pCe];function gCe(e,t,n){return ze({},n,e,t)}function vCe(e){return function(n,r){r.displayName;var i=r.pure,o=r.areMergedPropsEqual,s=!1,a;return function(d,p,m){var v=e(d,p,m);return s?(!i||!o(v,a))&&(a=v):(s=!0,a=v),a}}}function yCe(e){return typeof e=="function"?vCe(e):void 0}function xCe(e){return e?void 0:function(){return gCe}}const bCe=[yCe,xCe];var _Ce=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function wCe(e,t,n,r){return function(o,s){return n(e(o,s),t(r,s),s)}}function CCe(e,t,n,r,i){var o=i.areStatesEqual,s=i.areOwnPropsEqual,a=i.areStatePropsEqual,u=!1,d,p,m,v,x;function _(O,N){return d=O,p=N,m=e(d,p),v=t(r,p),x=n(m,v,p),u=!0,x}function P(){return m=e(d,p),t.dependsOnOwnProps&&(v=t(r,p)),x=n(m,v,p),x}function k(){return e.dependsOnOwnProps&&(m=e(d,p)),t.dependsOnOwnProps&&(v=t(r,p)),x=n(m,v,p),x}function T(){var O=e(d,p),N=!a(O,m);return m=O,N&&(x=n(m,v,p)),x}function M(O,N){var L=!s(N,p),F=!o(O,d,N,p);return d=O,p=N,L&&F?P():L?k():F?T():x}return function(N,L){return u?M(N,L):_(N,L)}}function SCe(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=uv(t,_Ce),s=n(e,o),a=r(e,o),u=i(e,o),d=o.pure?CCe:wCe;return d(s,a,u,e,o)}var ECe=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function f2(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function PCe(e,t){return e===t}function ICe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?sCe:n,i=t.mapStateToPropsFactories,o=i===void 0?mCe:i,s=t.mapDispatchToPropsFactories,a=s===void 0?fCe:s,u=t.mergePropsFactories,d=u===void 0?bCe:u,p=t.selectorFactory,m=p===void 0?SCe:p;return function(x,_,P,k){k===void 0&&(k={});var T=k,M=T.pure,O=M===void 0?!0:M,N=T.areStatesEqual,L=N===void 0?PCe:N,F=T.areOwnPropsEqual,V=F===void 0?d2:F,B=T.areStatePropsEqual,H=B===void 0?d2:B,G=T.areMergedPropsEqual,ee=G===void 0?d2:G,X=uv(T,ECe),Z=f2(x,o,"mapStateToProps"),Q=f2(_,a,"mapDispatchToProps"),le=f2(P,d,"mergeProps");return r(m,ze({methodName:"connect",getDisplayName:function(se){return"Connect("+se+")"},shouldHandleStateChanges:Boolean(x),initMapStateToProps:Z,initMapDispatchToProps:Q,initMergeProps:le,pure:O,areStatesEqual:L,areOwnPropsEqual:V,areStatePropsEqual:H,areMergedPropsEqual:ee},X))}}const kj=ICe();A4e(Cl.exports.unstable_batchedUpdates);function TCe(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 Mj(e,t){var n=w.exports.useState(function(){return{inputs:t,result:e()}})[0],r=w.exports.useRef(!0),i=w.exports.useRef(n),o=r.current||Boolean(t&&i.current.inputs&&TCe(t,i.current.inputs)),s=o?i.current:{inputs:t,result:e()};return w.exports.useEffect(function(){r.current=!1,i.current=s},[s]),s.result}function kCe(e,t){return Mj(function(){return e},t)}var br=Mj,Ln=kCe,MCe=!0,h2="Invariant failed";function RCe(e,t){if(!e){if(MCe)throw new Error(h2);var n=typeof t=="function"?t():t,r=n?"".concat(h2,": ").concat(n):h2;throw new Error(r)}}var zs=function(t){var n=t.top,r=t.right,i=t.bottom,o=t.left,s=r-o,a=i-n,u={top:n,right:r,bottom:i,left:o,width:s,height:a,x:o,y:n,center:{x:(r+o)/2,y:(i+n)/2}};return u},OT=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},ON=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},ACe=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},p2={top:0,right:0,bottom:0,left:0},NT=function(t){var n=t.borderBox,r=t.margin,i=r===void 0?p2:r,o=t.border,s=o===void 0?p2:o,a=t.padding,u=a===void 0?p2:a,d=zs(OT(n,i)),p=zs(ON(n,s)),m=zs(ON(p,u));return{marginBox:d,borderBox:zs(n),paddingBox:p,contentBox:m,margin:i,border:s,padding:u}},Ja=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var i=Number(n);return isNaN(i)&&RCe(!1),i},DCe=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Pb=function(t,n){var r=t.borderBox,i=t.border,o=t.margin,s=t.padding,a=ACe(r,n);return NT({borderBox:a,border:i,margin:o,padding:s})},Ib=function(t,n){return n===void 0&&(n=DCe()),Pb(t,n)},Rj=function(t,n){var r={top:Ja(n.marginTop),right:Ja(n.marginRight),bottom:Ja(n.marginBottom),left:Ja(n.marginLeft)},i={top:Ja(n.paddingTop),right:Ja(n.paddingRight),bottom:Ja(n.paddingBottom),left:Ja(n.paddingLeft)},o={top:Ja(n.borderTopWidth),right:Ja(n.borderRightWidth),bottom:Ja(n.borderBottomWidth),left:Ja(n.borderLeftWidth)};return NT({borderBox:t,margin:r,padding:i,border:o})},Aj=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return Rj(n,r)},NN=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function OCe(e,t){return!!(e===t||NN(e)&&NN(t))}function NCe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!OCe(e[n],t[n]))return!1;return!0}function oo(e,t){t===void 0&&(t=NCe);var n,r=[],i,o=!1;function s(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return o&&n===this&&t(a,r)||(i=e.apply(this,a),o=!0,n=this,r=a),i}return s}var LCe=function(t){var n=[],r=null,i=function(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];n=a,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){!r||(cancelAnimationFrame(r),r=null)},i};const yv=LCe;function Dj(e,t){}Dj.bind(null,"warn");Dj.bind(null,"error");function _c(){}function FCe(e,t){return ze({},e,{},t)}function ss(e,t,n){var r=t.map(function(i){var o=FCe(n,i.options);return e.addEventListener(i.eventName,i.fn,o),function(){e.removeEventListener(i.eventName,i.fn,o)}});return function(){r.forEach(function(o){o()})}}var zCe="Invariant failed";function Tb(e){this.message=e}Tb.prototype.toString=function(){return this.message};function ln(e,t){if(!e)throw new Tb(zCe)}var $Ce=function(e){hj(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.callbacks=null,r.unbind=_c,r.onWindowError=function(a){var u=r.getCallbacks();u.isDragging()&&u.tryAbort();var d=a.error;d instanceof Tb&&a.preventDefault()},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(a){r.callbacks=a},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=ss(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof Tb){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(Un.Component),BCe=`
|
|
|
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
|
|
|
`,kb=function(t){return t+1},VCe=function(t){return`
|
|
|
You have lifted an item in position `+kb(t.source.index)+`
|
|
|
`},Oj=function(t,n){var r=t.droppableId===n.droppableId,i=kb(t.index),o=kb(n.index);return r?`
|
|
|
You have moved the item from position `+i+`
|
|
|
to position `+o+`
|
|
|
`:`
|
|
|
You have moved the item from position `+i+`
|
|
|
in list `+t.droppableId+`
|
|
|
to list `+n.droppableId+`
|
|
|
in position `+o+`
|
|
|
`},Nj=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+`
|
|
|
`},UCe=function(t){var n=t.destination;if(n)return Oj(t.source,n);var r=t.combine;return r?Nj(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},LN=function(t){return`
|
|
|
The item has returned to its starting position
|
|
|
of `+kb(t.index)+`
|
|
|
`},jCe=function(t){if(t.reason==="CANCEL")return`
|
|
|
Movement cancelled.
|
|
|
`+LN(t.source)+`
|
|
|
`;var n=t.destination,r=t.combine;return n?`
|
|
|
You have dropped the item.
|
|
|
`+Oj(t.source,n)+`
|
|
|
`:r?`
|
|
|
You have dropped the item.
|
|
|
`+Nj(t.draggableId,t.source,r)+`
|
|
|
`:`
|
|
|
The item has been dropped while not over a drop area.
|
|
|
`+LN(t.source)+`
|
|
|
`},c1={dragHandleUsageInstructions:BCe,onDragStart:VCe,onDragUpdate:UCe,onDragEnd:jCe},ao={x:0,y:0},po=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Ra=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},wc=function(t,n){return t.x===n.x&&t.y===n.y},Ap=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},sf=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},xv=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},FN=function(t,n){return Math.min.apply(Math,n.map(function(r){return xv(t,r)}))},Lj=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},HCe=function(e,t){var n=zs({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},v0=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},zN=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}]},KCe={top:0,right:0,bottom:0,left:0},WCe=function(t,n){return n?v0(t,n.scroll.diff.displacement):t},GCe=function(t,n,r){if(r&&r.increasedBy){var i;return ze({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},qCe=function(t,n){return n&&n.shouldClipSubject?HCe(n.pageMarginBox,t):zs(t)},ap=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=WCe(t.marginBox,i),s=GCe(o,r,n),a=qCe(s,i);return{page:t,withPlaceholder:n,active:a}},LT=function(e,t){e.frame||ln(!1);var n=e.frame,r=Ra(t,n.scroll.initial),i=Ap(r),o=ze({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=ap({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),a=ze({},e,{frame:o,subject:s});return a};function Mb(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function FT(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 Bc(e,t){if(e.find)return e.find(t);var n=FT(e,t);if(n!==-1)return e[n]}function Fj(e){return Array.prototype.slice.call(e)}var zj=oo(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),$j=oo(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),gw=oo(function(e){return Mb(e)}),ZCe=oo(function(e){return Mb(e)}),Dp=oo(function(e,t){var n=ZCe(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,i){return r.descriptor.index-i.descriptor.index});return n});function zT(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function vw(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var yw=oo(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),XCe=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;var s=zT(o);if(!s)return null;function a(P){var k={type:"COMBINE",combine:{draggableId:P,droppableId:r.descriptor.id}};return ze({},o,{at:k})}var u=o.displaced.all,d=u.length?u[0]:null;if(t)return d?a(d):null;var p=yw(n,i);if(!d){if(!p.length)return null;var m=p[p.length-1];return a(m.descriptor.id)}var v=FT(p,function(P){return P.descriptor.id===d});v===-1&&ln(!1);var x=v-1;if(x<0)return null;var _=p[x];return a(_.descriptor.id)},Op=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Bj={point:ao,value:0},bv={invisible:{},visible:{},all:[]},YCe={displaced:bv,displacedBy:Bj,at:null},cs=function(e,t){return function(n){return e<=n&&n<=t}},Vj=function(e){var t=cs(e.top,e.bottom),n=cs(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 o=t(r.top)||t(r.bottom),s=n(r.left)||n(r.right),a=o&&s;if(a)return!0;var u=r.top<e.top&&r.bottom>e.bottom,d=r.left<e.left&&r.right>e.right,p=u&&d;if(p)return!0;var m=u&&s||d&&o;return m}},QCe=function(e){var t=cs(e.top,e.bottom),n=cs(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},$T={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Uj={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},JCe=function(e){return function(t){var n=cs(t.top,t.bottom),r=cs(t.left,t.right);return function(i){return e===$T?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},e2e=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:ao;return v0(t,r)},t2e=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},n2e=function(t,n,r){return r(n)(t)},BT=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,a=o?e2e(n,r):n;return t2e(a,r,s)&&n2e(a,i,s)},r2e=function(t){return BT(ze({},t,{isVisibleThroughFrameFn:Vj}))},jj=function(t){return BT(ze({},t,{isVisibleThroughFrameFn:QCe}))},i2e=function(t){return BT(ze({},t,{isVisibleThroughFrameFn:JCe(t.destination.axis)}))},o2e=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[t])return!1;var s=o[t];return s?s.shouldAnimate:!0};function a2e(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return zs(OT(n,r))}function _v(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(u,d){var p=a2e(d,r),m=d.descriptor.id;u.all.push(m);var v=r2e({target:p,destination:n,viewport:i,withDroppableDisplacement:!0});if(!v)return u.invisible[d.descriptor.id]=!0,u;var x=o2e(m,s,o),_={draggableId:m,shouldAnimate:x};return u.visible[m]=_,u},{all:[],visible:{},invisible:{}})}function s2e(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function $N(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=s2e(t,{inHomeList:n});return{displaced:bv,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Rb(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,a=e.index,u=e.forceShouldAnimate,d=Op(t,r);if(a==null)return $N({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var p=Bc(n,function(P){return P.descriptor.index===a});if(!p)return $N({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var m=yw(t,n),v=n.indexOf(p),x=m.slice(v),_=_v({afterDragging:x,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:u});return{displaced:_,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function Ac(e,t){return Boolean(t.effected[e])}var l2e=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,a=r[s],u=a.descriptor.index,d=Ac(s,o);return d?t?u:u-1:t?u+1:u},u2e=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,a=r[0].descriptor.index,u=r[r.length-1].descriptor.index,d=n?u:u+1;return s<a||s>d?null:s},c2e=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,a=e.previousImpact,u=e.viewport,d=e.afterCritical,p=a.at;if(p||ln(!1),p.type==="REORDER"){var m=u2e({isMovingForward:t,isInHomeList:n,location:p.destination,insideDestination:s});return m==null?null:Rb({draggable:r,insideDestination:s,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:m})}var v=l2e({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:p.combine,afterCritical:d});return v==null?null:Rb({draggable:r,insideDestination:s,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:v})},d2e=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return Ac(r,n)?o?ao:Ap(i.point):o?i.point:ao},f2e=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=vw(n);i||ln(!1);var o=i.draggableId,s=r[o].page.borderBox.center,a=d2e({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return po(s,a)},Hj=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},h2e=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},VT=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},BN=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return sf(n.line,r.marginBox[n.end]+Hj(n,i),VT(n,r.marginBox,i))},VN=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return sf(n.line,r.marginBox[n.start]-h2e(n,i),VT(n,r.marginBox,i))},p2e=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return sf(n.line,r.contentBox[n.start]+Hj(n,i),VT(n,r.contentBox,i))},m2e=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=Dp(i.descriptor.id,r),a=n.page,u=i.axis;if(!s.length)return p2e({axis:u,moveInto:i.page,isMoving:a});var d=t.displaced,p=t.displacedBy,m=d.all[0];if(m){var v=r[m];if(Ac(m,o))return VN({axis:u,moveRelativeTo:v.page,isMoving:a});var x=Pb(v.page,p.point);return VN({axis:u,moveRelativeTo:x,isMoving:a})}var _=s[s.length-1];if(_.descriptor.id===n.descriptor.id)return a.borderBox.center;if(Ac(_.descriptor.id,o)){var P=Pb(_.page,Ap(o.displacedBy.point));return BN({axis:u,moveRelativeTo:P,isMoving:a})}return BN({axis:u,moveRelativeTo:_.page,isMoving:a})},vE=function(e,t){var n=e.frame;return n?po(t,n.scroll.diff.displacement):t},g2e=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,a=r.page.borderBox.center,u=n.at;return!i||!u?a:u.type==="REORDER"?m2e({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):f2e({impact:n,draggables:o,afterCritical:s})},xw=function(e){var t=g2e(e),n=e.droppable,r=n?vE(n,t):t;return r},Kj=function(e,t){var n=Ra(t,e.scroll.initial),r=Ap(n),i=zs({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function UN(e,t){return e.map(function(n){return t[n]})}function v2e(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var y2e=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,s=Kj(n,po(n.scroll.current,o)),a=r.frame?LT(r,po(r.frame.scroll.current,o)):r,u=t.displaced,d=_v({afterDragging:UN(u.all,i),destination:r,displacedBy:t.displacedBy,viewport:s.frame,last:u,forceShouldAnimate:!1}),p=_v({afterDragging:UN(u.all,i),destination:a,displacedBy:t.displacedBy,viewport:n.frame,last:u,forceShouldAnimate:!1}),m={},v={},x=[u,d,p];u.all.forEach(function(P){var k=v2e(P,x);if(k){v[P]=k;return}m[P]=!0});var _=ze({},t,{displaced:{all:u.all,invisible:m,visible:v}});return _},x2e=function(e,t){return po(e.scroll.diff.displacement,t)},UT=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,i=x2e(r,t),o=Ra(i,n.page.borderBox.center);return po(n.client.borderBox.center,o)},Wj=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,s=e.onlyOnMainAxis,a=s===void 0?!1:s,u=Ra(r,t.page.borderBox.center),d=v0(t.page.borderBox,u),p={target:d,destination:n,withDroppableDisplacement:o,viewport:i};return a?i2e(p):jj(p)},b2e=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,s=e.viewport,a=e.previousPageBorderBoxCenter,u=e.previousClientSelection,d=e.afterCritical;if(!r.isEnabled)return null;var p=Dp(r.descriptor.id,i),m=Op(n,r),v=XCe({isMovingForward:t,draggable:n,destination:r,insideDestination:p,previousImpact:o})||c2e({isMovingForward:t,isInHomeList:m,draggable:n,draggables:i,destination:r,insideDestination:p,previousImpact:o,viewport:s,afterCritical:d});if(!v)return null;var x=xw({impact:v,draggable:n,droppable:r,draggables:i,afterCritical:d}),_=Wj({draggable:n,destination:r,newPageBorderBoxCenter:x,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(_){var P=UT({pageBorderBoxCenter:x,draggable:n,viewport:s});return{clientSelection:P,impact:v,scrollJumpRequest:null}}var k=Ra(x,a),T=y2e({impact:v,viewport:s,destination:r,draggables:i,maxScrollChange:k});return{clientSelection:u,impact:T,scrollJumpRequest:k}},jo=function(t){var n=t.subject.active;return n||ln(!1),n},_2e=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,s=r.subject.active;if(!s)return null;var a=r.axis,u=cs(s[a.start],s[a.end]),d=gw(i).filter(function(m){return m!==r}).filter(function(m){return m.isEnabled}).filter(function(m){return Boolean(m.subject.active)}).filter(function(m){return Vj(o.frame)(jo(m))}).filter(function(m){var v=jo(m);return t?s[a.crossAxisEnd]<v[a.crossAxisEnd]:v[a.crossAxisStart]<s[a.crossAxisStart]}).filter(function(m){var v=jo(m),x=cs(v[a.start],v[a.end]);return u(v[a.start])||u(v[a.end])||x(s[a.start])||x(s[a.end])}).sort(function(m,v){var x=jo(m)[a.crossAxisStart],_=jo(v)[a.crossAxisStart];return t?x-_:_-x}).filter(function(m,v,x){return jo(m)[a.crossAxisStart]===jo(x[0])[a.crossAxisStart]});if(!d.length)return null;if(d.length===1)return d[0];var p=d.filter(function(m){var v=cs(jo(m)[a.start],jo(m)[a.end]);return v(n[a.line])});return p.length===1?p[0]:p.length>1?p.sort(function(m,v){return jo(m)[a.start]-jo(v)[a.start]})[0]:d.sort(function(m,v){var x=FN(n,zN(jo(m))),_=FN(n,zN(jo(v)));return x!==_?x-_:jo(m)[a.start]-jo(v)[a.start]})[0]},jN=function(t,n){var r=t.page.borderBox.center;return Ac(t.descriptor.id,n)?Ra(r,n.displacedBy.point):r},w2e=function(t,n){var r=t.page.borderBox;return Ac(t.descriptor.id,n)?v0(r,Ap(n.displacedBy.point)):r},C2e=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(a){return jj({target:w2e(a,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(a,u){var d=xv(t,vE(r,jN(a,o))),p=xv(t,vE(r,jN(u,o)));return d<p?-1:p<d?1:a.descriptor.index-u.descriptor.index});return s[0]||null},y0=oo(function(t,n){var r=n[t.line];return{value:r,point:sf(t.line,r)}}),S2e=function(t,n,r){var i=t.axis;if(t.descriptor.mode==="virtual")return sf(i.line,n[i.line]);var o=t.subject.page.contentBox[i.size],s=Dp(t.descriptor.id,r),a=s.reduce(function(p,m){return p+m.client.marginBox[i.size]},0),u=a+n[i.line],d=u-o;return d<=0?null:sf(i.line,d)},Gj=function(t,n){return ze({},t,{scroll:ze({},t.scroll,{max:n})})},qj=function(t,n,r){var i=t.frame;Op(n,t)&&ln(!1),t.subject.withPlaceholder&&ln(!1);var o=y0(t.axis,n.displaceBy).point,s=S2e(t,o,r),a={placeholderSize:o,increasedBy:s,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!i){var u=ap({page:t.subject.page,withPlaceholder:a,axis:t.axis,frame:t.frame});return ze({},t,{subject:u})}var d=s?po(i.scroll.max,s):i.scroll.max,p=Gj(i,d),m=ap({page:t.subject.page,withPlaceholder:a,axis:t.axis,frame:p});return ze({},t,{subject:m,frame:p})},E2e=function(t){var n=t.subject.withPlaceholder;n||ln(!1);var r=t.frame;if(!r){var i=ap({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ze({},t,{subject:i})}var o=n.oldFrameMaxScroll;o||ln(!1);var s=Gj(r,o),a=ap({page:t.subject.page,axis:t.axis,frame:s,withPlaceholder:null});return ze({},t,{subject:a,frame:s})},P2e=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,s=e.destination,a=e.viewport,u=e.afterCritical;if(!n){if(r.length)return null;var d={displaced:bv,displacedBy:Bj,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},p=xw({impact:d,draggable:i,droppable:s,draggables:o,afterCritical:u}),m=Op(i,s)?s:qj(s,i,o),v=Wj({draggable:i,destination:m,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return v?d:null}var x=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||x?k:k+1}(),P=y0(s.axis,i.displaceBy);return Rb({draggable:i,insideDestination:r,destination:s,viewport:a,displacedBy:P,last:bv,index:_})},I2e=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,s=e.droppables,a=e.viewport,u=e.afterCritical,d=_2e({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:s,viewport:a});if(!d)return null;var p=Dp(d.descriptor.id,o),m=C2e({pageBorderBoxCenter:n,viewport:a,destination:d,insideDestination:p,afterCritical:u}),v=P2e({previousPageBorderBoxCenter:n,destination:d,draggable:r,draggables:o,moveRelativeTo:m,insideDestination:p,viewport:a,afterCritical:u});if(!v)return null;var x=xw({impact:v,draggable:r,droppable:d,draggables:o,afterCritical:u}),_=UT({pageBorderBoxCenter:x,draggable:r,viewport:a});return{clientSelection:_,impact:v,scrollJumpRequest:null}},Na=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},T2e=function(t,n){var r=Na(t);return r?n[r]:null},k2e=function(e){var t=e.state,n=e.type,r=T2e(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],s=r||o,a=s.axis.direction,u=a==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||a==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(u&&!i)return null;var d=n==="MOVE_DOWN"||n==="MOVE_RIGHT",p=t.dimensions.draggables[t.critical.draggable.id],m=t.current.page.borderBoxCenter,v=t.dimensions,x=v.draggables,_=v.droppables;return u?b2e({isMovingForward:d,previousPageBorderBoxCenter:m,draggable:p,destination:s,draggables:x,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):I2e({isMovingForward:d,previousPageBorderBoxCenter:m,draggable:p,isOver:s,draggables:x,droppables:_,viewport:t.viewport,afterCritical:t.afterCritical})};function Pd(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Zj(e){var t=cs(e.top,e.bottom),n=cs(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function M2e(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function R2e(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var a=s.axis,u=sf(s.axis.line,t.center[a.line],s.page.borderBox.center[a.crossAxisLine]);return{id:s.descriptor.id,distance:xv(i,u)}}).sort(function(s,a){return a.distance-s.distance});return o[0]?o[0].id:null}function A2e(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=gw(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!M2e(t,s))return!1;if(Zj(s)(t.center))return!0;var a=o.axis,u=s.center[a.crossAxisLine],d=t[a.crossAxisStart],p=t[a.crossAxisEnd],m=cs(s[a.crossAxisStart],s[a.crossAxisEnd]),v=m(d),x=m(p);return!v&&!x?!0:v?d<u:p>u});return i.length?i.length===1?i[0].descriptor.id:R2e({pageBorderBox:t,draggable:n,candidates:i}):null}var Xj=function(t,n){return zs(v0(t,n))},D2e=function(e,t){var n=e.frame;return n?Xj(t,n.scroll.diff.value):t};function Yj(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}function O2e(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 N2e=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,a=e.afterCritical,u=r.axis,d=y0(r.axis,n.displaceBy),p=d.value,m=t[u.start],v=t[u.end],x=yw(n,i),_=Bc(x,function(k){var T=k.descriptor.id,M=k.page.borderBox.center[u.line],O=Ac(T,a),N=Yj({displaced:o,id:T});return O?N?v<=M:m<M-p:N?v<=M+p:m<M}),P=O2e({draggable:n,closest:_,inHomeList:Op(n,r)});return Rb({draggable:n,insideDestination:i,destination:r,viewport:s,last:o,displacedBy:d,index:P})},L2e=4,F2e=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,s=e.afterCritical;if(!i.isCombineEnabled)return null;var a=i.axis,u=y0(i.axis,t.displaceBy),d=u.value,p=n[a.start],m=n[a.end],v=yw(t,o),x=Bc(v,function(P){var k=P.descriptor.id,T=P.page.borderBox,M=T[a.size],O=M/L2e,N=Ac(k,s),L=Yj({displaced:r.displaced,id:k});return N?L?m>T[a.start]+O&&m<T[a.end]-O:p>T[a.start]-d+O&&p<T[a.end]-d-O:L?m>T[a.start]+d+O&&m<T[a.end]+d-O:p>T[a.start]+O&&p<T[a.end]-O});if(!x)return null;var _={displacedBy:u,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:x.descriptor.id,droppableId:i.descriptor.id}}};return _},Qj=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,s=e.viewport,a=e.afterCritical,u=Xj(n.page.borderBox,t),d=A2e({pageBorderBox:u,draggable:n,droppables:i});if(!d)return YCe;var p=i[d],m=Dp(p.descriptor.id,r),v=D2e(p,u);return F2e({pageBorderBoxWithDroppableScroll:v,draggable:n,previousImpact:o,destination:p,insideDestination:m,afterCritical:a})||N2e({pageBorderBoxWithDroppableScroll:v,draggable:n,destination:p,insideDestination:m,last:o.displaced,viewport:s,afterCritical:a})},jT=function(e,t){var n;return ze({},e,(n={},n[t.descriptor.id]=t,n))},z2e=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Na(n),s=Na(r);if(!o||o===s)return i;var a=i[o];if(!a.subject.withPlaceholder)return i;var u=E2e(a);return jT(i,u)},$2e=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=z2e({previousImpact:i,impact:o,droppables:r}),a=Na(o);if(!a)return s;var u=r[a];if(Op(t,u)||u.subject.withPlaceholder)return s;var d=qj(u,t,n);return jT(s,d)},Ag=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,s=e.scrollJumpRequest,a=i||t.viewport,u=r||t.dimensions,d=n||t.current.client.selection,p=Ra(d,t.initial.client.selection),m={offset:p,selection:d,borderBoxCenter:po(t.initial.client.borderBoxCenter,p)},v={selection:po(m.selection,a.scroll.current),borderBoxCenter:po(m.borderBoxCenter,a.scroll.current),offset:po(m.offset,a.scroll.diff.value)},x={client:m,page:v};if(t.phase==="COLLECTING")return ze({phase:"COLLECTING"},t,{dimensions:u,viewport:a,current:x});var _=u.draggables[t.critical.draggable.id],P=o||Qj({pageOffset:v.offset,draggable:_,draggables:u.draggables,droppables:u.droppables,previousImpact:t.impact,viewport:a,afterCritical:t.afterCritical}),k=$2e({draggable:_,impact:P,previousImpact:t.impact,draggables:u.draggables,droppables:u.droppables}),T=ze({},t,{current:x,dimensions:{draggables:u.draggables,droppables:k},impact:P,viewport:a,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return T};function B2e(e,t){return e.map(function(n){return t[n]})}var Jj=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,a=B2e(s.all,r),u=_v({afterDragging:a,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return ze({},t,{displaced:u})},eH=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,a=xw({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return UT({pageBorderBoxCenter:a,draggable:n,viewport:o})},tH=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&ln(!1);var i=t.impact,o=r||t.viewport,s=n||t.dimensions,a=s.draggables,u=s.droppables,d=a[t.critical.draggable.id],p=Na(i);p||ln(!1);var m=u[p],v=Jj({impact:i,viewport:o,destination:m,draggables:a}),x=eH({impact:v,draggable:d,droppable:m,draggables:a,viewport:o,afterCritical:t.afterCritical});return Ag({impact:v,clientSelection:x,state:t,dimensions:s,viewport:o})},V2e=function(e){return{index:e.index,droppableId:e.droppableId}},nH=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=y0(n.axis,t.displaceBy),s=Dp(n.descriptor.id,r),a=s.indexOf(t);a===-1&&ln(!1);var u=s.slice(a+1),d=u.reduce(function(x,_){return x[_.descriptor.id]=!0,x},{}),p={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:d},m=_v({afterDragging:u,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),v={displaced:m,displacedBy:o,at:{type:"REORDER",destination:V2e(t.descriptor)}};return{impact:v,afterCritical:p}},U2e=function(e,t){return{draggables:e.draggables,droppables:jT(e.droppables,t)}},j2e=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=Pb(t.client,n),o=Ib(i,r),s=ze({},t,{placeholder:ze({},t.placeholder,{client:i}),client:i,page:o});return s},H2e=function(e){var t=e.frame;return t||ln(!1),t},K2e=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var s=o.descriptor.droppableId,a=n[s],u=H2e(a),d=u.scroll.diff.value,p=po(i,d),m=j2e({draggable:o,offset:p,initialWindowScroll:r.scroll.initial});return m})},W2e=function(e){var t=e.state,n=e.published,r=n.modified.map(function(O){var N=t.dimensions.droppables[O.droppableId],L=LT(N,O.scroll);return L}),i=ze({},t.dimensions.droppables,{},zj(r)),o=$j(K2e({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=ze({},t.dimensions.draggables,{},o);n.removals.forEach(function(O){delete s[O]});var a={droppables:i,draggables:s},u=Na(t.impact),d=u?a.droppables[u]:null,p=a.draggables[t.critical.draggable.id],m=a.droppables[t.critical.droppable.id],v=nH({draggable:p,home:m,draggables:s,viewport:t.viewport}),x=v.impact,_=v.afterCritical,P=d&&d.isCombineEnabled?t.impact:x,k=Qj({pageOffset:t.current.page.offset,draggable:a.draggables[t.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:P,viewport:t.viewport,afterCritical:_}),T=ze({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:k,onLiftImpact:x,dimensions:a,afterCritical:_,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return T;var M=ze({phase:"DROP_PENDING"},T,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return M},yE=function(t){return t.movementMode==="SNAP"},m2=function(t,n,r){var i=U2e(t.dimensions,n);return!yE(t)||r?Ag({state:t,dimensions:i}):tH({state:t,dimensions:i})};function g2(e){return e.isDragging&&e.movementMode==="SNAP"?ze({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var HN={phase:"IDLE",completed:null,shouldFlush:!1},G2e=function(e,t){if(e===void 0&&(e=HN),t.type==="FLUSH")return ze({},HN,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&ln(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,s=n.dimensions,a=n.movementMode,u=s.draggables[r.draggable.id],d=s.droppables[r.droppable.id],p={selection:i,borderBoxCenter:u.client.borderBox.center,offset:ao},m={client:p,page:{selection:po(p.selection,o.scroll.initial),borderBoxCenter:po(p.selection,o.scroll.initial),offset:po(p.selection,o.scroll.diff.value)}},v=gw(s.droppables).every(function(lt){return!lt.isFixedOnPage}),x=nH({draggable:u,home:d,draggables:s.draggables,viewport:o}),_=x.impact,P=x.afterCritical,k={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:a,dimensions:s,initial:m,current:m,isWindowScrollAllowed:v,impact:_,afterCritical:P,onLiftImpact:_,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return k}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&ln(!1);var T=ze({phase:"COLLECTING"},e,{phase:"COLLECTING"});return T}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||ln(!1),W2e({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Pd(e)||ln(!1);var M=t.payload.client;return wc(M,e.current.client.selection)?e:Ag({state:e,clientSelection:M,impact:yE(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return g2(e);Pd(e)||ln(!1);var O=t.payload,N=O.id,L=O.newScroll,F=e.dimensions.droppables[N];if(!F)return e;var V=LT(F,L);return m2(e,V,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Pd(e)||ln(!1);var B=t.payload,H=B.id,G=B.isEnabled,ee=e.dimensions.droppables[H];ee||ln(!1),ee.isEnabled===G&&ln(!1);var X=ze({},ee,{isEnabled:G});return m2(e,X,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Pd(e)||ln(!1);var Z=t.payload,Q=Z.id,le=Z.isCombineEnabled,ne=e.dimensions.droppables[Q];ne||ln(!1),ne.isCombineEnabled===le&&ln(!1);var se=ze({},ne,{isCombineEnabled:le});return m2(e,se,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Pd(e)||ln(!1),e.isWindowScrollAllowed||ln(!1);var oe=t.payload.newScroll;if(wc(e.viewport.scroll.current,oe))return g2(e);var he=Kj(e.viewport,oe);return yE(e)?tH({state:e,viewport:he}):Ag({state:e,viewport:he})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Pd(e))return e;var _e=t.payload.maxScroll;if(wc(_e,e.viewport.scroll.max))return e;var be=ze({},e.viewport,{scroll:ze({},e.viewport.scroll,{max:_e})});return ze({phase:"DRAGGING"},e,{viewport:be})}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"&&ln(!1);var xe=k2e({state:e,type:t.type});return xe?Ag({state:e,impact:xe.impact,clientSelection:xe.clientSelection,scrollJumpRequest:xe.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var Te=t.payload.reason;e.phase!=="COLLECTING"&&ln(!1);var Ee=ze({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:Te});return Ee}if(t.type==="DROP_ANIMATE"){var Ce=t.payload,ke=Ce.completed,De=Ce.dropDuration,Ke=Ce.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||ln(!1);var Ue={phase:"DROP_ANIMATING",completed:ke,dropDuration:De,newHomeClientOffset:Ke,dimensions:e.dimensions};return Ue}if(t.type==="DROP_COMPLETE"){var tt=t.payload.completed;return{phase:"IDLE",completed:tt,shouldFlush:!1}}return e},q2e=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},Z2e=function(t){return{type:"LIFT",payload:t}},X2e=function(t){return{type:"INITIAL_PUBLISH",payload:t}},Y2e=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},Q2e=function(){return{type:"COLLECTION_STARTING",payload:null}},J2e=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},eSe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},tSe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},rH=function(t){return{type:"MOVE",payload:t}},nSe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},rSe=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},iSe=function(){return{type:"MOVE_UP",payload:null}},oSe=function(){return{type:"MOVE_DOWN",payload:null}},aSe=function(){return{type:"MOVE_RIGHT",payload:null}},sSe=function(){return{type:"MOVE_LEFT",payload:null}},HT=function(){return{type:"FLUSH",payload:null}},lSe=function(t){return{type:"DROP_ANIMATE",payload:t}},KT=function(t){return{type:"DROP_COMPLETE",payload:t}},iH=function(t){return{type:"DROP",payload:t}},uSe=function(t){return{type:"DROP_PENDING",payload:t}},oH=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},cSe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var s=o.payload,a=s.id,u=s.clientSelection,d=s.movementMode,p=n();p.phase==="DROP_ANIMATING"&&r(KT({completed:p.completed})),n().phase!=="IDLE"&&ln(!1),r(HT()),r(q2e({draggableId:a,movementMode:d}));var m={shouldPublishImmediately:d==="SNAP"},v={draggableId:a,scrollOptions:m},x=e.startPublishing(v),_=x.critical,P=x.dimensions,k=x.viewport;r(X2e({critical:_,dimensions:P,clientSelection:u,movementMode:d,viewport:k}))}}}},dSe=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)}}}},WT={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},wv={opacity:{drop:0,combining:.7},scale:{drop:.75}},GT={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},md=GT.outOfTheWay+"s "+WT.outOfTheWay,Dg={fluid:"opacity "+md,snap:"transform "+md+", opacity "+md,drop:function(t){var n=t+"s "+WT.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+md,placeholder:"height "+md+", width "+md+", margin "+md},KN=function(t){return wc(t,ao)?null:"translate("+t.x+"px, "+t.y+"px)"},xE={moveTo:KN,drop:function(t,n){var r=KN(t);return r?n?r+" scale("+wv.scale.drop+")":r:null}},bE=GT.minDropTime,aH=GT.maxDropTime,fSe=aH-bE,WN=1500,hSe=.6,pSe=function(e){var t=e.current,n=e.destination,r=e.reason,i=xv(t,n);if(i<=0)return bE;if(i>=WN)return aH;var o=i/WN,s=bE+fSe*o,a=r==="CANCEL"?s*hSe:s;return Number(a.toFixed(2))},mSe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,a=r.droppables,u=Na(t),d=u?a[u]:null,p=a[n.descriptor.droppableId],m=eH({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:d||p,viewport:i}),v=Ra(m,n.client.borderBox.center);return v},gSe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var a=Jj({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:a,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var u=ze({},r,{displaced:bv});return{impact:u,didDropInsideDroppable:!0}},vSe=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var o=t(),s=i.payload.reason;if(o.phase==="COLLECTING"){n(uSe({reason:s}));return}if(o.phase!=="IDLE"){var a=o.phase==="DROP_PENDING"&&o.isWaiting;a&&ln(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||ln(!1);var u=o.critical,d=o.dimensions,p=d.draggables[o.critical.draggable.id],m=gSe({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),v=m.impact,x=m.didDropInsideDroppable,_=x?zT(v):null,P=x?vw(v):null,k={index:u.draggable.index,droppableId:u.droppable.id},T={draggableId:p.descriptor.id,type:p.descriptor.type,source:k,reason:s,mode:o.movementMode,destination:_,combine:P},M=mSe({impact:v,draggable:p,dimensions:d,viewport:o.viewport,afterCritical:o.afterCritical}),O={critical:o.critical,afterCritical:o.afterCritical,result:T,impact:v},N=!wc(o.current.client.offset,M)||Boolean(T.combine);if(!N){n(KT({completed:O}));return}var L=pSe({current:o.current.client.offset,destination:M,reason:s}),F={newHomeClientOffset:M,dropDuration:L,completed:O};n(lSe(F))}}}},sH=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function ySe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function xSe(e){var t=e.onWindowScroll;function n(){t(sH())}var r=yv(n),i=ySe(r),o=_c;function s(){return o!==_c}function a(){s()&&ln(!1),o=ss(window,[i])}function u(){s()||ln(!1),r.cancel(),o(),o=_c}return{start:a,stop:u,isActive:s}}var bSe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},_Se=function(e){var t=xSe({onWindowScroll:function(r){e.dispatch(nSe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&bSe(r)&&t.stop(),n(r)}}},wSe=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},CSe=function(){var e=[],t=function(o){var s=FT(e,function(d){return d.timerId===o});s===-1&&ln(!1);var a=e.splice(s,1),u=a[0];u.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),a={timerId:s,callback:o};e.push(a)},r=function(){if(!!e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},SSe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},ESe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},PSe=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},Km=function(t,n){n()},hx=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},v2=function(t,n,r,i){if(!t){r(i(n));return}var o=wSe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},ISe=function(e,t){var n=CSe(),r=null,i=function(v,x){r&&ln(!1),Km("onBeforeCapture",function(){var _=e().onBeforeCapture;if(_){var P={draggableId:v,mode:x};_(P)}})},o=function(v,x){r&&ln(!1),Km("onBeforeDragStart",function(){var _=e().onBeforeDragStart;_&&_(hx(v,x))})},s=function(v,x){r&&ln(!1);var _=hx(v,x);r={mode:x,lastCritical:v,lastLocation:_.source,lastCombine:null},n.add(function(){Km("onDragStart",function(){return v2(e().onDragStart,_,t,c1.onDragStart)})})},a=function(v,x){var _=zT(x),P=vw(x);r||ln(!1);var k=!PSe(v,r.lastCritical);k&&(r.lastCritical=v);var T=!SSe(r.lastLocation,_);T&&(r.lastLocation=_);var M=!ESe(r.lastCombine,P);if(M&&(r.lastCombine=P),!(!k&&!T&&!M)){var O=ze({},hx(v,r.mode),{combine:P,destination:_});n.add(function(){Km("onDragUpdate",function(){return v2(e().onDragUpdate,O,t,c1.onDragUpdate)})})}},u=function(){r||ln(!1),n.flush()},d=function(v){r||ln(!1),r=null,Km("onDragEnd",function(){return v2(e().onDragEnd,v,t,c1.onDragEnd)})},p=function(){if(!!r){var v=ze({},hx(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});d(v)}};return{beforeCapture:i,beforeStart:o,start:s,update:a,flush:u,drop:d,abort:p}},TSe=function(e,t){var n=ISe(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var a=o.payload.completed.result;n.flush(),i(o),n.drop(a);return}if(i(o),o.type==="FLUSH"){n.abort();return}var u=r.getState();u.phase==="DRAGGING"&&n.update(u.critical,u.impact)}}}},kSe=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"&&ln(!1),e.dispatch(KT({completed:r.completed}))}}},MSe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var u=e.getState();u.phase==="DROP_ANIMATING"&&e.dispatch(oH())}};n=requestAnimationFrame(function(){n=null,t=ss(window,[s])})}}}},RSe=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)}}}},ASe=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()}}}}}},DSe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},OSe=function(e){return function(t){return function(n){return function(r){if(DSe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&ln(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},NSe=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(iH({reason:r.reason})))}}}},LSe=mj,FSe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return pj(G2e,LSe(M4e(dSe(r),RSe(t),cSe(t),vSe,kSe,MSe,NSe,OSe(s),_Se,ASe(n),TSe(i,o))))},y2=function(){return{additions:{},removals:{},modified:{}}};function zSe(e){var t=e.registry,n=e.callbacks,r=y2(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var p=r,m=p.additions,v=p.removals,x=p.modified,_=Object.keys(m).map(function(T){return t.draggable.getById(T).getDimension(ao)}).sort(function(T,M){return T.descriptor.index-M.descriptor.index}),P=Object.keys(x).map(function(T){var M=t.droppable.getById(T),O=M.callbacks.getScrollWhileDragging();return{droppableId:T,scroll:O}}),k={additions:_,removals:Object.keys(v),modified:P};r=y2(),n.publish(k)}))},s=function(p){var m=p.descriptor.id;r.additions[m]=p,r.modified[p.descriptor.droppableId]=!0,r.removals[m]&&delete r.removals[m],o()},a=function(p){var m=p.descriptor;r.removals[m.id]=!0,r.modified[m.droppableId]=!0,r.additions[m.id]&&delete r.additions[m.id],o()},u=function(){!i||(cancelAnimationFrame(i),i=null,r=y2())};return{add:s,remove:a,stop:u}}var lH=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Ra({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},uH=function(){var e=document.documentElement;return e||ln(!1),e},cH=function(){var e=uH(),t=lH({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},$Se=function(){var e=sH(),t=cH(),n=e.y,r=e.x,i=uH(),o=i.clientWidth,s=i.clientHeight,a=r+o,u=n+s,d=zs({top:n,left:r,right:a,bottom:u}),p={frame:d,scroll:{initial:e,current:e,max:t,diff:{value:ao,displacement:ao}}};return p},BSe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=$Se(),o=i.scroll.current,s=t.droppable,a=r.droppable.getAllByType(s.type).map(function(m){return m.callbacks.getDimensionAndWatchScroll(o,n)}),u=r.draggable.getAllByType(t.draggable.type).map(function(m){return m.getDimension(o)}),d={draggables:$j(u),droppables:zj(a)},p={dimensions:d,critical:t,viewport:i};return p};function GN(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 VSe=function(e,t){var n=null,r=zSe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(x,_){e.droppable.exists(x)||ln(!1),n&&t.updateDroppableIsEnabled({id:x,isEnabled:_})},o=function(x,_){!n||(e.droppable.exists(x)||ln(!1),t.updateDroppableIsCombineEnabled({id:x,isCombineEnabled:_}))},s=function(x,_){!n||(e.droppable.exists(x)||ln(!1),t.updateDroppableScroll({id:x,newScroll:_}))},a=function(x,_){!n||e.droppable.getById(x).callbacks.scroll(_)},u=function(){if(!!n){r.stop();var x=n.critical.droppable;e.droppable.getAllByType(x.type).forEach(function(_){return _.callbacks.dragStopped()}),n.unsubscribe(),n=null}},d=function(x){n||ln(!1);var _=n.critical.draggable;x.type==="ADDITION"&&GN(e,_,x.value)&&r.add(x.value),x.type==="REMOVAL"&&GN(e,_,x.value)&&r.remove(x.value)},p=function(x){n&&ln(!1);var _=e.draggable.getById(x.draggableId),P=e.droppable.getById(_.descriptor.droppableId),k={draggable:_.descriptor,droppable:P.descriptor},T=e.subscribe(d);return n={critical:k,unsubscribe:T},BSe({critical:k,registry:e,scrollOptions:x.scrollOptions})},m={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:a,updateDroppableScroll:s,startPublishing:p,stopPublishing:u};return m},dH=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},USe=function(e){window.scrollBy(e.x,e.y)},jSe=oo(function(e){return gw(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),HSe=function(t,n){var r=Bc(jSe(n),function(i){return i.frame||ln(!1),Zj(i.frame.pageMarginBox)(t)});return r},KSe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=HSe(t,r);return o},Cc={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},WSe=function(e,t){var n=e[t.size]*Cc.startFromPercentage,r=e[t.size]*Cc.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},fH=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var o=r-t,s=o/i;return s},qT=1,GSe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Cc.maxPixelScroll;if(e===t.startScrollingFrom)return qT;var n=fH({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Cc.maxPixelScroll*Cc.ease(r);return Math.ceil(i)},qN=Cc.durationDampening.accelerateAt,ZN=Cc.durationDampening.stopDampeningAt,qSe=function(e,t){var n=t,r=ZN,i=Date.now(),o=i-n;if(o>=ZN)return e;if(o<qN)return qT;var s=fH({startOfRange:qN,endOfRange:r,current:o}),a=e*Cc.ease(s);return Math.ceil(a)},XN=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=GSe(t,n);return o===0?0:i?Math.max(qSe(o,r),qT):o},YN=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,s=WSe(t,i),a=n[i.end]<n[i.start];return a?XN({distanceToEdge:n[i.end],thresholds:s,dragStartTime:r,shouldUseTimeDampening:o}):-1*XN({distanceToEdge:n[i.start],thresholds:s,dragStartTime:r,shouldUseTimeDampening:o})},ZSe=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return!o&&!i?r:o&&i?null:{x:o?0:r.x,y:i?0:r.y}},XSe=Lj(function(e){return e===0?0:e}),hH=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},a=YN({container:n,distanceToEdges:s,dragStartTime:t,axis:$T,shouldUseTimeDampening:o}),u=YN({container:n,distanceToEdges:s,dragStartTime:t,axis:Uj,shouldUseTimeDampening:o}),d=XSe({x:u,y:a});if(wc(d,ao))return null;var p=ZSe({container:n,subject:r,proposedScroll:d});return p?wc(p,ao)?null:p:null},YSe=Lj(function(e){return e===0?0:e>0?1:-1}),ZT=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,o=po(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return wc(s,ao)?null:s}}(),pH=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},s=YSe(i),a=ZT({max:o,current:r,change:s});return!a||s.x!==0&&a.x===0||s.y!==0&&a.y===0},XT=function(t,n){return pH({current:t.scroll.current,max:t.scroll.max,change:n})},QSe=function(t,n){if(!XT(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return ZT({current:i,max:r,change:n})},YT=function(t,n){var r=t.frame;return r?pH({current:r.scroll.current,max:r.scroll.max,change:n}):!1},JSe=function(t,n){var r=t.frame;return!r||!YT(t,n)?null:ZT({current:r.scroll.current,max:r.scroll.max,change:n})},e3e=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=hH({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&XT(t,s)?s:null},t3e=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var a=hH({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return a&&YT(t,a)?a:null},QN=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id],u=a.page.marginBox;if(t.isWindowScrollAllowed){var d=t.viewport,p=e3e({dragStartTime:n,viewport:d,subject:u,center:s,shouldUseTimeDampening:r});if(p){i(p);return}}var m=KSe({center:s,destination:Na(t.impact),droppables:t.dimensions.droppables});if(!!m){var v=t3e({dragStartTime:n,droppable:m,subject:u,center:s,shouldUseTimeDampening:r});v&&o(m.descriptor.id,v)}},n3e=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=yv(t),i=yv(n),o=null,s=function(p){o||ln(!1);var m=o,v=m.shouldUseTimeDampening,x=m.dragStartTime;QN({state:p,scrollWindow:r,scrollDroppable:i,dragStartTime:x,shouldUseTimeDampening:v})},a=function(p){o&&ln(!1);var m=Date.now(),v=!1,x=function(){v=!0};QN({state:p,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:x,scrollDroppable:x}),o={dragStartTime:m,shouldUseTimeDampening:v},v&&s(p)},u=function(){!o||(r.cancel(),i.cancel(),o=null)};return{start:a,stop:u,scroll:s}},r3e=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(d,p){var m=po(d.current.client.selection,p);t({client:m})},o=function(d,p){if(!YT(d,p))return p;var m=JSe(d,p);if(!m)return n(d.descriptor.id,p),null;var v=Ra(p,m);n(d.descriptor.id,v);var x=Ra(p,v);return x},s=function(d,p,m){if(!d||!XT(p,m))return m;var v=QSe(p,m);if(!v)return r(m),null;var x=Ra(m,v);r(x);var _=Ra(m,x);return _},a=function(d){var p=d.scrollJumpRequest;if(!!p){var m=Na(d.impact);m||ln(!1);var v=o(d.dimensions.droppables[m],p);if(!!v){var x=d.viewport,_=s(d.isWindowScrollAllowed,x,v);!_||i(d,_)}}};return a},i3e=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=n3e({scrollWindow:n,scrollDroppable:t}),o=r3e({move:r,scrollWindow:n,scrollDroppable:t}),s=function(d){if(d.phase==="DRAGGING"){if(d.movementMode==="FLUID"){i.scroll(d);return}!d.scrollJumpRequest||o(d)}},a={scroll:s,start:i.start,stop:i.stop};return a},sp="data-rbd",lp=function(){var e=sp+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),_E=function(){var e=sp+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),o3e=function(){var e=sp+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),JN={contextId:sp+"-scroll-container-context-id"},a3e=function(t){return function(n){return"["+n+'="'+t+'"]'}},Wm=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},s3e="pointer-events: none;",l3e=function(e){var t=a3e(e),n=function(){var a=`
|
|
|
cursor: -webkit-grab;
|
|
|
cursor: grab;
|
|
|
`;return{selector:t(lp.contextId),styles:{always:`
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
touch-action: manipulation;
|
|
|
`,resting:a,dragging:s3e,dropAnimating:a}}}(),r=function(){var a=`
|
|
|
transition: `+Dg.outOfTheWay+`;
|
|
|
`;return{selector:t(_E.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}}(),i={selector:t(o3e.contextId),styles:{always:"overflow-anchor: none;"}},o={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,o];return{always:Wm(s,"always"),resting:Wm(s,"resting"),dragging:Wm(s,"dragging"),dropAnimating:Wm(s,"dropAnimating"),userCancel:Wm(s,"userCancel")}},La=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.exports.useLayoutEffect:w.exports.useEffect,x2=function(){var t=document.querySelector("head");return t||ln(!1),t},e6=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function u3e(e,t){var n=br(function(){return l3e(e)},[e]),r=w.exports.useRef(null),i=w.exports.useRef(null),o=Ln(oo(function(m){var v=i.current;v||ln(!1),v.textContent=m}),[]),s=Ln(function(m){var v=r.current;v||ln(!1),v.textContent=m},[]);La(function(){!r.current&&!i.current||ln(!1);var m=e6(t),v=e6(t);return r.current=m,i.current=v,m.setAttribute(sp+"-always",e),v.setAttribute(sp+"-dynamic",e),x2().appendChild(m),x2().appendChild(v),s(n.always),o(n.resting),function(){var x=function(P){var k=P.current;k||ln(!1),x2().removeChild(k),P.current=null};x(r),x(i)}},[t,s,o,n.always,n.resting,e]);var a=Ln(function(){return o(n.dragging)},[o,n.dragging]),u=Ln(function(m){if(m==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),d=Ln(function(){!i.current||o(n.resting)},[o,n.resting]),p=br(function(){return{dragging:a,dropping:u,resting:d}},[a,u,d]);return p}var mH=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function bw(e){return e instanceof mH(e).HTMLElement}function c3e(e,t){var n="["+lp.contextId+'="'+e+'"]',r=Fj(document.querySelectorAll(n));if(!r.length)return null;var i=Bc(r,function(o){return o.getAttribute(lp.draggableId)===t});return!i||!bw(i)?null:i}function d3e(e){var t=w.exports.useRef({}),n=w.exports.useRef(null),r=w.exports.useRef(null),i=w.exports.useRef(!1),o=Ln(function(v,x){var _={id:v,focus:x};return t.current[v]=_,function(){var k=t.current,T=k[v];T!==_&&delete k[v]}},[]),s=Ln(function(v){var x=c3e(e,v);x&&x!==document.activeElement&&x.focus()},[e]),a=Ln(function(v,x){n.current===v&&(n.current=x)},[]),u=Ln(function(){r.current||!i.current||(r.current=requestAnimationFrame(function(){r.current=null;var v=n.current;v&&s(v)}))},[s]),d=Ln(function(v){n.current=null;var x=document.activeElement;!x||x.getAttribute(lp.draggableId)===v&&(n.current=v)},[]);La(function(){return i.current=!0,function(){i.current=!1;var v=r.current;v&&cancelAnimationFrame(v)}},[]);var p=br(function(){return{register:o,tryRecordFocus:d,tryRestoreFocusRecorded:u,tryShiftRecord:a}},[o,d,u,a]);return p}function f3e(){var e={draggables:{},droppables:{}},t=[];function n(m){return t.push(m),function(){var x=t.indexOf(m);x!==-1&&t.splice(x,1)}}function r(m){t.length&&t.forEach(function(v){return v(m)})}function i(m){return e.draggables[m]||null}function o(m){var v=i(m);return v||ln(!1),v}var s={register:function(v){e.draggables[v.descriptor.id]=v,r({type:"ADDITION",value:v})},update:function(v,x){var _=e.draggables[x.descriptor.id];!_||_.uniqueId===v.uniqueId&&(delete e.draggables[x.descriptor.id],e.draggables[v.descriptor.id]=v)},unregister:function(v){var x=v.descriptor.id,_=i(x);!_||v.uniqueId===_.uniqueId&&(delete e.draggables[x],r({type:"REMOVAL",value:v}))},getById:o,findById:i,exists:function(v){return Boolean(i(v))},getAllByType:function(v){return Mb(e.draggables).filter(function(x){return x.descriptor.type===v})}};function a(m){return e.droppables[m]||null}function u(m){var v=a(m);return v||ln(!1),v}var d={register:function(v){e.droppables[v.descriptor.id]=v},unregister:function(v){var x=a(v.descriptor.id);!x||v.uniqueId===x.uniqueId&&delete e.droppables[v.descriptor.id]},getById:u,findById:a,exists:function(v){return Boolean(a(v))},getAllByType:function(v){return Mb(e.droppables).filter(function(x){return x.descriptor.type===v})}};function p(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:d,subscribe:n,clean:p}}function h3e(){var e=br(f3e,[]);return w.exports.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var QT=Un.createContext(null),Ab=function(){var e=document.body;return e||ln(!1),e},p3e={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},m3e=function(t){return"rbd-announcement-"+t};function g3e(e){var t=br(function(){return m3e(e)},[e]),n=w.exports.useRef(null);w.exports.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),ze(o.style,p3e),Ab().appendChild(o),function(){setTimeout(function(){var u=Ab();u.contains(o)&&u.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=Ln(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var v3e=0,y3e={separator:"::"};function JT(e,t){return t===void 0&&(t=y3e),br(function(){return""+e+t.separator+v3e++},[t.separator,e])}function x3e(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function b3e(e){var t=e.contextId,n=e.text,r=JT("hidden-text",{separator:"-"}),i=br(function(){return x3e({contextId:t,uniqueId:r})},[r,t]);return w.exports.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",Ab().appendChild(s),function(){var u=Ab();u.contains(s)&&u.removeChild(s)}},[i,n]),i}var _w=Un.createContext(null);function gH(e){var t=w.exports.useRef(e);return w.exports.useEffect(function(){t.current=e}),t}function _3e(){var e=null;function t(){return Boolean(e)}function n(s){return s===e}function r(s){e&&ln(!1);var a={abandon:s};return e=a,a}function i(){e||ln(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var w3e=9,C3e=13,ek=27,vH=32,S3e=33,E3e=34,P3e=35,I3e=36,T3e=37,k3e=38,M3e=39,R3e=40,px,A3e=(px={},px[C3e]=!0,px[w3e]=!0,px),yH=function(e){A3e[e.keyCode]&&e.preventDefault()},ww=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=Bc(t,function(r){return"on"+r in document});return n||e}(),xH=0,t6=5;function D3e(e,t){return Math.abs(t.x-e.x)>=t6||Math.abs(t.y-e.y)>=t6}var n6={type:"IDLE"};function O3e(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var a=s.button,u=s.clientX,d=s.clientY;if(a===xH){var p={x:u,y:d},m=r();if(m.type==="DRAGGING"){s.preventDefault(),m.actions.move(p);return}m.type!=="PENDING"&&ln(!1);var v=m.point;if(!!D3e(v,p)){s.preventDefault();var x=m.actions.fluidLift(p);i({type:"DRAGGING",actions:x})}}}},{eventName:"mouseup",fn:function(s){var a=r();if(a.type!=="DRAGGING"){t();return}s.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var a=r();if(a.type==="PENDING"){t();return}if(s.keyCode===ek){s.preventDefault(),t();return}yH(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var a=r();if(a.type==="IDLE"&&ln(!1),a.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:ww,fn:t}]}function N3e(e){var t=w.exports.useRef(n6),n=w.exports.useRef(_c),r=br(function(){return{eventName:"mousedown",fn:function(m){if(!m.defaultPrevented&&m.button===xH&&!(m.ctrlKey||m.metaKey||m.shiftKey||m.altKey)){var v=e.findClosestDraggableId(m);if(!!v){var x=e.tryGetLock(v,s,{sourceEvent:m});if(!!x){m.preventDefault();var _={x:m.clientX,y:m.clientY};n.current(),d(x,_)}}}}}},[e]),i=br(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(m){if(!m.defaultPrevented){var v=e.findClosestDraggableId(m);if(!!v){var x=e.findOptionsForDraggable(v);!x||x.shouldRespectForcePress||!e.canGetLock(v)||m.preventDefault()}}}}},[e]),o=Ln(function(){var m={passive:!1,capture:!0};n.current=ss(window,[i,r],m)},[i,r]),s=Ln(function(){var p=t.current;p.type!=="IDLE"&&(t.current=n6,n.current(),o())},[o]),a=Ln(function(){var p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),u=Ln(function(){var m={capture:!0,passive:!1},v=O3e({cancel:a,completed:s,getPhase:function(){return t.current},setPhase:function(_){t.current=_}});n.current=ss(window,v,m)},[a,s]),d=Ln(function(m,v){t.current.type!=="IDLE"&&ln(!1),t.current={type:"PENDING",point:v,actions:m},u()},[u]);La(function(){return o(),function(){n.current()}},[o])}var ah;function L3e(){}var F3e=(ah={},ah[E3e]=!0,ah[S3e]=!0,ah[I3e]=!0,ah[P3e]=!0,ah);function z3e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===ek){o.preventDefault(),n();return}if(o.keyCode===vH){o.preventDefault(),r();return}if(o.keyCode===R3e){o.preventDefault(),e.moveDown();return}if(o.keyCode===k3e){o.preventDefault(),e.moveUp();return}if(o.keyCode===M3e){o.preventDefault(),e.moveRight();return}if(o.keyCode===T3e){o.preventDefault(),e.moveLeft();return}if(F3e[o.keyCode]){o.preventDefault();return}yH(o)}},{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:ww,fn:n}]}function $3e(e){var t=w.exports.useRef(L3e),n=br(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==vH)return;var s=e.findClosestDraggableId(o);if(!s)return;var a=e.tryGetLock(s,p,{sourceEvent:o});if(!a)return;o.preventDefault();var u=!0,d=a.snapLift();t.current();function p(){u||ln(!1),u=!1,t.current(),r()}t.current=ss(window,z3e(d,p),{capture:!0,passive:!1})}}},[e]),r=Ln(function(){var o={passive:!1,capture:!0};t.current=ss(window,[n],o)},[n]);La(function(){return r(),function(){t.current()}},[r])}var b2={type:"IDLE"},B3e=120,V3e=.15;function U3e(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===ek&&i.preventDefault(),t()}},{eventName:ww,fn:t}]}function j3e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var a=o.touches[0],u=a.clientX,d=a.clientY,p={x:u,y:d};o.preventDefault(),s.actions.move(p)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&ln(!1);var a=o.touches[0];if(!!a){var u=a.force>=V3e;if(!!u){var d=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){d&&t();return}if(d){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:ww,fn:t}]}function H3e(e){var t=w.exports.useRef(b2),n=w.exports.useRef(_c),r=Ln(function(){return t.current},[]),i=Ln(function(x){t.current=x},[]),o=br(function(){return{eventName:"touchstart",fn:function(x){if(!x.defaultPrevented){var _=e.findClosestDraggableId(x);if(!!_){var P=e.tryGetLock(_,a,{sourceEvent:x});if(!!P){var k=x.touches[0],T=k.clientX,M=k.clientY,O={x:T,y:M};n.current(),m(P,O)}}}}}},[e]),s=Ln(function(){var x={capture:!0,passive:!1};n.current=ss(window,[o],x)},[o]),a=Ln(function(){var v=t.current;v.type!=="IDLE"&&(v.type==="PENDING"&&clearTimeout(v.longPressTimerId),i(b2),n.current(),s())},[s,i]),u=Ln(function(){var v=t.current;a(),v.type==="DRAGGING"&&v.actions.cancel({shouldBlockNextClick:!0}),v.type==="PENDING"&&v.actions.abort()},[a]),d=Ln(function(){var x={capture:!0,passive:!1},_={cancel:u,completed:a,getPhase:r},P=ss(window,j3e(_),x),k=ss(window,U3e(_),x);n.current=function(){P(),k()}},[u,r,a]),p=Ln(function(){var x=r();x.type!=="PENDING"&&ln(!1);var _=x.actions.fluidLift(x.point);i({type:"DRAGGING",actions:_,hasMoved:!1})},[r,i]),m=Ln(function(x,_){r().type!=="IDLE"&&ln(!1);var P=setTimeout(p,B3e);i({type:"PENDING",point:_,actions:x,longPressTimerId:P}),d()},[d,r,i,p]);La(function(){return s(),function(){n.current();var _=r();_.type==="PENDING"&&(clearTimeout(_.longPressTimerId),i(b2))}},[r,s,i]),La(function(){var x=ss(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return x},[])}var K3e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function bH(e,t){if(t==null)return!1;var n=Boolean(K3e[t.tagName.toLowerCase()]);if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:bH(e,t.parentElement)}function W3e(e,t){var n=t.target;return bw(n)?bH(e,n):!1}var G3e=function(e){return zs(e.getBoundingClientRect()).center};function q3e(e){return e instanceof mH(e).Element}var Z3e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=Bc(t,function(r){return r in Element.prototype});return n||e}();function _H(e,t){return e==null?null:e[Z3e](t)?e:_H(e.parentElement,t)}function X3e(e,t){return e.closest?e.closest(t):_H(e,t)}function Y3e(e){return"["+lp.contextId+'="'+e+'"]'}function Q3e(e,t){var n=t.target;if(!q3e(n))return null;var r=Y3e(e),i=X3e(n,r);return!i||!bw(i)?null:i}function J3e(e,t){var n=Q3e(e,t);return n?n.getAttribute(lp.draggableId):null}function eEe(e,t){var n="["+_E.contextId+'="'+e+'"]',r=Fj(document.querySelectorAll(n)),i=Bc(r,function(o){return o.getAttribute(_E.id)===t});return!i||!bw(i)?null:i}function tEe(e){e.preventDefault()}function mx(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function wH(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!dH(n.getState(),i))}function nEe(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,a=e.sourceEvent,u=wH({lockAPI:t,store:r,registry:i,draggableId:o});if(!u)return null;var d=i.draggable.getById(o),p=eEe(n,d.descriptor.id);if(!p||a&&!d.options.canDragInteractiveElements&&W3e(p,a))return null;var m=t.claim(s||_c),v="PRE_DRAG";function x(){return d.options.shouldRespectForcePress}function _(){return t.isActive(m)}function P(F,V){mx({expected:F,phase:v,isLockActive:_,shouldWarn:!0})&&r.dispatch(V())}var k=P.bind(null,"DRAGGING");function T(F){function V(){t.release(),v="COMPLETED"}v!=="PRE_DRAG"&&(V(),v!=="PRE_DRAG"&&ln(!1)),r.dispatch(Z2e(F.liftActionArgs)),v="DRAGGING";function B(H,G){if(G===void 0&&(G={shouldBlockNextClick:!1}),F.cleanup(),G.shouldBlockNextClick){var ee=ss(window,[{eventName:"click",fn:tEe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(ee)}V(),r.dispatch(iH({reason:H}))}return ze({isActive:function(){return mx({expected:"DRAGGING",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:x,drop:function(G){return B("DROP",G)},cancel:function(G){return B("CANCEL",G)}},F.actions)}function M(F){var V=yv(function(H){k(function(){return rH({client:H})})}),B=T({liftActionArgs:{id:o,clientSelection:F,movementMode:"FLUID"},cleanup:function(){return V.cancel()},actions:{move:V}});return ze({},B,{move:V})}function O(){var F={moveUp:function(){return k(iSe)},moveRight:function(){return k(aSe)},moveDown:function(){return k(oSe)},moveLeft:function(){return k(sSe)}};return T({liftActionArgs:{id:o,clientSelection:G3e(p),movementMode:"SNAP"},cleanup:_c,actions:F})}function N(){var F=mx({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!0});F&&t.release()}var L={isActive:function(){return mx({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:x,fluidLift:M,snapLift:O,abort:N};return L}var rEe=[N3e,$3e,H3e];function iEe(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?rEe:[],i||[]),a=w.exports.useState(function(){return _3e()})[0],u=Ln(function(M,O){M.isDragging&&!O.isDragging&&a.tryAbandon()},[a]);La(function(){var M=n.getState(),O=n.subscribe(function(){var N=n.getState();u(M,N),M=N});return O},[a,n,u]),La(function(){return a.tryAbandon},[a.tryAbandon]);for(var d=Ln(function(T){return wH({lockAPI:a,registry:r,store:n,draggableId:T})},[a,r,n]),p=Ln(function(T,M,O){return nEe({lockAPI:a,registry:r,contextId:t,store:n,draggableId:T,forceSensorStop:M,sourceEvent:O&&O.sourceEvent?O.sourceEvent:null})},[t,a,r,n]),m=Ln(function(T){return J3e(t,T)},[t]),v=Ln(function(T){var M=r.draggable.findById(T);return M?M.options:null},[r.draggable]),x=Ln(function(){!a.isClaimed()||(a.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(HT()))},[a,n]),_=Ln(a.isClaimed,[a]),P=br(function(){return{canGetLock:d,tryGetLock:p,findClosestDraggableId:m,findOptionsForDraggable:v,tryReleaseLock:x,isLockClaimed:_}},[d,p,m,v,x,_]),k=0;k<s.length;k++)s[k](P)}var oEe=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function Gm(e){return e.current||ln(!1),e.current}function aEe(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,s=w.exports.useRef(null),a=gH(e),u=Ln(function(){return oEe(a.current)},[a]),d=g3e(t),p=b3e({contextId:t,text:o}),m=u3e(t,i),v=Ln(function(H){Gm(s).dispatch(H)},[]),x=br(function(){return EN({publishWhileDragging:Y2e,updateDroppableScroll:J2e,updateDroppableIsEnabled:eSe,updateDroppableIsCombineEnabled:tSe,collectionStarting:Q2e},v)},[v]),_=h3e(),P=br(function(){return VSe(_,x)},[_,x]),k=br(function(){return i3e(ze({scrollWindow:USe,scrollDroppable:P.scrollDroppable},EN({move:rH},v)))},[P.scrollDroppable,v]),T=d3e(t),M=br(function(){return FSe({announce:d,autoScroller:k,dimensionMarshal:P,focusMarshal:T,getResponders:u,styleMarshal:m})},[d,k,P,T,u,m]);s.current=M;var O=Ln(function(){var H=Gm(s),G=H.getState();G.phase!=="IDLE"&&H.dispatch(HT())},[]),N=Ln(function(){var H=Gm(s).getState();return H.isDragging||H.phase==="DROP_ANIMATING"},[]),L=br(function(){return{isDragging:N,tryAbort:O}},[N,O]);n(L);var F=Ln(function(H){return dH(Gm(s).getState(),H)},[]),V=Ln(function(){return Pd(Gm(s).getState())},[]),B=br(function(){return{marshal:P,focus:T,contextId:t,canLift:F,isMovementAllowed:V,dragHandleUsageInstructionsId:p,registry:_}},[t,P,p,T,F,V,_]);return iEe({contextId:t,store:M,registry:_,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),w.exports.useEffect(function(){return O},[O]),I(_w.Provider,{value:B,children:I(N4e,{context:QT,store:M,children:e.children})})}var sEe=0;function lEe(){return br(function(){return""+sEe++},[])}function uEe(e){var t=lEe(),n=e.dragHandleUsageInstructions||c1.dragHandleUsageInstructions;return I($Ce,{children:function(r){return I(aEe,{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 CH=function(t){return function(n){return t===n}},cEe=CH("scroll"),dEe=CH("auto"),r6=function(t,n){return n(t.overflowX)||n(t.overflowY)},fEe=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return r6(r,cEe)||r6(r,dEe)},hEe=function(){return!1},pEe=function e(t){return t==null?null:t===document.body?hEe()?t:null:t===document.documentElement?null:fEe(t)?t:e(t.parentElement)},wE=function(e){return{x:e.scrollLeft,y:e.scrollTop}},mEe=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},gEe=function(e){var t=pEe(e),n=mEe(e);return{closestScrollable:t,isFixedOnPage:n}},vEe=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,s=e.client,a=e.page,u=e.closest,d=function(){if(!u)return null;var x=u.scrollSize,_=u.client,P=lH({scrollHeight:x.scrollHeight,scrollWidth:x.scrollWidth,height:_.paddingBox.height,width:_.paddingBox.width});return{pageMarginBox:u.page.marginBox,frameClient:_,scrollSize:x,shouldClipSubject:u.shouldClipSubject,scroll:{initial:u.scroll,current:u.scroll,max:P,diff:{value:ao,displacement:ao}}}}(),p=o==="vertical"?$T:Uj,m=ap({page:a,withPlaceholder:null,axis:p,frame:d}),v={descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:p,isEnabled:n,client:s,page:a,frame:d,subject:m};return v},yEe=function(t,n){var r=Aj(t);if(!n||t!==n)return r;var i=r.paddingBox.top-n.scrollTop,o=r.paddingBox.left-n.scrollLeft,s=i+n.scrollHeight,a=o+n.scrollWidth,u={top:i,right:a,bottom:s,left:o},d=OT(u,r.border),p=NT({borderBox:d,margin:r.margin,border:r.border,padding:r.padding});return p},xEe=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,s=e.isDropDisabled,a=e.isCombineEnabled,u=e.shouldClipSubject,d=r.closestScrollable,p=yEe(t,d),m=Ib(p,i),v=function(){if(!d)return null;var _=Aj(d),P={scrollHeight:d.scrollHeight,scrollWidth:d.scrollWidth};return{client:_,page:Ib(_,i),scroll:wE(d),scrollSize:P,shouldClipSubject:u}}(),x=vEe({descriptor:n,isEnabled:!s,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:o,client:p,page:m,closest:v});return x},bEe={passive:!1},_Ee={passive:!0},i6=function(e){return e.shouldPublishImmediately?bEe:_Ee};function Db(e){var t=w.exports.useContext(e);return t||ln(!1),t}var gx=function(t){return t&&t.env.closestScrollable||null};function wEe(e){var t=w.exports.useRef(null),n=Db(_w),r=JT("droppable"),i=n.registry,o=n.marshal,s=gH(e),a=br(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),u=w.exports.useRef(a),d=br(function(){return oo(function(N,L){t.current||ln(!1);var F={x:N,y:L};o.updateDroppableScroll(a.id,F)})},[a.id,o]),p=Ln(function(){var N=t.current;return!N||!N.env.closestScrollable?ao:wE(N.env.closestScrollable)},[]),m=Ln(function(){var N=p();d(N.x,N.y)},[p,d]),v=br(function(){return yv(m)},[m]),x=Ln(function(){var N=t.current,L=gx(N);N&&L||ln(!1);var F=N.scrollOptions;if(F.shouldPublishImmediately){m();return}v()},[v,m]),_=Ln(function(N,L){t.current&&ln(!1);var F=s.current,V=F.getDroppableRef();V||ln(!1);var B=gEe(V),H={ref:V,descriptor:a,env:B,scrollOptions:L};t.current=H;var G=xEe({ref:V,descriptor:a,env:B,windowScroll:N,direction:F.direction,isDropDisabled:F.isDropDisabled,isCombineEnabled:F.isCombineEnabled,shouldClipSubject:!F.ignoreContainerClipping}),ee=B.closestScrollable;return ee&&(ee.setAttribute(JN.contextId,n.contextId),ee.addEventListener("scroll",x,i6(H.scrollOptions))),G},[n.contextId,a,x,s]),P=Ln(function(){var N=t.current,L=gx(N);return N&&L||ln(!1),wE(L)},[]),k=Ln(function(){var N=t.current;N||ln(!1);var L=gx(N);t.current=null,L&&(v.cancel(),L.removeAttribute(JN.contextId),L.removeEventListener("scroll",x,i6(N.scrollOptions)))},[x,v]),T=Ln(function(N){var L=t.current;L||ln(!1);var F=gx(L);F||ln(!1),F.scrollTop+=N.y,F.scrollLeft+=N.x},[]),M=br(function(){return{getDimensionAndWatchScroll:_,getScrollWhileDragging:P,dragStopped:k,scroll:T}},[k,_,P,T]),O=br(function(){return{uniqueId:r,descriptor:a,callbacks:M}},[M,a,r]);La(function(){return u.current=O.descriptor,i.droppable.register(O),function(){t.current&&k(),i.droppable.unregister(O)}},[M,a,k,O,o,i.droppable]),La(function(){!t.current||o.updateDroppableIsEnabled(u.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),La(function(){!t.current||o.updateDroppableIsCombineEnabled(u.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function _2(){}var o6={width:0,height:0,margin:KCe},CEe=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate;return n||i==="close"?o6:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},SEe=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate,o=CEe({isAnimatingOpenOnMount:n,placeholder:r,animate:i});return{display:r.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:i!=="none"?Dg.placeholder:null}};function EEe(e){var t=w.exports.useRef(null),n=Ln(function(){!t.current||(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,s=e.contextId,a=w.exports.useState(e.animate==="open"),u=a[0],d=a[1];w.exports.useEffect(function(){return u?r!=="open"?(n(),d(!1),_2):t.current?_2:(t.current=setTimeout(function(){t.current=null,d(!1)}),n):_2},[r,u,n]);var p=Ln(function(v){v.propertyName==="height"&&(i(),r==="close"&&o())},[r,o,i]),m=SEe({isAnimatingOpenOnMount:u,animate:e.animate,placeholder:e.placeholder});return Un.createElement(e.placeholder.tagName,{style:m,"data-rbd-placeholder-context-id":s,onTransitionEnd:p,ref:e.innerRef})}var PEe=Un.memo(EEe),tk=Un.createContext(null),IEe=function(e){hj(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||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,o){return i.shouldAnimate?i.on?{isVisible:!0,data:i.on,animate:"open"}:o.isVisible?{isVisible:!0,data:o.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),a6={dragging:5e3,dropAnimating:4500},TEe=function(t,n){return n?Dg.drop(n.duration):t?Dg.snap:Dg.fluid},kEe=function(t,n){return t?n?wv.opacity.drop:wv.opacity.combining:null},MEe=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function REe(e){var t=e.dimension,n=t.client,r=e.offset,i=e.combineWith,o=e.dropping,s=Boolean(i),a=MEe(e),u=Boolean(o),d=u?xE.drop(r,s):xE.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:TEe(a,o),transform:d,opacity:kEe(s,u),zIndex:u?a6.dropAnimating:a6.dragging,pointerEvents:"none"};return p}function AEe(e){return{transform:xE.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function DEe(e){return e.type==="DRAGGING"?REe(e):AEe(e)}function OEe(e,t,n){n===void 0&&(n=ao);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=Rj(i,r),s=Ib(o,n),a={client:o,tagName:t.tagName.toLowerCase(),display:r.display},u={x:o.marginBox.width,y:o.marginBox.height},d={descriptor:e,placeholder:a,displaceBy:u,client:o,page:s};return d}function NEe(e){var t=JT("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,s=e.shouldRespectForcePress,a=e.isEnabled,u=br(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:a}},[o,a,s]),d=Ln(function(x){var _=i();return _||ln(!1),OEe(n,_,x)},[n,i]),p=br(function(){return{uniqueId:t,descriptor:n,options:u,getDimension:d}},[n,d,u,t]),m=w.exports.useRef(p),v=w.exports.useRef(!0);La(function(){return r.draggable.register(m.current),function(){return r.draggable.unregister(m.current)}},[r.draggable]),La(function(){if(v.current){v.current=!1;return}var x=m.current;m.current=p,r.draggable.update(p,x)},[p,r.draggable])}function LEe(e){e.preventDefault()}function FEe(e){var t=w.exports.useRef(null),n=Ln(function(H){t.current=H},[]),r=Ln(function(){return t.current},[]),i=Db(_w),o=i.contextId,s=i.dragHandleUsageInstructionsId,a=i.registry,u=Db(tk),d=u.type,p=u.droppableId,m=br(function(){return{id:e.draggableId,index:e.index,type:d,droppableId:p}},[e.draggableId,e.index,d,p]),v=e.children,x=e.draggableId,_=e.isEnabled,P=e.shouldRespectForcePress,k=e.canDragInteractiveElements,T=e.isClone,M=e.mapped,O=e.dropAnimationFinished;if(!T){var N=br(function(){return{descriptor:m,registry:a,getDraggableRef:r,canDragInteractiveElements:k,shouldRespectForcePress:P,isEnabled:_}},[m,a,r,k,P,_]);NEe(N)}var L=br(function(){return _?{tabIndex:0,role:"button","aria-describedby":s,"data-rbd-drag-handle-draggable-id":x,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:LEe}:null},[o,s,x,_]),F=Ln(function(H){M.type==="DRAGGING"&&(!M.dropping||H.propertyName==="transform"&&O())},[O,M]),V=br(function(){var H=DEe(M),G=M.type==="DRAGGING"&&M.dropping?F:null,ee={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":x,style:H,onTransitionEnd:G},dragHandleProps:L};return ee},[o,L,x,M,F,n]),B=br(function(){return{draggableId:m.id,type:m.type,source:{index:m.index,droppableId:m.droppableId}}},[m.droppableId,m.id,m.index,m.type]);return v(V,M.snapshot,B)}var SH=function(e,t){return e===t},EH=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},zEe=function(t){return t.combine?t.combine.draggableId:null},$Ee=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function BEe(){var e=oo(function(i,o){return{x:i,y:o}}),t=oo(function(i,o,s,a,u){return{isDragging:!0,isClone:o,isDropAnimating:Boolean(u),dropAnimation:u,mode:i,draggingOver:s,combineWith:a,combineTargetFor:null}}),n=oo(function(i,o,s,a,u,d,p){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:u,combineWith:d,mode:o,offset:i,dimension:s,forceShouldAnimate:p,snapshot:t(o,a,u,d,null)}}}),r=function(o,s){if(o.isDragging){if(o.critical.draggable.id!==s.draggableId)return null;var a=o.current.client.offset,u=o.dimensions.draggables[s.draggableId],d=Na(o.impact),p=$Ee(o.impact),m=o.forceShouldAnimate;return n(e(a.x,a.y),o.movementMode,u,s.isClone,d,p,m)}if(o.phase==="DROP_ANIMATING"){var v=o.completed;if(v.result.draggableId!==s.draggableId)return null;var x=s.isClone,_=o.dimensions.draggables[s.draggableId],P=v.result,k=P.mode,T=EH(P),M=zEe(P),O=o.dropDuration,N={duration:O,curve:WT.drop,moveTo:o.newHomeClientOffset,opacity:M?wv.opacity.drop:null,scale:M?wv.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:_,dropping:N,draggingOver:T,combineWith:M,mode:k,forceShouldAnimate:null,snapshot:t(k,x,T,M,N)}}}return null};return r}function PH(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var VEe={mapped:{type:"SECONDARY",offset:ao,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:PH(null)}};function UEe(){var e=oo(function(s,a){return{x:s,y:a}}),t=oo(PH),n=oo(function(s,a,u){return a===void 0&&(a=null),{mapped:{type:"SECONDARY",offset:s,combineTargetFor:a,shouldAnimateDisplacement:u,snapshot:t(a)}}}),r=function(a){return a?n(ao,a,!0):null},i=function(a,u,d,p){var m=d.displaced.visible[a],v=Boolean(p.inVirtualList&&p.effected[a]),x=vw(d),_=x&&x.draggableId===a?u:null;if(!m){if(!v)return r(_);if(d.displaced.invisible[a])return null;var P=Ap(p.displacedBy.point),k=e(P.x,P.y);return n(k,_,!0)}if(v)return r(_);var T=d.displacedBy.point,M=e(T.x,T.y);return n(M,_,m.shouldAnimate)},o=function(a,u){if(a.isDragging)return a.critical.draggable.id===u.draggableId?null:i(u.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){var d=a.completed;return d.result.draggableId===u.draggableId?null:i(u.draggableId,d.result.draggableId,d.impact,d.afterCritical)}return null};return o}var jEe=function(){var t=BEe(),n=UEe(),r=function(o,s){return t(o,s)||n(o,s)||VEe};return r},HEe={dropAnimationFinished:oH},KEe=kj(jEe,HEe,null,{context:QT,pure:!0,areStatePropsEqual:SH})(FEe);function IH(e){var t=Db(tk),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:I(KEe,{...e})}function WEe(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return I(IH,{...e,isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r})}function GEe(e){var t=w.exports.useContext(_w);t||ln(!1);var n=t.contextId,r=t.isMovementAllowed,i=w.exports.useRef(null),o=w.exports.useRef(null),s=e.children,a=e.droppableId,u=e.type,d=e.mode,p=e.direction,m=e.ignoreContainerClipping,v=e.isDropDisabled,x=e.isCombineEnabled,_=e.snapshot,P=e.useClone,k=e.updateViewportMaxScroll,T=e.getContainerForClone,M=Ln(function(){return i.current},[]),O=Ln(function(ee){i.current=ee},[]);Ln(function(){return o.current},[]);var N=Ln(function(ee){o.current=ee},[]),L=Ln(function(){r()&&k({maxScroll:cH()})},[r,k]);wEe({droppableId:a,type:u,mode:d,direction:p,isDropDisabled:v,isCombineEnabled:x,ignoreContainerClipping:m,getDroppableRef:M});var F=I(IEe,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder,children:function(ee){var X=ee.onClose,Z=ee.data,Q=ee.animate;return I(PEe,{placeholder:Z,onClose:X,innerRef:N,animate:Q,contextId:n,onTransitionEnd:L})}}),V=br(function(){return{innerRef:O,placeholder:F,droppableProps:{"data-rbd-droppable-id":a,"data-rbd-droppable-context-id":n}}},[n,a,F,O]),B=P?P.dragging.draggableId:null,H=br(function(){return{droppableId:a,type:u,isUsingCloneFor:B}},[a,B,u]);function G(){if(!P)return null;var ee=P.dragging,X=P.render,Z=I(IH,{draggableId:ee.draggableId,index:ee.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0,children:function(Q,le){return X(Q,le,ee)}});return Tc.createPortal(Z,T())}return $e(tk.Provider,{value:H,children:[s(V,_),G()]})}var w2=function(t,n){return t===n.droppable.type},s6=function(t,n){return n.draggables[t.draggable.id]},qEe=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ze({},t,{shouldAnimatePlaceholder:!1}),r=oo(function(s){return{draggableId:s.id,type:s.type,source:{index:s.index,droppableId:s.droppableId}}}),i=oo(function(s,a,u,d,p,m){var v=p.descriptor.id,x=p.descriptor.droppableId===s;if(x){var _=m?{render:m,dragging:r(p.descriptor)}:null,P={isDraggingOver:u,draggingOverWith:u?v:null,draggingFromThisWith:v,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!1,snapshot:P,useClone:_}}if(!a)return n;if(!d)return t;var k={isDraggingOver:u,draggingOverWith:v,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!0,snapshot:k,useClone:null}}),o=function(a,u){var d=u.droppableId,p=u.type,m=!u.isDropDisabled,v=u.renderClone;if(a.isDragging){var x=a.critical;if(!w2(p,x))return n;var _=s6(x,a.dimensions),P=Na(a.impact)===d;return i(d,m,P,P,_,v)}if(a.phase==="DROP_ANIMATING"){var k=a.completed;if(!w2(p,k.critical))return n;var T=s6(k.critical,a.dimensions);return i(d,m,EH(k.result)===d,Na(k.impact)===d,T,v)}if(a.phase==="IDLE"&&a.completed&&!a.shouldFlush){var M=a.completed;if(!w2(p,M.critical))return n;var O=Na(M.impact)===d,N=Boolean(M.impact.at&&M.impact.at.type==="COMBINE"),L=M.critical.droppable.id===d;return O?N?t:n:L?t:n}return n};return o},ZEe={updateViewportMaxScroll:rSe};function XEe(){return document.body||ln(!1),document.body}var YEe={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:XEe},TH=kj(qEe,ZEe,null,{context:QT,pure:!0,areStatePropsEqual:SH})(GEe);TH.defaultProps=YEe;const QEe=({orderColumns:e})=>{const[t,n]=w.exports.useState(e.order);w.exports.useEffect(()=>{n(e.order)},[e]);const r=s=>{if(!s.destination)return;var a=[...t];const[u]=a.splice(s.source.index,1);a.splice(s.destination.index,0,u),n(a),e.setOrder(a)},i=s=>{const a=t.map((u,d)=>s===d?{...u,show:!u.show}:u);n(a),e.setOrder(a)},o=()=>I("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:I(uEe,{onDragEnd:r,children:I(TH,{droppableId:"tableOrder",children:s=>$e("div",{className:"flex flex-col",...s.droppableProps,ref:s.innerRef,children:[t.map((a,u)=>{const d=a.position;if(!!e.defaultColumns[d])return I(WEe,{draggableId:`list-${d}`,index:u,children:p=>$e("div",{className:"flex flex-row gap-2 p-1.5 hover:bg-gray-300 rounded-md",ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,children:[I(bc,{onChange:()=>i(u),checked:a.show}),I("p",{className:"m-0",children:e.defaultColumns[d].name||e.defaultColumns[d].title})]})},`list-${d}`)}),s.placeholder]})})})});return I(qv,{trigger:"click",dropdownRender:()=>o(),children:I($n,{onClick:s=>s.stopPropagation(),children:I(qwe,{})})})},JEe=()=>{const{tableState:{fullScreen:e},toggleFullScreen:t}=s0(),[n,r]=w.exports.useState(!1);return w.exports.useEffect(()=>{const a=setTimeout(()=>r(!1),1500);return()=>clearTimeout(a)},[n]),I($i,{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:I($n,{onClick:a=>{a.stopPropagation(),t()},onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)},children:e?I(Nwe,{}):I(zwe,{})})})},Cw=({leftColumn:e,rightColumn:t,exportProvider:n,classes:r,orderColumns:i})=>$e("div",{className:"flex items-center w-full justify-between",children:[$e("div",{className:r==null?void 0:r.leftColumn,children:[I("span",{className:"py-[5px]",children:"\u0422\u0430\u0431\u043B\u0438\u0446\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043E\u0432"}),e]}),$e("div",{className:r==null?void 0:r.rightColumn,children:[t,$e("div",{className:"flex items-center gap-x-1",children:[I(QEe,{orderColumns:i}),n&&I(P4e,{provider:n}),I(JEe,{})]})]})]});let l6=e=>typeof e=="object"&&e!=null&&e.nodeType===1,u6=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",C2=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return u6(n.overflowY,t)||u6(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},vx=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,ePe=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t},c6=(e,t)=>{var n,r,i,o;if(typeof document>"u")return[];let{scrollMode:s,block:a,inline:u,boundary:d,skipOverflowHiddenElements:p}=t,m=typeof d=="function"?d:X=>X!==d;if(!l6(e))throw new TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,x=[],_=e;for(;l6(_)&&m(_);){if(_=ePe(_),_===v){x.push(_);break}_!=null&&_===document.body&&C2(_)&&!C2(document.documentElement)||_!=null&&C2(_,p)&&x.push(_)}let P=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,k=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:T,scrollY:M}=window,{height:O,width:N,top:L,right:F,bottom:V,left:B}=e.getBoundingClientRect(),H=a==="start"||a==="nearest"?L:a==="end"?V:L+O/2,G=u==="center"?B+N/2:u==="end"?F:B,ee=[];for(let X=0;X<x.length;X++){let Z=x[X],{height:Q,width:le,top:ne,right:se,bottom:oe,left:he}=Z.getBoundingClientRect();if(s==="if-needed"&&L>=0&&B>=0&&V<=k&&F<=P&&L>=ne&&V<=oe&&B>=he&&F<=se)return ee;let _e=getComputedStyle(Z),be=parseInt(_e.borderLeftWidth,10),xe=parseInt(_e.borderTopWidth,10),Te=parseInt(_e.borderRightWidth,10),Ee=parseInt(_e.borderBottomWidth,10),Ce=0,ke=0,De="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-be-Te:0,Ke="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-xe-Ee:0,Ue="offsetWidth"in Z?Z.offsetWidth===0?0:le/Z.offsetWidth:0,tt="offsetHeight"in Z?Z.offsetHeight===0?0:Q/Z.offsetHeight:0;if(v===Z)Ce=a==="start"?H:a==="end"?H-k:a==="nearest"?vx(M,M+k,k,xe,Ee,M+H,M+H+O,O):H-k/2,ke=u==="start"?G:u==="center"?G-P/2:u==="end"?G-P:vx(T,T+P,P,be,Te,T+G,T+G+N,N),Ce=Math.max(0,Ce+M),ke=Math.max(0,ke+T);else{Ce=a==="start"?H-ne-xe:a==="end"?H-oe+Ee+Ke:a==="nearest"?vx(ne,oe,Q,xe,Ee+Ke,H,H+O,O):H-(ne+Q/2)+Ke/2,ke=u==="start"?G-he-be:u==="center"?G-(he+le/2)+De/2:u==="end"?G-se+Te+De:vx(he,se,le,be,Te+De,G,G+N,N);let{scrollLeft:lt,scrollTop:St}=Z;Ce=Math.max(0,Math.min(St+Ce/tt,Z.scrollHeight-Q/tt+Ke)),ke=Math.max(0,Math.min(lt+ke/Ue,Z.scrollWidth-le/Ue+De)),H+=St-Ce,G+=lt-ke}ee.push({el:Z,top:Ce,left:ke})}return ee},tPe=e=>typeof e=="object"&&typeof e.behavior=="function",nPe=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function rPe(e,t){if(!e.isConnected||!e.ownerDocument.documentElement.contains(e))return;if(tPe(t))return t.behavior(c6(e,t));let n=typeof t=="boolean"||t==null?void 0:t.behavior;for(let{el:r,top:i,left:o}of c6(e,nPe(t)))r.scroll({top:i,left:o,behavior:n})}const nk=Un.memo(({rowSelection:e,data:t,pageSize:n,isClickedPointLoading:r,page:i,onPageChange:o,columns:s,header:a,fullWidth:u,loading:d,onChange:p})=>{const{clickedPointConfig:m,setClickedPointConfig:v}=Su(),{map:x}=WP(),{tableState:_,toggleOpened:P}=s0(),{setPopup:k}=Sf(),T={y:_.fullScreen?"calc(100vh - 136px)":"200px",x:"max-content"};return w.exports.useEffect(()=>{if(m===null||r)return;const M=document.querySelector(".scroll-row");M&&rPe(M,{behavior:"smooth"})},[m,t]),I(ll,{bordered:!1,onChange:P,activeKey:_.isOpened?"opened":null,children:I(ll.Panel,{header:a||I(Cw,{}),collapsible:_.fullScreen?"disabled":void 0,children:I(xU,{size:"small",className:da("table__wrapper",_.fullScreen&&"table__wrapper__fullScreen"),locale:{emptyText:I(dl,{description:"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})},pagination:{pageSize:n,current:i,onChange:o,total:t==null?void 0:t.count,showSizeChanger:!1,position:"bottomCenter"},showHeader:(t==null?void 0:t.results)&&t.results.length>0,dataSource:t==null?void 0:t.results,columns:s,onChange:p,rowKey:"id",scroll:T,sticky:!0,onRow:M=>({onClick:()=>{const O=Rp.exports(M.geometry);x.flyTo({center:[O.coordinates[0],O.coordinates[1]],zoom:13,essential:!0}),k({features:[{properties:M}],coordinates:O.coordinates}),v(M.id,e==null?void 0:e.selectedRowKeys.includes(M.id))}}),rowSelection:e,rowClassName:M=>da("cursor-pointer",M.id===(m==null?void 0:m.id)&&"scroll-row"),"data-fullwidth":u,loading:d})},"opened")})}),up=(e,t)=>{var n,r;return(r=(n=t==null?void 0:t[e])==null?void 0:n.name)!=null?r:e},CE=[{name:"\u0410\u0434\u0440\u0435\u0441",field:"address"},{name:"\u0420\u0430\u0439\u043E\u043D",field:"area_id",fallbackField:"area",render:up,type:"region"},{name:"\u041E\u043A\u0440\u0443\u0433",field:"district_id",fallbackField:"district",render:up,type:"region"},{name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",field:"name"},{name:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",field:"category"},{name:"\u0421\u0442\u0430\u0442\u0443\u0441",field:"status",render:e=>Nd[e]},{name:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",field:"prediction_current"}],kH=[{name:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440",field:"flat_cnt"},{name:"\u0413\u043E\u0434 \u043F\u043E\u0441\u0442\u0440\u043E\u0439\u043A\u0438",field:"year_bld"},{name:"\u041A\u043E\u043B-\u0432\u043E \u044D\u0442\u0430\u0436\u0435\u0439",field:"levels"},{name:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0441\u0442\u0435\u043D",field:"mat_nes"}];[...CE,...kH];const iPe=[{name:"\u041F\u043B\u0430\u043D",field:"plan_current"},{name:"\u0424\u0430\u043A\u0442",field:"fact"},{name:"\u0420\u0430\u0441\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u0435 \u0441 \u043F\u0440\u043E\u0433\u043D\u043E\u0437\u043E\u043C",field:"delta_current"},{name:"\u0417\u0440\u0435\u043B\u043E\u0441\u0442\u044C",field:"age_day"},{name:"id \u043B\u043E\u043A\u0430\u0446\u0438\u0438",field:"postamat_id",empty:"\u041D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D"}],oPe=[{name:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",field:"category_id"},{name:"\u0413\u0440\u0443\u043F\u043F\u0430",field:"group_id"}];function aPe(e,t){const[n,r]=w.exports.useState(e);return w.exports.useEffect(()=>{const i=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(i)}},[e,t]),n}const sPe=e=>I("div",{children:e}),rk=({autoFocus:e=!1})=>{const{map:t}=WP(),[n,r]=w.exports.useState(""),i=aPe(n),{setPopup:o}=Sf(),{setClickedPointConfig:s}=Su(),a=w.exports.useRef(),u=ys(),{data:d}=Vi(["address",i],async()=>(await Mi.get(`https://postamates.spatialsystems.ru/api/${u}/search_address?page_size=100&address=${i}`)).data,{enabled:!!i}),p=w.exports.useMemo(()=>d?d.results.map(x=>({label:sPe(x.address),value:`${x.address}$${x.id}`,item:x})):[],[d]),m=x=>{r(x&&x.split("$")[0])},v=(x,_)=>{const P=Rp.exports(_.item.geometry);t.flyTo({center:[P.coordinates[0],P.coordinates[1]],zoom:13,essential:!0});const k={properties:_.item};o({features:[k],coordinates:P.coordinates}),s(k.properties.id)};return w.exports.useEffect(()=>{e&&(a==null?void 0:a.current)&&a.current.focus()},[e]),I("div",{children:I(use,{options:p,style:{width:300},value:n,onChange:m,onSelect:v,allowClear:!0,onClear:()=>r(""),autoFocus:e,popupClassName:"overflow-visible",children:I(nV,{prefix:I(TT,{}),placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0442\u043E\u0447\u043A\u0438",className:"text-ellipsis",ref:a})})})};var MH={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},d6=Un.createContext&&Un.createContext(MH),Sc=globalThis&&globalThis.__assign||function(){return Sc=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},Sc.apply(this,arguments)},lPe=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 RH(e){return e&&e.map(function(t,n){return Un.createElement(t.tag,Sc({key:n},t.attr),RH(t.child))})}function ik(e){return function(t){return I(uPe,{...Sc({attr:Sc({},e.attr)},t),children:RH(e.child)})}}function uPe(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,s=lPe(e,["attr","size","title"]),a=i||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),$e("svg",{...Sc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:u,style:Sc(Sc({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),children:[o&&I("title",{children:o}),e.children]})};return d6!==void 0?I(d6.Consumer,{children:function(n){return t(n)}}):t(MH)}function cPe(e){return ik({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M22 7.999a1 1 0 0 0-.516-.874l-9.022-5a1.003 1.003 0 0 0-.968 0l-8.978 4.96a1 1 0 0 0-.003 1.748l9.022 5.04a.995.995 0 0 0 .973.001l8.978-5A1 1 0 0 0 22 7.999zm-9.977 3.855L5.06 7.965l6.917-3.822 6.964 3.859-6.918 3.852z"}},{tag:"path",attr:{d:"M20.515 11.126 12 15.856l-8.515-4.73-.971 1.748 9 5a1 1 0 0 0 .971 0l9-5-.97-1.748z"}},{tag:"path",attr:{d:"M20.515 15.126 12 19.856l-8.515-4.73-.971 1.748 9 5a1 1 0 0 0 .971 0l9-5-.97-1.748z"}}]})(e)}function dPe(e){return ik({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 12a2 2 0 0 0-.703.133l-2.398-1.963c.059-.214.101-.436.101-.67C17 8.114 15.886 7 14.5 7S12 8.114 12 9.5c0 .396.1.765.262 1.097l-2.909 3.438A2.06 2.06 0 0 0 9 14c-.179 0-.348.03-.512.074l-2.563-2.563C5.97 11.348 6 11.179 6 11c0-1.108-.892-2-2-2s-2 .892-2 2 .892 2 2 2c.179 0 .348-.03.512-.074l2.563 2.563A1.906 1.906 0 0 0 7 16c0 1.108.892 2 2 2s2-.892 2-2c0-.237-.048-.46-.123-.671l2.913-3.442c.227.066.462.113.71.113a2.48 2.48 0 0 0 1.133-.281l2.399 1.963A2.077 2.077 0 0 0 18 14c0 1.108.892 2 2 2s2-.892 2-2-.892-2-2-2z"}}]})(e)}function fPe(e){return ik({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M5 20a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8h2V6h-4V4a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v2H3v2h2zM9 4h6v2H9zM8 8h9v12H7V8z"}},{tag:"path",attr:{d:"M9 10h2v8H9zm4 0h2v8h-2z"}}]})(e)}/*!
|
|
|
* @kurkle/color v0.3.4
|
|
|
* https://github.com/kurkle/color#readme
|
|
|
* (c) 2024 Jukka Kurkela
|
|
|
* Released under the MIT License
|
|
|
*/function x0(e){return e+.5|0}const lc=(e,t,n)=>Math.max(Math.min(e,n),t);function ug(e){return lc(x0(e*2.55),0,255)}function Ec(e){return lc(x0(e*255),0,255)}function nu(e){return lc(x0(e/2.55)/100,0,1)}function f6(e){return lc(x0(e*100),0,100)}const es={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},SE=[..."0123456789ABCDEF"],hPe=e=>SE[e&15],pPe=e=>SE[(e&240)>>4]+SE[e&15],yx=e=>(e&240)>>4===(e&15),mPe=e=>yx(e.r)&&yx(e.g)&&yx(e.b)&&yx(e.a);function gPe(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&es[e[1]]*17,g:255&es[e[2]]*17,b:255&es[e[3]]*17,a:t===5?es[e[4]]*17:255}:(t===7||t===9)&&(n={r:es[e[1]]<<4|es[e[2]],g:es[e[3]]<<4|es[e[4]],b:es[e[5]]<<4|es[e[6]],a:t===9?es[e[7]]<<4|es[e[8]]:255})),n}const vPe=(e,t)=>e<255?t(e):"";function yPe(e){var t=mPe(e)?hPe:pPe;return e?"#"+t(e.r)+t(e.g)+t(e.b)+vPe(e.a,t):void 0}const xPe=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function AH(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function bPe(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function _Pe(e,t,n){const r=AH(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 wPe(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 ok(e){const n=e.r/255,r=e.g/255,i=e.b/255,o=Math.max(n,r,i),s=Math.min(n,r,i),a=(o+s)/2;let u,d,p;return o!==s&&(p=o-s,d=a>.5?p/(2-o-s):p/(o+s),u=wPe(n,r,i,p,o),u=u*60+.5),[u|0,d||0,a]}function ak(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Ec)}function sk(e,t,n){return ak(AH,e,t,n)}function CPe(e,t,n){return ak(_Pe,e,t,n)}function SPe(e,t,n){return ak(bPe,e,t,n)}function DH(e){return(e%360+360)%360}function EPe(e){const t=xPe.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?ug(+t[5]):Ec(+t[5]));const i=DH(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=CPe(i,o,s):t[1]==="hsv"?r=SPe(i,o,s):r=sk(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function PPe(e,t){var n=ok(e);n[0]=DH(n[0]+t),n=sk(n),e.r=n[0],e.g=n[1],e.b=n[2]}function IPe(e){if(!e)return;const t=ok(e),n=t[0],r=f6(t[1]),i=f6(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${nu(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const h6={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"},p6={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 TPe(){const e={},t=Object.keys(p6),n=Object.keys(h6);let r,i,o,s,a;for(r=0;r<t.length;r++){for(s=a=t[r],i=0;i<n.length;i++)o=n[i],a=a.replace(o,h6[o]);o=parseInt(p6[s],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let xx;function kPe(e){xx||(xx=TPe(),xx.transparent=[0,0,0,0]);const t=xx[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const MPe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function RPe(e){const t=MPe.exec(e);let n=255,r,i,o;if(!!t){if(t[7]!==r){const s=+t[7];n=t[8]?ug(s):lc(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?ug(r):lc(r,0,255)),i=255&(t[4]?ug(i):lc(i,0,255)),o=255&(t[6]?ug(o):lc(o,0,255)),{r,g:i,b:o,a:n}}}function APe(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${nu(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const S2=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,sh=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function DPe(e,t,n){const r=sh(nu(e.r)),i=sh(nu(e.g)),o=sh(nu(e.b));return{r:Ec(S2(r+n*(sh(nu(t.r))-r))),g:Ec(S2(i+n*(sh(nu(t.g))-i))),b:Ec(S2(o+n*(sh(nu(t.b))-o))),a:e.a+n*(t.a-e.a)}}function bx(e,t,n){if(e){let r=ok(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=sk(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function OH(e,t){return e&&Object.assign(t||{},e)}function m6(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=Ec(e[3]))):(t=OH(e,{r:0,g:0,b:0,a:1}),t.a=Ec(t.a)),t}function OPe(e){return e.charAt(0)==="r"?RPe(e):EPe(e)}class Cv{constructor(t){if(t instanceof Cv)return t;const n=typeof t;let r;n==="object"?r=m6(t):n==="string"&&(r=gPe(t)||kPe(t)||OPe(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=OH(this._rgb);return t&&(t.a=nu(t.a)),t}set rgb(t){this._rgb=m6(t)}rgbString(){return this._valid?APe(this._rgb):void 0}hexString(){return this._valid?yPe(this._rgb):void 0}hslString(){return this._valid?IPe(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,u=r.a-i.a,d=((a*u===-1?a:(a+u)/(1+a*u))+1)/2;o=1-d,r.r=255&d*r.r+o*i.r+.5,r.g=255&d*r.g+o*i.g+.5,r.b=255&d*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=DPe(this._rgb,t._rgb,n)),this}clone(){return new Cv(this.rgb)}alpha(t){return this._rgb.a=Ec(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=x0(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 bx(this._rgb,2,t),this}darken(t){return bx(this._rgb,2,-t),this}saturate(t){return bx(this._rgb,1,t),this}desaturate(t){return bx(this._rgb,1,-t),this}rotate(t){return PPe(this._rgb,t),this}}/*!
|
|
|
* Chart.js v4.5.0
|
|
|
* https://www.chartjs.org
|
|
|
* (c) 2025 Chart.js Contributors
|
|
|
* Released under the MIT License
|
|
|
*/function Wl(){}const NPe=(()=>{let e=0;return()=>e++})();function wr(e){return e==null}function li(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 Sr(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ro(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ia(e,t){return ro(e)?e:t}function cr(e,t){return typeof e>"u"?t:e}const LPe=(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 Ar(e,t,n,r){let i,o,s;if(li(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(Sr(e))for(s=Object.keys(e),o=s.length,i=0;i<o;i++)t.call(n,e[s[i]],s[i])}function Ob(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Nb(e){if(li(e))return e.map(Nb);if(Sr(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Nb(e[n[i]]);return t}return e}function NH(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function FPe(e,t,n,r){if(!NH(e))return;const i=t[e],o=n[e];Sr(i)&&Sr(o)?Sv(i,o,r):t[e]=Nb(o)}function Sv(e,t,n){const r=li(t)?t:[t],i=r.length;if(!Sr(e))return e;n=n||{};const o=n.merger||FPe;let s;for(let a=0;a<i;++a){if(s=r[a],!Sr(s))continue;const u=Object.keys(s);for(let d=0,p=u.length;d<p;++d)o(u[d],e,s,n)}return e}function Og(e,t){return Sv(e,t,{merger:zPe})}function zPe(e,t,n){if(!NH(e))return;const r=t[e],i=n[e];Sr(r)&&Sr(i)?Og(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Nb(i))}const g6={"":e=>e,x:e=>e.x,y:e=>e.y};function $Pe(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 BPe(e){const t=$Pe(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function cp(e,t){return(g6[t]||(g6[t]=BPe(t)))(e)}function lk(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ev=e=>typeof e<"u",Dc=e=>typeof e=="function",v6=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function VPe(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Bi=Math.PI,ds=2*Bi,UPe=ds+Bi,Lb=Number.POSITIVE_INFINITY,jPe=Bi/180,Aa=Bi/2,gd=Bi/4,y6=Bi*2/3,uc=Math.log10,bl=Math.sign;function Ng(e,t,n){return Math.abs(e-t)<n}function x6(e){const t=Math.round(e);e=Ng(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(uc(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function HPe(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,o)=>i-o).pop(),t}function KPe(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Pv(e){return!KPe(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function WPe(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function LH(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function cc(e){return e*(Bi/180)}function uk(e){return e*(180/Bi)}function b6(e){if(!ro(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function GPe(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*Bi&&(o+=ds),{angle:o,distance:i}}function EE(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function qPe(e,t){return(e-t+UPe)%ds-Bi}function Ns(e){return(e%ds+ds)%ds}function FH(e,t,n,r){const i=Ns(e),o=Ns(t),s=Ns(n),a=Ns(o-i),u=Ns(s-i),d=Ns(i-o),p=Ns(i-s);return i===o||i===s||r&&o===s||a>u&&d<p}function Da(e,t,n){return Math.max(t,Math.min(n,e))}function ZPe(e){return Da(e,-32768,32767)}function Bd(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function ck(e,t,n){n=n||(s=>e[s]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Vd=(e,t,n,r)=>ck(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),XPe=(e,t,n)=>ck(e,n,r=>e[r][t]>=n);function YPe(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 zH=["push","pop","shift","splice","unshift"];function QPe(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),zH.forEach(n=>{const r="_onData"+lk(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function _6(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)&&(zH.forEach(o=>{delete e[o]}),delete e._chartjs)}function $H(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const BH=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function VH(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,BH.call(window,()=>{r=!1,e.apply(t,n)}))}}function JPe(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const dk=e=>e==="start"?"left":e==="end"?"right":"center",Po=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,eIe=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function tIe(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,vScale:a,_parsed:u}=e,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,p=s.axis,{min:m,max:v,minDefined:x,maxDefined:_}=s.getUserBounds();if(x){if(i=Math.min(Vd(u,p,m).lo,n?r:Vd(t,p,s.getPixelForValue(m)).lo),d){const P=u.slice(0,i+1).reverse().findIndex(k=>!wr(k[a.axis]));i-=Math.max(0,P)}i=Da(i,0,r-1)}if(_){let P=Math.max(Vd(u,s.axis,v,!0).hi+1,n?0:Vd(t,p,s.getPixelForValue(v),!0).hi+1);if(d){const k=u.slice(P-1).findIndex(T=>!wr(T[a.axis]));P+=Math.max(0,k)}o=Da(P,i,r)-i}else o=r-i}return{start:i,count:o}}function nIe(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 o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const _x=e=>e===0||e===1,w6=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ds/n)),C6=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*ds/n)+1,Lg={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*Aa)+1,easeOutSine:e=>Math.sin(e*Aa),easeInOutSine:e=>-.5*(Math.cos(Bi*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=>_x(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=>_x(e)?e:w6(e,.075,.3),easeOutElastic:e=>_x(e)?e:C6(e,.075,.3),easeInOutElastic(e){return _x(e)?e:e<.5?.5*w6(e*2,.1125,.45):.5+.5*C6(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-Lg.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?Lg.easeInBounce(e*2)*.5:Lg.easeOutBounce(e*2-1)*.5+.5};function fk(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function S6(e){return fk(e)?e:new Cv(e)}function E2(e){return fk(e)?e:new Cv(e).saturate(.5).darken(.1).hexString()}const rIe=["x","y","borderWidth","radius","tension"],iIe=["color","borderColor","backgroundColor"];function oIe(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:iIe},numbers:{type:"number",properties:rIe}}),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 aIe(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const E6=new Map;function sIe(e,t){t=t||{};const n=e+JSON.stringify(t);let r=E6.get(n);return r||(r=new Intl.NumberFormat(e,t),E6.set(n,r)),r}function hk(e,t,n){return sIe(t,n).format(e)}const UH={values(e){return li(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(i="scientific"),o=lIe(e,n)}const s=uc(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),u={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(u,this.options.ticks.format),hk(e,r,u)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(uc(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?UH.numeric.call(this,e,t,n):""}};function lIe(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 Sw={formatters:UH};function uIe(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:Sw.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 lf=Object.create(null),PE=Object.create(null);function Fg(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function P2(e,t,n){return typeof t=="string"?Sv(Fg(e,t),n):Sv(Fg(e,""),t)}class cIe{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)=>E2(i.backgroundColor),this.hoverBorderColor=(r,i)=>E2(i.borderColor),this.hoverColor=(r,i)=>E2(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 P2(this,t,n)}get(t){return Fg(this,t)}describe(t,n){return P2(PE,t,n)}override(t,n){return P2(lf,t,n)}route(t,n,r,i){const o=Fg(this,t),s=Fg(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const u=this[a],d=s[i];return Sr(u)?Object.assign({},d,u):cr(u,d)},set(u){this[a]=u}}})}apply(t){t.forEach(n=>n(this))}}var _i=new cIe({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[oIe,aIe,uIe]);function dIe(e){return!e||wr(e.size)||wr(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Fb(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function fIe(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let u,d,p,m,v;for(u=0;u<a;u++)if(m=n[u],m!=null&&!li(m))s=Fb(e,i,o,s,m);else if(li(m))for(d=0,p=m.length;d<p;d++)v=m[d],v!=null&&!li(v)&&(s=Fb(e,i,o,s,v));e.restore();const x=o.length/2;if(x>n.length){for(u=0;u<x;u++)delete i[o[u]];o.splice(0,x)}return s}function vd(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 P6(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function IE(e,t,n,r){jH(e,t,n,r,null)}function jH(e,t,n,r,i){let o,s,a,u,d,p,m,v;const x=t.pointStyle,_=t.rotation,P=t.radius;let k=(_||0)*jPe;if(x&&typeof x=="object"&&(o=x.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(k),e.drawImage(x,-x.width/2,-x.height/2,x.width,x.height),e.restore();return}if(!(isNaN(P)||P<=0)){switch(e.beginPath(),x){default:i?e.ellipse(n,r,i/2,P,0,0,ds):e.arc(n,r,P,0,ds),e.closePath();break;case"triangle":p=i?i/2:P,e.moveTo(n+Math.sin(k)*p,r-Math.cos(k)*P),k+=y6,e.lineTo(n+Math.sin(k)*p,r-Math.cos(k)*P),k+=y6,e.lineTo(n+Math.sin(k)*p,r-Math.cos(k)*P),e.closePath();break;case"rectRounded":d=P*.516,u=P-d,s=Math.cos(k+gd)*u,m=Math.cos(k+gd)*(i?i/2-d:u),a=Math.sin(k+gd)*u,v=Math.sin(k+gd)*(i?i/2-d:u),e.arc(n-m,r-a,d,k-Bi,k-Aa),e.arc(n+v,r-s,d,k-Aa,k),e.arc(n+m,r+a,d,k,k+Aa),e.arc(n-v,r+s,d,k+Aa,k+Bi),e.closePath();break;case"rect":if(!_){u=Math.SQRT1_2*P,p=i?i/2:u,e.rect(n-p,r-u,2*p,2*u);break}k+=gd;case"rectRot":m=Math.cos(k)*(i?i/2:P),s=Math.cos(k)*P,a=Math.sin(k)*P,v=Math.sin(k)*(i?i/2:P),e.moveTo(n-m,r-a),e.lineTo(n+v,r-s),e.lineTo(n+m,r+a),e.lineTo(n-v,r+s),e.closePath();break;case"crossRot":k+=gd;case"cross":m=Math.cos(k)*(i?i/2:P),s=Math.cos(k)*P,a=Math.sin(k)*P,v=Math.sin(k)*(i?i/2:P),e.moveTo(n-m,r-a),e.lineTo(n+m,r+a),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s);break;case"star":m=Math.cos(k)*(i?i/2:P),s=Math.cos(k)*P,a=Math.sin(k)*P,v=Math.sin(k)*(i?i/2:P),e.moveTo(n-m,r-a),e.lineTo(n+m,r+a),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s),k+=gd,m=Math.cos(k)*(i?i/2:P),s=Math.cos(k)*P,a=Math.sin(k)*P,v=Math.sin(k)*(i?i/2:P),e.moveTo(n-m,r-a),e.lineTo(n+m,r+a),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s);break;case"line":s=i?i/2:Math.cos(k)*P,a=Math.sin(k)*P,e.moveTo(n-s,r-a),e.lineTo(n+s,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(k)*(i?i/2:P),r+Math.sin(k)*P);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function au(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 pk(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function mk(e){e.restore()}function hIe(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,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 pIe(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 mIe(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),wr(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 gIe(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),s=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,u=n-o.actualBoundingBoxAscent,d=n+o.actualBoundingBoxDescent,p=i.strikethrough?(u+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(s,p),e.lineTo(a,p),e.stroke()}}function vIe(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function uf(e,t,n,r,i,o={}){const s=li(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let u,d;for(e.save(),e.font=i.string,mIe(e,o),u=0;u<s.length;++u)d=s[u],o.backdrop&&vIe(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),wr(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(d,n,r,o.maxWidth)),e.fillText(d,n,r,o.maxWidth),gIe(e,n,r,d,o),r+=Number(i.lineHeight);e.restore()}function Iv(e,t){const{x:n,y:r,w:i,h:o,radius:s}=t;e.arc(n+s.topLeft,r+s.topLeft,s.topLeft,1.5*Bi,Bi,!0),e.lineTo(n,r+o-s.bottomLeft),e.arc(n+s.bottomLeft,r+o-s.bottomLeft,s.bottomLeft,Bi,Aa,!0),e.lineTo(n+i-s.bottomRight,r+o),e.arc(n+i-s.bottomRight,r+o-s.bottomRight,s.bottomRight,Aa,0,!0),e.lineTo(n+i,r+s.topRight),e.arc(n+i-s.topRight,r+s.topRight,s.topRight,0,-Aa,!0),e.lineTo(n+s.topLeft,r)}const yIe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,xIe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function bIe(e,t){const n=(""+e).match(yIe);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 _Ie=e=>+e||0;function HH(e,t){const n={},r=Sr(t),i=r?Object.keys(t):t,o=Sr(e)?r?s=>cr(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=_Ie(o(s));return n}function KH(e){return HH(e,{top:"y",right:"x",bottom:"y",left:"x"})}function qd(e){return HH(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Ao(e){const t=KH(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Gi(e,t){e=e||{},t=t||_i.font;let n=cr(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=cr(e.style,t.style);r&&!(""+r).match(xIe)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:cr(e.family,t.family),lineHeight:bIe(cr(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:cr(e.weight,t.weight),string:""};return i.string=dIe(i),i}function wx(e,t,n,r){let i=!0,o,s,a;for(o=0,s=e.length;o<s;++o)if(a=e[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),i=!1),n!==void 0&&li(a)&&(a=a[n%a.length],i=!1),a!==void 0))return r&&!i&&(r.cacheable=!1),a}function wIe(e,t,n){const{min:r,max:i}=e,o=LPe(t,(i-r)/2),s=(a,u)=>n&&a===0?0:a+u;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Vc(e,t){return Object.assign(Object.create(e),t)}function gk(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=ZH("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:a=>gk([a,...e],t,o,r)};return new Proxy(s,{deleteProperty(a,u){return delete a[u],delete a._keys,delete e[0][u],!0},get(a,u){return GH(a,u,()=>MIe(u,t,e,a))},getOwnPropertyDescriptor(a,u){return Reflect.getOwnPropertyDescriptor(a._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,u){return T6(a).includes(u)},ownKeys(a){return T6(a)},set(a,u,d){const p=a._storage||(a._storage=i());return a[u]=p[u]=d,delete a._keys,!0}})}function dp(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:WH(e,r),setContext:o=>dp(e,o,n,r),override:o=>dp(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return GH(o,s,()=>SIe(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function WH(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:Dc(n)?n:()=>n,isIndexable:Dc(r)?r:()=>r}}const CIe=(e,t)=>e?e+lk(t):t,vk=(e,t)=>Sr(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function GH(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function SIe(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return Dc(a)&&s.isScriptable(t)&&(a=EIe(t,a,e,n)),li(a)&&a.length&&(a=PIe(t,a,e,s.isIndexable)),vk(t,a)&&(a=dp(a,i,o&&o[t],s)),a}function EIe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let u=t(o,s||r);return a.delete(e),vk(e,u)&&(u=yk(i._scopes,i,e,u)),u}function PIe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Sr(t[0])){const u=t,d=i._scopes.filter(p=>p!==u);t=[];for(const p of u){const m=yk(d,i,e,p);t.push(dp(m,o,s&&s[e],a))}}return t}function qH(e,t,n){return Dc(e)?e(t,n):e}const IIe=(e,t)=>e===!0?t:typeof e=="string"?cp(t,e):void 0;function TIe(e,t,n,r,i){for(const o of t){const s=IIe(n,o);if(s){e.add(s);const a=qH(s._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function yk(e,t,n,r){const i=t._rootScopes,o=qH(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let u=I6(a,s,n,o||n,r);return u===null||typeof o<"u"&&o!==n&&(u=I6(a,s,o,u,r),u===null)?!1:gk(Array.from(a),[""],i,o,()=>kIe(t,n,r))}function I6(e,t,n,r,i){for(;n;)n=TIe(e,t,n,r,i);return n}function kIe(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return li(i)&&Sr(n)?n:i||{}}function MIe(e,t,n,r){let i;for(const o of t)if(i=ZH(CIe(o,e),n),typeof i<"u")return vk(e,i)?yk(n,r,e,i):i}function ZH(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function T6(e){let t=e._keys;return t||(t=e._keys=RIe(e._scopes)),t}function RIe(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 AIe=Number.EPSILON||1e-14,fp=(e,t)=>t<e.length&&!e[t].skip&&e[t],XH=e=>e==="x"?"y":"x";function DIe(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=EE(o,i),u=EE(s,o);let d=a/(a+u),p=u/(a+u);d=isNaN(d)?0:d,p=isNaN(p)?0:p;const m=r*d,v=r*p;return{previous:{x:o.x-m*(s.x-i.x),y:o.y-m*(s.y-i.y)},next:{x:o.x+v*(s.x-i.x),y:o.y+v*(s.y-i.y)}}}function OIe(e,t,n){const r=e.length;let i,o,s,a,u,d=fp(e,0);for(let p=0;p<r-1;++p)if(u=d,d=fp(e,p+1),!(!u||!d)){if(Ng(t[p],0,AIe)){n[p]=n[p+1]=0;continue}i=n[p]/t[p],o=n[p+1]/t[p],a=Math.pow(i,2)+Math.pow(o,2),!(a<=9)&&(s=3/Math.sqrt(a),n[p]=i*s*t[p],n[p+1]=o*s*t[p])}}function NIe(e,t,n="x"){const r=XH(n),i=e.length;let o,s,a,u=fp(e,0);for(let d=0;d<i;++d){if(s=a,a=u,u=fp(e,d+1),!a)continue;const p=a[n],m=a[r];s&&(o=(p-s[n])/3,a[`cp1${n}`]=p-o,a[`cp1${r}`]=m-o*t[d]),u&&(o=(u[n]-p)/3,a[`cp2${n}`]=p+o,a[`cp2${r}`]=m+o*t[d])}}function LIe(e,t="x"){const n=XH(t),r=e.length,i=Array(r).fill(0),o=Array(r);let s,a,u,d=fp(e,0);for(s=0;s<r;++s)if(a=u,u=d,d=fp(e,s+1),!!u){if(d){const p=d[t]-u[t];i[s]=p!==0?(d[n]-u[n])/p:0}o[s]=a?d?bl(i[s-1])!==bl(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s]}OIe(e,i,o),NIe(e,o,t)}function Cx(e,t,n){return Math.max(Math.min(e,n),t)}function FIe(e,t){let n,r,i,o,s,a=au(e[0],t);for(n=0,r=e.length;n<r;++n)s=o,o=a,a=n<r-1&&au(e[n+1],t),o&&(i=e[n],s&&(i.cp1x=Cx(i.cp1x,t.left,t.right),i.cp1y=Cx(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=Cx(i.cp2x,t.left,t.right),i.cp2y=Cx(i.cp2y,t.top,t.bottom)))}function zIe(e,t,n,r,i){let o,s,a,u;if(t.spanGaps&&(e=e.filter(d=>!d.skip)),t.cubicInterpolationMode==="monotone")LIe(e,i);else{let d=r?e[e.length-1]:e[0];for(o=0,s=e.length;o<s;++o)a=e[o],u=DIe(d,a,e[Math.min(o+1,s-(r?0:1))%s],t.tension),a.cp1x=u.previous.x,a.cp1y=u.previous.y,a.cp2x=u.next.x,a.cp2y=u.next.y,d=a}t.capBezierPoints&&FIe(e,n)}function xk(){return typeof window<"u"&&typeof document<"u"}function bk(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function zb(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 Ew=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function $Ie(e,t){return Ew(e).getPropertyValue(t)}const BIe=["top","right","bottom","left"];function Zd(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=BIe[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const VIe=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function UIe(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,u;if(VIe(i,o,e.target))a=i,u=o;else{const d=t.getBoundingClientRect();a=r.clientX-d.left,u=r.clientY-d.top,s=!0}return{x:a,y:u,box:s}}function Id(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Ew(n),o=i.boxSizing==="border-box",s=Zd(i,"padding"),a=Zd(i,"border","width"),{x:u,y:d,box:p}=UIe(e,n),m=s.left+(p&&a.left),v=s.top+(p&&a.top);let{width:x,height:_}=t;return o&&(x-=s.width+a.width,_-=s.height+a.height),{x:Math.round((u-m)/x*n.width/r),y:Math.round((d-v)/_*n.height/r)}}function jIe(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&bk(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=Ew(o),u=Zd(a,"border","width"),d=Zd(a,"padding");t=s.width-d.width-u.width,n=s.height-d.height-u.height,r=zb(a.maxWidth,o,"clientWidth"),i=zb(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Lb,maxHeight:i||Lb}}const Sx=e=>Math.round(e*10)/10;function HIe(e,t,n,r){const i=Ew(e),o=Zd(i,"margin"),s=zb(i.maxWidth,e,"clientWidth")||Lb,a=zb(i.maxHeight,e,"clientHeight")||Lb,u=jIe(e,t,n);let{width:d,height:p}=u;if(i.boxSizing==="content-box"){const v=Zd(i,"border","width"),x=Zd(i,"padding");d-=x.width+v.width,p-=x.height+v.height}return d=Math.max(0,d-o.width),p=Math.max(0,r?d/r:p-o.height),d=Sx(Math.min(d,s,u.maxWidth)),p=Sx(Math.min(p,a,u.maxHeight)),d&&!p&&(p=Sx(d/2)),(t!==void 0||n!==void 0)&&r&&u.height&&p>u.height&&(p=u.height,d=Sx(Math.floor(p*r))),{width:d,height:p}}function k6(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=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!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const KIe=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};xk()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function M6(e,t){const n=$Ie(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Td(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function WIe(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 GIe(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=Td(e,i,n),a=Td(i,o,n),u=Td(o,t,n),d=Td(s,a,n),p=Td(a,u,n);return Td(d,p,n)}const qIe=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}}},ZIe=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function zh(e,t,n){return e?qIe(t,n):ZIe()}function YH(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 QH(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function JH(e){return e==="angle"?{between:FH,compare:qPe,normalize:Ns}:{between:Bd,compare:(t,n)=>t-n,normalize:t=>t}}function R6({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 XIe(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=JH(r),u=t.length;let{start:d,end:p,loop:m}=e,v,x;if(m){for(d+=u,p+=u,v=0,x=u;v<x&&s(a(t[d%u][r]),i,o);++v)d--,p--;d%=u,p%=u}return p<d&&(p+=u),{start:d,end:p,loop:m,style:e.style}}function YIe(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,s=t.length,{compare:a,between:u,normalize:d}=JH(r),{start:p,end:m,loop:v,style:x}=XIe(e,t,n),_=[];let P=!1,k=null,T,M,O;const N=()=>u(i,O,T)&&a(i,O)!==0,L=()=>a(o,T)===0||u(o,O,T),F=()=>P||N(),V=()=>!P||L();for(let B=p,H=p;B<=m;++B)M=t[B%s],!M.skip&&(T=d(M[r]),T!==O&&(P=u(T,i,o),k===null&&F()&&(k=a(T,i)===0?B:H),k!==null&&V()&&(_.push(R6({start:k,end:B,loop:v,count:s,style:x})),k=null),H=B,O=T));return k!==null&&_.push(R6({start:k,end:m,loop:v,count:s,style:x})),_}function QIe(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=YIe(r[i],e.points,t);o.length&&n.push(...o)}return n}function JIe(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function eTe(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],u;for(u=t+1;u<=n;++u){const d=e[u%i];d.skip||d.stop?a.skip||(r=!1,o.push({start:t%i,end:(u-1)%i,loop:r}),t=s=d.stop?u:null):(s=u,a.skip&&(t=u)),a=d}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function tTe(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=JIe(n,i,o,r);if(r===!0)return A6(e,[{start:s,end:a,loop:o}],n,t);const u=a<s?a+i:a,d=!!e._fullLoop&&s===0&&a===i-1;return A6(e,eTe(n,s,u,d),n,t)}function A6(e,t,n,r){return!r||!r.setContext||!n?t:nTe(e,t,n,r)}function nTe(e,t,n,r){const i=e._chart.getContext(),o=D6(e.options),{_datasetIndex:s,options:{spanGaps:a}}=e,u=n.length,d=[];let p=o,m=t[0].start,v=m;function x(_,P,k,T){const M=a?-1:1;if(_!==P){for(_+=u;n[_%u].skip;)_-=M;for(;n[P%u].skip;)P+=M;_%u!==P%u&&(d.push({start:_%u,end:P%u,loop:k,style:T}),p=T,m=P%u)}}for(const _ of t){m=a?m:_.start;let P=n[m%u],k;for(v=m+1;v<=_.end;v++){const T=n[v%u];k=D6(r.setContext(Vc(i,{type:"segment",p0:P,p1:T,p0DataIndex:(v-1)%u,p1DataIndex:v%u,datasetIndex:s}))),rTe(k,p)&&x(m,v-1,_.loop,p),P=T,p=k}m<v-1&&x(m,v-1,_.loop,p)}return d}function D6(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function rTe(e,t){if(!t)return!1;const n=[],r=function(i,o){return fk(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function Ex(e,t,n){return e.options.clip?e[n]:t[n]}function iTe(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Ex(n,t,"left"),right:Ex(n,t,"right"),top:Ex(r,t,"top"),bottom:Ex(r,t,"bottom")}:t}function oTe(e,t){const n=t._clip;if(n.disabled)return!1;const r=iTe(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
|
* Chart.js v4.5.0
|
|
|
* https://www.chartjs.org
|
|
|
* (c) 2025 Chart.js Contributors
|
|
|
* Released under the MIT License
|
|
|
*/class aTe{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],s=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=BH.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 o=r.items;let s=o.length-1,a=!1,u;for(;s>=0;--s)u=o[s],u._active?(u._total>r.duration&&(r.duration=u._total),u.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.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 ql=new aTe;const O6="transparent",sTe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=S6(e||O6),i=r.valid&&S6(t||O6);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class lTe{constructor(t,n,r,i){const o=n[r];i=wx([t.to,i,o,t.from]);const s=wx([t.from,o,i]);this._active=!0,this._fn=t.fn||sTe[t.type||typeof s],this._easing=Lg[t.easing]||Lg.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],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=wx([t.to,n,i,t.from]),this._from=wx([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,o=this._from,s=this._loop,a=this._to;let u;if(this._active=o!==a&&(s||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=o;return}u=n/r%2,u=s&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[i]=this._fn(o,a,u)}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 eK{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Sr(t))return;const n=Object.keys(_i.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Sr(o))return;const s={};for(const a of n)s[a]=o[a];(li(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=cTe(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&uTe(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let u;for(u=s.length-1;u>=0;--u){const d=s[u];if(d.charAt(0)==="$")continue;if(d==="options"){i.push(...this._animateOptions(t,n));continue}const p=n[d];let m=o[d];const v=r.get(d);if(m)if(v&&m.active()){m.update(v,p,a);continue}else m.cancel();if(!v||!v.duration){t[d]=p;continue}o[d]=m=new lTe(v,t,d,p),i.push(m)}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 ql.add(this._chart,r),!0}}function uTe(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function cTe(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 N6(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function dTe(e,t,n){if(n===!1)return!1;const r=N6(e,n),i=N6(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function fTe(e){let t,n,r,i;return Sr(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 tK(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function L6(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let s,a,u,d;if(t===null)return;let p=!1;for(s=0,a=i.length;s<a;++s){if(u=+i[s],u===n){if(p=!0,r.all)continue;break}d=e.values[u],ro(d)&&(o||t===0||bl(t)===bl(d))&&(t+=d)}return!p&&!r.all?0:t}function hTe(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",s=Object.keys(e),a=new Array(s.length);let u,d,p;for(u=0,d=s.length;u<d;++u)p=s[u],a[u]={[i]:p,[o]:e[p]};return a}function I2(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function pTe(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function mTe(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 gTe(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function F6(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function z6(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,u=o.axis,d=s.axis,p=pTe(o,s,r),m=t.length;let v;for(let x=0;x<m;++x){const _=t[x],{[u]:P,[d]:k}=_,T=_._stacks||(_._stacks={});v=T[d]=gTe(i,p,P),v[a]=k,v._top=F6(v,s,!0,r.type),v._bottom=F6(v,s,!1,r.type);const M=v._visualValues||(v._visualValues={});M[a]=k}}function T2(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function vTe(e,t){return Vc(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function yTe(e,t,n){return Vc(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function qm(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 o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const k2=e=>e==="reset"||e==="none",$6=(e,t)=>t?e:Object.assign({},e),xTe=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:tK(n,!0),values:null};class $h{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=I2(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&&qm(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(m,v,x,_)=>m==="x"?v:m==="r"?_:x,o=n.xAxisID=cr(r.xAxisID,T2(t,"x")),s=n.yAxisID=cr(r.yAxisID,T2(t,"y")),a=n.rAxisID=cr(r.rAxisID,T2(t,"r")),u=n.indexAxis,d=n.iAxisID=i(u,o,s,a),p=n.vAxisID=i(u,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(d),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&&_6(this._data,this),t._stacked&&qm(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Sr(n)){const i=this._cachedMeta;this._data=hTe(n,i)}else if(r!==n){if(r){_6(r,this);const i=this._cachedMeta;qm(i),i._parsed=[]}n&&Object.isExtensible(n)&&QPe(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 o=n._stacked;n._stacked=I2(n.vScale,n),n.stack!==r.stack&&(i=!0,qm(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(z6(this,n._parsed),n._stacked=I2(n.vScale,n))}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:o,_stacked:s}=r,a=o.axis;let u=t===0&&n===i.length?!0:r._sorted,d=t>0&&r._parsed[t-1],p,m,v;if(this._parsing===!1)r._parsed=i,r._sorted=!0,v=i;else{li(i[t])?v=this.parseArrayData(r,i,t,n):Sr(i[t])?v=this.parseObjectData(r,i,t,n):v=this.parsePrimitiveData(r,i,t,n);const x=()=>m[a]===null||d&&m[a]<d[a];for(p=0;p<n;++p)r._parsed[p+t]=m=v[p],u&&(x()&&(u=!1),d=m);r._sorted=u}s&&z6(this,v)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:s}=t,a=o.axis,u=s.axis,d=o.getLabels(),p=o===s,m=new Array(i);let v,x,_;for(v=0,x=i;v<x;++v)_=v+r,m[v]={[a]:p||o.parse(d[_],_),[u]:s.parse(n[_],_)};return m}parseArrayData(t,n,r,i){const{xScale:o,yScale:s}=t,a=new Array(i);let u,d,p,m;for(u=0,d=i;u<d;++u)p=u+r,m=n[p],a[u]={x:o.parse(m[0],p),y:s.parse(m[1],p)};return a}parseObjectData(t,n,r,i){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:u="y"}=this._parsing,d=new Array(i);let p,m,v,x;for(p=0,m=i;p<m;++p)v=p+r,x=n[v],d[p]={x:o.parse(cp(x,a),v),y:s.parse(cp(x,u),v)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,s=n[t.axis],a={keys:tK(i,!0),values:n._stacks[t.axis]._visualValues};return L6(a,s,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let s=o===null?NaN:o;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,s=L6(i,o,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,o=r._sorted&&t===r.iScale,s=i.length,a=this._getOtherScale(t),u=xTe(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:m}=mTe(a);let v,x;function _(){x=i[v];const P=x[a.axis];return!ro(x[t.axis])||p>P||m<P}for(v=0;v<s&&!(!_()&&(this.updateRangeFromParsed(d,t,x,u),o));++v);if(o){for(v=s-1;v>=0;--v)if(!_()){this.updateRangeFromParsed(d,t,x,u);break}}return d}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i<o;++i)s=n[i][t.axis],ro(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=fTe(cr(this.options.clip,dTe(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,s=[],a=this._drawStart||0,u=this._drawCount||i.length-a,d=this.options.drawActiveElementsOnTop;let p;for(r.dataset&&r.dataset.draw(t,o,a,u),p=a;p<a+u;++p){const m=i[p];m.hidden||(m.active&&d?s.push(m):m.draw(t,o))}for(p=0;p<s.length;++p)s[p].draw(t,o)}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 o;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];o=s.$context||(s.$context=yTe(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=vTe(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}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",o=this._cachedDataOpts,s=t+"-"+n,a=o[s],u=this.enableOptionSharing&&Ev(r);if(a)return $6(a,u);const d=this.chart.config,p=d.datasetElementScopeKeys(this._type,t),m=i?[`${t}Hover`,"hover",t,""]:[t,""],v=d.getOptionScopes(this.getDataset(),p),x=Object.keys(_i.elements[t]),_=()=>this.getContext(r,i,n),P=d.resolveNamedOptions(v,x,_,m);return P.$shared&&(P.$shared=u,o[s]=Object.freeze($6(P,u))),P}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let u;if(i.options.animation!==!1){const p=this.chart.config,m=p.datasetAnimationScopeKeys(this._type,n),v=p.getOptionScopes(this.getDataset(),m);u=p.createResolver(v,this.getContext(t,r,n))}const d=new eK(i,u&&u.animations);return u&&u._cacheable&&(o[s]=Object.freeze(d)),d}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||k2(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){k2(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!k2(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}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[a,u,d]of this._syncList)this[a](u,d);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,s=t+n;let a;const u=d=>{for(d.length+=n,a=d.length-1;a>=s;a--)d[a]=d[a-n]};for(u(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&u(i._parsed),this.parse(t,n),r&&this.updateElements(o,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&&qm(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])}}Bn($h,"defaults",{}),Bn($h,"datasetElementType",null),Bn($h,"dataElementType",null);function bTe(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=$H(r.sort((i,o)=>i-o))}return e._cache.$bar}function _Te(e){const t=e.iScale,n=bTe(t,e.type);let r=t._length,i,o,s,a;const u=()=>{s===32767||s===-32768||(Ev(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i<o;++i)s=t.getPixelForValue(n[i]),u();for(a=void 0,i=0,o=t.ticks.length;i<o;++i)s=t.getPixelForTick(i),u();return r}function wTe(e,t,n,r){const i=n.barThickness;let o,s;return wr(i)?(o=t.min*n.categoryPercentage,s=n.barPercentage):(o=i*r,s=1),{chunk:o/r,ratio:s,start:t.pixels[e]-o/2}}function CTe(e,t,n,r){const i=t.pixels,o=i[e];let s=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const u=n.categoryPercentage;s===null&&(s=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-s);const d=o-(o-Math.min(s,a))/2*u;return{chunk:Math.abs(a-s)/2*u/r,ratio:n.barPercentage,start:d}}function STe(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),s=Math.min(i,o),a=Math.max(i,o);let u=s,d=a;Math.abs(s)>Math.abs(a)&&(u=a,d=s),t[n.axis]=d,t._custom={barStart:u,barEnd:d,start:i,end:o,min:s,max:a}}function nK(e,t,n,r){return li(e)?STe(e,t,n,r):t[n.axis]=n.parse(e,r),t}function B6(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,u=[];let d,p,m,v;for(d=n,p=n+r;d<p;++d)v=t[d],m={},m[i.axis]=a||i.parse(s[d],d),u.push(nK(v,m,o,d));return u}function M2(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function ETe(e,t,n){return e!==0?bl(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function PTe(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function ITe(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:a,reverse:u,top:d,bottom:p}=PTe(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=d:(n._bottom||0)===r?i=p:(o[V6(p,s,a,u)]=!0,i=d)),o[V6(i,s,a,u)]=!0,e.borderSkipped=o}function V6(e,t,n,r){return r?(e=TTe(e,t,n),e=U6(e,n,t)):e=U6(e,t,n),e}function TTe(e,t,n){return e===t?n:e===n?t:e}function U6(e,t,n){return e==="start"?t:e==="end"?n:e}function kTe(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class d1 extends $h{parsePrimitiveData(t,n,r,i){return B6(t,n,r,i)}parseArrayData(t,n,r,i){return B6(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:u="y"}=this._parsing,d=o.axis==="x"?a:u,p=s.axis==="x"?a:u,m=[];let v,x,_,P;for(v=r,x=r+i;v<x;++v)P=n[v],_={},_[o.axis]=o.parse(cp(P,d),v),m.push(nK(cp(P,p),_,s,v));return m}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),s=o._custom,a=M2(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:a}}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 o=i==="reset",{index:s,_cachedMeta:{vScale:a}}=this,u=a.getBasePixel(),d=a.isHorizontal(),p=this._getRuler(),{sharedOptions:m,includeOptions:v}=this._getSharedOptions(n,i);for(let x=n;x<n+r;x++){const _=this.getParsed(x),P=o||wr(_[a.axis])?{base:u,head:u}:this._calculateBarValuePixels(x),k=this._calculateBarIndexPixels(x,p),T=(_._stacks||{})[a.axis],M={horizontal:d,base:P.base,enableBorderRadius:!T||M2(_._custom)||s===T._top||s===T._bottom,x:d?P.head:k.center,y:d?k.center:P.head,height:d?k.size:Math.abs(P.size),width:d?Math.abs(P.size):k.size};v&&(M.options=m||this.resolveDataElementOptions(x,t[x].active?"active":i));const O=M.options||t[x].options;ITe(M,O,T,s),kTe(M,O,p.ratio),this.updateElement(t[x],x,M,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),o=r.options.stacked,s=[],a=this._cachedMeta.controller.getParsed(n),u=a&&a[r.axis],d=p=>{const m=p._parsed.find(x=>x[r.axis]===u),v=m&&m[p.vScale.axis];if(wr(v)||isNaN(v))return!0};for(const p of i)if(!(n!==void 0&&d(p))&&((o===!1||s.indexOf(p.stack)===-1||o===void 0&&p.stack===void 0)&&s.push(p.stack),p.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[cr(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o<s;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const a=t.barThickness;return{min:a||_Te(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:s}}=this,a=o||0,u=this.getParsed(t),d=u._custom,p=M2(d);let m=u[n.axis],v=0,x=r?this.applyStack(n,u,r):m,_,P;x!==m&&(v=x-m,x=m),p&&(m=d.barStart,x=d.barEnd-d.barStart,m!==0&&bl(m)!==bl(d.barEnd)&&(v=0),v+=m);const k=!wr(o)&&!p?o:v;let T=n.getPixelForValue(k);if(this.chart.getDataVisibility(t)?_=n.getPixelForValue(v+x):_=T,P=_-T,Math.abs(P)<s){P=ETe(P,n,a)*s,m===a&&(T-=P/2);const M=n.getPixelForDecimal(0),O=n.getPixelForDecimal(1),N=Math.min(M,O),L=Math.max(M,O);T=Math.max(Math.min(T,L),N),_=T+P,r&&!p&&(u._stacks[n.axis]._visualValues[i]=n.getValueForPixel(_)-n.getValueForPixel(T))}if(T===n.getPixelForValue(a)){const M=bl(P)*n.getLineWidthForValue(a)/2;T+=M,P-=M}return{size:P,base:T,head:_,center:_+P/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,s=cr(i.maxBarThickness,1/0);let a,u;const d=this._getAxisCount();if(n.grouped){const p=o?this._getStackCount(t):n.stackCount,m=i.barThickness==="flex"?CTe(t,n,i,p*d):wTe(t,n,i,p*d),v=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,x=this._getAxis().indexOf(cr(v,this.getFirstScaleIdForIndexAxis())),_=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+x;a=m.start+m.chunk*_+m.chunk/2,u=Math.min(s,m.chunk*m.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),u=Math.min(s,n.min*n.ratio);return{base:a-u/2,head:a+u/2,center:a,size:u}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}Bn(d1,"id","bar"),Bn(d1,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Bn(d1,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class f1 extends $h{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:u}=tIe(n,i,s);this._drawStart=a,this._drawCount=u,nIe(n)&&(a=0,u=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:d},t),this.updateElements(i,a,u,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:u,_dataset:d}=this._cachedMeta,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(n,i),v=s.axis,x=a.axis,{spanGaps:_,segment:P}=this.options,k=Pv(_)?_:Number.POSITIVE_INFINITY,T=this.chart._animationsDisabled||o||i==="none",M=n+r,O=t.length;let N=n>0&&this.getParsed(n-1);for(let L=0;L<O;++L){const F=t[L],V=T?F:{};if(L<n||L>=M){V.skip=!0;continue}const B=this.getParsed(L),H=wr(B[x]),G=V[v]=s.getPixelForValue(B[v],L),ee=V[x]=o||H?a.getBasePixel():a.getPixelForValue(u?this.applyStack(a,B,u):B[x],L);V.skip=isNaN(G)||isNaN(ee)||H,V.stop=L>0&&Math.abs(B[v]-N[v])>k,P&&(V.parsed=B,V.raw=d.data[L]),m&&(V.options=p||this.resolveDataElementOptions(L,F.active?"active":i)),T||this.updateElement(F,L,V,i),N=B}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Bn(f1,"id","line"),Bn(f1,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Bn(f1,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function yd(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class _k{constructor(t){Bn(this,"options");this.options=t||{}}static override(t){Object.assign(_k.prototype,t)}init(){}formats(){return yd()}parse(){return yd()}format(){return yd()}add(){return yd()}diff(){return yd()}startOf(){return yd()}endOf(){return yd()}}var MTe={_date:_k};function RTe(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const d=a._reversePixels?XPe:Vd;if(r){if(i._sharedOptions){const p=o[0],m=typeof p.getRange=="function"&&p.getRange(t);if(m){const v=d(o,t,n-m),x=d(o,t,n+m);return{lo:v.lo,hi:x.hi}}}}else{const p=d(o,t,n);if(u){const{vScale:m}=i._cachedMeta,{_parsed:v}=e,x=v.slice(0,p.lo+1).reverse().findIndex(P=>!wr(P[m.axis]));p.lo-=Math.max(0,x);const _=v.slice(p.hi).findIndex(P=>!wr(P[m.axis]));p.hi+=Math.max(0,_)}return p}}return{lo:0,hi:o.length-1}}function b0(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,u=o.length;a<u;++a){const{index:d,data:p}=o[a],{lo:m,hi:v}=RTe(o[a],t,s,i);for(let x=m;x<=v;++x){const _=p[x];_.skip||r(_,d,x)}}}function ATe(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function R2(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||b0(e,n,t,function(a,u,d){!i&&!au(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&o.push({element:a,datasetIndex:u,index:d})},!0),o}function DTe(e,t,n,r){let i=[];function o(s,a,u){const{startAngle:d,endAngle:p}=s.getProps(["startAngle","endAngle"],r),{angle:m}=GPe(s,{x:t.x,y:t.y});FH(m,d,p)&&i.push({element:s,datasetIndex:a,index:u})}return b0(e,n,t,o),i}function OTe(e,t,n,r,i,o){let s=[];const a=ATe(n);let u=Number.POSITIVE_INFINITY;function d(p,m,v){const x=p.inRange(t.x,t.y,i);if(r&&!x)return;const _=p.getCenterPoint(i);if(!(!!o||e.isPointInArea(_))&&!x)return;const k=a(t,_);k<u?(s=[{element:p,datasetIndex:m,index:v}],u=k):k===u&&s.push({element:p,datasetIndex:m,index:v})}return b0(e,n,t,d),s}function A2(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?DTe(e,t,n,i):OTe(e,t,n,r,i,o)}function j6(e,t,n,r,i){const o=[],s=n==="x"?"inXRange":"inYRange";let a=!1;return b0(e,n,t,(u,d,p)=>{u[s]&&u[s](t[n],i)&&(o.push({element:u,datasetIndex:d,index:p}),a=a||u.inRange(t.x,t.y,i))}),r&&!a?[]:o}var NTe={evaluateInteractionItems:b0,modes:{index(e,t,n,r){const i=Id(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?R2(e,i,o,r,s):A2(e,i,o,!1,r,s),u=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const p=a[0].index,m=d.data[p];m&&!m.skip&&u.push({element:m,datasetIndex:d.index,index:p})}),u):[]},dataset(e,t,n,r){const i=Id(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?R2(e,i,o,r,s):A2(e,i,o,!1,r,s);if(a.length>0){const u=a[0].datasetIndex,d=e.getDatasetMeta(u).data;a=[];for(let p=0;p<d.length;++p)a.push({element:d[p],datasetIndex:u,index:p})}return a},point(e,t,n,r){const i=Id(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return R2(e,i,o,r,s)},nearest(e,t,n,r){const i=Id(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return A2(e,i,o,n.intersect,r,s)},x(e,t,n,r){const i=Id(t,e);return j6(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=Id(t,e);return j6(e,i,"y",n.intersect,r)}}};const rK=["left","top","right","bottom"];function Zm(e,t){return e.filter(n=>n.pos===t)}function H6(e,t){return e.filter(n=>rK.indexOf(n.pos)===-1&&n.box.axis===t)}function Xm(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function LTe(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:s,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&o+s,stackWeight:a});return t}function FTe(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!rK.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return t}function zTe(e,t){const n=FTe(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,s,a;for(o=0,s=e.length;o<s;++o){a=e[o];const{fullSize:u}=a.box,d=n[a.stack],p=d&&a.stackWeight/d.weight;a.horizontal?(a.width=p?p*r:u&&t.availableWidth,a.height=i):(a.width=r,a.height=p?p*i:u&&t.availableHeight)}return n}function $Te(e){const t=LTe(e),n=Xm(t.filter(d=>d.box.fullSize),!0),r=Xm(Zm(t,"left"),!0),i=Xm(Zm(t,"right")),o=Xm(Zm(t,"top"),!0),s=Xm(Zm(t,"bottom")),a=H6(t,"x"),u=H6(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(u).concat(s).concat(a),chartArea:Zm(t,"chartArea"),vertical:r.concat(i).concat(u),horizontal:o.concat(s).concat(a)}}function K6(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function iK(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 BTe(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!Sr(i)){n.size&&(e[i]-=n.size);const m=r[n.stack]||{size:0,count:1};m.size=Math.max(m.size,n.horizontal?o.height:o.width),n.size=m.size/m.count,e[i]+=n.size}o.getPadding&&iK(s,o.getPadding());const a=Math.max(0,t.outerWidth-K6(s,e,"left","right")),u=Math.max(0,t.outerHeight-K6(s,e,"top","bottom")),d=a!==e.w,p=u!==e.h;return e.w=a,e.h=u,n.horizontal?{same:d,other:p}:{same:p,other:d}}function VTe(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 UTe(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function cg(e,t,n,r){const i=[];let o,s,a,u,d,p;for(o=0,s=e.length,d=0;o<s;++o){a=e[o],u=a.box,u.update(a.width||t.w,a.height||t.h,UTe(a.horizontal,t));const{same:m,other:v}=BTe(t,n,a,r);d|=m&&i.length,p=p||v,u.fullSize||i.push(a)}return d&&cg(i,t,n,r)||p}function Px(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 W6(e,t,n,r){const i=n.padding;let{x:o,y:s}=t;for(const a of e){const u=a.box,d=r[a.stack]||{count:1,placed:0,weight:1},p=a.stackWeight/d.weight||1;if(a.horizontal){const m=t.w*p,v=d.size||u.height;Ev(d.start)&&(s=d.start),u.fullSize?Px(u,i.left,s,n.outerWidth-i.right-i.left,v):Px(u,t.left+d.placed,s,m,v),d.start=s,d.placed+=m,s=u.bottom}else{const m=t.h*p,v=d.size||u.width;Ev(d.start)&&(o=d.start),u.fullSize?Px(u,o,i.top,v,n.outerHeight-i.bottom-i.top):Px(u,o,t.top+d.placed,v,m),d.start=o,d.placed+=m,o=u.right}}t.x=o,t.y=s}var ls={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=Ao(e.options.layout.padding),o=Math.max(t-i.width,0),s=Math.max(n-i.height,0),a=$Te(e.boxes),u=a.vertical,d=a.horizontal;Ar(e.boxes,P=>{typeof P.beforeLayout=="function"&&P.beforeLayout()});const p=u.reduce((P,k)=>k.box.options&&k.box.options.display===!1?P:P+1,0)||1,m=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/p,hBoxMaxHeight:s/2}),v=Object.assign({},i);iK(v,Ao(r));const x=Object.assign({maxPadding:v,w:o,h:s,x:i.left,y:i.top},i),_=zTe(u.concat(d),m);cg(a.fullSize,x,m,_),cg(u,x,m,_),cg(d,x,m,_)&&cg(u,x,m,_),VTe(x),W6(a.leftAndTop,x,m,_),x.x+=x.w,x.y+=x.h,W6(a.rightAndBottom,x,m,_),e.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},Ar(a.chartArea,P=>{const k=P.box;Object.assign(k,e.chartArea),k.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}};class oK{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 jTe extends oK{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const h1="$chartjs",HTe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},G6=e=>e===null||e==="";function KTe(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[h1]={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",G6(i)){const o=M6(e,"width");o!==void 0&&(e.width=o)}if(G6(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=M6(e,"height");o!==void 0&&(e.height=o)}return e}const aK=KIe?{passive:!0}:!1;function WTe(e,t,n){e&&e.addEventListener(t,n,aK)}function GTe(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,aK)}function qTe(e,t){const n=HTe[e.type]||e.type,{x:r,y:i}=Id(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function $b(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function ZTe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||$b(a.addedNodes,r),s=s&&!$b(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function XTe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||$b(a.removedNodes,r),s=s&&!$b(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Tv=new Map;let q6=0;function sK(){const e=window.devicePixelRatio;e!==q6&&(q6=e,Tv.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function YTe(e,t){Tv.size||window.addEventListener("resize",sK),Tv.set(e,t)}function QTe(e){Tv.delete(e),Tv.size||window.removeEventListener("resize",sK)}function JTe(e,t,n){const r=e.canvas,i=r&&bk(r);if(!i)return;const o=VH((a,u)=>{const d=i.clientWidth;n(a,u),d<i.clientWidth&&n()},window),s=new ResizeObserver(a=>{const u=a[0],d=u.contentRect.width,p=u.contentRect.height;d===0&&p===0||o(d,p)});return s.observe(i),YTe(e,o),s}function D2(e,t,n){n&&n.disconnect(),t==="resize"&&QTe(e)}function eke(e,t,n){const r=e.canvas,i=VH(o=>{e.ctx!==null&&n(qTe(o,e))},e);return WTe(r,t,i),i}class tke extends oK{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(KTe(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[h1])return!1;const r=n[h1].initial;["height","width"].forEach(o=>{const s=r[o];wr(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[h1],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:ZTe,detach:XTe,resize:JTe}[n]||eke;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:D2,detach:D2,resize:D2}[n]||GTe)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return HIe(t,n,r,i)}isAttached(t){const n=t&&bk(t);return!!(n&&n.isConnected)}}function nke(e){return!xk()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?jTe:tke}class _l{constructor(){Bn(this,"x");Bn(this,"y");Bn(this,"active",!1);Bn(this,"options");Bn(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Pv(this.x)&&Pv(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}}Bn(_l,"defaults",{}),Bn(_l,"defaultRoutes");function rke(e,t){const n=e.options.ticks,r=ike(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?ake(t):[],s=o.length,a=o[0],u=o[s-1],d=[];if(s>i)return ske(t,d,o,s/i),d;const p=oke(o,t,i);if(s>0){let m,v;const x=s>1?Math.round((u-a)/(s-1)):null;for(Ix(t,d,p,wr(x)?0:a-x,a),m=0,v=s-1;m<v;m++)Ix(t,d,p,o[m],o[m+1]);return Ix(t,d,p,u,wr(x)?t.length:u+x),d}return Ix(t,d,p),d}function ike(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 oke(e,t,n){const r=lke(e),i=t.length/n;if(!r)return Math.max(i,1);const o=HPe(r);for(let s=0,a=o.length-1;s<a;s++){const u=o[s];if(u>i)return u}return Math.max(i,1)}function ake(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function ske(e,t,n,r){let i=0,o=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===o&&(t.push(e[s]),i++,o=n[i*r])}function Ix(e,t,n,r,i){const o=cr(r,0),s=Math.min(cr(i,e.length),e.length);let a=0,u,d,p;for(n=Math.ceil(n),i&&(u=i-r,n=u/Math.floor(u/n)),p=o;p<0;)a++,p=Math.round(o+a*n);for(d=Math.max(o,0);d<s;d++)d===p&&(t.push(e[d]),a++,p=Math.round(o+a*n))}function lke(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 uke=e=>e==="left"?"right":e==="right"?"left":e,Z6=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,X6=(e,t)=>Math.min(t||e,e);function Y6(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function cke(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,s=e._endPixel,a=1e-6;let u=e.getPixelForTick(i),d;if(!(n&&(r===1?d=Math.max(u-o,s-u):t===0?d=(e.getPixelForTick(1)-u)/2:d=(u-e.getPixelForTick(i-1))/2,u+=i<t?d:-d,u<o-a||u>s+a)))return u}function dke(e,t){Ar(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function Ym(e){return e.drawTicks?e.tickLength:0}function Q6(e,t){if(!e.display)return 0;const n=Gi(e.font,t),r=Ao(e.padding);return(li(e.text)?e.text.length:1)*n.lineHeight+r.height}function fke(e,t){return Vc(e,{scale:t,type:"scale"})}function hke(e,t,n){return Vc(e,{tick:n,index:t,type:"tick"})}function pke(e,t,n){let r=dk(e);return(n&&t!=="right"||!n&&t==="right")&&(r=uke(r)),r}function mke(e,t,n,r){const{top:i,left:o,bottom:s,right:a,chart:u}=e,{chartArea:d,scales:p}=u;let m=0,v,x,_;const P=s-i,k=a-o;if(e.isHorizontal()){if(x=Po(r,o,a),Sr(n)){const T=Object.keys(n)[0],M=n[T];_=p[T].getPixelForValue(M)+P-t}else n==="center"?_=(d.bottom+d.top)/2+P-t:_=Z6(e,n,t);v=a-o}else{if(Sr(n)){const T=Object.keys(n)[0],M=n[T];x=p[T].getPixelForValue(M)-k+t}else n==="center"?x=(d.left+d.right)/2-k+t:x=Z6(e,n,t);_=Po(r,s,i),m=n==="left"?-Aa:Aa}return{titleX:x,titleY:_,maxWidth:v,rotation:m}}class Ef extends _l{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=Ia(t,Number.POSITIVE_INFINITY),n=Ia(n,Number.NEGATIVE_INFINITY),r=Ia(r,Number.POSITIVE_INFINITY),i=Ia(i,Number.NEGATIVE_INFINITY),{min:Ia(t,r),max:Ia(n,i),minDefined:ro(t),maxDefined:ro(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),s;if(i&&o)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let u=0,d=a.length;u<d;++u)s=a[u].controller.getMinMax(this,t),i||(n=Math.min(n,s.min)),o||(r=Math.max(r,s.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:Ia(n,Ia(r,n)),max:Ia(r,Ia(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:o,ticks:s}=this.options,a=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=wIe(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=a<this.ticks.length;this._convertTicksToLabels(u?Y6(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=rke(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&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,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=Qr(n.callback,[o.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=X6(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let s=i,a,u,d;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const p=this._getLabelSizes(),m=p.widest.width,v=p.highest.height,x=Da(this.chart.width-m,0,this.maxWidth);a=t.offset?this.maxWidth/r:x/(r-1),m+6>a&&(a=x/(r-(t.offset?.5:1)),u=this.maxHeight-Ym(t.grid)-n.padding-Q6(t.title,this.chart.options.font),d=Math.sqrt(m*m+v*v),s=uk(Math.min(Math.asin(Da((p.highest.height+6)/a,-1,1)),Math.asin(Da(u/d,-1,1))-Math.asin(Da(v/d,-1,1)))),s=Math.max(i,Math.min(o,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:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const u=Q6(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Ym(o)+u):(t.height=this.maxHeight,t.width=Ym(o)+u),r.display&&this.ticks.length){const{first:d,last:p,widest:m,highest:v}=this._getLabelSizes(),x=r.padding*2,_=cc(this.labelRotation),P=Math.cos(_),k=Math.sin(_);if(a){const T=r.mirror?0:k*m.width+P*v.height;t.height=Math.min(this.maxHeight,t.height+T+x)}else{const T=r.mirror?0:P*m.width+k*v.height;t.width=Math.min(this.maxWidth,t.width+T+x)}this._calculatePadding(d,p,k,P)}}this._handleMargins(),a?(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:o,padding:s},position:a}=this.options,u=this.labelRotation!==0,d=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1);let v=0,x=0;u?d?(v=i*t.width,x=r*n.height):(v=r*t.height,x=i*n.width):o==="start"?x=n.width:o==="end"?v=t.width:o!=="inner"&&(v=t.width/2,x=n.width/2),this.paddingLeft=Math.max((v-p+s)*this.width/(this.width-p),0),this.paddingRight=Math.max((x-m+s)*this.width/(this.width-m),0)}else{let p=n.height/2,m=t.height/2;o==="start"?(p=0,m=t.height):o==="end"&&(p=n.height,m=0),this.paddingTop=p+s,this.paddingBottom=m+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++)wr(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=Y6(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,s=[],a=[],u=Math.floor(n/X6(n,r));let d=0,p=0,m,v,x,_,P,k,T,M,O,N,L;for(m=0;m<n;m+=u){if(_=t[m].label,P=this._resolveTickFontOptions(m),i.font=k=P.string,T=o[k]=o[k]||{data:{},gc:[]},M=P.lineHeight,O=N=0,!wr(_)&&!li(_))O=Fb(i,T.data,T.gc,O,_),N=M;else if(li(_))for(v=0,x=_.length;v<x;++v)L=_[v],!wr(L)&&!li(L)&&(O=Fb(i,T.data,T.gc,O,L),N+=M);s.push(O),a.push(N),d=Math.max(O,d),p=Math.max(N,p)}dke(o,n);const F=s.indexOf(d),V=a.indexOf(p),B=H=>({width:s[H]||0,height:a[H]||0});return{first:B(0),last:B(n-1),widest:B(F),highest:B(V),widths:s,heights:a}}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 ZPe(this._alignToPixels?vd(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=hke(this.getContext(),t,r))}return this.$context||(this.$context=fke(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=cc(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,u=o?o.highest.height+s:0;return this.isHorizontal()?u*r>a*i?a/r:u/i:u*i<a*r?u/r:a/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:o,position:s,border:a}=i,u=o.offset,d=this.isHorizontal(),m=this.ticks.length+(u?1:0),v=Ym(o),x=[],_=a.setContext(this.getContext()),P=_.display?_.width:0,k=P/2,T=function(ne){return vd(r,ne,P)};let M,O,N,L,F,V,B,H,G,ee,X,Z;if(s==="top")M=T(this.bottom),V=this.bottom-v,H=M-k,ee=T(t.top)+k,Z=t.bottom;else if(s==="bottom")M=T(this.top),ee=t.top,Z=T(t.bottom)-k,V=M+k,H=this.top+v;else if(s==="left")M=T(this.right),F=this.right-v,B=M-k,G=T(t.left)+k,X=t.right;else if(s==="right")M=T(this.left),G=t.left,X=T(t.right)-k,F=M+k,B=this.left+v;else if(n==="x"){if(s==="center")M=T((t.top+t.bottom)/2+.5);else if(Sr(s)){const ne=Object.keys(s)[0],se=s[ne];M=T(this.chart.scales[ne].getPixelForValue(se))}ee=t.top,Z=t.bottom,V=M+k,H=V+v}else if(n==="y"){if(s==="center")M=T((t.left+t.right)/2);else if(Sr(s)){const ne=Object.keys(s)[0],se=s[ne];M=T(this.chart.scales[ne].getPixelForValue(se))}F=M-k,B=F-v,G=t.left,X=t.right}const Q=cr(i.ticks.maxTicksLimit,m),le=Math.max(1,Math.ceil(m/Q));for(O=0;O<m;O+=le){const ne=this.getContext(O),se=o.setContext(ne),oe=a.setContext(ne),he=se.lineWidth,_e=se.color,be=oe.dash||[],xe=oe.dashOffset,Te=se.tickWidth,Ee=se.tickColor,Ce=se.tickBorderDash||[],ke=se.tickBorderDashOffset;N=cke(this,O,u),N!==void 0&&(L=vd(r,N,he),d?F=B=G=X=L:V=H=ee=Z=L,x.push({tx1:F,ty1:V,tx2:B,ty2:H,x1:G,y1:ee,x2:X,y2:Z,width:he,color:_e,borderDash:be,borderDashOffset:xe,tickWidth:Te,tickColor:Ee,tickBorderDash:Ce,tickBorderDashOffset:ke}))}return this._ticksLength=m,this._borderValue=M,x}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,s=this.isHorizontal(),a=this.ticks,{align:u,crossAlign:d,padding:p,mirror:m}=o,v=Ym(r.grid),x=v+p,_=m?-p:x,P=-cc(this.labelRotation),k=[];let T,M,O,N,L,F,V,B,H,G,ee,X,Z="middle";if(i==="top")F=this.bottom-_,V=this._getXAxisLabelAlignment();else if(i==="bottom")F=this.top+_,V=this._getXAxisLabelAlignment();else if(i==="left"){const le=this._getYAxisLabelAlignment(v);V=le.textAlign,L=le.x}else if(i==="right"){const le=this._getYAxisLabelAlignment(v);V=le.textAlign,L=le.x}else if(n==="x"){if(i==="center")F=(t.top+t.bottom)/2+x;else if(Sr(i)){const le=Object.keys(i)[0],ne=i[le];F=this.chart.scales[le].getPixelForValue(ne)+x}V=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")L=(t.left+t.right)/2-x;else if(Sr(i)){const le=Object.keys(i)[0],ne=i[le];L=this.chart.scales[le].getPixelForValue(ne)}V=this._getYAxisLabelAlignment(v).textAlign}n==="y"&&(u==="start"?Z="top":u==="end"&&(Z="bottom"));const Q=this._getLabelSizes();for(T=0,M=a.length;T<M;++T){O=a[T],N=O.label;const le=o.setContext(this.getContext(T));B=this.getPixelForTick(T)+o.labelOffset,H=this._resolveTickFontOptions(T),G=H.lineHeight,ee=li(N)?N.length:1;const ne=ee/2,se=le.color,oe=le.textStrokeColor,he=le.textStrokeWidth;let _e=V;s?(L=B,V==="inner"&&(T===M-1?_e=this.options.reverse?"left":"right":T===0?_e=this.options.reverse?"right":"left":_e="center"),i==="top"?d==="near"||P!==0?X=-ee*G+G/2:d==="center"?X=-Q.highest.height/2-ne*G+G:X=-Q.highest.height+G/2:d==="near"||P!==0?X=G/2:d==="center"?X=Q.highest.height/2-ne*G:X=Q.highest.height-ee*G,m&&(X*=-1),P!==0&&!le.showLabelBackdrop&&(L+=G/2*Math.sin(P))):(F=B,X=(1-ee)*G/2);let be;if(le.showLabelBackdrop){const xe=Ao(le.backdropPadding),Te=Q.heights[T],Ee=Q.widths[T];let Ce=X-xe.top,ke=0-xe.left;switch(Z){case"middle":Ce-=Te/2;break;case"bottom":Ce-=Te;break}switch(V){case"center":ke-=Ee/2;break;case"right":ke-=Ee;break;case"inner":T===M-1?ke-=Ee:T>0&&(ke-=Ee/2);break}be={left:ke,top:Ce,width:Ee+xe.width,height:Te+xe.height,color:le.backdropColor}}k.push({label:N,font:H,textOffset:X,options:{rotation:P,color:se,strokeColor:oe,strokeWidth:he,textAlign:_e,textBaseline:Z,translation:[L,F],backdrop:be}})}return k}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-cc(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:o}}=this.options,s=this._getLabelSizes(),a=t+o,u=s.widest.width;let d,p;return n==="left"?i?(p=this.right+o,r==="near"?d="left":r==="center"?(d="center",p+=u/2):(d="right",p+=u)):(p=this.right-a,r==="near"?d="right":r==="center"?(d="center",p-=u/2):(d="left",p=this.left)):n==="right"?i?(p=this.left+o,r==="near"?d="right":r==="center"?(d="center",p-=u/2):(d="left",p-=u)):(p=this.left+a,r==="near"?d="left":r==="center"?(d="center",p+=u/2):(d="right",p=this.right)):d="right",{textAlign:d,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:o,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.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 o,s;const a=(u,d,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(u.x,u.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o<s;++o){const u=i[o];n.drawOnChartArea&&a({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&a({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),s=r.display?o.width:0;if(!s)return;const a=i.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let d,p,m,v;this.isHorizontal()?(d=vd(t,this.left,s)-s/2,p=vd(t,this.right,a)+a/2,m=v=u):(m=vd(t,this.top,s)-s/2,v=vd(t,this.bottom,a)+a/2,d=p=u),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(d,m),n.lineTo(p,v),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&pk(r,i);const o=this.getLabelItems(t);for(const s of o){const a=s.options,u=s.font,d=s.label,p=s.textOffset;uf(r,d,0,p,u,a)}i&&mk(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=Gi(r.font),s=Ao(r.padding),a=r.align;let u=o.lineHeight/2;n==="bottom"||n==="center"||Sr(n)?(u+=s.bottom,li(r.text)&&(u+=o.lineHeight*(r.text.length-1))):u+=s.top;const{titleX:d,titleY:p,maxWidth:m,rotation:v}=mke(this,u,n,a);uf(t,r.text,0,0,o,{color:r.color,maxWidth:m,rotation:v,textAlign:pke(a,n,i),textBaseline:"middle",translation:[d,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=cr(t.grid&&t.grid.z,-1),i=cr(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Ef.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o<s;++o){const a=n[o];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Gi(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Tx{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;yke(n)&&(r=this.register(n));const i=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,gke(t,s,r),this.override&&_i.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 _i[i]&&(delete _i[i][r],this.override&&delete lf[r])}}function gke(e,t,n){const r=Sv(Object.create(null),[n?_i.get(n):{},_i.get(t),e.defaults]);_i.set(t,r),e.defaultRoutes&&vke(t,e.defaultRoutes),e.descriptors&&_i.describe(t,e.descriptors)}function vke(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),u=s.join(".");_i.route(o,i,u,a)})}function yke(e){return"id"in e&&"defaults"in e}class xke{constructor(){this.controllers=new Tx($h,"datasets",!0),this.elements=new Tx(_l,"elements"),this.plugins=new Tx(Object,"plugins"),this.scales=new Tx(Ef,"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 o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Ar(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=lk(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 sl=new xke;class bke{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,r,i){i=i||{};for(const o of t){const s=o.plugin,a=s[r],u=[n,i,o.options];if(Qr(a,u,s)===!1&&i.cancelable)return!1}return!0}invalidate(){wr(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=cr(r.options&&r.options.plugins,{}),o=_ke(r);return i===!1&&!n?[]:Cke(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,s)=>o.filter(a=>!s.some(u=>a.plugin.id===u.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function _ke(e){const t={},n=[],r=Object.keys(sl.plugins.items);for(let o=0;o<r.length;o++)n.push(sl.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const s=i[o];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function wke(e,t){return!t&&e===!1?null:e===!0?{}:e}function Cke(e,{plugins:t,localIds:n},r,i){const o=[],s=e.getContext();for(const a of t){const u=a.id,d=wke(r[u],i);d!==null&&o.push({plugin:a,options:Ske(e.config,{plugin:a,local:n[u]},d,s)})}return o}function Ske(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),s=e.getOptionScopes(r,o);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function TE(e,t){const n=_i.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Eke(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Pke(e,t){return e===t?"_index_":"_value_"}function J6(e){if(e==="x"||e==="y"||e==="r")return e}function Ike(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function kE(e,...t){if(J6(e))return e;for(const n of t){const r=n.axis||Ike(n.position)||e.length>1&&J6(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function eL(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Tke(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 eL(e,"x",n[0])||eL(e,"y",n[0])}return{}}function kke(e,t){const n=lf[e.type]||{scales:{}},r=t.scales||{},i=TE(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!Sr(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const u=kE(s,a,Tke(s,e),_i.scales[a.type]),d=Pke(u,i),p=n.scales||{};o[s]=Og(Object.create(null),[{axis:u},a,p[u],p[d]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,u=s.indexAxis||TE(a,t),p=(lf[a]||{}).scales||{};Object.keys(p).forEach(m=>{const v=Eke(m,u),x=s[v+"AxisID"]||v;o[x]=o[x]||Object.create(null),Og(o[x],[{axis:v},r[x],p[m]])})}),Object.keys(o).forEach(s=>{const a=o[s];Og(a,[_i.scales[a.type],_i.scale])}),o}function lK(e){const t=e.options||(e.options={});t.plugins=cr(t.plugins,{}),t.scales=kke(e,t)}function uK(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Mke(e){return e=e||{},e.data=uK(e.data),lK(e),e}const tL=new Map,cK=new Set;function kx(e,t){let n=tL.get(e);return n||(n=t(),tL.set(e,n),cK.add(n)),n}const Qm=(e,t,n)=>{const r=cp(t,n);r!==void 0&&e.add(r)};class Rke{constructor(t){this._config=Mke(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=uK(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(),lK(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return kx(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return kx(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return kx(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return kx(`${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:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const u=new Set;n.forEach(p=>{t&&(u.add(t),p.forEach(m=>Qm(u,t,m))),p.forEach(m=>Qm(u,i,m)),p.forEach(m=>Qm(u,lf[o]||{},m)),p.forEach(m=>Qm(u,_i,m)),p.forEach(m=>Qm(u,PE,m))});const d=Array.from(u);return d.length===0&&d.push(Object.create(null)),cK.has(n)&&s.set(n,d),d}chartOptionScopes(){const{options:t,type:n}=this;return[t,lf[n]||{},_i.datasets[n]||{},{type:n},_i,PE]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=nL(this._resolverCache,t,i);let u=s;if(Dke(s,n)){o.$shared=!1,r=Dc(r)?r():r;const d=this.createResolver(t,r,a);u=dp(s,r,d)}for(const d of n)o[d]=u[d];return o}createResolver(t,n,r=[""],i){const{resolver:o}=nL(this._resolverCache,t,r);return Sr(n)?dp(o,n,void 0,i):o}}function nL(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:gk(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const Ake=e=>Sr(e)&&Object.getOwnPropertyNames(e).some(t=>Dc(e[t]));function Dke(e,t){const{isScriptable:n,isIndexable:r}=WH(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Dc(a)||Ake(a))||s&&li(a))return!0}return!1}var Oke="4.5.0";const Nke=["top","bottom","left","right","chartArea"];function rL(e,t){return e==="top"||e==="bottom"||Nke.indexOf(e)===-1&&t==="x"}function iL(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function oL(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Qr(n&&n.onComplete,[e],t)}function Lke(e){const t=e.chart,n=t.options.animation;Qr(n&&n.onProgress,[e],t)}function dK(e){return xk()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const p1={},aL=e=>{const t=dK(e);return Object.values(p1).filter(n=>n.canvas===t).pop()};function Fke(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function zke(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}class ul{static register(...t){sl.add(...t),sL()}static unregister(...t){sl.remove(...t),sL()}constructor(t,n){const r=this.config=new Rke(n),i=dK(t),o=aL(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||nke(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),u=a&&a.canvas,d=u&&u.height,p=u&&u.width;if(this.id=NPe(),this.ctx=a,this.canvas=u,this.width=p,this.height=d,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 bke,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=JPe(m=>this.update(m),s.resizeDelay||0),this._dataChanges=[],p1[this.id]=this,!a||!u){console.error("Failed to create chart: can't acquire context from the given item");return}ql.listen(this,"complete",oL),ql.listen(this,"progress",Lke),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return wr(t)?n&&o?o: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 sl}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():k6(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return P6(this.canvas,this.ctx),this}stop(){return ql.stop(this),this}resize(t,n){ql.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,k6(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Qr(r.onResize,[this,s],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ar(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],u=kE(s,a),d=u==="r",p=u==="x";return{options:a,dposition:d?"chartArea":p?"bottom":"left",dtype:d?"radialLinear":p?"category":"linear"}}))),Ar(o,s=>{const a=s.options,u=a.id,d=kE(u,a),p=cr(a.type,s.dtype);(a.position===void 0||rL(a.position,d)!==rL(s.dposition))&&(a.position=s.dposition),i[u]=!0;let m=null;if(u in r&&r[u].type===p)m=r[u];else{const v=sl.getScale(p);m=new v({id:u,type:p,ctx:this.ctx,chart:this}),r[m.id]=m}m.init(a,t)}),Ar(i,(s,a)=>{s||delete r[a]}),Ar(r,s=>{ls.configure(this,s,s.options),ls.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(iL("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===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 o=n[r];let s=this.getDatasetMeta(r);const a=o.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=a,s.indexAxis=o.indexAxis||TE(a,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const u=sl.getController(a),{datasetElementType:d,dataElementType:p}=_i.datasets[a];Object.assign(u,{dataElementType:sl.getElement(p),datasetElementType:d&&sl.getElement(d)}),s.controller=new u(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){Ar(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 o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let d=0,p=this.data.datasets.length;d<p;d++){const{controller:m}=this.getDatasetMeta(d),v=!i&&o.indexOf(m)===-1;m.buildOrUpdateElements(v),s=Math.max(+m.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||Ar(o,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(iL("z","_idx"));const{_active:a,_lastEvent:u}=this;u?this._eventHandler(u,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ar(this.scales,t=>{ls.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!v6(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:o}of n){const s=r==="_removeElements"?-o:o;Fke(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!v6(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ls.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ar(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),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,Dc(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&&(ql.has(this)?this.attached&&!ql.running(this)&&ql.start(this):(this.draw(),oL({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}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,o;for(i=0,o=n.length;i<o;++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={meta:t,index:t.index,cancelable:!0},i=oTe(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&pk(n,i),t.controller.draw(),i&&mk(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return au(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=NTe.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._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=Vc(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",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);Ev(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.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(),ql.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(),P6(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete p1[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=(o,s)=>{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};Ar(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(u,d)=>{n.addEventListener(this,u,d),t[u]=d},i=(u,d)=>{t[u]&&(n.removeEventListener(this,u,d),delete t[u])},o=(u,d)=>{this.canvas&&this.resize(u,d)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){Ar(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ar(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,u;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,u=t.length;a<u;++a){s=t[a];const d=s&&this.getDatasetMeta(s.datasetIndex).controller;d&&d[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:s})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!Ob(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,o=(u,d)=>u.filter(p=>!d.some(m=>p.datasetIndex===m.datasetIndex&&p.index===m.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,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 o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),u=VPe(t),d=zke(t,this._lastEvent,r,u);r&&(this._lastEvent=null,Qr(o.onHover,[t,a,this],this),u&&Qr(o.onClick,[t,a,this],this));const p=!Ob(a,i);return(p||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=d,p}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}}Bn(ul,"defaults",_i),Bn(ul,"instances",p1),Bn(ul,"overrides",lf),Bn(ul,"registry",sl),Bn(ul,"version",Oke),Bn(ul,"getChart",aL);function sL(){return Ar(ul.instances,e=>e._plugins.invalidate())}function fK(e,t,n=t){e.lineCap=cr(n.borderCapStyle,t.borderCapStyle),e.setLineDash(cr(n.borderDash,t.borderDash)),e.lineDashOffset=cr(n.borderDashOffset,t.borderDashOffset),e.lineJoin=cr(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=cr(n.borderWidth,t.borderWidth),e.strokeStyle=cr(n.borderColor,t.borderColor)}function $ke(e,t,n){e.lineTo(n.x,n.y)}function Bke(e){return e.stepped?hIe:e.tension||e.cubicInterpolationMode==="monotone"?pIe:$ke}function hK(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,u=Math.max(i,s),d=Math.min(o,a),p=i<s&&o<s||i>a&&o>a;return{count:r,start:u,loop:t.loop,ilen:d<u&&!p?r+d-u:d-u}}function Vke(e,t,n,r){const{points:i,options:o}=t,{count:s,start:a,loop:u,ilen:d}=hK(i,n,r),p=Bke(o);let{move:m=!0,reverse:v}=r||{},x,_,P;for(x=0;x<=d;++x)_=i[(a+(v?d-x:x))%s],!_.skip&&(m?(e.moveTo(_.x,_.y),m=!1):p(e,P,_,v,o.stepped),P=_);return u&&(_=i[(a+(v?d:0))%s],p(e,P,_,v,o.stepped)),!!u}function Uke(e,t,n,r){const i=t.points,{count:o,start:s,ilen:a}=hK(i,n,r),{move:u=!0,reverse:d}=r||{};let p=0,m=0,v,x,_,P,k,T;const M=N=>(s+(d?a-N:N))%o,O=()=>{P!==k&&(e.lineTo(p,k),e.lineTo(p,P),e.lineTo(p,T))};for(u&&(x=i[M(0)],e.moveTo(x.x,x.y)),v=0;v<=a;++v){if(x=i[M(v)],x.skip)continue;const N=x.x,L=x.y,F=N|0;F===_?(L<P?P=L:L>k&&(k=L),p=(m*p+N)/++m):(O(),e.lineTo(N,L),_=F,m=0,P=k=L),T=L}O()}function ME(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Uke:Vke}function jke(e){return e.stepped?WIe:e.tension||e.cubicInterpolationMode==="monotone"?GIe:Td}function Hke(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),fK(e,t.options),e.stroke(i)}function Kke(e,t,n,r){const{segments:i,options:o}=t,s=ME(t);for(const a of i)fK(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Wke=typeof Path2D=="function";function Gke(e,t,n,r){Wke&&!t.options.segment?Hke(e,t,n,r):Kke(e,t,n,r)}class dg extends _l{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;zIe(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=tTe(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],o=this.points,s=QIe(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],u=jke(r);let d,p;for(d=0,p=s.length;d<p;++d){const{start:m,end:v}=s[d],x=o[m],_=o[v];if(x===_){a.push(x);continue}const P=Math.abs((i-x[n])/(_[n]-x[n])),k=u(x,_,P,r.stepped);k[n]=t[n],a.push(k)}return a.length===1?a[0]:a}pathSegment(t,n,r){return ME(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=ME(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)s&=o(t,this,a,{start:n,end:n+r-1});return!!s}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Gke(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Bn(dg,"id","line"),Bn(dg,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Bn(dg,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Bn(dg,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function lL(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class m1 extends _l{constructor(n){super();Bn(this,"parsed");Bn(this,"skip");Bn(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 o=this.options,{x:s,y:a}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(r-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,r){return lL(this,n,"x",r)}inYRange(n,r){return lL(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||!au(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,IE(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Bn(m1,"id","point"),Bn(m1,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Bn(m1,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function pK(e,t){const{x:n,y:r,base:i,width:o,height:s}=e.getProps(["x","y","base","width","height"],t);let a,u,d,p,m;return e.horizontal?(m=s/2,a=Math.min(n,i),u=Math.max(n,i),d=r-m,p=r+m):(m=o/2,a=n-m,u=n+m,d=Math.min(r,i),p=Math.max(r,i)),{left:a,top:d,right:u,bottom:p}}function dc(e,t,n,r){return e?0:Da(t,n,r)}function qke(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=KH(r);return{t:dc(i.top,o.top,0,n),r:dc(i.right,o.right,0,t),b:dc(i.bottom,o.bottom,0,n),l:dc(i.left,o.left,0,t)}}function Zke(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=qd(i),s=Math.min(t,n),a=e.borderSkipped,u=r||Sr(i);return{topLeft:dc(!u||a.top||a.left,o.topLeft,0,s),topRight:dc(!u||a.top||a.right,o.topRight,0,s),bottomLeft:dc(!u||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:dc(!u||a.bottom||a.right,o.bottomRight,0,s)}}function Xke(e){const t=pK(e),n=t.right-t.left,r=t.bottom-t.top,i=qke(e,n/2,r/2),o=Zke(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},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,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function O2(e,t,n,r){const i=t===null,o=n===null,a=e&&!(i&&o)&&pK(e,r);return a&&(i||Bd(t,a.left,a.right))&&(o||Bd(n,a.top,a.bottom))}function Yke(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Qke(e,t){e.rect(t.x,t.y,t.w,t.h)}function N2(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(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+o,h:e.h+s,radius:e.radius}}class g1 extends _l{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:o,outer:s}=Xke(this),a=Yke(s.radius)?Iv:Qke;t.save(),(s.w!==o.w||s.h!==o.h)&&(t.beginPath(),a(t,N2(s,n,o)),t.clip(),a(t,N2(o,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,N2(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return O2(this,t,n,r)}inXRange(t,n){return O2(this,t,null,n)}inYRange(t,n){return O2(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Bn(g1,"id","bar"),Bn(g1,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Bn(g1,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const uL=(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)}},Jke=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class cL extends _l{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=Gi(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:u}=uL(r,o);let d,p;n.font=i.string,this.isHorizontal()?(d=this.maxWidth,p=this._fitRows(s,o,a,u)+10):(p=this.maxHeight,d=this._fitCols(s,i,a,u)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(p,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],d=this.lineWidths=[0],p=i+a;let m=t;o.textAlign="left",o.textBaseline="middle";let v=-1,x=-p;return this.legendItems.forEach((_,P)=>{const k=r+n/2+o.measureText(_.text).width;(P===0||d[d.length-1]+k+2*a>s)&&(m+=p,d[d.length-(P>0?0:1)]=0,x+=p,v++),u[P]={left:0,top:x,row:v,width:k,height:i},d[d.length-1]+=k+a}),m}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],d=this.columnSizes=[],p=s-t;let m=a,v=0,x=0,_=0,P=0;return this.legendItems.forEach((k,T)=>{const{itemWidth:M,itemHeight:O}=eMe(r,n,o,k,i);T>0&&x+O+2*a>p&&(m+=v+a,d.push({width:v,height:x}),_+=v+a,P++,v=x=0),u[T]={left:_,top:x,col:P,width:M,height:O},v=Math.max(v,M),x+=O+a}),m+=v,d.push({width:v,height:x}),m}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=zh(o,this.left,this.width);if(this.isHorizontal()){let a=0,u=Po(r,this.left+i,this.right-this.lineWidths[a]);for(const d of n)a!==d.row&&(a=d.row,u=Po(r,this.left+i,this.right-this.lineWidths[a])),d.top+=this.top+t+i,d.left=s.leftForLtr(s.x(u),d.width),u+=d.width+i}else{let a=0,u=Po(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const d of n)d.col!==a&&(a=d.col,u=Po(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),d.top=u,d.left+=this.left+i,d.left=s.leftForLtr(s.x(d.left),d.width),u+=d.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;pk(t,this),this._draw(),mk(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=_i.color,u=zh(t.rtl,this.left,this.width),d=Gi(s.font),{padding:p}=s,m=d.size,v=m/2;let x;this.drawTitle(),i.textAlign=u.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=d.string;const{boxWidth:_,boxHeight:P,itemHeight:k}=uL(s,m),T=function(F,V,B){if(isNaN(_)||_<=0||isNaN(P)||P<0)return;i.save();const H=cr(B.lineWidth,1);if(i.fillStyle=cr(B.fillStyle,a),i.lineCap=cr(B.lineCap,"butt"),i.lineDashOffset=cr(B.lineDashOffset,0),i.lineJoin=cr(B.lineJoin,"miter"),i.lineWidth=H,i.strokeStyle=cr(B.strokeStyle,a),i.setLineDash(cr(B.lineDash,[])),s.usePointStyle){const G={radius:P*Math.SQRT2/2,pointStyle:B.pointStyle,rotation:B.rotation,borderWidth:H},ee=u.xPlus(F,_/2),X=V+v;jH(i,G,ee,X,s.pointStyleWidth&&_)}else{const G=V+Math.max((m-P)/2,0),ee=u.leftForLtr(F,_),X=qd(B.borderRadius);i.beginPath(),Object.values(X).some(Z=>Z!==0)?Iv(i,{x:ee,y:G,w:_,h:P,radius:X}):i.rect(ee,G,_,P),i.fill(),H!==0&&i.stroke()}i.restore()},M=function(F,V,B){uf(i,B.text,F,V+k/2,d,{strikethrough:B.hidden,textAlign:u.textAlign(B.textAlign)})},O=this.isHorizontal(),N=this._computeTitleHeight();O?x={x:Po(o,this.left+p,this.right-r[0]),y:this.top+p+N,line:0}:x={x:this.left+p,y:Po(o,this.top+N+p,this.bottom-n[0].height),line:0},YH(this.ctx,t.textDirection);const L=k+p;this.legendItems.forEach((F,V)=>{i.strokeStyle=F.fontColor,i.fillStyle=F.fontColor;const B=i.measureText(F.text).width,H=u.textAlign(F.textAlign||(F.textAlign=s.textAlign)),G=_+v+B;let ee=x.x,X=x.y;u.setWidth(this.width),O?V>0&&ee+G+p>this.right&&(X=x.y+=L,x.line++,ee=x.x=Po(o,this.left+p,this.right-r[x.line])):V>0&&X+L>this.bottom&&(ee=x.x=ee+n[x.line].width+p,x.line++,X=x.y=Po(o,this.top+N+p,this.bottom-n[x.line].height));const Z=u.x(ee);if(T(Z,X,F),ee=eIe(H,ee+_+v,O?ee+G:this.right,t.rtl),M(u.x(ee),X,F),O)x.x+=G+p;else if(typeof F.text!="string"){const Q=d.lineHeight;x.y+=mK(F,Q)+p}else x.y+=L}),QH(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Gi(n.font),i=Ao(n.padding);if(!n.display)return;const o=zh(t.rtl,this.left,this.width),s=this.ctx,a=n.position,u=r.size/2,d=i.top+u;let p,m=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),p=this.top+d,m=Po(t.align,m,this.right-v);else{const _=this.columnSizes.reduce((P,k)=>Math.max(P,k.height),0);p=d+Po(t.align,this.top,this.bottom-_-t.labels.padding-this._computeTitleHeight())}const x=Po(a,m,m+v);s.textAlign=o.textAlign(dk(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,uf(s,n.text,x,p,r)}_computeTitleHeight(){const t=this.options.title,n=Gi(t.font),r=Ao(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Bd(t,this.left,this.right)&&Bd(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Bd(t,i.left,i.left+i.width)&&Bd(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!rMe(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=Jke(i,r);i&&!o&&Qr(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&Qr(n.onHover,[t,r,this],this)}else r&&Qr(n.onClick,[t,r,this],this)}}function eMe(e,t,n,r,i){const o=tMe(r,e,t,n),s=nMe(i,r,t.lineHeight);return{itemWidth:o,itemHeight:s}}function tMe(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,s)=>o.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function nMe(e,t,n){let r=e;return typeof t.text!="string"&&(r=mK(t,n)),r}function mK(e,t){const n=e.text?e.text.length:0;return t*n}function rMe(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var iMe={id:"legend",_element:cL,start(e,t,n){const r=e.legend=new cL({ctx:e.ctx,options:n,chart:e});ls.configure(e,r,n),ls.addBox(e,r)},stop(e){ls.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ls.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:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(u=>{const d=u.controller.getStyle(n?0:void 0),p=Ao(d.borderWidth);return{text:t[u.index].label,fillStyle:d.backgroundColor,fontColor:o,hidden:!u.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:i||d.textAlign,borderRadius:s&&(a||d.borderRadius),datasetIndex:u.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 gK extends _l{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=li(r.text)?r.text.length:1;this._padding=Ao(r.padding);const o=i*Gi(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let u=0,d,p,m;return this.isHorizontal()?(p=Po(a,r,o),m=n+t,d=o-r):(s.position==="left"?(p=r+t,m=Po(a,i,n),u=Bi*-.5):(p=o-t,m=Po(a,n,i),u=Bi*.5),d=i-n),{titleX:p,titleY:m,maxWidth:d,rotation:u}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=Gi(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:u,rotation:d}=this._drawArgs(o);uf(t,n.text,0,0,r,{color:n.color,maxWidth:u,rotation:d,textAlign:dk(n.align),textBaseline:"middle",translation:[s,a]})}}function oMe(e,t){const n=new gK({ctx:e.ctx,options:t,chart:e});ls.configure(e,n,t),ls.addBox(e,n),e.titleBlock=n}var aMe={id:"title",_element:gK,start(e,t,n){oMe(e,n)},stop(e){const t=e.titleBlock;ls.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;ls.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 fg={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const u=a.tooltipPosition();r.add(u.x),i+=u.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((a,u)=>a+u)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,s,a;for(o=0,s=e.length;o<s;++o){const u=e[o].element;if(u&&u.hasValue()){const d=u.getCenterPoint(),p=EE(t,d);p<i&&(i=p,a=u)}}if(a){const u=a.tooltipPosition();n=u.x,r=u.y}return{x:n,y:r}}};function ol(e,t){return t&&(li(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Zl(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
|
`)>-1?e.split(`
|
|
|
`):e}function sMe(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function dL(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,u=Gi(t.bodyFont),d=Gi(t.titleFont),p=Gi(t.footerFont),m=o.length,v=i.length,x=r.length,_=Ao(t.padding);let P=_.height,k=0,T=r.reduce((N,L)=>N+L.before.length+L.lines.length+L.after.length,0);if(T+=e.beforeBody.length+e.afterBody.length,m&&(P+=m*d.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),T){const N=t.displayColors?Math.max(a,u.lineHeight):u.lineHeight;P+=x*N+(T-x)*u.lineHeight+(T-1)*t.bodySpacing}v&&(P+=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=d.string,Ar(e.title,O),n.font=u.string,Ar(e.beforeBody.concat(e.afterBody),O),M=t.displayColors?s+2+t.boxPadding:0,Ar(r,N=>{Ar(N.before,O),Ar(N.lines,O),Ar(N.after,O)}),M=0,n.font=p.string,Ar(e.footer,O),n.restore(),k+=_.width,{width:k,height:P}}function lMe(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function uMe(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function cMe(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:u}}=e;let d="center";return r==="center"?d=i<=(a+u)/2?"left":"right":i<=o/2?d="left":i>=s-o/2&&(d="right"),uMe(d,e,t,n)&&(d="center"),d}function fL(e,t,n){const r=n.yAlign||t.yAlign||lMe(e,n);return{xAlign:n.xAlign||t.xAlign||cMe(e,t,n,r),yAlign:r}}function dMe(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function fMe(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function hL(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:u}=n,d=i+o,{topLeft:p,topRight:m,bottomLeft:v,bottomRight:x}=qd(s);let _=dMe(t,a);const P=fMe(t,u,d);return u==="center"?a==="left"?_+=d:a==="right"&&(_-=d):a==="left"?_-=Math.max(p,v)+i:a==="right"&&(_+=Math.max(m,x)+i),{x:Da(_,0,r.width-t.width),y:Da(P,0,r.height-t.height)}}function Mx(e,t,n){const r=Ao(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function pL(e){return ol([],Zl(e))}function hMe(e,t,n){return Vc(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function mL(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const vK={beforeTitle:Wl,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:Wl,beforeBody:Wl,beforeLabel:Wl,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 wr(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:Wl,afterBody:Wl,beforeFooter:Wl,footer:Wl,afterFooter:Wl};function oa(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?vK[t].call(n,r):i}class RE extends _l{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,o=new eK(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=hMe(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=oa(r,"beforeTitle",this,t),o=oa(r,"title",this,t),s=oa(r,"afterTitle",this,t);let a=[];return a=ol(a,Zl(i)),a=ol(a,Zl(o)),a=ol(a,Zl(s)),a}getBeforeBody(t,n){return pL(oa(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ar(t,o=>{const s={before:[],lines:[],after:[]},a=mL(r,o);ol(s.before,Zl(oa(a,"beforeLabel",this,o))),ol(s.lines,oa(a,"label",this,o)),ol(s.after,Zl(oa(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return pL(oa(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=oa(r,"beforeFooter",this,t),o=oa(r,"footer",this,t),s=oa(r,"afterFooter",this,t);let a=[];return a=ol(a,Zl(i)),a=ol(a,Zl(o)),a=ol(a,Zl(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],u,d;for(u=0,d=n.length;u<d;++u)a.push(sMe(this.chart,n[u]));return t.filter&&(a=a.filter((p,m,v)=>t.filter(p,m,v,r))),t.itemSort&&(a=a.sort((p,m)=>t.itemSort(p,m,r))),Ar(a,p=>{const m=mL(t.callbacks,p);i.push(oa(m,"labelColor",this,p)),o.push(oa(m,"labelPointStyle",this,p)),s.push(oa(m,"labelTextColor",this,p))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=fg[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 u=this._size=dL(this,r),d=Object.assign({},a,u),p=fL(this.chart,r,d),m=hL(r,d,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,o={opacity:1,x:m.x,y:m.y,width:u.width,height:u.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:u,topRight:d,bottomLeft:p,bottomRight:m}=qd(a),{x:v,y:x}=t,{width:_,height:P}=n;let k,T,M,O,N,L;return o==="center"?(N=x+P/2,i==="left"?(k=v,T=k-s,O=N+s,L=N-s):(k=v+_,T=k+s,O=N-s,L=N+s),M=k):(i==="left"?T=v+Math.max(u,p)+s:i==="right"?T=v+_-Math.max(d,m)-s:T=this.caretX,o==="top"?(O=x,N=O-s,k=T-s,M=T+s):(O=x+P,N=O+s,k=T+s,M=T-s),L=O),{x1:k,x2:T,x3:M,y1:O,y2:N,y3:L}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,u;if(o){const d=zh(r.rtl,this.x,this.width);for(t.x=Mx(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",s=Gi(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,u=0;u<o;++u)n.fillText(i[u],d.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,u+1===o&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,o){const s=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:u,boxWidth:d}=o,p=Gi(o.bodyFont),m=Mx(this,"left",o),v=i.x(m),x=u<p.lineHeight?(p.lineHeight-u)/2:0,_=n.y+x;if(o.usePointStyle){const P={radius:Math.min(d,u)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},k=i.leftForLtr(v,d)+d/2,T=_+u/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,IE(t,P,k,T),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,IE(t,P,k,T)}else{t.lineWidth=Sr(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 P=i.leftForLtr(v,d),k=i.leftForLtr(i.xPlus(v,1),d-2),T=qd(s.borderRadius);Object.values(T).some(M=>M!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Iv(t,{x:P,y:_,w:d,h:u,radius:T}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Iv(t,{x:k,y:_+1,w:d-2,h:u-2,radius:T}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(P,_,d,u),t.strokeRect(P,_,d,u),t.fillStyle=s.backgroundColor,t.fillRect(k,_+1,d-2,u-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:u,boxWidth:d,boxPadding:p}=r,m=Gi(r.bodyFont);let v=m.lineHeight,x=0;const _=zh(r.rtl,this.x,this.width),P=function(B){n.fillText(B,_.x(t.x+x),t.y+v/2),t.y+=v+o},k=_.textAlign(s);let T,M,O,N,L,F,V;for(n.textAlign=s,n.textBaseline="middle",n.font=m.string,t.x=Mx(this,k,r),n.fillStyle=r.bodyColor,Ar(this.beforeBody,P),x=a&&k!=="right"?s==="center"?d/2+p:d+2+p:0,N=0,F=i.length;N<F;++N){for(T=i[N],M=this.labelTextColors[N],n.fillStyle=M,Ar(T.before,P),O=T.lines,a&&O.length&&(this._drawColorBox(n,t,N,_,r),v=Math.max(m.lineHeight,u)),L=0,V=O.length;L<V;++L)P(O[L]),v=m.lineHeight;Ar(T.after,P)}x=0,v=m.lineHeight,Ar(this.afterBody,P),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let s,a;if(o){const u=zh(r.rtl,this.x,this.width);for(t.x=Mx(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=u.textAlign(r.footerAlign),n.textBaseline="middle",s=Gi(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,a=0;a<o;++a)n.fillText(i[a],u.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:s}=this,{x:a,y:u}=t,{width:d,height:p}=r,{topLeft:m,topRight:v,bottomLeft:x,bottomRight:_}=qd(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+m,u),s==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+d-v,u),n.quadraticCurveTo(a+d,u,a+d,u+v),s==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+d,u+p-_),n.quadraticCurveTo(a+d,u+p,a+d-_,u+p),s==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+x,u+p),n.quadraticCurveTo(a,u+p,a,u+p-x),s==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,u+m),n.quadraticCurveTo(a,u,a+m,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=fg[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=dL(this,t),u=Object.assign({},s,this._size),d=fL(n,t,u),p=hL(t,u,d,n);(i._to!==p.x||o._to!==p.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=a.width,this.height=a.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},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Ao(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),YH(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),QH(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:u})=>{const d=this.chart.getDatasetMeta(a);if(!d)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:d.data[u],index:u}}),o=!Ob(r,i),s=this._positionChanged(i,n);(o||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,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),u=n||!Ob(s,o)||a;return u&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),u}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=fg[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}Bn(RE,"positioners",fg);var pMe={id:"tooltip",_element:RE,positioners:fg,afterInit(e,t,n){n&&(e.tooltip=new RE({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:vK},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 mMe=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function gMe(e,t,n,r){const i=e.indexOf(t);if(i===-1)return mMe(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const vMe=(e,t)=>e===null?null:Da(Math.round(e),0,t);function gL(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class AE extends Ef{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:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(wr(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:gMe(r,t,cr(n,t),this._addedLabels),vMe(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 o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.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 gL.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}}Bn(AE,"id","category"),Bn(AE,"defaults",{ticks:{callback:gL}});function yMe(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:u,count:d,maxTicks:p,maxDigits:m,includeBounds:v}=e,x=o||1,_=p-1,{min:P,max:k}=t,T=!wr(s),M=!wr(a),O=!wr(d),N=(k-P)/(m+1);let L=x6((k-P)/_/x)*x,F,V,B,H;if(L<1e-14&&!T&&!M)return[{value:P},{value:k}];H=Math.ceil(k/L)-Math.floor(P/L),H>_&&(L=x6(H*L/_/x)*x),wr(u)||(F=Math.pow(10,u),L=Math.ceil(L*F)/F),i==="ticks"?(V=Math.floor(P/L)*L,B=Math.ceil(k/L)*L):(V=P,B=k),T&&M&&o&&WPe((a-s)/o,L/1e3)?(H=Math.round(Math.min((a-s)/L,p)),L=(a-s)/H,V=s,B=a):O?(V=T?s:V,B=M?a:B,H=d-1,L=(B-V)/H):(H=(B-V)/L,Ng(H,Math.round(H),L/1e3)?H=Math.round(H):H=Math.ceil(H));const G=Math.max(b6(L),b6(V));F=Math.pow(10,wr(u)?G:u),V=Math.round(V*F)/F,B=Math.round(B*F)/F;let ee=0;for(T&&(v&&V!==s?(n.push({value:s}),V<s&&ee++,Ng(Math.round((V+ee*L)*F)/F,s,vL(s,N,e))&&ee++):V<s&&ee++);ee<H;++ee){const X=Math.round((V+ee*L)*F)/F;if(M&&X>a)break;n.push({value:X})}return M&&v&&B!==a?n.length&&Ng(n[n.length-1].value,a,vL(a,N,e))?n[n.length-1].value=a:n.push({value:a}):(!M||B===a)&&n.push({value:B}),n}function vL(e,t,{horizontal:n,minRotation:r}){const i=cc(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class Bb extends Ef{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 wr(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:o}=this;const s=u=>i=n?i:u,a=u=>o=r?o:u;if(t){const u=bl(i),d=bl(o);u<0&&d<0?a(0):u>0&&d>0&&s(0)}if(i===o){let u=o===0?1:Math.abs(o*.05);a(o+u),t||s(i-u)}this.min=i,this.max=o}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},o=this._range||this,s=yMe(i,o);return t.bounds==="ticks"&&LH(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 hk(t,this.chart.options.locale,this.options.ticks.format)}}class DE extends Bb{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ro(t)?t:0,this.max=ro(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=cc(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.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}}Bn(DE,"id","linear"),Bn(DE,"defaults",{ticks:{callback:Sw.formatters.numeric}});const kv=e=>Math.floor(uc(e)),xd=(e,t)=>Math.pow(10,kv(e)+t);function yL(e){return e/Math.pow(10,kv(e))===1}function xL(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function xMe(e,t){const n=t-e;let r=kv(n);for(;xL(e,t,r)>10;)r++;for(;xL(e,t,r)<10;)r--;return Math.min(r,kv(e))}function bMe(e,{min:t,max:n}){t=Ia(e.min,t);const r=[],i=kv(t);let o=xMe(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),u=i>o?Math.pow(10,i):0,d=Math.round((t-u)*s)/s,p=Math.floor((t-u)/a/10)*a*10;let m=Math.floor((d-p)/Math.pow(10,o)),v=Ia(e.min,Math.round((u+p+m*Math.pow(10,o))*s)/s);for(;v<n;)r.push({value:v,major:yL(v),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(o++,m=2,s=o>=0?1:s),v=Math.round((u+p+m*Math.pow(10,o))*s)/s;const x=Ia(e.max,v);return r.push({value:x,major:yL(x),significand:m}),r}class bL extends Ef{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Bb.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return ro(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ro(t)?Math.max(0,t):null,this.max=ro(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ro(this._userMin)&&(this.min=t===xd(this.min,0)?xd(this.min,-1):xd(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(xd(r,-1)),s(xd(i,1)))),r<=0&&o(xd(i,-1)),i<=0&&s(xd(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=bMe(n,this);return t.bounds==="ticks"&&LH(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":hk(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=uc(t),this._valueRange=uc(this.max)-uc(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(uc(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Bn(bL,"id","logarithmic"),Bn(bL,"defaults",{ticks:{callback:Sw.formatters.logarithmic,major:{enabled:!0}}});function OE(e){const t=e.ticks;if(t.display&&e.display){const n=Ao(t.backdropPadding);return cr(t.font&&t.font.size,_i.font.size)+n.height}return 0}function _Me(e,t,n){return n=li(n)?n:[n],{w:fIe(e,t.string,n),h:n.length*t.lineHeight}}function _L(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 wMe(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=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Bi/o:0;for(let u=0;u<o;u++){const d=s.setContext(e.getPointLabelContext(u));i[u]=d.padding;const p=e.getPointPosition(u,e.drawingArea+i[u],a),m=Gi(d.font),v=_Me(e.ctx,m,e._pointLabels[u]);r[u]=v;const x=Ns(e.getIndexAngle(u)+a),_=Math.round(uk(x)),P=_L(_,p.x,v.w,0,180),k=_L(_,p.y,v.h,90,270);CMe(n,t,x,P,k)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=PMe(e,r,i)}function CMe(e,t,n,r,i){const o=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let a=0,u=0;r.start<t.l?(a=(t.l-r.start)/o,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(u=(t.t-i.start)/s,e.t=Math.min(e.t,t.t-u)):i.end>t.b&&(u=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+u))}function SMe(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:s,size:a}=n,u=e.getPointPosition(t,r+i+s,o),d=Math.round(uk(Ns(u.angle+Aa))),p=kMe(u.y,a.h,d),m=IMe(d),v=TMe(u.x,a.w,m);return{visible:!0,x:u.x,y:p,textAlign:m,left:v,top:p,right:v+a.w,bottom:p+a.h}}function EMe(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(au({x:n,y:r},t)||au({x:n,y:o},t)||au({x:i,y:r},t)||au({x:i,y:o},t))}function PMe(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,u={extra:OE(o)/2,additionalAngle:s?Bi/i:0};let d;for(let p=0;p<i;p++){u.padding=n[p],u.size=t[p];const m=SMe(e,p,u);r.push(m),a==="auto"&&(m.visible=EMe(m,d),m.visible&&(d=m))}return r}function IMe(e){return e===0||e===180?"center":e<180?"left":"right"}function TMe(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function kMe(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function MMe(e,t,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:a}=t;if(!wr(a)){const u=qd(t.borderRadius),d=Ao(t.backdropPadding);e.fillStyle=a;const p=r-d.left,m=i-d.top,v=o-r+d.width,x=s-i+d.height;Object.values(u).some(_=>_!==0)?(e.beginPath(),Iv(e,{x:p,y:m,w:v,h:x,radius:u}),e.fill()):e.fillRect(p,m,v,x)}}function RMe(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(e.getPointLabelContext(i));MMe(n,s,o);const a=Gi(s.font),{x:u,y:d,textAlign:p}=o;uf(n,e._pointLabels[i],u,d+a.lineHeight/2,a,{color:s.color,textAlign:p,textBaseline:"middle"})}}function yK(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,ds);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s<r;s++)o=e.getPointPosition(s,t),i.lineTo(o.x,o.y)}}function AMe(e,t,n,r,i){const o=e.ctx,s=t.circular,{color:a,lineWidth:u}=t;!s&&!r||!a||!u||n<0||(o.save(),o.strokeStyle=a,o.lineWidth=u,o.setLineDash(i.dash||[]),o.lineDashOffset=i.dashOffset,o.beginPath(),yK(e,n,s,r),o.closePath(),o.stroke(),o.restore())}function DMe(e,t,n){return Vc(e,{label:n,index:t,type:"pointLabel"})}class Rx extends Bb{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=Ao(OE(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=ro(t)&&!isNaN(t)?t:0,this.max=ro(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/OE(this.options))}generateTickLabels(t){Bb.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?wMe(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=ds/(this._pointLabels.length||1),r=this.options.startAngle||0;return Ns(t*n+cc(r))}getDistanceFromCenterForValue(t){if(wr(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(wr(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 DMe(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-Aa+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:o}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),yK(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:o}=n,s=this._pointLabels.length;let a,u,d;if(n.pointLabels.display&&RMe(this,s),i.display&&this.ticks.forEach((p,m)=>{if(m!==0||m===0&&this.min<0){u=this.getDistanceFromCenterForValue(p.value);const v=this.getContext(m),x=i.setContext(v),_=o.setContext(v);AMe(this,x,u,s,_)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const p=r.setContext(this.getPointLabelContext(a)),{color:m,lineWidth:v}=p;!v||!m||(t.lineWidth=v,t.strokeStyle=m,t.setLineDash(p.borderDash),t.lineDashOffset=p.borderDashOffset,u=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),d=this.getPointPosition(a,u),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(d.x,d.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 o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,u)=>{if(u===0&&this.min>=0&&!n.reverse)return;const d=r.setContext(this.getContext(u)),p=Gi(d.font);if(o=this.getDistanceFromCenterForValue(this.ticks[u].value),d.showLabelBackdrop){t.font=p.string,s=t.measureText(a.label).width,t.fillStyle=d.backdropColor;const m=Ao(d.backdropPadding);t.fillRect(-s/2-m.left,-o-p.size/2-m.top,s+m.width,p.size+m.height)}uf(t,a.label,0,-o,p,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),t.restore()}drawTitle(){}}Bn(Rx,"id","radialLinear"),Bn(Rx,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Sw.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Bn(Rx,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Bn(Rx,"descriptors",{angleLines:{_fallback:"grid"}});const Pw={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}},ua=Object.keys(Pw);function wL(e,t){return e-t}function CL(e,t){if(wr(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),ro(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Pv(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function SL(e,t,n,r){const i=ua.length;for(let o=ua.indexOf(e);o<i-1;++o){const s=Pw[ua[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(a*s.size))<=r)return ua[o]}return ua[i-1]}function OMe(e,t,n,r,i){for(let o=ua.length-1;o>=ua.indexOf(n);o--){const s=ua[o];if(Pw[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return ua[n?ua.indexOf(n):0]}function NMe(e){for(let t=ua.indexOf(e)+1,n=ua.length;t<n;++t)if(Pw[ua[t]].common)return ua[t]}function EL(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=ck(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function LMe(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,u;for(a=o;a<=s;a=+i.add(a,1,r))u=n[a],u>=0&&(t[u].major=!0);return t}function PL(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s<o;++s)a=t[s],i[a]=s,r.push({value:a,major:!1});return o===0||!n?r:LMe(e,r,i,n)}class Vb extends Ef{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 MTe._date(t.adapters.date);i.init(n),Og(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:CL(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:o,minDefined:s,maxDefined:a}=this.getUserBounds();function u(d){!s&&!isNaN(d.min)&&(i=Math.min(i,d.min)),!a&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!s||!a)&&(u(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&u(this.getMinMax(!1))),i=ro(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=ro(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_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 o=this.min,s=this.max,a=YPe(i,o,s);return this._unit=n.unit||(r.autoSkip?SL(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):OMe(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:NMe(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),PL(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Da(n,0,s),r=Da(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,o=i.time,s=o.unit||SL(o.minUnit,n,r,this._getLabelCapacity(n)),a=cr(i.ticks.stepSize,1),u=s==="week"?o.isoWeekday:!1,d=Pv(u)||u===!0,p={};let m=n,v,x;if(d&&(m=+t.startOf(m,"isoWeek",u)),m=+t.startOf(m,d?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(v=m,x=0;v<r;v=+t.add(v,a,s),x++)EL(p,v,_);return(v===r||i.bounds==="ticks"||x===1)&&EL(p,v,_),Object.keys(p).sort(wL).map(P=>+P)}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,o=this._unit,s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Qr(s,[t,n,r],this);const a=o.time.displayFormats,u=this._unit,d=this._majorUnit,p=u&&a[u],m=d&&a[d],v=r[n],x=d&&m&&v&&v.major;return this._adapter.format(t,i||(x?m: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=cc(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),s=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*o+a*s,h:r*s+a*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,PL(this,[t],this._majorUnit),i),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a: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(CL(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return $H(t.sort(wL))}}Bn(Vb,"id","time"),Bn(Vb,"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 Ax(e,t,n){let r=0,i=e.length-1,o,s,a,u;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Vd(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:u}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Vd(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:u}=e[i]);const d=s-o;return d?a+(u-a)*(t-o)/d:a}class IL extends Vb{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=Ax(n,this.min),this._tableRange=Ax(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,u,d,p;for(s=0,a=t.length;s<a;++s)d=t[s],d>=n&&d<=r&&i.push(d);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;s<a;++s)p=i[s+1],u=i[s-1],d=i[s],Math.round((p+u)/2)!==d&&o.push({time:d,pos:s/(a-1)});return o}_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,o)=>i-o)}_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(Ax(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ax(this._table,r*this._tableRange+this._minPos,!0)}}Bn(IL,"id","timeseries"),Bn(IL,"defaults",Vb.defaults);const xK="label";function TL(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function FMe(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function bK(e,t){e.labels=t}function _K(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xK;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function zMe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xK;const n={labels:[],datasets:[]};return bK(n,e.labels),_K(n,e.datasets,t),n}function $Me(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:u,plugins:d=[],fallbackContent:p,updateMode:m,...v}=e,x=w.exports.useRef(null),_=w.exports.useRef(null),P=()=>{!x.current||(_.current=new ul(x.current,{type:s,data:zMe(a,o),options:u&&{...u},plugins:d}),TL(t,_.current))},k=()=>{TL(t,null),_.current&&(_.current.destroy(),_.current=null)};return w.exports.useEffect(()=>{!i&&_.current&&u&&FMe(_.current,u)},[i,u]),w.exports.useEffect(()=>{!i&&_.current&&bK(_.current.config.data,a.labels)},[i,a.labels]),w.exports.useEffect(()=>{!i&&_.current&&a.datasets&&_K(_.current.config.data,a.datasets,o)},[i,a.datasets]),w.exports.useEffect(()=>{!_.current||(i?(k(),setTimeout(P)):_.current.update(m))},[i,u,a.labels,a.datasets,m]),w.exports.useEffect(()=>{!_.current||(k(),setTimeout(P))},[s]),w.exports.useEffect(()=>(P(),()=>k()),[]),I("canvas",{ref:x,role:"img",height:n,width:r,...v,children:p})}const BMe=w.exports.forwardRef($Me);function VMe(e,t){return ul.register(t),w.exports.forwardRef((n,r)=>I(BMe,{...n,ref:r,type:e}))}const UMe=VMe("line",f1);ul.register(AE,d1,m1,dg,DE,g1,aMe,pMe,iMe);const Dx={target_dist_shap:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430 \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442",target_post_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0442\u043E\u0447\u0435\u043A \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442*",target_cnt_ao_mean_shap:"\u0421\u0440\u0435\u0434\u043D\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043A \u0432 \u0442\u043E\u0447\u043A\u0430\u0445 \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442 \u0432 \u0410\u041E",rival_pvz_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u041F\u0412\u0417*",rival_post_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432 \u043A\u043E\u043D\u043A\u0443\u0440\u0435\u043D\u0442\u043E\u0432 *",metro_dist_shap:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u043C\u0435\u0442\u0440\u043E",property_price_bargains_shap:"\u0426\u0435\u043D\u0430 \u0441\u0434\u0435\u043B\u043E\u043A \u0436\u0438\u043B\u043E\u0439 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438*",property_price_offers_shap:"\u0426\u0435\u043D\u0430 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0436\u0438\u043B\u043E\u0439 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438*",property_mean_floor_shap:"\u0421\u0440\u0435\u0434\u043D\u044F\u044F \u044D\u0442\u0430\u0436\u043D\u043E\u0441\u0442\u044C \u0437\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438*",property_era_shap:"\u042D\u043F\u043E\u0445\u0430 \u0436\u0438\u043B\u043E\u0439 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438*",flats_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440*",popul_home_shap:"\u0427\u0438\u0441\u043B\u0435\u043D\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0436\u0438\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043D\u0430\u0441\u0435\u043B\u0435\u043D\u0438\u044F*",popul_job_shap:"\u0427\u0438\u0441\u043B\u0435\u043D\u043D\u043E\u0441\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0435\u0433\u043E \u043D\u0430\u0441\u0435\u043B\u0435\u043D\u0438\u044F*",yndxfood_sum_shap:"\u0421\u0443\u043C\u043C\u0430 \u0437\u0430\u043A\u0430\u0437\u043E\u0432 \u042F\u043D\u0434\u0435\u043A\u0441.\u0415\u0434\u0430*",yndxfood_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0437\u0430\u043A\u0430\u0437\u043E\u0432 \u042F\u043D\u0434\u0435\u043A\u0441.\u0415\u0434\u0430*",school_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0448\u043A\u043E\u043B*",kindergar_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0434\u0435\u0442\u0441\u0430\u0434\u043E\u0432*",public_stop_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043E\u043A \u043E\u0431\u0449. \u0442\u0440\u0430\u043D\u0441\u043F\u043E\u0440\u0442\u0430*",sport_center_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0441\u043F\u043E\u0440\u0442\u0438\u0432\u043D\u044B\u0445 \u0446\u0435\u043D\u0442\u0440\u043E\u0432*",pharmacy_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0430\u043F\u0442\u0435\u043A*",supermarket_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0441\u0443\u043F\u0435\u0440\u043C\u0430\u0440\u043A\u0435\u0442\u043E\u0432*",supermarket_premium_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u043F\u0440\u0435\u043C\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0441\u0443\u043F\u0435\u0440\u043C\u0430\u0440\u043A\u0435\u0442\u043E\u0432*",clinic_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u043B\u0438\u043A\u043B\u0438\u043D\u0438\u043A*",bank_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0431\u0430\u043D\u043A\u043E\u0432*",reca_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0442\u043E\u0447\u0435\u043A \u043E\u0431\u0449\u0435\u043F\u0438\u0442\u0430*",lab_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u043B\u0430\u0431\u043E\u0440\u0430\u0442\u043E\u0440\u0438\u0439*",culture_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u043A\u0443\u043B\u044C\u0442\u0443\u0440\u044B*",attraction_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0434\u043E\u0441\u0442\u043E\u043F\u0440\u0438\u043C\u0435\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0435\u0439*",mfc_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u041C\u0424\u0426*",bc_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0431\u0438\u0437\u043D\u0435\u0441-\u0446\u0435\u043D\u0442\u0440\u043E\u0432*",tc_cnt_shap:"\u041A\u043E\u043B-\u0432\u043E \u0442\u043E\u0440\u0433\u043E\u0432\u044B\u0445 \u0446\u0435\u043D\u0442\u0440\u043E\u0432*",business_activity_shap:"\u0411\u0438\u0437\u043D\u0435\u0441 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C"},jMe=({point:e})=>{const{data:t}=Vi(["mean-data"],async()=>{const{data:o}=await Mi.get("https://postamates.spatialsystems.ru/api/avg_bi_values/");return o},{refetchOnWindowFocus:!1,refetchOnMount:!1}),n={indexAxis:"y",elements:{bar:{borderWidth:0,borderRadius:5,pointStyle:"circle"}},plugins:{legend:{display:!1},tooltip:{displayColors:!1,yAlign:"top",callbacks:{label:function(o){const s=[],a=Object.keys(Dx).find(d=>Dx[d]===o.label),u=a.substring(0,a.length-5);if(o.datasetIndex===0&&s.push("\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435: "+e[u]),o.parsed.x!==null){let d="";o.datasetIndex===0&&(d="\u0412\u043A\u043B\u0430\u0434 \u0432 \u043F\u0440\u043E\u0433\u043D\u043E\u0437, %: "),o.datasetIndex===1&&(d="\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0432\u043A\u043B\u0430\u0434 \u0432 \u043F\u0440\u043E\u0433\u043D\u043E\u0437, %: "),o.datasetIndex===2&&(d="\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0432\u043A\u043B\u0430\u0434 \u0432 \u043F\u0440\u043E\u0433\u043D\u043E\u0437, %: "),s.push(d+o.parsed.x)}return s},body:()=>"\u0412\u043A\u043B\u0430\u0434 \u0432 \u043F\u0440\u043E\u0433\u043D\u043E\u0437, %:"}}},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"}}}}},r=Object.keys(Dx).sort((o,s)=>Math.abs(e[o])<Math.abs(e[s])?1:-1).slice(0,15),i={labels:r.map(o=>Dx[o]),datasets:[{data:r.map(o=>e[o]),backgroundColor:r.map(o=>e[o]).map(o=>o<=0?"#CC2500":"#278211"),hoverBackgroundColor:r.map(o=>e[o]).map(o=>o<=0?"#F22C00":"#2DB20C"),type:"line",showLine:!1},{data:r.map(o=>t?t[`min_${o}`]:0),backgroundColor:"#cccccc",hoverBackgroundColor:"#aaaaaa",type:"bar",showLine:!1},{data:r.map(o=>t?t[`max_${o}`]:0),backgroundColor:"#cccccc",hoverBackgroundColor:"#aaaaaa",type:"bar",showLine:!1}]};return I(UMe,{options:n,data:i})},HMe=()=>$e("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\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A \u0432 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D\u043D\u043E\u0439 \u0442\u043E\u0447\u043A\u0435.",I("br",{}),I("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.",I("br",{}),I("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 \u043F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A, \u0442\u0435\u043C \u0431\u043B\u0438\u0436\u0435 \u0435\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043A 100% (-100%)."]}),wK=({point:e})=>{const[t,n]=w.exports.useState(!1),r=()=>[I($n,{type:"primary",onClick:()=>n(!1),children:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},"close-button")];return $e("div",{className:"flex items-center",children:[e.prediction_current,I($i,{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:I($n,{className:"flex justify-center items-center h-6 ml-1 p-1",type:"primary",onClick:()=>n(!0),children:I(dPe,{})})}),I(t0,{open:t,title:"\u0412\u043A\u043B\u0430\u0434 \u0444\u0430\u043A\u0442\u043E\u0440\u043E\u0432 \u0432 \u043F\u0440\u043E\u0433\u043D\u043E\u0437 \u0442\u0440\u0430\u0444\u0438\u043A\u0430",onCancel:()=>n(!1),width:800,footer:r(),style:{top:"15px"},children:$e("div",{children:[$e("div",{className:"flex flex-col gap-2",children:[$e(sc,{className:da("p-1"),children:[I(Io,{className:"font-semibold",span:12,children:"\u0410\u0434\u0440\u0435\u0441 \u0442\u043E\u0447\u043A\u0438:"}),I(Io,{span:12,children:e.address})]}),$e(sc,{className:da("p-1"),children:[I(Io,{className:"font-semibold",span:12,children:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0444\u0438\u043A:"}),I(Io,{span:12,children:e.prediction_current})]})]}),I(Lce,{}),I(jMe,{point:e}),I("p",{children:"* - \u0432 \u043E\u043A\u0440\u0435\u0441\u0442\u043D\u043E\u0441\u0442\u0438"}),I(bf,{content:I(HMe,{autoFocus:!0}),trigger:"click",placement:"leftBottom",color:"#ffffff",children:I($n,{type:"text",className:"text-[#1890FF] p-0",children:"\u041A\u0430\u043A \u0447\u0438\u0442\u0430\u0442\u044C \u0433\u0440\u0430\u0444\u0438\u043A?"})})]})})]})},CK=(e=[],t)=>{const{data:n}=cw(),{tableState:{fullScreen:r}}=s0(),[i,o]=iv(`${t}Sort`,null),s=w.exports.useMemo(()=>[{title:r?$e("div",{className:"flex items-center justify-between",children:[I("span",{children:"\u0410\u0434\u0440\u0435\u0441"}),I(bf,{content:I(rk,{autoFocus:!0}),trigger:"click",placement:"right",children:I($n,{onClick:p=>p.stopPropagation(),children:I(TT,{})})})]}):"\u0410\u0434\u0440\u0435\u0441",name:"\u0410\u0434\u0440\u0435\u0441",dataIndex:"address",key:"address",width:200,sorter:!0,showSorterTooltip:!1},{title:"\u0420\u0430\u0439\u043E\u043D",dataIndex:"area",key:"area",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1,render:(p,m)=>up(m.area,n==null?void 0:n.normalized)},{title:"\u041E\u043A\u0440\u0443\u0433",dataIndex:"district",key:"district",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1,render:(p,m)=>up(m.district,n==null?void 0:n.normalized)},{title:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",dataIndex:"name",key:"name",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",dataIndex:"category",key:"category",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0421\u0442\u0430\u0442\u0443\u0441",dataIndex:"status",key:"status",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1,render:(p,m)=>Nd[m.status]},{title:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",dataIndex:"prediction_current",key:"prediction_current",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1,render:(p,m)=>I(wK,{point:m})},{title:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u043E\u0432 \u0432 \u0436\u0438\u043B\u043E\u043C \u0434\u043E\u043C\u0435",dataIndex:"doors",key:"doors",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043B\u0430\u0441\u0441 \u044D\u043D\u0435\u0440\u043E\u044D\u0444\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u0438 \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430",dataIndex:"enrg_cls",key:"enrg_cls",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440 \u0432 \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u0435 \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430",dataIndex:"flat_cnt",key:"flat_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0413\u043E\u0434 \u043F\u043E\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430",dataIndex:"year_bld",key:"year_bld",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u044D\u0442\u0430\u0436\u0435\u0439 \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430",dataIndex:"levels",key:"levels",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0441\u0442\u0435\u043D \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430",dataIndex:"mat_nes",key:"mat_nes",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0442\u0435\u0439 \u0432 \u043E\u043A\u0440\u0435\u0441\u0442\u043D\u043E\u0441\u0442\u0438 500\u043C (\u0434\u0430\u043B\u0435\u0435 \u0430\u043D\u0430\u043B\u043E\u0433\u0438\u0447\u043D\u043E)",dataIndex:"rival_post_cnt",key:"rival_post_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u041F\u0412\u0417",dataIndex:"rival_pvz_cnt",key:"rival_pvz_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432 \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442",dataIndex:"target_post_cnt",key:"target_post_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440 \u0432 \u043E\u043A\u0440\u0435\u0441\u0442\u043D\u043E\u0441\u0442\u0438",dataIndex:"flats_cnt",key:"flats_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0434\u043E\u0441\u0442\u043E\u043F\u0440\u0438\u043C\u0435\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0435\u0439",dataIndex:"attraction_cnt",key:"attraction_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0431\u0430\u043D\u043A\u043E\u0432",dataIndex:"bank_cnt",key:"bank_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0442\u043E\u0440\u0433\u043E\u0432\u044B\u0445 \u0446\u0435\u043D\u0442\u0440\u043E\u0432",dataIndex:"tc_cnt",key:"tc_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0431\u0438\u0437\u043D\u0435\u0441-\u0446\u0435\u043D\u0442\u0440\u043E\u0432",dataIndex:"bc_cnt",key:"bc_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043A\u043B\u0438\u043D\u0438\u043A",dataIndex:"clinic_cnt",key:"clinic_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u043A\u0443\u043B\u044C\u0442\u0443\u0440\u044B (\u0442\u0435\u0430\u0442\u0440\u044B, \u043C\u0443\u0437\u0435\u0439 \u0438 \u0442\u0434)",dataIndex:"culture_cnt",key:"culture_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0441\u043F\u043E\u0440\u0442\u0438\u0432\u043D\u044B\u0445 \u0446\u0435\u043D\u0442\u0440\u043E\u0432",dataIndex:"sport_center_cnt",key:"sport_center_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043B\u0430\u0431\u043E\u0440\u0430\u0442\u043E\u0440\u0438\u0439",dataIndex:"lab_cnt",key:"lab_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0448\u043A\u043E\u043B",dataIndex:"school_cnt",key:"school_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0434\u0435\u0442\u0441\u043A\u0438\u0445 \u0441\u0430\u0434\u043E\u0432",dataIndex:"kindergar_cnt",key:"kindergar_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u041C\u0424\u0426",dataIndex:"mfc_cnt",key:"mfc_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0430\u043F\u0442\u0435\u043A",dataIndex:"pharmacy_cnt",key:"pharmacy_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043E\u043A \u041E\u0422",dataIndex:"public_stop_cnt",key:"public_stop_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u0437 HORECA",dataIndex:"reca_cnt",key:"reca_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u0441\u0443\u043F\u0435\u0440\u043C\u0430\u0440\u043A\u0435\u0442\u043E\u0432",dataIndex:"supermarket_cnt",key:"supermarket_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043E\u043B-\u0432\u043E \u043F\u0440\u0435\u043C\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0441\u0443\u043F\u0435\u0440\u043C\u0430\u0440\u043A\u0435\u0442\u043E\u0432",dataIndex:"supermarket_premium_cnt",key:"supermarket_premium_cnt",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430 \u041C\u043E\u0439 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430",dataIndex:"target_dist",key:"target_dist",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0434\u043E \u043C\u0435\u0442\u0440\u043E",dataIndex:"metro_dist",key:"metro_dist",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C \u0436\u0438\u043B\u043E\u0439 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438 ",dataIndex:"property_price_bargains",key:"property_price_bargains",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0411\u0438\u0437\u043D\u0435\u0441-\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C",dataIndex:"business_activity",key:"business_activity",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u042D\u0440\u0430 \u043F\u043E\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0436\u0438\u043B\u043E\u0439 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438",dataIndex:"property_era",key:"property_era",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0421\u0440\u0435\u0434\u043D\u044F\u044F \u044D\u0442\u0430\u0436\u043D\u043E\u0441\u0442\u044C \u0437\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",dataIndex:"property_mean_floor",key:"property_mean_floor",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},...e].filter(Boolean),[n==null?void 0:n.normalized,e,r]),[a,u]=iv(`${t}Order`,s.map((p,m)=>({key:p.key,position:m,show:!0})));return w.exports.useEffect(()=>{const m=s.filter(v=>!a.find(x=>x.key===v.key)).map((v,x)=>({key:v.key,position:s.length-x-1,show:!0}));u([...a,...m])},[s]),{columns:w.exports.useMemo(()=>a.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,a,r]),orderColumns:{defaultColumns:s,order:a,setOrder:u},sort:i,setSort:o}},KMe=(e,t)=>{const{filters:n,ranges:r}=va(),{categories:i,region:o}=n,{selection:s}=Pl(),a=[...s.included],u=[...s.excluded],d=ys();return Vi(["export-initial",n,s],async()=>await iI((()=>{const m=new URLSearchParams({"status[]":[jn.pending]});return v_(m,n,r),m.append("status[]",[jn.pending,jn.cancelled].join(",")),i.length&&m.append("categories[]",i),a.length&&m.append("included[]",a),u.length&&m.append("excluded[]",u),m})(),o,d),{enabled:e,onSuccess:kT,onSettled:t,retry:!1})},WMe=(e,t)=>{const{clickedPointConfig:n}=Su(),{data:r,isInitialLoading:i,isFetching:o}=Vi(["clicked-point",n==null?void 0:n.id],async()=>{const s=new URLSearchParams({"location_ids[]":[n.id]}),{data:a}=await Mi.get(`/api/placement_points?${s.toString()}`);return a},{enabled:e,onSuccess:t});return{data:r,isLoading:i||o}},wk=(e,t)=>{const[n,r]=w.exports.useState(),[i,o]=w.exports.useState(!1),s=w.exports.useRef(),{data:a,isLoading:u}=WMe(i,()=>o(!1)),{clickedPointConfig:d}=Su(),p=ff();return w.exports.useEffect(()=>{!e||r(e)},[e]),w.exports.useEffect(()=>{!e||d===null||e.results.find(v=>v.id===d.id)||o(!0)},[e,d]),w.exports.useEffect(()=>{var m;!((m=a==null?void 0:a.results)!=null&&m[0])||(s.current=a.results[0].id,t(op+1),r({count:(e==null?void 0:e.count)+1,results:[a.results[0],...e.results]}))},[a,e]),w.exports.useEffect(()=>{if(d===null){const m=["clicked-point",s.current];p.removeQueries({queryKey:m}),t(op),r(e)}},[d,e]),{data:n,isClickedPointLoading:u}},GMe=(e,t,n,r,i)=>{const{filters:o,ranges:s}=va(),{updateCounter:a}=bu(),{categories:u,region:d}=o,p=ys(),m=()=>{const T=new URLSearchParams({page:e,page_size:n,"categories[]":u,ordering:i});return v_(T,o,s),T.append("status[]",[jn.pending,jn.cancelled].join(",")),T},{data:v,isInitialLoading:x,isFetching:_}=Vi(["table",e,o,i,p,a],async({signal:T})=>{const M=m();return await gf(M,d,p,T)},{onError:T=>{T.response.data.detail==="\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"&&t()},refetchOnWindowFocus:!1}),{data:P,isClickedPointLoading:k}=wk(v,r);return{data:P,pageSize:n,isClickedPointLoading:k,isDataLoading:x||_}},kL={New:{name:"\u041D\u043E\u0432\u0430\u044F",color:"import_status_new"},Error:{name:"\u041E\u0448\u0438\u0431\u043A\u0430 \u0433\u0435\u043E\u043A\u043E\u0434\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F",color:"import_status_error"},Matched:{name:"\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435",color:"import_status_matched"}},qMe=()=>{const{isImportMode:e}=Do(),{toggleUpdateCounter:t}=bu(),[n,r]=w.exports.useState(!1),i=async(s,a)=>{s.stopPropagation(),r(!0);try{await ite(a),t()}catch{}finally{r(!1)}};return{fields:w.exports.useMemo(()=>e?[{title:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0438\u043C\u043F\u043E\u0440\u0442\u0430",dataIndex:"matching_status",key:"matching_status",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1,render:(s,a)=>{if(!a.matching_status)return;const u=kL[a.matching_status].name,d=kL[a.matching_status].color;return I("div",{className:`bg-opacity-25 rounded-md px-2 py-1 text-center border-solid border-[2px] ${d}`,children:u})}},{title:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",key:"del",width:"60px",ellipsis:!0,render:(s,a)=>{if(!!a.id)return I($n,{type:"text",onClick:u=>i(u,a.id),children:I(fPe,{})})}}]:[],[e]),isDeleting:n}},ZMe="pendingTable",XMe=({fullWidth:e})=>{const{selection:t,include:n,exclude:r}=Pl(),{clickedPointConfig:i,setClickedPointConfig:o}=Su(),[s,a]=w.exports.useState(1),[u,d]=w.exports.useState(op),{fields:p,isDeleting:m}=qMe(),{columns:v,orderColumns:x,sort:_,setSort:P}=CK(p,ZMe),{setPopup:k}=Sf(),T=(H,G)=>{H==="ascend"&&P(G),H==="descend"&&P(`-${G}`),H||P(null)},{data:M,isClickedPointLoading:O,isDataLoading:N}=GMe(s,()=>a(1),u,d,_),L=()=>d(op),V={selectedRowKeys:w.exports.useCallback(()=>{var Q;const H=(Q=M==null?void 0:M.results.filter(le=>le.status===jn.pending).map(le=>le.id))!=null?Q:[],G=M==null?void 0:M.results.find(le=>le.id===(i==null?void 0:i.id)),ee=le=>t.excluded.has(le),X=le=>le===(G==null?void 0:G.id)&&(i==null?void 0:i.shouldSelect)===!1;return[...H.filter(le=>!ee(le)&&!X(le)),...t.included]},[M,i,t])(),onSelect:(H,G)=>{const{id:ee}=H;G?n(ee):r(ee)},getCheckboxProps:H=>({disabled:H.status!==jn.pending}),hideSelectAll:!0},B=w.exports.useCallback(H=>{L(),o(null),k(null),a(H)},[]);return I(nk,{rowSelection:V,data:M,onPageChange:B,page:s,pageSize:u,isClickedPointLoading:O,columns:v,fullWidth:e,onChange:(H,G,ee)=>{T(ee.order,ee.columnKey)},header:I(Cw,{exportProvider:KMe,orderColumns:x}),loading:N||m})},YMe=[{label:Nd[jn.pending],value:jn.pending},{label:Nd[jn.onApproval],value:jn.onApproval},{label:Nd[jn.working],value:jn.working},{label:Nd[jn.cancelled],value:jn.cancelled}],SK=({value:e,onChange:t,disabled:n,isLoading:r})=>I(vu,{style:{width:250},value:e,onChange:s=>{t(s)},options:YMe,loading:r,disabled:n,placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0442\u0430\u0442\u0443\u0441",onClick:s=>s.stopPropagation()}),QMe=(e,t)=>{const{filters:{region:n}}=Cf(),r=ys();return Vi(["export-on-approval",n],async()=>{const i=new URLSearchParams({"status[]":[jn.onApproval,jn.working]});return await iI(i,n,r)},{enabled:e,onSuccess:kT,onSettled:t})},JMe=({selectedIds:e,selectedStatus:t,onOpenMakeWorkingModal:n,onSuccess:r})=>{const i=ff(),{setPopup:o}=Sf(),{mutate:s}=hw({onSuccess:()=>{i.invalidateQueries(["on-approval-points"]),o(null),r()}});return I(Tn,{children:I($n,{type:"primary",onClick:u=>{u.stopPropagation();const d=new URLSearchParams({status:t,"location_ids[]":e});t===jn.working?n():s(d)},children:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"})})},eRe=({selectedIds:e,onClearSelected:t,onOpenMakeWorkingModal:n,orderColumns:r})=>{const[i,o]=w.exports.useState(jn.pending),s=a=>{a.stopPropagation(),t()};return I(Cw,{leftColumn:e.length>0&&$e(Tn,{children:[I(SK,{value:i,onChange:o}),I(JMe,{selectedIds:e,selectedStatus:i,onOpenMakeWorkingModal:n,onSuccess:t})]}),rightColumn:e.length>0&&I($n,{onClick:s,children:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435"}),classes:{leftColumn:"flex items-center gap-x-4",rightColumn:"flex item-center gap-x-4"},orderColumns:r,exportProvider:QMe})},tRe=[{title:"Id",dataIndex:"id",key:"id",width:50},{title:"\u0410\u0434\u0440\u0435\u0441",dataIndex:"address",key:"address",width:200},{title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",dataIndex:"category",key:"category",width:"120px",ellipsis:!0},{title:"\u0421\u0442\u0430\u0442\u0443\u0441",dataIndex:"status",key:"status",width:"120px",ellipsis:!0,render:(e,t)=>Nd[t.status]},{title:"Id \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430",dataIndex:"postamat_id",key:"postamat_id",width:"120px",editable:!0}];const EK=Un.createContext(null),nRe=({index:e,...t})=>{const[n]=j3.useForm();return I(j3,{form:n,component:!1,children:I(EK.Provider,{value:n,children:I("tr",{...t})})})},rRe=({title:e,editable:t,children:n,dataIndex:r,record:i,handleSave:o,setHasError:s,...a})=>{const[u,d]=w.exports.useState(!1),p=w.exports.useRef(null),m=w.exports.useContext(EK);w.exports.useEffect(()=>{u&&p.current.focus()},[u]);const v=()=>{d(!u),m.setFieldsValue({[r]:i[r]})},x=async()=>{try{const P=await m.validateFields();s(!1),v(),o({...i,...P})}catch(P){console.log("Save failed:",P),s(!0)}};let _=n;return t&&(_=u?I(j3.Item,{style:{margin:0},name:r,rules:[{required:!0,message:`\u0423\u043A\u0430\u0436\u0438\u0442\u0435 ${e}`}],children:I(oV,{ref:p,onPressEnter:x,onBlur:x,className:"w-full",min:0,precision:0})}):I("div",{className:"editable-cell-value-wrap",style:{paddingRight:24},onClick:v,children:n})),I("td",{...a,children:_})},iRe=({data:e,onChange:t,setHasError:n})=>{const r=a=>{const u=[...e],d=u.findIndex(m=>a.id===m.id),p=u[d];u.splice(d,1,{...p,...a}),t(u)},i={body:{row:nRe,cell:rRe}},o=tRe.map(a=>a.editable?{...a,onCell:u=>({record:u,editable:a.editable,dataIndex:a.dataIndex,title:a.title,handleSave:r,setHasError:n})}:a);return I(xU,{components:i,size:"small",pagination:!1,dataSource:e,columns:o,rowKey:"id",sticky:!0,rowClassName:()=>"editable-row",className:"!max-w-full",scroll:{y:"max-content",x:"max-content"}})},oRe=({selectedIds:e,onClose:t,onSuccess:n})=>{const{data:r}=Vi(["make-working-table",e],async()=>{const P=new URLSearchParams({page:1,page_size:100,"location_ids[]":e});return await gf(P)}),[i,o]=w.exports.useState(!1),[s,a]=w.exports.useState([]),[u,d]=w.exports.useState(null);w.exports.useEffect(()=>{a(r==null?void 0:r.results)},[r]);const p=ff(),{setPopup:m}=Sf(),{mutateAsync:v}=n$(),{mutateAsync:x}=hw({});return I(t0,{open:!0,title:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u044B \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432",onCancel:t,width:800,footer:[u&&I("span",{className:"mr-2 text-primary",children:u},"error"),I($n,{type:"primary",onClick:()=>{const P=s.map(M=>{const O=new URLSearchParams({id:M.id,postamat_id:M.postamat_id});return v(O)}),k=new URLSearchParams({status:jn.working,"location_ids[]":e}),T=x(k);Promise.all([...P,T]).then(()=>{p.invalidateQueries(["on-approval-points"]),d(null),m(null),n(),t()}).catch(()=>d("\u0412\u0432\u0435\u0434\u0435\u043D\u043D\u044B\u0435 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u044B \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0442, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435"))},disabled:i,children:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"},"ok-button")],children:s&&I(iRe,{data:s,onChange:a,setHasError:o})})},aRe=[{title:"Id \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430",dataIndex:"postamat_id",key:"postamat_id",width:"70px",ellipsis:!0,sorter:!0,showSorterTooltip:!1}],sRe=({fullWidth:e})=>{const[t,n]=w.exports.useState(op),[r,i]=w.exports.useState(1),[o,s]=w.exports.useState([]),{filters:{region:a}}=Cf(),[u,d]=w.exports.useState(!1),{columns:p,orderColumns:m,sort:v,setSort:x}=CK(aRe,"onApprovalTableOrder"),{isVisible:_}=Ks(),P=ys(),k=(H,G)=>{H==="ascend"&&x(G),H==="descend"&&x(`-${G}`),H||x(null)},T=()=>s([]),{data:M,isInitialLoading:O,isFetching:N}=Vi(["on-approval-points",r,a,_,v],async()=>{const H=[];_[Cn.approve]&&H.push(jn.onApproval),_[Cn.working]&&H.push(jn.working),_[Cn.cancelled]&&H.push(jn.cancelled);const G=new URLSearchParams({page:r,page_size:t,"status[]":H.length>0?H:[jn.onApproval,jn.working,jn.cancelled],ordering:v});return H.length===0?{count:0,results:[]}:await gf(G,a,P)},{keepPreviousData:!0}),{data:L,isClickedPointLoading:F}=wk(M,n),V=w.exports.useCallback(H=>i(H),[]);return $e(Tn,{children:[I(nk,{header:I(eRe,{selectedIds:o,onClearSelected:T,onOpenMakeWorkingModal:()=>d(!0),orderColumns:m}),rowSelection:{selectedRowKeys:o,onChange:H=>s(H),hideSelectAll:!0},data:L,onPageChange:V,page:r,pageSize:t,isClickedPointLoading:F,columns:p,fullWidth:e,onChange:(H,G,ee)=>{k(ee.order,ee.columnKey)},loading:O||N}),u&&I(oRe,{selectedIds:o,onClose:()=>d(!1),onSuccess:T})]})},lRe=(e,t)=>{const{filters:{region:n,deltaTraffic:r,factTraffic:i,age:o}}=$c();return Vi(["export-working",n,r,i,o],async()=>{const s=new URLSearchParams({"status[]":[jn.working],"delta_current[]":r,"fact[]":i,"age_day[]":o});return await iI(s,n)},{enabled:e,onSuccess:kT,onSettled:t})},uRe=11,cRe=e=>{const{data:t}=cw(),{tableState:{fullScreen:n}}=s0(),[r,i]=iv(`${e}Order`,[...Array(uRe).keys()].map(d=>({position:d,show:!0}))),[o,s]=iv(`${e}Sort`,null),a=w.exports.useMemo(()=>[{title:n?$e("div",{className:"flex items-center justify-between",children:[I("span",{children:"\u0410\u0434\u0440\u0435\u0441"}),I(bf,{content:I(rk,{autoFocus:!0}),trigger:"click",placement:"right",children:I($n,{onClick:d=>d.stopPropagation(),children:I(TT,{})})})]}):"\u0410\u0434\u0440\u0435\u0441",name:"\u0410\u0434\u0440\u0435\u0441",dataIndex:"address",key:"address",sorter:!0,showSorterTooltip:!1,width:200},{title:"\u0420\u0430\u0439\u043E\u043D",dataIndex:"area",key:"area",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1,render:(d,p)=>up(p.area,t==null?void 0:t.normalized)},{title:"\u041E\u043A\u0440\u0443\u0433",dataIndex:"district",key:"district",width:"120px",ellipsis:!0,render:(d,p)=>up(p.district,t==null?void 0:t.normalized),sorter:!0,showSorterTooltip:!1},{title:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",dataIndex:"name",key:"name",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",dataIndex:"category",key:"category",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041F\u043B\u0430\u043D",dataIndex:"plan_current",key:"plan_current",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0424\u0430\u043A\u0442",dataIndex:"fact",key:"fact",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0420\u0430\u0441\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u0435 \u0441 \u043F\u0440\u043E\u0433\u043D\u043E\u0437\u043E\u043C",dataIndex:"delta_current",key:"delta_current",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0417\u0440\u0435\u043B\u043E\u0441\u0442\u044C",dataIndex:"age_day",key:"age_day",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B",dataIndex:"start_date",key:"start_date",width:"120px",sorter:!0,showSorterTooltip:!1,render:d=>d?new Date(d).toLocaleDateString("ru"):"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"},{title:"Id \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430",dataIndex:"postamat_id",key:"postamat_id",width:"70px",ellipsis:!0,sorter:!0,showSorterTooltip:!1}],[t==null?void 0:t.normalized,n]);return{columns:w.exports.useMemo(()=>r.flatMap(d=>d.show?a[d.position]:[]).map(d=>o&&o.includes(d.key)?{...d,defaultSortOrder:o.includes("-")?"descend":"ascend"}:d),[a,r,n]),orderColumns:{defaultColumns:a,order:r,setOrder:i},sort:o,setSort:s}},dRe="workingTable",fRe=({fullWidth:e})=>{const[t,n]=w.exports.useState(op),[r,i]=w.exports.useState(1),{filters:{region:o,deltaTraffic:s,factTraffic:a,age:u}}=$c(),{columns:d,orderColumns:p,sort:m,setSort:v}=cRe(dRe),x=(N,L)=>{N==="ascend"&&v(L),N==="descend"&&v(`-${L}`),N||v(null)},{data:_,isInitialLoading:P,isFetching:k}=Vi(["working-points",r,o,s,a,u,m],async()=>{const N=new URLSearchParams({page:r,page_size:t,"status[]":[jn.working],"delta_current[]":s,"fact[]":a,"age_day[]":u,ordering:m});return await gf(N,o)},{keepPreviousData:!0}),{data:T,isClickedPointLoading:M}=wk(_,n),O=w.exports.useCallback(N=>i(N),[]);return I(nk,{data:T,onPageChange:O,page:r,pageSize:t,isClickedPointLoading:M,columns:d,fullWidth:e,onChange:(N,L,F)=>{x(F.order,F.columnKey)},header:I(Cw,{exportProvider:lRe,orderColumns:p}),loading:P||k})},hRe=({fullWidth:e})=>{const{mode:t}=Do();return t===Gr.ON_APPROVAL?I(sRe,{fullWidth:e}):t===Gr.WORKING?I(fRe,{fullWidth:e}):I(XMe,{fullWidth:e})};function pRe(){return I("div",{className:"absolute top-[20px] right-[20px]",children:I(bf,{content:I(Tn,{children:$e($n,{type:"primary",block:!0,children:[I("span",{className:"mr-1",children:"\u0412\u044B\u0439\u0442\u0438"}),I(XU,{})]})}),trigger:"click",placement:"bottomRight",children:I($i,{title:"\u0412\u044B\u0439\u0442\u0438",placement:"left",children:I($n,{icon:I(Hwe,{}),type:"primary",size:"large"})})})})}const mRe="https://api.mapbox.com/styles/v1/ghermant/cla2nwk5f00el14nxvtjlsi6z/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1IjoiZ2hlcm1hbnQiLCJhIjoiY2xhMm5zZ3ZrMDF4MDN2bzc5Yjd0ZjZ1dCJ9.fqnvrEqKKBoguR7R6DR7Yw",gRe=()=>I(Od,{type:"raster",id:"basemap",tiles:[mRe],tileSize:256,children:I(ps,{type:"raster",source:"basemap",id:"basemap-layer",paint:{}})}),vRe=({width:e=40,height:t=40})=>I("img",{width:e,height:t,src:i$,alt:"logo"}),yRe=()=>$e("svg",{width:"102",height:"16",viewBox:"0 0 102 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I("g",{clipPath:"url(#clip0_857_5233)",children:$e("g",{clipPath:"url(#clip1_857_5233)",children:[I("path",{d:"M27.8387 15.9746L41.7002 15.9746V2.11306L27.8387 2.11306V15.9746Z",fill:"#E40050"}),I("path",{d:"M13.922 2.11328V15.9748H0.0604095L13.922 2.11328Z",fill:"#E40050"}),I("path",{d:"M41.6451 2.11328V15.9748H27.7835L41.6451 2.11328Z",fill:"#CE1344"}),I("path",{d:"M0.0604095 2.11328V15.9748H13.922L0.0604095 2.11328Z",fill:"#CE1344"}),I("path",{d:"M20.8526 15.9745C24.6802 15.9745 27.7832 12.8716 27.7832 9.04389C27.7832 5.21622 24.6802 2.11328 20.8526 2.11328C17.0249 2.11328 13.922 5.21622 13.922 9.04389C13.922 12.8716 17.0249 15.9745 20.8526 15.9745Z",fill:"#CE1344"}),I("path",{d:"M51.9638 8.56478C51.7816 8.56478 51.6242 8.50208 51.4916 8.37604C51.3656 8.2438 51.3029 8.08641 51.3029 7.90388V4.52363L49.6506 6.61049C49.5246 6.77408 49.3515 6.85604 49.1311 6.85604C48.9107 6.85604 48.7376 6.77441 48.6119 6.61049L46.9597 4.52363V7.90388C46.9597 8.08641 46.8967 8.2438 46.7709 8.37604C46.6387 8.50208 46.4813 8.56478 46.2988 8.56478C46.1163 8.56478 45.9589 8.50208 45.8269 8.37604C45.7009 8.2438 45.6379 8.08641 45.6379 7.90388V2.61637C45.6379 2.30159 45.7858 2.09392 46.0816 1.99302C46.3775 1.88624 46.623 1.95873 46.818 2.21016L49.1311 5.13718L51.4442 2.21016C51.6392 1.96461 51.8847 1.89245 52.1812 1.99302C52.4771 2.09392 52.625 2.30159 52.625 2.61637V7.90388C52.625 8.08641 52.5616 8.2438 52.4356 8.37604C52.3037 8.50208 52.1463 8.56478 51.9634 8.56478H51.9638Z",fill:"#192732"}),I("path",{d:"M57.3456 8.56406C56.433 8.56406 55.6555 8.24014 55.0132 7.59165C54.3651 6.94969 54.0408 6.17222 54.0408 5.25957C54.0408 4.34692 54.3651 3.56945 55.0132 2.92749C55.6555 2.27932 56.433 1.95508 57.3456 1.95508C58.2583 1.95508 59.0358 2.27932 59.6777 2.92749C60.3262 3.56977 60.6505 4.34692 60.6505 5.25957C60.6505 6.17222 60.3262 6.94969 59.6777 7.59165C59.0358 8.24014 58.2583 8.56406 57.3456 8.56406ZM57.3456 3.27655C56.798 3.27655 56.3321 3.47181 55.9484 3.86202C55.5579 4.24602 55.3629 4.71198 55.3629 5.25924C55.3629 5.80651 55.5579 6.27279 55.9484 6.65647C56.3324 7.047 56.798 7.24194 57.3456 7.24194C57.8932 7.24194 58.3592 7.047 58.7429 6.65647C59.1331 6.27279 59.3283 5.80683 59.3283 5.25924C59.3283 4.71165 59.1331 4.24569 58.7429 3.86202C58.3589 3.47181 57.8932 3.27655 57.3456 3.27655Z",fill:"#192732"}),I("path",{d:"M67.9207 7.90314C67.9207 8.08567 67.8576 8.24012 67.7319 8.36584C67.5997 8.49808 67.4423 8.56404 67.2598 8.56404C67.0772 8.56404 66.9198 8.49808 66.7876 8.36584C66.6616 8.24012 66.5985 8.086 66.5985 7.90314V4.40012L63.2281 8.32796C63.0958 8.48535 62.929 8.56404 62.7275 8.56404C62.6459 8.56404 62.5701 8.5513 62.5009 8.52616C62.2116 8.41939 62.0669 8.21139 62.0669 7.90314V2.61563C62.0669 2.4331 62.1296 2.27898 62.2557 2.15294C62.3879 2.02069 62.5453 1.95473 62.7278 1.95473C62.9104 1.95473 63.0678 2.02069 63.2 2.15294C63.326 2.27898 63.3891 2.4331 63.3891 2.61563V6.11832L66.7595 2.18102C66.9545 1.95441 67.1971 1.89138 67.4864 1.99196C67.776 2.09906 67.9207 2.30673 67.9207 2.6153V7.90314ZM65.7492 0.0664062C65.9318 0.0664062 66.0888 0.129426 66.2214 0.255141C66.3471 0.387386 66.4101 0.544773 66.4101 0.727304C66.4101 0.909834 66.3471 1.06722 66.2214 1.19947C66.0892 1.32551 65.9318 1.3882 65.7492 1.3882H64.2384C64.0555 1.3882 63.8985 1.32551 63.7662 1.19947C63.6402 1.06722 63.5771 0.909834 63.5771 0.727304C63.5771 0.544773 63.6402 0.387386 63.7662 0.255141C63.8985 0.129426 64.0555 0.0664062 64.2384 0.0664062H65.7492Z",fill:"#192732"}),I("path",{d:"M45.6379 10.0261C45.6379 9.8436 45.7006 9.68948 45.8269 9.56344C45.9592 9.43119 46.1162 9.36523 46.2988 9.36523H50.8307C51.0136 9.36523 51.1703 9.43119 51.3029 9.56344C51.4289 9.68948 51.4916 9.8436 51.4916 10.0261V15.3136C51.4916 15.4962 51.4289 15.6506 51.3029 15.7763C51.1706 15.9086 51.0136 15.9745 50.8307 15.9745C50.6478 15.9745 50.4911 15.9086 50.3585 15.7763C50.2325 15.6506 50.1698 15.4965 50.1698 15.3136V10.687H46.9593V15.3136C46.9593 15.4962 46.8963 15.6506 46.7706 15.7763C46.6384 15.9086 46.481 15.9745 46.2985 15.9745C46.1159 15.9745 45.9585 15.9086 45.8266 15.7763C45.7006 15.6506 45.6376 15.4965 45.6376 15.3136L45.6379 10.0261Z",fill:"#192732"}),I("path",{d:"M56.2129 15.9742C55.3003 15.9742 54.5228 15.6503 53.8805 15.0018C53.2323 14.3598 52.9081 13.5824 52.9081 12.6697C52.9081 11.7571 53.2323 10.9796 53.8805 10.3376C54.5228 9.68948 55.3003 9.36523 56.2129 9.36523C57.1256 9.36523 57.903 9.68948 58.545 10.3376C59.1935 10.9799 59.5177 11.7571 59.5177 12.6697C59.5177 13.5824 59.1935 14.3598 58.545 15.0018C57.903 15.6503 57.1256 15.9742 56.2129 15.9742ZM56.2129 10.6867C55.6653 10.6867 55.1993 10.882 54.8157 11.2722C54.4251 11.6562 54.2302 12.1221 54.2302 12.6694C54.2302 13.2167 54.4251 13.6829 54.8157 14.0666C55.1997 14.4572 55.6653 14.6521 56.2129 14.6521C56.7605 14.6521 57.2265 14.4572 57.6101 14.0666C58.0003 13.6829 58.1956 13.217 58.1956 12.6694C58.1956 12.1218 58.0003 11.6558 57.6101 11.2722C57.2261 10.882 56.7605 10.6867 56.2129 10.6867Z",fill:"#192732"}),I("path",{d:"M60.5561 12.6697C60.5561 11.7571 60.8803 10.9796 61.5285 10.3376C62.1708 9.68948 62.9482 9.36523 63.8609 9.36523C64.9309 9.36523 65.7962 9.78711 66.4575 10.6302C66.5708 10.7752 66.6181 10.9355 66.5992 11.1118C66.5737 11.2944 66.4888 11.4423 66.3442 11.5556C66.1995 11.6689 66.0389 11.713 65.8625 11.6878C65.68 11.6689 65.5321 11.5873 65.4188 11.4423C65.022 10.9388 64.5029 10.687 63.8609 10.687C63.3133 10.687 62.8474 10.8823 62.4637 11.2725C62.0731 11.6565 61.8782 12.1225 61.8782 12.6697C61.8782 13.217 62.0731 13.6833 62.4637 14.0669C62.8477 14.4575 63.3133 14.6524 63.8609 14.6524C64.5029 14.6524 65.0224 14.4007 65.4188 13.8972C65.5321 13.7525 65.68 13.6705 65.8625 13.6516C66.0389 13.6265 66.1995 13.6702 66.3442 13.7838C66.4888 13.8975 66.5737 14.0451 66.5992 14.2276C66.6178 14.4039 66.5708 14.5646 66.4575 14.7092C65.7962 15.5527 64.9309 15.9742 63.8609 15.9742C62.9482 15.9742 62.1708 15.6503 61.5285 15.0018C60.8803 14.3598 60.5561 13.5824 60.5561 12.6697Z",fill:"#192732"}),I("path",{d:"M68.1378 10.687C67.9549 10.687 67.7979 10.6243 67.6656 10.498C67.5396 10.3657 67.4766 10.2087 67.4766 10.0261C67.4766 9.8436 67.5396 9.68621 67.6656 9.55397C67.7979 9.42826 67.9549 9.36523 68.1378 9.36523H72.67C72.8526 9.36523 73.0096 9.42826 73.1419 9.55397C73.2679 9.68621 73.3309 9.8436 73.3309 10.0261C73.3309 10.2087 73.2679 10.3661 73.1419 10.498C73.0096 10.624 72.8526 10.687 72.67 10.687H71.0648V15.3136C71.0648 15.4962 71.0018 15.6506 70.8761 15.7763C70.7438 15.9086 70.5865 15.9745 70.4039 15.9745C70.2214 15.9745 70.0669 15.9086 69.9412 15.7763C69.809 15.6506 69.743 15.4965 69.743 15.3136V10.687H68.1381H68.1378Z",fill:"#192732"}),I("path",{d:"M79.6382 15.0105C79.7198 15.1741 79.7326 15.3443 79.6761 15.5203C79.6193 15.6904 79.5092 15.8161 79.3453 15.898C79.2509 15.9487 79.1533 15.9735 79.0527 15.9735C78.7755 15.9735 78.5773 15.8507 78.4578 15.6055L77.9762 14.6517H74.832L74.3504 15.6055C74.2684 15.7691 74.1427 15.8791 73.9729 15.9359C73.7966 15.9927 73.6265 15.98 73.4629 15.898C73.2993 15.8164 73.1889 15.6904 73.1321 15.5203C73.0756 15.3439 73.088 15.1741 73.17 15.0105L75.8139 9.72303C75.9272 9.50262 76.1254 9.39258 76.4088 9.39258C76.6857 9.39258 76.8807 9.50262 76.994 9.72303L79.6379 15.0105H79.6382ZM77.3153 13.3299L76.4091 11.4984L75.4932 13.3299H77.3153Z",fill:"#192732"}),I("path",{d:"M87.314 15.973C87.1314 15.973 86.9744 15.9103 86.8418 15.7842C86.7158 15.652 86.6531 15.4946 86.6531 15.3121V11.9318L85.0005 14.0187C84.8744 14.1823 84.7014 14.2642 84.4813 14.2642C84.2612 14.2642 84.0878 14.1826 83.9621 14.0187L82.3099 11.9318V15.3121C82.3099 15.4946 82.2469 15.652 82.1208 15.7842C81.9886 15.9103 81.8312 15.973 81.6487 15.973C81.4661 15.973 81.3091 15.9103 81.1765 15.7842C81.0504 15.652 80.9878 15.4946 80.9878 15.3121V10.0246C80.9878 9.7098 81.1353 9.50212 81.4315 9.40122C81.7273 9.29445 81.9729 9.36694 82.1678 9.61837L84.481 12.5454L86.7941 9.61837C86.9891 9.37282 87.2346 9.30065 87.5308 9.40122C87.8266 9.50212 87.9745 9.7098 87.9745 10.0246V15.3121C87.9745 15.4946 87.9115 15.652 87.7855 15.7842C87.6532 15.9103 87.4958 15.973 87.3133 15.973H87.314Z",fill:"#192732"}),I("path",{d:"M95.793 15.0105C95.8746 15.1741 95.8874 15.3443 95.8309 15.5203C95.774 15.6904 95.664 15.8161 95.5001 15.898C95.4057 15.9487 95.3081 15.9735 95.2075 15.9735C94.9303 15.9735 94.7321 15.8507 94.6126 15.6055L94.1309 14.6517H90.9868L90.5051 15.6055C90.4232 15.7691 90.2975 15.8791 90.1277 15.9359C89.9514 15.9927 89.7812 15.98 89.6176 15.898C89.4541 15.8164 89.3437 15.6904 89.2869 15.5203C89.2304 15.3439 89.2428 15.1741 89.3247 15.0105L91.9687 9.72303C92.082 9.50262 92.2802 9.39258 92.5636 9.39258C92.8405 9.39258 93.0354 9.50262 93.1487 9.72303L95.7927 15.0105H95.793ZM93.4701 13.3299L92.5639 11.4984L91.648 13.3299H93.4701Z",fill:"#192732"}),I("path",{d:"M96.2932 10.687C96.1104 10.687 95.9533 10.6243 95.8211 10.498C95.695 10.3657 95.632 10.2087 95.632 10.0261C95.632 9.8436 95.695 9.68621 95.8211 9.55397C95.9533 9.42826 96.1104 9.36523 96.2932 9.36523H100.825C101.008 9.36523 101.165 9.42826 101.297 9.55397C101.423 9.68621 101.486 9.8436 101.486 10.0261C101.486 10.2087 101.423 10.3661 101.297 10.498C101.165 10.624 101.008 10.687 100.825 10.687H99.2202V15.3136C99.2202 15.4962 99.1572 15.6506 99.0315 15.7763C98.8993 15.9086 98.7419 15.9745 98.5594 15.9745C98.3768 15.9745 98.2224 15.9086 98.0967 15.7763C97.9644 15.6506 97.8984 15.4965 97.8984 15.3136V10.687H96.2932Z",fill:"#192732"})]})}),$e("defs",{children:[I("clipPath",{id:"clip0_857_5233",children:I("rect",{width:"102",height:"16",fill:"white"})}),I("clipPath",{id:"clip1_857_5233",children:I("rect",{width:"101.6",height:"16",fill:"white"})})]})]}),xRe=({width:e=24,height:t=24})=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:t,children:[I("polygon",{className:"ai-st0",points:"10.5,3.6 10.5,5.2 10.5,19.9 10.3,20.8 10,21.5 9.5,22.1 9.1,22.5 8.4,22.7 7.8,22.7 7.3,22.7 6.7,22.7 6.1,22.1 5.7,21.6 5.3,20.9 4.5,20.9 4,20.6 3.5,20.2 3.2,19.6 3,19.1 3,17.9 2.3,17.2 2,16.7 1,15 0.7,14.1 0.4,13.2 0.3,11.1 0.4,10.1 0.9,9.3 1.5,8.7 2,8.2 1.8,7.3 1.7,6.4 2,5.8 2.3,5.3 3.2,4.9 4.1,4.7 4.7,4.6 4.7,3.8 4.8,3 5.4,2.2 6.1,1.5 6.7,1.3 7.4,1.1 8,1.1 8.5,1.3 9.3,1.7 9.9,2.4 "}),I("polyline",{className:"ai-st0",points:"18.6,4.1 17.3,5.8 12.6,5.7 "}),I("polyline",{className:"ai-st0",points:"12.3,9.9 17.2,9.8 21,13.6 "}),I("line",{className:"ai-st0",x1:"12.3",y1:"14.5",x2:"14.5",y2:"14.5"}),I("polyline",{className:"ai-st0",points:"12.4,19 15.9,19 17.5,20.7 "}),$e("g",{children:[I("ellipse",{className:"ai-st1",cx:"19.4",cy:"3",rx:"1.9",ry:"1.9"}),I("ellipse",{className:"ai-st2",cx:"19.4",cy:"2.9",rx:"1.1",ry:"1.1"})]}),$e("g",{children:[I("ellipse",{className:"ai-st1",cx:"22",cy:"14.6",rx:"1.9",ry:"1.9"}),I("ellipse",{className:"ai-st2",cx:"22.1",cy:"14.6",rx:"1.1",ry:"1.1"})]}),$e("g",{children:[I("ellipse",{className:"ai-st1",cx:"16.2",cy:"14.5",rx:"1.9",ry:"1.9"}),I("ellipse",{className:"ai-st2",cx:"16.2",cy:"14.4",rx:"1.1",ry:"1.1"})]}),$e("g",{children:[I("ellipse",{className:"ai-st1",cx:"18.7",cy:"21.7",rx:"1.9",ry:"1.9"}),I("ellipse",{className:"ai-st2",cx:"18.7",cy:"21.7",rx:"1.1",ry:"1.1"})]}),I("polyline",{className:"ai-st0",points:"5,9.5 3.6,10.9 3.4,12.7 3.8,13.9 5.6,16.4 "})]});const bRe=({width:e=24,height:t=24})=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-293 385 24 24",width:e,height:t,children:[I("polyline",{className:"approve-st0",points:"-273.8,391.3 -273.8,389.8 -274.1,389 -274.8,388.5 -275.9,388.5 -290.5,388.5 -291.2,388.7 -291.9,389.1 -292.3,389.8 -292.4,405.1 -292.3,405.9 -292,406.4 -291.4,406.7 -290.9,406.8 -276,406.8 -275.2,406.7 -274.4,406.4 -273.9,405.8 -273.8,404.3 "}),I("polygon",{className:"approve-st1",points:"-287.3,392.4 -286.4,393.5 -286.2,393.7 -285.8,393.7 -285,393.5 -284.1,392.4 -283.1,391.6 -282.6,391.6 -282,391.6 -281.6,392 -281.4,392.8 -281.6,393.2 -282.4,394.3 -285.6,397 -286,397 -286.4,397 -287.1,396.4 -289.2,394.3 -289.6,393.9 -289.6,393 -289.2,392.4 -288.7,392.2 -288.1,392 -287.7,392 "}),I("polygon",{className:"approve-st1",points:"-276.8,392.9 -275.9,392.4 -275.5,392.4 -275,393.5 -274.5,393.5 -273.9,393.5 -273.2,393.6 -272.9,392.7 -272.3,392.7 -271.8,392.9 -271.3,393.3 -271.1,393.5 -271.6,394.3 -271.3,394.7 -271.1,395 -270.8,395.6 -269.9,395.2 -269.6,395.6 -269.4,396.1 -269.3,396.4 -269.4,396.8 -269.4,397 -270.3,397.2 -270.2,397.9 -270.2,398.4 -270.3,398.7 -269.2,399.2 -269.4,399.6 -269.6,400.1 -270,400.6 -270.1,400.8 -270.9,400.3 -271,400.2 -271.4,400.5 -271.7,400.7 -272.1,401 -272.3,401.2 -272,402 -272.2,402.3 -273.3,402.7 -273.7,402.6 -273.9,401.8 -274,401.5 -274.8,401.6 -275.5,401.5 -275.6,402.5 -275.9,402.7 -276.4,402.6 -277.3,402.3 -277.3,401.9 -276.8,401 -277.5,400.7 -277.7,400.4 -278.1,400 -279,400.3 -279.3,399.8 -279.6,399 -279.5,398.5 -278.6,398.2 -278.5,397.3 -278.6,396.8 -279,396.5 -279.4,396.3 -279.6,396.2 -279.6,395.8 -279.3,395.1 -279.1,394.9 -278.7,394.9 -277.6,395.1 -277.4,394.6 -276.9,394.4 -276.8,394.2 -277.1,393.1 "}),I("circle",{className:"approve-st2",cx:"-274.4",cy:"397.5",r:"2.2"}),I("path",{className:"approve-st1",d:"M-282,400.2h-7.4c-0.3,0-0.5-0.2-0.5-0.5l0,0c0-0.3,0.2-0.5,0.5-0.5h7.4c0.3,0,0.5,0.2,0.5,0.5l0,0 C-281.5,400-281.7,400.2-282,400.2z"}),I("path",{className:"approve-st1",d:"M-282.1,402.6h-7.4c-0.3,0-0.5-0.2-0.5-0.5l0,0c0-0.3,0.2-0.5,0.5-0.5h7.4c0.3,0,0.5,0.2,0.5,0.5l0,0 C-281.6,402.4-281.8,402.6-282.1,402.6z"})]}),_Re=({width:e=24,height:t=24})=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-293 385 24 24",width:e,height:t,children:[I("path",{className:"working-st0",d:"M-279.1,402.7"}),I("polyline",{className:"working-st1",points:"-275,391.8 -275,390.5 -275.3,389.9 -276,389.6 -277,389.5 -290.8,389.6 -291.4,389.7 -292.1,390 -292.5,390.4 -292.5,401.4 -292.5,401.9 -292.1,402.3 -291.6,402.5 -291.1,402.6 -280,402.5 "}),I("polyline",{className:"working-st2",points:"-290.8,396 -289.3,396 -288.7,398.4 -287.6,394.3 -286.1,399.7 -285.1,392 -284.2,397 -283.2,395.9 -281.8,396 "}),I("circle",{className:"working-st3",cx:"-277",cy:"397.6",r:"4.6"}),I("circle",{className:"working-st4",cx:"-277.1",cy:"397.5",r:"2.9"}),I("polygon",{className:"working-st3",points:"-270.9,405.7 -269,403.8 -273.5,399.6 -275.4,401 "})]}),wRe=()=>{const{mode:e,setMode:t,isImportMode:n}=Do(),r=o=>{t(o)},i=o=>o===e?"primary":"default";return $e(Tn,{children:[I($i,{title:"\u041E\u0442\u0431\u043E\u0440 \u043B\u043E\u043A\u0430\u0446\u0438\u0439 \u0434\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B",children:I($n,{icon:I(xRe,{}),type:i(Gr.PENDING),onClick:()=>r(Gr.PENDING),className:"flex items-center justify-center",size:"large"})}),I($i,{title:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043C\u0438 \u043B\u043E\u043A\u0430\u0446\u0438\u0439",children:I($n,{icon:I(bRe,{}),type:i(Gr.ON_APPROVAL),onClick:()=>r(Gr.ON_APPROVAL),className:"flex items-center justify-center",size:"large"})}),I($i,{title:"\u041C\u043E\u043D\u0438\u0442\u043E\u0440\u0438\u043D\u0433 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0445 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432",className:"text-center",children:I($n,{icon:I(_Re,{}),type:i(Gr.WORKING),onClick:()=>r(Gr.WORKING),className:"flex items-center justify-center",size:"large",disabled:n})})]})},CRe=()=>$e("div",{className:"absolute top-[20px] left-[19px] flex items-center z-10",children:[$e("div",{className:da("flex items-center gap-x-[42px]"),children:[I(yRe,{}),I("div",{className:"flex items-center gap-x-3",children:I(wRe,{})})]}),I("div",{className:"ml-[71px]",children:I(rk,{})})]}),SRe={finished:"\u041F\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442 ML \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"};function ERe(){const{data:e}=tte(),[t,n]=w.exports.useState(!1);w.exports.useEffect(()=>{n((e==null?void 0:e.task_status)!==SRe.finished)},[e]);const r=async()=>{n(!0);try{await Qee()}catch{n(!1)}};return I(bf,{content:()=>t?$e("div",{className:"flex items-center gap-2",children:[I("div",{children:"\u0418\u0434\u0435\u0442 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043C\u044B..."}),I(vs,{})]}):$e(Tn,{children:[I("div",{className:"text-xs text-grey z-10 bg-white-background rounded-xl px-2 py-0.5 space-y-3",children:"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043C\u044B"}),I("div",{className:"text-xs text-grey z-10 bg-white-background rounded-xl px-2 py-0.5 space-y-3",children:(e==null?void 0:e.last_time)&&new Date(e==null?void 0:e.last_time).toLocaleString("ru-RU")}),I($n,{type:"text",className:"flex items-center p-2 text-[#C50000] hover:text-[#C50000] text-xs",onClick:()=>r(),children:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0438\u0441\u0442\u0435\u043C\u0443"})]}),trigger:"click",placement:"leftBottom",color:"#ffffff",children:I($i,{title:"\u0418\u043D\u0444\u043E",children:I($n,{className:"absolute bottom-[64px] right-[20px] flex items-center justify-center p-3",children:t?I(vs,{indicator:I(IT,{style:{fontSize:16,color:"#000000"},spin:!0})}):I(aj,{className:"w-4 h-4"})})})})}const PRe=5,IRe=3,PK={property:"prediction_current",stops:[[160,"#FDEBF0"],[161,"#F8C7D8"],[186,"#F398BC"],[201,"#EE67A1"],[211,"#B64490"],[226,"#7E237E"],[251,"#46016C"]]},Ub="#A6A6A6",NE="#ff7d00",TRe="rgba(196,195,195,0.6)",IK="#3f5be8",TK="#26a2a2",ML={type:"circle",paint:{"circle-stroke-width":.4,"circle-stroke-color":"#fff","circle-opacity":.8}},wl=(e=PK,t=PRe)=>({...ML,paint:{...ML.paint,"circle-color":e,"circle-radius":["interpolate",["linear"],["zoom"],3,0,9,2,13,t]}}),Jm=wl(),kRe=wl(TRe,IRe),MRe={...wl(NE),paint:{...wl(NE).paint,"circle-stroke-width":1,"circle-stroke-color":"#252525"}},jb={type:"symbol",layout:{"icon-image":"logo","icon-size":["interpolate",["linear"],["zoom"],3,0,9,.1,13,.5]},paint:{"icon-color":"#E63941"}},Hb=e=>({type:"symbol",layout:{"icon-image":["coalesce",["image",e],["image","defaultIcon"]],"icon-size":["interpolate",["linear"],["zoom"],3,0,9,.1,13,.5]}}),RL="#ffffff",AL=16;({...wl(RL,AL),paint:{...wl(RL,AL).paint}});const RRe={...wl(Ub),paint:{...wl(Ub).paint,"circle-stroke-width":1,"circle-stroke-color":"#252525"}};wl(IK);wl(TK);const kK="#676767",DL={id:"ao",type:"line",source:"ao","source-layer":"public.service_ao",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":kK,"line-width":1.5,"line-opacity":.8}},OL={id:"rayon",type:"line",source:"rayon","source-layer":"public.service_rayon",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":kK,"line-width":.5,"line-opacity":.8}},ARe={id:"selected-region",type:"line",source:"selected-region",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#CC2222","line-width":4}},DRe=({id:e,categoryId:t,name:n})=>{const{isVisible:r}=Ks(),i=["==",["get","group_id"],e];return I(Tn,{children:I(ps,{...Hb(n+e),id:Cn.other+e,source:"other","source-layer":"public.service_otherobjects",layout:{...Hb(n+e).layout,visibility:r[Cn.other_category+t]?"visible":"none"},filter:i})})},ORe={ao:"district_id",rayon:"area_id"},_0=e=>w.exports.useMemo(()=>e?["==",["get",ORe[e.type]],e.id]:null,[e]),NRe=["==",["get","status"],jn.pending],LRe=()=>{const{filters:e,ranges:t}=va(),{prediction:n,categories:r,region:i}=e,{selection:o}=Pl(),s=[...o.included],a=[...o.excluded],u=_0(i),d=["in",["get","id"],["literal",s]],p=["in",["get","id"],["literal",a]],m=[[">=",["get","prediction_current"],n[0]],["<=",["get","prediction_current"],n[1]]],x=ms.map(O=>/d[0-9]/.test(O)&&e[`${O}__lt`]===4e3?[[">=",["get",O],e[`${O}__gt`]]]:[[">=",["get",O],e[`${O}__gt`]],["<=",["get",O],e[`${O}__lt`]]]).filter(O=>{const N=O[0][1][1];return Qh(e,t,N).result}).flat(),_=r.length>0?["in",["get","category"],["literal",r]]:!0,P=NRe,k=rI(e,t)?m:[!0],T=["all",P,["!",p],["any",u?["all",...k,...x,_,u]:["all",...k,...x,_],d]],M=["all",P,["!",d],["any",["!",u?["all",...k,_,u,...x,_]:["all",...k,_,...x]],p]];return{match:T,unmatch:M}},FRe=()=>{const{isVisible:e}=Ks(),t=tf(),{match:n,unmatch:r}=LRe();return $e(Tn,{children:[I(ps,{...Jm,id:Cn["initial-unmatch"],source:"points","source-layer":tf(),layout:{...Jm.layout,visibility:e[Cn.initial]?"visible":"none"},filter:r,paint:kRe.paint}),I(ps,{...Jm,id:Cn["initial-match"],source:"points","source-layer":t,layout:{...Jm.layout,visibility:e[Cn.initial]?"visible":"none"},filter:n,paint:Jm.paint})]})},NL=["==",["get","status"],jn.onApproval],zRe=()=>{const{isVisible:e}=Ks(),t=tf(),{filters:{region:n}}=Cf(),r=_0(n),i=r?["all",NL,r]:NL;return I(Tn,{children:I(ps,{...MRe,id:Cn.approve,source:"points","source-layer":t,layout:{visibility:e[Cn.approve]?"visible":"none"},filter:i})})},L2=["==",["get","status"],jn.working],$Re=()=>{const{isVisible:e}=Ks(),t=tf(),{filters:{region:n}}=Cf(),r=_0(n),{mode:i}=Do(),o=()=>i===Gr.ON_APPROVAL&&r?["all",L2,r]:L2;return I(Tn,{children:I(ps,{...jb,id:Cn.working,source:"points","source-layer":t,layout:{...jb.layout,visibility:e[Cn.working]?"visible":"none"},filter:o()})})},LL=["==",["get","status"],jn.working],BRe=()=>{const{isVisible:e}=Ks(),t=tf(),{filters:{deltaTraffic:n,factTraffic:r,age:i,region:o},ranges:s}=$c(),a=_0(o),u=Dh(n,s,"deltaTraffic")?[[">=",["get","delta_current"],n[0]],["<=",["get","delta_current"],n[1]]]:[!0],d=Dh(r,s,"factTraffic")?[[">=",["get","fact"],r[0]],["<=",["get","fact"],r[1]]]:[!0],p=Dh(i,s,"age")?[[">=",["get","age_day"],i[0]],["<=",["get","age_day"],i[1]]]:[!0],m=a?["all",LL,...u,...d,...p,a]:["all",LL,...u,...d,...p];return I(Tn,{children:I(ps,{...jb,id:Cn.filteredWorking,source:"points","source-layer":t,layout:{...jb.layout,visibility:e[Cn.filteredWorking]?"visible":"none"},filter:m})})},F2=["==",["get","status"],jn.cancelled],VRe=()=>{const{isVisible:e}=Ks(),{filters:{region:t}}=Cf(),n=_0(t),{mode:r}=Do(),i=tf(),o=()=>r===Gr.ON_APPROVAL&&n?["all",F2,n]:F2;return I(Tn,{children:I(ps,{...RRe,id:Cn.cancelled,source:"points","source-layer":i,layout:{visibility:e[Cn.cancelled]?"visible":"none"},filter:o()})})},URe=()=>{const{updateCounter:e,toggleUpdateCounter:t,updatePVZLayer:n}=bu(),r=tf();return w.exports.useEffect(()=>{t()},[r]),I(Tn,{children:$e(Od,{id:"points",type:"vector",tiles:[`${e$}/martin/${r}/{z}/{x}/{y}.pbf`],children:[I(FRe,{}),I(zRe,{}),I(VRe,{}),I($Re,{}),I(BRe,{})]},`points-${e}-${n}`)})},jRe=({id:e,categoryId:t,name:n})=>{const{isVisible:r}=Ks(),i=["==",["get","group_id"],e];return I(Tn,{children:I(ps,{...Hb(n+e),id:Cn.pvz+e,source:"pvz","source-layer":"public.service_post_and_pvz",layout:{...Hb(n+e).layout,visibility:r[Cn.pvz_category+t]?"visible":"none"},filter:i})})},z2=({data:e})=>I(Od,{id:"selected-region",type:"geojson",data:e,children:I(ps,{...ARe})}),HRe=()=>{const{filters:{region:e}}=va(),{filters:{region:t}}=Cf(),{filters:{region:n}}=$c(),{mode:r}=Do(),i=r===Gr.PENDING&&(e==null?void 0:e.geometry),o=r===Gr.ON_APPROVAL&&(t==null?void 0:t.geometry),s=r===Gr.WORKING&&(n==null?void 0:n.geometry);return $e(Tn,{children:[i&&I(z2,{data:e.geometry}),o&&I(z2,{data:t.geometry}),s&&I(z2,{data:n.geometry})]})},KRe=({postGroups:e,otherGroups:t})=>{const{updateCounter:n,updatePVZLayer:r}=bu();return $e(Tn,{children:[I(Od,{id:"ao",type:"vector",tiles:["https://postamates.spatialsystems.ru/martin/public.service_ao/{z}/{x}/{y}.pbf"],children:I(ps,{...DL,layout:{...DL.layout}})}),I(Od,{id:"rayon",type:"vector",tiles:["https://postamates.spatialsystems.ru/martin/public.service_rayon/{z}/{x}/{y}.pbf"],children:I(ps,{...OL,layout:{...OL.layout}})}),I(HRe,{}),I(URe,{}),I(Od,{id:"pvz",type:"vector",tiles:["https://postamates.spatialsystems.ru/martin/public.service_post_and_pvz/{z}/{x}/{y}.pbf"],children:e==null?void 0:e.map(i=>i.groups.map(o=>I(jRe,{id:o.id,categoryId:o.category,name:YS(o.name)})))},`pvz-${n}-${r}`),I(Od,{id:"other",type:"vector",tiles:["https://postamates.spatialsystems.ru/martin/public.service_otherobjects/{z}/{x}/{y}.pbf"],children:t&&t.map(i=>i.groups.map(o=>I(DRe,{id:o.id,categoryId:o.category,name:YS(o.name)})))},`other-${n}-${r}`)]})},WRe=({postGroups:e,otherGroups:t})=>{const{toggleVisibility:n,isVisible:r}=Ks(),{mode:i}=Do();return $e("div",{className:"space-y-1 flex flex-col",children:[i===Gr.PENDING&&$e(Tn,{children:[I($d,{className:"!ml-0",onChange:()=>n(Cn.working),checked:r[Cn.working],children:"\u0420\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u044B"}),I($d,{className:"!ml-0",onChange:()=>n(Cn.cancelled),checked:r[Cn.cancelled],children:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u043B\u043E\u043A\u0430\u0446\u0438\u0438"})]}),e==null?void 0:e.map(o=>I($d,{className:"!ml-0",onChange:()=>n(Cn.pvz_category+o.id),checked:r[Cn.pvz_category+o.id],children:o.name},o.id)),t&&t.map(o=>I($d,{className:"!ml-0",onChange:()=>n(Cn.other_category+o.id),checked:r[Cn.other_category+o.id],children:o.name},o.id))]})},GRe=({postGroups:e,otherGroups:t})=>I(bf,{content:I(WRe,{postGroups:e,otherGroups:t}),trigger:"click",placement:"leftBottom",children:I($i,{title:"\u0421\u043B\u043E\u0438",children:I($n,{className:"absolute bottom-[20px] right-[20px] flex items-center justify-center p-3",children:I(cPe,{className:"w-4 h-4"})})})}),Yu=({color:e,imageSrc:t,name:n,hideImage:r,border:i})=>$e("div",{className:"flex gap-2 items-center",children:[t&&I(nfe,{src:t,width:18,height:18,className:"flex items-center",preview:!1}),e&&!t&&I("span",{className:"w-4 h-[100%] flex items-center justify-center",children:I("span",{className:`rounded-xl w-3 h-3 inline-block ${i&&"border-black border-[1px] border-solid"}`,style:{backgroundColor:e}})}),!t&&!e&&!r&&I(vRe,{width:18,height:18}),I("span",{className:"text-xs text-grey",children:n})]}),qRe=PK.stops.map(([e,t])=>t),ZRe=({colors:e,name:t})=>$e("div",{className:"mb-3",children:[I("span",{className:"mb-1 mt-3 text-center",children:t}),I("div",{className:"w-[200px]",children:I("div",{className:"w-full h-[10px] rounded-xl",style:{background:`linear-gradient(to right, ${e.join(",")})`}})}),I("span",{className:"italic",children:"\u043F\u0440\u043E\u0433\u043D\u043E\u0437 \u0442\u0440\u0430\u0444\u0438\u043A\u0430 \u2192"})]}),FL=({item:e,color:t})=>{var n;return I(ll,{bordered:!1,expandIcon:null,style:{background:"none"},className:"legend_group",children:I(ll.Panel,{header:I(Yu,{name:e.name,hideImage:!0}),children:I("div",{className:"ml-3 my-1",children:e.groups&&((n=e.groups)==null?void 0:n.map(r=>I("div",{className:"my-1",children:I(Yu,{color:t,imageSrc:r.image,name:r.name})},r.id)))})},"opened")})};function XRe({postGroups:e,otherGroups:t}){const{mode:n}=Do();return $e("div",{className:"absolute bottom-[20px] left-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:[I("div",{children:$e("div",{className:"space-y-1",children:[n===Gr.PENDING&&$e(Tn,{children:[I(ZRe,{colors:qRe,name:"\u041B\u043E\u043A\u0430\u0446\u0438\u0438 \u043A \u0440\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u044E"}),I(Yu,{name:"\u0420\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u044B"}),I(Yu,{name:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u043B\u043E\u043A\u0430\u0446\u0438\u0438",color:Ub,border:!0})]}),n===Gr.ON_APPROVAL&&$e(Tn,{children:[I(Yu,{name:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430",color:NE,border:!0}),I(Yu,{name:"\u0420\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u044B"}),I(Yu,{name:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u043B\u043E\u043A\u0430\u0446\u0438\u0438",color:Ub,border:!0})]}),n===Gr.WORKING&&I(Tn,{children:I(Yu,{name:"\u0420\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u044B"})})]})}),I("div",{className:"space-y-1",children:e==null?void 0:e.map(r=>I(FL,{item:r,color:IK},r.id))}),I("div",{className:"space-y-1",children:t==null?void 0:t.map(r=>I(FL,{item:r,color:TK},r.id))})]})}const YRe=({lat:e,lng:t,onClose:n,children:r})=>I(bQ,{longitude:t,latitude:e,onClose:n,closeOnClick:!1,style:{minWidth:"330px"},children:r}),QRe=e=>{var p,m,v,x,_;const{data:t}=oI(),{data:n}=r$(),r=w.exports.useMemo(()=>sv(t),[t]),i=w.exports.useMemo(()=>sv(n),[n]),o=w.exports.useMemo(()=>r?r.map(P=>[...P.groups]).flat():[],[r]),s=w.exports.useMemo(()=>i?i.map(P=>[...P.groups]).flat():[],[i]),a=(p=e.layer)==null?void 0:p.id.includes(Cn.other),u=a?(m=i.find(P=>P.id===e.properties.category_id))==null?void 0:m.name:(v=r.find(P=>P.id===e.properties.category_id))==null?void 0:v.name,d=a?(x=s.find(P=>P.id===e.properties.group_id))==null?void 0:x.name:(_=o.find(P=>P.id===e.properties.group_id))==null?void 0:_.name;return{name:u,groupName:d}},Mv=({feature:e,dynamicStatus:t,postamatId:n,point:r})=>{var v,x;const{data:i}=cw(),o=e.properties.category===nI.residential,s=e.properties.status===jn.working,{name:a,groupName:u}=QRe(e),d=((v=e.layer)==null?void 0:v.id.includes(Cn.pvz))||((x=e.layer)==null?void 0:x.id.includes(Cn.other)),p=()=>{if(d)return oPe;const _=s?[...CE,...iPe]:CE;return o?[..._,...kH]:_},m=({field:_,render:P,empty:k,type:T,fallbackField:M})=>{let O=r?r[_]:e.properties[_];return _==="prediction_current"&&(O=I(wK,{point:r})),_==="category_id"&&(O=a),_==="group_id"&&(O=u),_==="status"&&t&&(O=t),_==="postamat_id"&&n&&(O=n),T==="region"?(O=O||(r||e)[M],O=P(O,i==null?void 0:i.normalized)):(O=P?P(O):O,O=QS(O)&&k?k:O),O};return I("div",{children:p().map(_=>$e(sc,{className:da("p-1"),children:[I(Io,{className:"font-semibold",span:12,children:_.name}),I(Io,{span:12,children:m(_)})]},_.field))})},JRe=({feature:e,point:t})=>{const{include:n,selection:r,exclude:i}=Pl(),{setClickedPointConfig:o}=Su(),{filters:s,ranges:a}=va(),u=e.properties.id,d=Jz(s,a,e)&&!r.excluded.has(u)||r.included.has(u);return w.exports.useEffect(()=>o(u,d),[u,d]),$e(Tn,{children:[I(Mv,{feature:e,point:t}),I($n,{type:"primary",className:"mt-2 mx-auto",block:!0,onClick:()=>{d?i(u):n(u)},children:d?"\u0418\u0441\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0438\u0437 \u0432\u044B\u0431\u043E\u0440\u043A\u0438":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u0432\u044B\u0431\u043E\u0440\u043A\u0443"})]})},eAe=({feature:e,point:t})=>{const n=e.properties.id,{setClickedPointConfig:r}=Su(),{status:i,postamat_id:o}=t,[s,a]=w.exports.useState(i),[u,d]=w.exports.useState(o);w.exports.useEffect(()=>{a(i),d(o)},[i,o]);const[p,m]=w.exports.useState(s===jn.working&&QS(u)),[v,x]=w.exports.useState("");w.exports.useEffect(()=>r(n),[n]);const _=ff(),P=()=>{_.invalidateQueries(["on-approval-points"]),_.invalidateQueries(["clicked-point",n])},{mutateAsync:k,isLoading:T}=hw({}),{mutateAsync:M,isLoading:O}=n$(),N=T||O,L=async()=>{const V=new URLSearchParams({id:n,postamat_id:u}),B=new URLSearchParams({status:jn.working,"location_ids[]":[n]});try{await M(V)}catch{x("\u0423\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u0439 id \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439");return}await k(B),P(),m(!1)};return $e(Tn,{children:[I(Mv,{feature:e,point:t,dynamicStatus:s,postamatId:u}),I("div",{className:"flex justify-center mt-4",children:$e("div",{className:"flex flex-col items-center space-y-2",children:[I(xl,{text:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"}),I(SK,{isLoading:N,disabled:N,value:s,onChange:V=>{if(a(V),V===jn.working)m(!0);else{m(!1);const B=new URLSearchParams({status:V,"location_ids[]":[n]});k(B).then(P)}}}),p&&$e(Tn,{children:[I(xl,{text:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 id \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430"}),I(oV,{className:"w-full",min:0,precision:0,value:u,onChange:V=>d(V)}),v&&I("div",{className:"text-primary text-center",children:v}),I($n,{type:"primary",disabled:QS(u),onClick:L,loading:N,children:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"})]})]})})]})},tAe=({feature:e,point:t})=>{const n=e.properties.id,{setClickedPointConfig:r}=Su();return w.exports.useEffect(()=>r(n),[e]),I(Mv,{feature:e,point:t})},nAe=({width:e=24,height:t=24})=>I("svg",{xmlns:"http://www.w3.org/2000/svg",className:"rounded-md bg-[#cc2222] hover:bg-[#d94c48] p-1",width:e,height:t,viewBox:"0 0 24 24",children:I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm4.21 14.16c3.53-.61 6.79-1.174 6.79-4.146V7a3 3 0 0 0-2.999-3H15.5l.008.143-.01-.001a3.487 3.487 0 0 1-.914 2.22l.549.182A2 2 0 0 1 16.5 8.441v5.492l.423.073c2.13.37 4.077.708 4.077 2.008 0 1.327-1.993 1.655-4.328 2.04l-.853.143a1 1 0 1 0 .341 1.971l.05-.009zM1 16V7a3 3 0 0 1 3-3h4.5l-.008.143.01-.001c.012.286.058.564.134.828-.66.318-1.136.99-1.136 1.805v7.157l-.488.084C4.907 14.376 3 14.702 3 16c0 1.355 2.146 1.701 4.533 2.087l.775.126.13-1.524a.217.217 0 0 1 .027-.084.196.196 0 0 1 .275-.077l4.66 3.019a.214.214 0 0 1-.022.375L8.28 21.983a.194.194 0 0 1-.099.016.208.208 0 0 1-.18-.23l.134-1.554C4.439 19.635 1 19 1 16zm9.316-9.561A1 1 0 0 0 9 7.387v2.406a.5.5 0 0 0 .146.353l.708.708a.5.5 0 0 1 .146.353v3.984a.5.5 0 0 0 .276.447l.924.462.665-2.992c.024-.11.186-.101.197.012l.36 3.59 1.144.573a.3.3 0 0 0 .434-.268v-4.206a.5.5 0 0 1 .276-.447l.448-.224a.5.5 0 0 0 .276-.447v-2.61a1.5 1.5 0 0 0-1.026-1.423l-3.658-1.22z",fill:"#ffffff"})}),rAe=({feature:e,point:t})=>{var s,a;const{mode:n}=Do(),r=((s=e.layer)==null?void 0:s.id.includes(Cn.pvz))||((a=e.layer)==null?void 0:a.id.includes(Cn.other)),i=e.properties.status===jn.pending,o=e.properties.status===jn.working;return r?I(Mv,{feature:e,point:t}):n===Gr.ON_APPROVAL&&!i?I(eAe,{feature:e,point:t}):n===Gr.WORKING&&o?I(tAe,{feature:e,point:t}):n===Gr.PENDING&&i?I(JRe,{feature:e,point:t}):I(Mv,{feature:e,point:t})},iAe=({features:e,points:t})=>{const{setPopup:n}=Sf(),{selection:r,include:i,exclude:o}=Pl(),{filters:s,ranges:a}=va();return I("div",{className:"space-y-2 p-1",children:e.map(u=>{var x;const d=u.properties.id,p=t.find(_=>_.id===d),m=Jz(s,a,u)&&!r.excluded.has(d)||r.included.has(d),v=()=>{m?o(d):i(d)};return $e("div",{className:"flex flex-row items-center gap-2 w-full",children:[u.properties.status===jn.pending&&I($d,{checked:m,onClick:v}),I($n,{className:"text-start flex-1 !w-0",block:!0,onClick:()=>{n({features:[u],coordinates:u.geometry.coordinates})},children:u.properties.category===nI.residential||u.layer.id===Cn.working?$e("div",{className:"space-x-2 flex items-center w-full",children:[I("span",{className:"flex-1 truncate inline-block",children:p==null?void 0:p.address}),I("span",{children:p==null?void 0:p.name})]}):I("div",{className:"flex w-full",children:$e("span",{className:"truncate",children:[(x=p==null?void 0:p.name)!=null?x:p==null?void 0:p.category,(p==null?void 0:p.category_id)&&getRivalsName(u).name]})})},u.properties.id)]})})})},oAe=({lat:e,lng:t})=>{const n=`https://yandex.ru/maps/?panorama[point]=${t},${e}`;return I("div",{className:"pl-1 flex",children:I($i,{title:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u042F\u043D\u0434\u0435\u043A\u0441.\u041F\u0430\u043D\u043E\u0440\u0430\u043C\u044B",children:I("a",{target:"_blank",href:n,children:I(nAe,{})})})})},aAe=({features:e,lat:t,lng:n,onClose:r})=>{const{data:i,isLoading:o}=rte(e);return $e(YRe,{lat:t,lng:n,onClose:r,children:[I(oAe,{lat:t,lng:n}),o?I(vs,{}):(()=>e.length===1?I(rAe,{feature:e[0],point:i[0]}):I(iAe,{features:e,points:i}))()]})},sAe=({width:e=24,height:t=24})=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:t,children:[I("polygon",{points:"23.7,4.1 23.7,6.1 0.1,6.2 0.1,4.1 "}),$e("g",{children:[I("circle",{cx:"6.3",cy:"5.2",r:"3.1"}),I("circle",{fill:"#fff",cx:"6.3",cy:"5.2",r:"1.4"})]}),I("polygon",{points:"23.6,11.1 23.7,13.1 0,13.1 0,11 "}),$e("g",{children:[I("circle",{cx:"18.6",cy:"12.1",r:"3.1"}),I("circle",{fill:"#fff",cx:"18.6",cy:"12.1",r:"1.4"})]}),I("polygon",{points:"23.8,18.2 23.9,20.1 0.2,20.2 0.2,18.2 "}),$e("g",{children:[I("circle",{cx:"10.2",cy:"19.1",r:"3.1"}),I("circle",{fill:"#fff",cx:"10.2",cy:"19.1",r:"1.4"})]})]}),lAe=({toggleCollapse:e})=>I($n,{icon:I(sAe,{width:16,height:16}),onClick:e,className:"border-l-0 rounded-bl-none rounded-tl-none absolute top-[100px] flex items-center justify-center"}),uAe=()=>{const e=w.exports.useRef(null),t=w.exports.useRef(null),n=w.exports.useRef(null),{popup:r,setPopup:i}=Sf(),{setClickedPointConfig:o}=Su(),{setLayersVisibility:s}=Ks(),{mode:a}=Do(),{tableState:u,openTable:d}=s0(),{toggleUpdatePVZLayer:p}=bu(),{data:m}=oI(),{data:v}=r$(),x=w.exports.useMemo(()=>sv(m),[m]),_=w.exports.useMemo(()=>sv(v),[v]),P=w.exports.useMemo(()=>{const V=[];return[..._,...x].map(B=>{B.groups.map(H=>{V.push({name:YS(H.name+H.id),url:H.image})})}),[...V,...qA]},[qA,x,_]);w.exports.useEffect(()=>{P.map(V=>{var H,G;const B=new Image(((H=V.size)==null?void 0:H.width)||64,((G=V.size)==null?void 0:G.height)||64);B.src=V.url,B.crossOrigin="Anonymous",B.onload=()=>{e.current.addImage(V.name,B),p()},B.src=V.url,B.crossOrigin="Anonymous"})},[P]);const k=w.exports.useMemo(()=>{const V=[];return x.map(B=>{J1[`category${B.id}`]={name:Yz[B.name]},B.groups.map(H=>{ms.includes(`d${H.id}`)||ms.push(`d${H.id}`),J1[`category${B.id}`][`d${H.id}`]=H.name,V.push(Cn.pvz+H.id)})}),_.map(B=>{B.groups.map(H=>{V.push(Cn.other+H.id)})}),V},[x,_]);w.exports.useEffect(()=>{s(vee[a]),i(null),o(null)},[a]);const T=V=>{if(!V.features){i(null),o(null);return}const B=V.features[0];if(!B){i(null),o(null);return}const{lng:H}=V.lngLat;if(B.geometry.type==="Point"){const G=B.geometry.coordinates.slice();for(;Math.abs(H-G[0])>180;)G[0]+=H>G[0]?360:-360;i({features:V.features,coordinates:G})}},M=V=>{!V.features[0]||(e.current.getCanvas().style.cursor="pointer")},O=V=>{!V.features[0]||(e.current.getCanvas().style.cursor="")};w.exports.useEffect(()=>{const V=new ResizeObserver(QY(()=>{var B;(B=e==null?void 0:e.current)==null||B.resize()},16));return t.current&&V.observe(t.current),()=>{V.disconnect()}},[t.current]),w.exports.useEffect(()=>{u.fullScreen&&!u.isOpened&&d()},[u.fullScreen]);const[N,L]=w.exports.useState(!1),F=()=>L(V=>!V);return I(rQ,{children:$e("div",{className:"w-screen h-screen relative flex overflow-hidden",children:[I(CRe,{}),I(C4e,{isCollapsed:N,ref:n}),$e("div",{className:"flex-1 h-screen flex flex-col ",children:[I("div",{ref:t,className:da(u.fullScreen?"":"flex-1"),children:$e(GP,{mapLib:JY,initialViewState:{latitude:55.7558,longitude:37.6173,zoom:12},dragRotate:!1,ref:e,interactiveLayerIds:[Cn["initial-match"],Cn["initial-unmatch"],Cn.approve,Cn.working,Cn.filteredWorking,Cn.cancelled,...k],onClick:T,onMouseEnter:M,onMouseLeave:O,id:"map",children:[r&&I(aAe,{lat:r.coordinates[1],lng:r.coordinates[0],features:r.features,onClose:()=>{i(null),o(null)}}),I(lAe,{toggleCollapse:F}),I(gRe,{}),I(KRe,{postGroups:x,otherGroups:_}),I(XRe,{postGroups:x,otherGroups:_}),I(ERe,{}),I(pRe,{}),I(GRe,{postGroups:x,otherGroups:_})]})}),I("div",{className:"w-full border-solid border-border border-0 border-t-[1px] z-20",children:I(hRe,{fullWidth:N})})]})]})})};function cAe(){return I(uAe,{})}const dAe=new QZ;FX();const $2="0.0.9";function fAe(){const[e,t]=iv("version_control",$2);return e!==$2&&(localStorage.clear(),t($2)),I(vX,{client:dAe,children:I(OY,{basename:"/",children:I(DY,{children:I(yz,{path:"/",element:I(cAe,{})})})})})}B2.createRoot(document.getElementById("root")).render(I(Un.StrictMode,{children:I(fAe,{})}));
|