From 78a2eb68c989cdc8eda105cefffa50fc25fe7bbe Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 5 Jul 2024 13:27:37 +0000 Subject: [PATCH] build project gh-pages --- 404.html | 4 +- assets/index-BY9G-0DD.js | 474 ++++++++++++++++++++++++++++++++++++++ assets/index-Cyny1uIo.css | 55 +++++ index.html | 4 +- 4 files changed, 533 insertions(+), 4 deletions(-) create mode 100644 assets/index-BY9G-0DD.js create mode 100644 assets/index-Cyny1uIo.css diff --git a/404.html b/404.html index b19baa9..1172a59 100644 --- a/404.html +++ b/404.html @@ -5,8 +5,8 @@ Cartes.gouv - - + +
diff --git a/assets/index-BY9G-0DD.js b/assets/index-BY9G-0DD.js new file mode 100644 index 0000000..37cc301 --- /dev/null +++ b/assets/index-BY9G-0DD.js @@ -0,0 +1,474 @@ +var qn=Object.defineProperty;var Sn=n=>{throw TypeError(n)};var Kn=(n,e,t)=>e in n?qn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var $n=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var hn=(n,e,t)=>Kn(n,typeof e!="symbol"?e+"":e,t),Jn=(n,e,t)=>e.has(n)||Sn("Cannot "+t);var bn=(n,e,t)=>e.has(n)?Sn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t);var fn=(n,e,t)=>(Jn(n,e,"access private method"),t);var Qn=$n(exports=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();/** +* @vue/shared v3.4.31 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function makeMap(n,e){const t=new Set(n.split(","));return i=>t.has(i)}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),isModelListener=n=>n.startsWith("onUpdate:"),extend$5=Object.assign,remove=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},hasOwnProperty$1=Object.prototype.hasOwnProperty,hasOwn=(n,e)=>hasOwnProperty$1.call(n,e),isArray$1=Array.isArray,isMap=n=>toTypeString(n)==="[object Map]",isSet=n=>toTypeString(n)==="[object Set]",isDate=n=>toTypeString(n)==="[object Date]",isRegExp=n=>toTypeString(n)==="[object RegExp]",isFunction$1=n=>typeof n=="function",isString=n=>typeof n=="string",isSymbol=n=>typeof n=="symbol",isObject$1=n=>n!==null&&typeof n=="object",isPromise=n=>(isObject$1(n)||isFunction$1(n))&&isFunction$1(n.then)&&isFunction$1(n.catch),objectToString=Object.prototype.toString,toTypeString=n=>objectToString.call(n),toRawType=n=>toTypeString(n).slice(8,-1),isPlainObject$1=n=>toTypeString(n)==="[object Object]",isIntegerKey=n=>isString(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(n=>n.replace(camelizeRE,(e,t)=>t?t.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(n=>n.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(n=>n.charAt(0).toUpperCase()+n.slice(1)),toHandlerKey=cacheStringFunction(n=>n?`on${capitalize(n)}`:""),hasChanged=(n,e)=>!Object.is(n,e),invokeArrayFns=(n,...e)=>{for(let t=0;t{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},looseToNumber=n=>{const e=parseFloat(n);return isNaN(e)?n:e},toNumber=n=>{const e=isString(n)?Number(n):NaN;return isNaN(e)?n:e};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),GLOBALS_ALLOWED="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error",isGloballyAllowed=makeMap(GLOBALS_ALLOWED);function normalizeStyle(n){if(isArray$1(n)){const e={};for(let t=0;t{if(t){const i=t.split(propertyDelimiterRE);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function normalizeClass(n){let e="";if(isString(n))e=n;else if(isArray$1(n))for(let t=0;tlooseEqual(t,e))}const isRef$1=n=>!!(n&&n.__v_isRef===!0),toDisplayString=n=>isString(n)?n:n==null?"":isArray$1(n)||isObject$1(n)&&(n.toString===objectToString||!isFunction$1(n.toString))?isRef$1(n)?toDisplayString(n.value):JSON.stringify(n,replacer,2):String(n),replacer=(n,e)=>isRef$1(e)?replacer(n,e.value):isMap(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,r],s)=>(t[stringifySymbol(i,s)+" =>"]=r,t),{})}:isSet(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>stringifySymbol(t))}:isSymbol(e)?stringifySymbol(e):isObject$1(e)&&!isArray$1(e)&&!isPlainObject$1(e)?String(e):e,stringifySymbol=(n,e="")=>{var t;return isSymbol(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** +* @vue/reactivity v3.4.31 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let activeEffectScope;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=t}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this._active){let t,i;for(t=0,i=this.effects.length;t=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),resetTracking()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=shouldTrack,t=activeEffect;try{return shouldTrack=!0,activeEffect=this,this._runnings++,preCleanupEffect(this),this.fn()}finally{postCleanupEffect(this),this._runnings--,activeEffect=t,shouldTrack=e}}stop(){this.active&&(preCleanupEffect(this),postCleanupEffect(this),this.onStop&&this.onStop(),this.active=!1)}}function triggerComputed(n){return n.value}function preCleanupEffect(n){n._trackId++,n._depsLength=0}function postCleanupEffect(n){if(n.deps.length>n._depsLength){for(let e=n._depsLength;e{t.dirty&&t.run()});e&&(extend$5(t,e),e.scope&&recordEffectScope(t,e.scope)),(!e||!e.lazy)&&t.run();const i=t.run.bind(t);return i.effect=t,i}function stop(n){n.effect.stop()}let shouldTrack=!0,pauseScheduleStack=0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const n=trackStack.pop();shouldTrack=n===void 0?!0:n}function pauseScheduling(){pauseScheduleStack++}function resetScheduling(){for(pauseScheduleStack--;!pauseScheduleStack&&queueEffectSchedulers.length;)queueEffectSchedulers.shift()()}function trackEffect(n,e,t){if(e.get(n)!==n._trackId){e.set(n,n._trackId);const i=n.deps[n._depsLength];i!==e?(i&&cleanupDepEffect(i,n),n.deps[n._depsLength++]=e):n._depsLength++}}const queueEffectSchedulers=[];function triggerEffects(n,e,t){pauseScheduling();for(const i of n.keys()){let r;i._dirtyLevel{const t=new Map;return t.cleanup=n,t.computed=e,t},targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol("");function track(n,e,t){if(shouldTrack&&activeEffect){let i=targetMap.get(n);i||targetMap.set(n,i=new Map);let r=i.get(t);r||i.set(t,r=createDep(()=>i.delete(t))),trackEffect(activeEffect,r)}}function trigger(n,e,t,i,r,s){const o=targetMap.get(n);if(!o)return;let a=[];if(e==="clear")a=[...o.values()];else if(t==="length"&&isArray$1(n)){const d=Number(i);o.forEach((y,v)=>{(v==="length"||!isSymbol(v)&&v>=d)&&a.push(y)})}else switch(t!==void 0&&a.push(o.get(t)),e){case"add":isArray$1(n)?isIntegerKey(t)&&a.push(o.get("length")):(a.push(o.get(ITERATE_KEY)),isMap(n)&&a.push(o.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$1(n)||(a.push(o.get(ITERATE_KEY)),isMap(n)&&a.push(o.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(n)&&a.push(o.get(ITERATE_KEY));break}pauseScheduling();for(const d of a)d&&triggerEffects(d,4);resetScheduling()}function getDepFromReactive(n,e){const t=targetMap.get(n);return t&&t.get(e)}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(isSymbol)),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const n={};return["includes","indexOf","lastIndexOf"].forEach(e=>{n[e]=function(...t){const i=toRaw(this);for(let s=0,o=this.length;s{n[e]=function(...t){pauseTracking(),pauseScheduling();const i=toRaw(this)[e].apply(this,t);return resetScheduling(),resetTracking(),i}}),n}function hasOwnProperty(n){isSymbol(n)||(n=String(n));const e=toRaw(this);return track(e,"has",n),e.hasOwnProperty(n)}class BaseReactiveHandler{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){const r=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!r;if(t==="__v_isReadonly")return r;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(r?s?shallowReadonlyMap:readonlyMap:s?shallowReactiveMap:reactiveMap).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=isArray$1(e);if(!r){if(o&&hasOwn(arrayInstrumentations,t))return Reflect.get(arrayInstrumentations,t,i);if(t==="hasOwnProperty")return hasOwnProperty}const a=Reflect.get(e,t,i);return(isSymbol(t)?builtInSymbols.has(t):isNonTrackableKeys(t))||(r||track(e,"get",t),s)?a:isRef(a)?o&&isIntegerKey(t)?a:a.value:isObject$1(a)?r?readonly(a):reactive(a):a}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(e=!1){super(!1,e)}set(e,t,i,r){let s=e[t];if(!this._isShallow){const d=isReadonly(s);if(!isShallow(i)&&!isReadonly(i)&&(s=toRaw(s),i=toRaw(i)),!isArray$1(e)&&isRef(s)&&!isRef(i))return d?!1:(s.value=i,!0)}const o=isArray$1(e)&&isIntegerKey(t)?Number(t)n,getProto=n=>Reflect.getPrototypeOf(n);function get$6(n,e,t=!1,i=!1){n=n.__v_raw;const r=toRaw(n),s=toRaw(e);t||(hasChanged(e,s)&&track(r,"get",e),track(r,"get",s));const{has:o}=getProto(r),a=i?toShallow:t?toReadonly:toReactive;if(o.call(r,e))return a(n.get(e));if(o.call(r,s))return a(n.get(s));n!==r&&n.get(e)}function has$1(n,e=!1){const t=this.__v_raw,i=toRaw(t),r=toRaw(n);return e||(hasChanged(n,r)&&track(i,"has",n),track(i,"has",r)),n===r?t.has(n):t.has(n)||t.has(r)}function size(n,e=!1){return n=n.__v_raw,!e&&track(toRaw(n),"iterate",ITERATE_KEY),Reflect.get(n,"size",n)}function add$4(n){n=toRaw(n);const e=toRaw(this);return getProto(e).has.call(e,n)||(e.add(n),trigger(e,"add",n,n)),this}function set$1(n,e){e=toRaw(e);const t=toRaw(this),{has:i,get:r}=getProto(t);let s=i.call(t,n);s||(n=toRaw(n),s=i.call(t,n));const o=r.call(t,n);return t.set(n,e),s?hasChanged(e,o)&&trigger(t,"set",n,e):trigger(t,"add",n,e),this}function deleteEntry(n){const e=toRaw(this),{has:t,get:i}=getProto(e);let r=t.call(e,n);r||(n=toRaw(n),r=t.call(e,n)),i&&i.call(e,n);const s=e.delete(n);return r&&trigger(e,"delete",n,void 0),s}function clear$2(){const n=toRaw(this),e=n.size!==0,t=n.clear();return e&&trigger(n,"clear",void 0,void 0),t}function createForEach(n,e){return function(i,r){const s=this,o=s.__v_raw,a=toRaw(o),d=e?toShallow:n?toReadonly:toReactive;return!n&&track(a,"iterate",ITERATE_KEY),o.forEach((y,v)=>i.call(r,d(y),d(v),s))}}function createIterableMethod(n,e,t){return function(...i){const r=this.__v_raw,s=toRaw(r),o=isMap(s),a=n==="entries"||n===Symbol.iterator&&o,d=n==="keys"&&o,y=r[n](...i),v=t?toShallow:e?toReadonly:toReactive;return!e&&track(s,"iterate",d?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:_,done:C}=y.next();return C?{value:_,done:C}:{value:a?[v(_[0]),v(_[1])]:v(_),done:C}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function createInstrumentations(){const n={get(s){return get$6(this,s)},get size(){return size(this)},has:has$1,add:add$4,set:set$1,delete:deleteEntry,clear:clear$2,forEach:createForEach(!1,!1)},e={get(s){return get$6(this,s,!1,!0)},get size(){return size(this)},has:has$1,add:add$4,set:set$1,delete:deleteEntry,clear:clear$2,forEach:createForEach(!1,!0)},t={get(s){return get$6(this,s,!0)},get size(){return size(this,!0)},has(s){return has$1.call(this,s,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},i={get(s){return get$6(this,s,!0,!0)},get size(){return size(this,!0)},has(s){return has$1.call(this,s,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=createIterableMethod(s,!1,!1),t[s]=createIterableMethod(s,!0,!1),e[s]=createIterableMethod(s,!1,!0),i[s]=createIterableMethod(s,!0,!0)}),[n,t,e,i]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(n,e){const t=e?n?shallowReadonlyInstrumentations:shallowInstrumentations:n?readonlyInstrumentations:mutableInstrumentations;return(i,r,s)=>r==="__v_isReactive"?!n:r==="__v_isReadonly"?n:r==="__v_raw"?i:Reflect.get(hasOwn(t,r)&&r in i?t:i,r,s)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(n){return n.__v_skip||!Object.isExtensible(n)?0:targetTypeMap(toRawType(n))}function reactive(n){return isReadonly(n)?n:createReactiveObject(n,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(n){return createReactiveObject(n,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(n){return createReactiveObject(n,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(n){return createReactiveObject(n,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(n,e,t,i,r){if(!isObject$1(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const s=r.get(n);if(s)return s;const o=getTargetType(n);if(o===0)return n;const a=new Proxy(n,o===2?i:t);return r.set(n,a),a}function isReactive(n){return isReadonly(n)?isReactive(n.__v_raw):!!(n&&n.__v_isReactive)}function isReadonly(n){return!!(n&&n.__v_isReadonly)}function isShallow(n){return!!(n&&n.__v_isShallow)}function isProxy(n){return n?!!n.__v_raw:!1}function toRaw(n){const e=n&&n.__v_raw;return e?toRaw(e):n}function markRaw(n){return Object.isExtensible(n)&&def(n,"__v_skip",!0),n}const toReactive=n=>isObject$1(n)?reactive(n):n,toReadonly=n=>isObject$1(n)?readonly(n):n;class ComputedRefImpl{constructor(e,t,i,r){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ReactiveEffect(()=>e(this._value),()=>triggerRefValue(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=i}get value(){const e=toRaw(this);return(!e._cacheable||e.effect.dirty)&&hasChanged(e._value,e._value=e.effect.run())&&triggerRefValue(e,4),trackRefValue(e),e.effect._dirtyLevel>=2&&triggerRefValue(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function computed$1(n,e,t=!1){let i,r;const s=isFunction$1(n);return s?(i=n,r=NOOP):(i=n.get,r=n.set),new ComputedRefImpl(i,r,s||!r,t)}function trackRefValue(n){var e;shouldTrack&&activeEffect&&(n=toRaw(n),trackEffect(activeEffect,(e=n.dep)!=null?e:n.dep=createDep(()=>n.dep=void 0,n instanceof ComputedRefImpl?n:void 0)))}function triggerRefValue(n,e=4,t,i){n=toRaw(n);const r=n.dep;r&&triggerEffects(r,e)}function isRef(n){return!!(n&&n.__v_isRef===!0)}function ref(n){return createRef(n,!1)}function shallowRef(n){return createRef(n,!0)}function createRef(n,e){return isRef(n)?n:new RefImpl(n,e)}class RefImpl{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:toRaw(e),this._value=t?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const t=this.__v_isShallow||isShallow(e)||isReadonly(e);e=t?e:toRaw(e),hasChanged(e,this._rawValue)&&(this._rawValue,this._rawValue=e,this._value=t?e:toReactive(e),triggerRefValue(this,4))}}function triggerRef(n){triggerRefValue(n,4)}function unref(n){return isRef(n)?n.value:n}function toValue$1(n){return isFunction$1(n)?n():unref(n)}const shallowUnwrapHandlers={get:(n,e,t)=>unref(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const r=n[e];return isRef(r)&&!isRef(t)?(r.value=t,!0):Reflect.set(n,e,t,i)}};function proxyRefs(n){return isReactive(n)?n:new Proxy(n,shallowUnwrapHandlers)}class CustomRefImpl{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:i}=e(()=>trackRefValue(this),()=>triggerRefValue(this));this._get=t,this._set=i}get value(){return this._get()}set value(e){this._set(e)}}function customRef(n){return new CustomRefImpl(n)}function toRefs(n){const e=isArray$1(n)?new Array(n.length):{};for(const t in n)e[t]=propertyToRef(n,t);return e}class ObjectRefImpl{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function toRef(n,e,t){return isRef(n)?n:isFunction$1(n)?new GetterRefImpl(n):isObject$1(n)&&arguments.length>1?propertyToRef(n,e,t):ref(n)}function propertyToRef(n,e,t){const i=n[e];return isRef(i)?i:new ObjectRefImpl(n,e,t)}const TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};/** +* @vue/runtime-core v3.4.31 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const stack=[];function warn$1(n,...e){pauseTracking();const t=stack.length?stack[stack.length-1].component:null,i=t&&t.appContext.config.warnHandler,r=getComponentTrace();if(i)callWithErrorHandling(i,t,11,[n+e.map(s=>{var o,a;return(a=(o=s.toString)==null?void 0:o.call(s))!=null?a:JSON.stringify(s)}).join(""),t&&t.proxy,r.map(({vnode:s})=>`at <${formatComponentName(t,s.type)}>`).join(` +`),r]);else{const s=[`[Vue warn]: ${n}`,...e];r.length&&s.push(` +`,...formatTrace(r)),console.warn(...s)}resetTracking()}function getComponentTrace(){let n=stack[stack.length-1];if(!n)return[];const e=[];for(;n;){const t=e[0];t&&t.vnode===n?t.recurseCount++:e.push({vnode:n,recurseCount:0});const i=n.component&&n.component.parent;n=i&&i.vnode}return e}function formatTrace(n){const e=[];return n.forEach((t,i)=>{e.push(...i===0?[]:[` +`],...formatTraceEntry(t))}),e}function formatTraceEntry({vnode:n,recurseCount:e}){const t=e>0?`... (${e} recursive calls)`:"",i=n.component?n.component.parent==null:!1,r=` at <${formatComponentName(n.component,n.type,i)}`,s=">"+t;return n.props?[r,...formatProps(n.props),s]:[r+s]}function formatProps(n){const e=[],t=Object.keys(n);return t.slice(0,3).forEach(i=>{e.push(...formatProp(i,n[i]))}),t.length>3&&e.push(" ..."),e}function formatProp(n,e,t){return isString(e)?(e=JSON.stringify(e),t?e:[`${n}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?t?e:[`${n}=${e}`]:isRef(e)?(e=formatProp(n,toRaw(e.value),!0),t?e:[`${n}=Ref<`,e,">"]):isFunction$1(e)?[`${n}=fn${e.name?`<${e.name}>`:""}`]:(e=toRaw(e),t?e:[`${n}=`,e])}function assertNumber(n,e){}const ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},ErrorTypeStrings$1={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function callWithErrorHandling(n,e,t,i){try{return i?n(...i):n()}catch(r){handleError(r,e,t)}}function callWithAsyncErrorHandling(n,e,t,i){if(isFunction$1(n)){const r=callWithErrorHandling(n,e,t,i);return r&&isPromise(r)&&r.catch(s=>{handleError(s,e,t)}),r}if(isArray$1(n)){const r=[];for(let s=0;s>>1,r=queue[i],s=getId(r);sflushIndex&&queue.splice(e,1)}function queuePostFlushCb(n){isArray$1(n)?pendingPostFlushCbs.push(...n):(!activePostFlushCbs||!activePostFlushCbs.includes(n,n.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(n),queueFlush()}function flushPreFlushCbs(n,e,t=isFlushing?flushIndex+1:0){for(;tgetId(t)-getId(i));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...e);return}for(activePostFlushCbs=e,postFlushIndex=0;postFlushIndexn.id==null?1/0:n.id,comparator=(n,e)=>{const t=getId(n)-getId(e);if(t===0){if(n.pre&&!e.pre)return-1;if(e.pre&&!n.pre)return 1}return t};function flushJobs(n){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);try{for(flushIndex=0;flushIndexdevtools$1.emit(r,...s)),buffer$1=[]):typeof window<"u"&&window.HTMLElement&&!((i=(t=window.navigator)==null?void 0:t.userAgent)!=null&&i.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{setDevtoolsHook$1(s,e)}),setTimeout(()=>{devtools$1||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,buffer$1=[])},3e3)):buffer$1=[]}function emit(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||EMPTY_OBJ;let r=t;const s=e.startsWith("update:"),o=s&&e.slice(7);if(o&&o in i){const v=`${o==="modelValue"?"model":o}Modifiers`,{number:_,trim:C}=i[v]||EMPTY_OBJ;C&&(r=t.map(E=>isString(E)?E.trim():E)),_&&(r=t.map(looseToNumber))}let a,d=i[a=toHandlerKey(e)]||i[a=toHandlerKey(camelize(e))];!d&&s&&(d=i[a=toHandlerKey(hyphenate(e))]),d&&callWithAsyncErrorHandling(d,n,6,r);const y=i[a+"Once"];if(y){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,callWithAsyncErrorHandling(y,n,6,r)}}function normalizeEmitsOptions(n,e,t=!1){const i=e.emitsCache,r=i.get(n);if(r!==void 0)return r;const s=n.emits;let o={},a=!1;if(!isFunction$1(n)){const d=y=>{const v=normalizeEmitsOptions(y,e,!0);v&&(a=!0,extend$5(o,v))};!t&&e.mixins.length&&e.mixins.forEach(d),n.extends&&d(n.extends),n.mixins&&n.mixins.forEach(d)}return!s&&!a?(isObject$1(n)&&i.set(n,null),null):(isArray$1(s)?s.forEach(d=>o[d]=null):extend$5(o,s),isObject$1(n)&&i.set(n,o),o)}function isEmitListener(n,e){return!n||!isOn(e)?!1:(e=e.slice(2).replace(/Once$/,""),hasOwn(n,e[0].toLowerCase()+e.slice(1))||hasOwn(n,hyphenate(e))||hasOwn(n,e))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(n){const e=currentRenderingInstance;return currentRenderingInstance=n,currentScopeId=n&&n.type.__scopeId||null,e}function pushScopeId(n){currentScopeId=n}function popScopeId(){currentScopeId=null}const withScopeId=n=>withCtx;function withCtx(n,e=currentRenderingInstance,t){if(!e||n._n)return n;const i=(...r)=>{i._d&&setBlockTracking(-1);const s=setCurrentRenderingInstance(e);let o;try{o=n(...r)}finally{setCurrentRenderingInstance(s),i._d&&setBlockTracking(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function markAttrsAccessed(){}function renderComponentRoot(n){const{type:e,vnode:t,proxy:i,withProxy:r,propsOptions:[s],slots:o,attrs:a,emit:d,render:y,renderCache:v,props:_,data:C,setupState:E,ctx:S,inheritAttrs:b}=n,P=setCurrentRenderingInstance(n);let R,x;try{if(t.shapeFlag&4){const L=r||i,k=L;R=normalizeVNode(y.call(k,L,v,_,E,C,S)),x=a}else{const L=e;R=normalizeVNode(L.length>1?L(_,{attrs:a,slots:o,emit:d}):L(_,null)),x=e.props?a:getFunctionalFallthrough(a)}}catch(L){blockStack.length=0,handleError(L,n,1),R=createVNode(Comment)}let T=R;if(x&&b!==!1){const L=Object.keys(x),{shapeFlag:k}=T;L.length&&k&7&&(s&&L.some(isModelListener)&&(x=filterModelListeners(x,s)),T=cloneVNode(T,x,!1,!0))}return t.dirs&&(T=cloneVNode(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(t.dirs):t.dirs),t.transition&&(T.transition=t.transition),R=T,setCurrentRenderingInstance(P),R}function filterSingleRoot(n,e=!0){let t;for(let i=0;i{let e;for(const t in n)(t==="class"||t==="style"||isOn(t))&&((e||(e={}))[t]=n[t]);return e},filterModelListeners=(n,e)=>{const t={};for(const i in n)(!isModelListener(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function shouldUpdateComponent(n,e,t){const{props:i,children:r,component:s}=n,{props:o,children:a,patchFlag:d}=e,y=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&d>=0){if(d&1024)return!0;if(d&16)return i?hasPropsChanged(i,o,y):!!o;if(d&8){const v=e.dynamicProps;for(let _=0;_n.__isSuspense;let suspenseId=0;const SuspenseImpl={name:"Suspense",__isSuspense:!0,process(n,e,t,i,r,s,o,a,d,y){if(n==null)mountSuspense(e,t,i,r,s,o,a,d,y);else{if(s&&s.deps>0&&!n.suspense.isInFallback){e.suspense=n.suspense,e.suspense.vnode=e,e.el=n.el;return}patchSuspense(n,e,t,i,r,o,a,d,y)}},hydrate:hydrateSuspense,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(n,e){const t=n.props&&n.props[e];isFunction$1(t)&&t()}function mountSuspense(n,e,t,i,r,s,o,a,d){const{p:y,o:{createElement:v}}=d,_=v("div"),C=n.suspense=createSuspenseBoundary(n,r,i,e,_,t,s,o,a,d);y(null,C.pendingBranch=n.ssContent,_,null,i,C,s,o),C.deps>0?(triggerEvent(n,"onPending"),triggerEvent(n,"onFallback"),y(null,n.ssFallback,e,t,i,null,s,o),setActiveBranch(C,n.ssFallback)):C.resolve(!1,!0)}function patchSuspense(n,e,t,i,r,s,o,a,{p:d,um:y,o:{createElement:v}}){const _=e.suspense=n.suspense;_.vnode=e,e.el=n.el;const C=e.ssContent,E=e.ssFallback,{activeBranch:S,pendingBranch:b,isInFallback:P,isHydrating:R}=_;if(b)_.pendingBranch=C,isSameVNodeType(C,b)?(d(b,C,_.hiddenContainer,null,r,_,s,o,a),_.deps<=0?_.resolve():P&&(R||(d(S,E,t,i,r,null,s,o,a),setActiveBranch(_,E)))):(_.pendingId=suspenseId++,R?(_.isHydrating=!1,_.activeBranch=b):y(b,r,_),_.deps=0,_.effects.length=0,_.hiddenContainer=v("div"),P?(d(null,C,_.hiddenContainer,null,r,_,s,o,a),_.deps<=0?_.resolve():(d(S,E,t,i,r,null,s,o,a),setActiveBranch(_,E))):S&&isSameVNodeType(C,S)?(d(S,C,t,i,r,_,s,o,a),_.resolve(!0)):(d(null,C,_.hiddenContainer,null,r,_,s,o,a),_.deps<=0&&_.resolve()));else if(S&&isSameVNodeType(C,S))d(S,C,t,i,r,_,s,o,a),setActiveBranch(_,C);else if(triggerEvent(e,"onPending"),_.pendingBranch=C,C.shapeFlag&512?_.pendingId=C.component.suspenseId:_.pendingId=suspenseId++,d(null,C,_.hiddenContainer,null,r,_,s,o,a),_.deps<=0)_.resolve();else{const{timeout:x,pendingId:T}=_;x>0?setTimeout(()=>{_.pendingId===T&&_.fallback(E)},x):x===0&&_.fallback(E)}}function createSuspenseBoundary(n,e,t,i,r,s,o,a,d,y,v=!1){const{p:_,m:C,um:E,n:S,o:{parentNode:b,remove:P}}=y;let R;const x=isVNodeSuspensible(n);x&&e&&e.pendingBranch&&(R=e.pendingId,e.deps++);const T=n.props?toNumber(n.props.timeout):void 0,L=s,k={vnode:n,parent:e,parentComponent:t,namespace:o,container:i,hiddenContainer:r,deps:0,pendingId:suspenseId++,timeout:typeof T=="number"?T:-1,activeBranch:null,pendingBranch:null,isInFallback:!v,isHydrating:v,isUnmounted:!1,effects:[],resolve(N=!1,G=!1){const{vnode:F,activeBranch:z,pendingBranch:B,pendingId:D,effects:U,parentComponent:Y,container:$}=k;let K=!1;k.isHydrating?k.isHydrating=!1:N||(K=z&&B.transition&&B.transition.mode==="out-in",K&&(z.transition.afterLeave=()=>{D===k.pendingId&&(C(B,$,s===L?S(z):s,0),queuePostFlushCb(U))}),z&&(b(z.el)!==k.hiddenContainer&&(s=S(z)),E(z,Y,k,!0)),K||C(B,$,s,0)),setActiveBranch(k,B),k.pendingBranch=null,k.isInFallback=!1;let q=k.parent,te=!1;for(;q;){if(q.pendingBranch){q.effects.push(...U),te=!0;break}q=q.parent}!te&&!K&&queuePostFlushCb(U),k.effects=[],x&&e&&e.pendingBranch&&R===e.pendingId&&(e.deps--,e.deps===0&&!G&&e.resolve()),triggerEvent(F,"onResolve")},fallback(N){if(!k.pendingBranch)return;const{vnode:G,activeBranch:F,parentComponent:z,container:B,namespace:D}=k;triggerEvent(G,"onFallback");const U=S(F),Y=()=>{k.isInFallback&&(_(null,N,B,U,z,null,D,a,d),setActiveBranch(k,N))},$=N.transition&&N.transition.mode==="out-in";$&&(F.transition.afterLeave=Y),k.isInFallback=!0,E(F,z,null,!0),$||Y()},move(N,G,F){k.activeBranch&&C(k.activeBranch,N,G,F),k.container=N},next(){return k.activeBranch&&S(k.activeBranch)},registerDep(N,G,F){const z=!!k.pendingBranch;z&&k.deps++;const B=N.vnode.el;N.asyncDep.catch(D=>{handleError(D,N,0)}).then(D=>{if(N.isUnmounted||k.isUnmounted||k.pendingId!==N.suspenseId)return;N.asyncResolved=!0;const{vnode:U}=N;handleSetupResult(N,D,!1),B&&(U.el=B);const Y=!B&&N.subTree.el;G(N,U,b(B||N.subTree.el),B?null:S(N.subTree),k,o,F),Y&&P(Y),updateHOCHostEl(N,U.el),z&&--k.deps===0&&k.resolve()})},unmount(N,G){k.isUnmounted=!0,k.activeBranch&&E(k.activeBranch,t,N,G),k.pendingBranch&&E(k.pendingBranch,t,N,G)}};return k}function hydrateSuspense(n,e,t,i,r,s,o,a,d){const y=e.suspense=createSuspenseBoundary(e,i,t,n.parentNode,document.createElement("div"),null,r,s,o,a,!0),v=d(n,y.pendingBranch=e.ssContent,t,y,s,o);return y.deps===0&&y.resolve(!1,!0),v}function normalizeSuspenseChildren(n){const{shapeFlag:e,children:t}=n,i=e&32;n.ssContent=normalizeSuspenseSlot(i?t.default:t),n.ssFallback=i?normalizeSuspenseSlot(t.fallback):createVNode(Comment)}function normalizeSuspenseSlot(n){let e;if(isFunction$1(n)){const t=isBlockTreeEnabled&&n._c;t&&(n._d=!1,openBlock()),n=n(),t&&(n._d=!0,e=currentBlock,closeBlock())}return isArray$1(n)&&(n=filterSingleRoot(n)),n=normalizeVNode(n),e&&!n.dynamicChildren&&(n.dynamicChildren=e.filter(t=>t!==n)),n}function queueEffectWithSuspense(n,e){e&&e.pendingBranch?isArray$1(n)?e.effects.push(...n):e.effects.push(n):queuePostFlushCb(n)}function setActiveBranch(n,e){n.activeBranch=e;const{vnode:t,parentComponent:i}=n;let r=e.el;for(;!r&&e.component;)e=e.component.subTree,r=e.el;t.el=r,i&&i.subTree===t&&(i.vnode.el=r,updateHOCHostEl(i,r))}function isVNodeSuspensible(n){const e=n.props&&n.props.suspensible;return e!=null&&e!==!1}function injectHook(n,e,t=currentInstance,i=!1){if(t){const r=t[n]||(t[n]=[]),s=e.__weh||(e.__weh=(...o)=>{pauseTracking();const a=setCurrentInstance(t),d=callWithAsyncErrorHandling(e,t,n,o);return a(),resetTracking(),d});return i?r.unshift(s):r.push(s),s}}const createHook=n=>(e,t=currentInstance)=>{(!isInSSRComponentSetup||n==="sp")&&injectHook(n,(...i)=>e(...i),t)},onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(n,e=currentInstance){injectHook("ec",n,e)}function withDirectives(n,e){if(currentRenderingInstance===null)return n;const t=getComponentPublicInstance(currentRenderingInstance),i=n.dirs||(n.dirs=[]);for(let r=0;re(o,a,void 0,s&&s[a]));else{const o=Object.keys(n);r=new Array(o.length);for(let a=0,d=o.length;a{const s=i.fn(...r);return s&&(s.key=i.key),s}:i.fn)}return n}/*! #__NO_SIDE_EFFECTS__ */function defineComponent(n,e){return isFunction$1(n)?extend$5({name:n.name},e,{setup:n}):n}const isAsyncWrapper=n=>!!n.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function defineAsyncComponent(n){isFunction$1(n)&&(n={loader:n});const{loader:e,loadingComponent:t,errorComponent:i,delay:r=200,timeout:s,suspensible:o=!0,onError:a}=n;let d=null,y,v=0;const _=()=>(v++,d=null,C()),C=()=>{let E;return d||(E=d=e().catch(S=>{if(S=S instanceof Error?S:new Error(String(S)),a)return new Promise((b,P)=>{a(S,()=>b(_()),()=>P(S),v+1)});throw S}).then(S=>E!==d&&d?d:(S&&(S.__esModule||S[Symbol.toStringTag]==="Module")&&(S=S.default),y=S,S)))};return defineComponent({name:"AsyncComponentWrapper",__asyncLoader:C,get __asyncResolved(){return y},setup(){const E=currentInstance;if(y)return()=>createInnerComp(y,E);const S=x=>{d=null,handleError(x,E,13,!i)};if(o&&E.suspense||isInSSRComponentSetup)return C().then(x=>()=>createInnerComp(x,E)).catch(x=>(S(x),()=>i?createVNode(i,{error:x}):null));const b=ref(!1),P=ref(),R=ref(!!r);return r&&setTimeout(()=>{R.value=!1},r),s!=null&&setTimeout(()=>{if(!b.value&&!P.value){const x=new Error(`Async component timed out after ${s}ms.`);S(x),P.value=x}},s),C().then(()=>{b.value=!0,E.parent&&isKeepAlive(E.parent.vnode)&&(E.parent.effect.dirty=!0,queueJob(E.parent.update))}).catch(x=>{S(x),P.value=x}),()=>{if(b.value&&y)return createInnerComp(y,E);if(P.value&&i)return createVNode(i,{error:P.value});if(t&&!R.value)return createVNode(t)}}})}function createInnerComp(n,e){const{ref:t,props:i,children:r,ce:s}=e.vnode,o=createVNode(n,i,r);return o.ref=t,o.ce=s,delete e.vnode.ce,o}function renderSlot(n,e,t={},i,r){if(currentRenderingInstance.isCE||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.isCE)return e!=="default"&&(t.name=e),createVNode("slot",t,i&&i());let s=n[e];s&&s._c&&(s._d=!1),openBlock();const o=s&&ensureValidVNode(s(t)),a=createBlock(Fragment,{key:t.key||o&&o.key||`_${e}`},o||(i?i():[]),o&&n._===1?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function ensureValidVNode(n){return n.some(e=>isVNode(e)?!(e.type===Comment||e.type===Fragment&&!ensureValidVNode(e.children)):!0)?n:null}function toHandlers(n,e){const t={};for(const i in n)t[e&&/[A-Z]/.test(i)?`on:${i}`:toHandlerKey(i)]=n[i];return t}const getPublicInstance=n=>n?isStatefulComponent(n)?getComponentPublicInstance(n):getPublicInstance(n.parent):null,publicPropertiesMap=extend$5(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>getPublicInstance(n.parent),$root:n=>getPublicInstance(n.root),$emit:n=>n.emit,$options:n=>resolveMergedOptions(n),$forceUpdate:n=>n.f||(n.f=()=>{n.effect.dirty=!0,queueJob(n.update)}),$nextTick:n=>n.n||(n.n=nextTick.bind(n.proxy)),$watch:n=>instanceWatch.bind(n)}),hasSetupBinding=(n,e)=>n!==EMPTY_OBJ&&!n.__isScriptSetup&&hasOwn(n,e),PublicInstanceProxyHandlers={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:r,props:s,accessCache:o,type:a,appContext:d}=n;let y;if(e[0]!=="$"){const E=o[e];if(E!==void 0)switch(E){case 1:return i[e];case 2:return r[e];case 4:return t[e];case 3:return s[e]}else{if(hasSetupBinding(i,e))return o[e]=1,i[e];if(r!==EMPTY_OBJ&&hasOwn(r,e))return o[e]=2,r[e];if((y=n.propsOptions[0])&&hasOwn(y,e))return o[e]=3,s[e];if(t!==EMPTY_OBJ&&hasOwn(t,e))return o[e]=4,t[e];shouldCacheAccess&&(o[e]=0)}}const v=publicPropertiesMap[e];let _,C;if(v)return e==="$attrs"&&track(n.attrs,"get",""),v(n);if((_=a.__cssModules)&&(_=_[e]))return _;if(t!==EMPTY_OBJ&&hasOwn(t,e))return o[e]=4,t[e];if(C=d.config.globalProperties,hasOwn(C,e))return C[e]},set({_:n},e,t){const{data:i,setupState:r,ctx:s}=n;return hasSetupBinding(r,e)?(r[e]=t,!0):i!==EMPTY_OBJ&&hasOwn(i,e)?(i[e]=t,!0):hasOwn(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(s[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:r,propsOptions:s}},o){let a;return!!t[o]||n!==EMPTY_OBJ&&hasOwn(n,o)||hasSetupBinding(e,o)||(a=s[0])&&hasOwn(a,o)||hasOwn(i,o)||hasOwn(publicPropertiesMap,o)||hasOwn(r.config.globalProperties,o)},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:hasOwn(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}},RuntimeCompiledPublicInstanceProxyHandlers=extend$5({},PublicInstanceProxyHandlers,{get(n,e){if(e!==Symbol.unscopables)return PublicInstanceProxyHandlers.get(n,e,n)},has(n,e){return e[0]!=="_"&&!isGloballyAllowed(e)}});function defineProps(){return null}function defineEmits(){return null}function defineExpose(n){}function defineOptions(n){}function defineSlots(){return null}function defineModel(){}function withDefaults(n,e){return null}function useSlots(){return getContext().slots}function useAttrs(){return getContext().attrs}function getContext(){const n=getCurrentInstance();return n.setupContext||(n.setupContext=createSetupContext(n))}function normalizePropsOrEmits(n){return isArray$1(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}function mergeDefaults(n,e){const t=normalizePropsOrEmits(n);for(const i in e){if(i.startsWith("__skip"))continue;let r=t[i];r?isArray$1(r)||isFunction$1(r)?r=t[i]={type:r,default:e[i]}:r.default=e[i]:r===null&&(r=t[i]={default:e[i]}),r&&e[`__skip_${i}`]&&(r.skipFactory=!0)}return t}function mergeModels(n,e){return!n||!e?n||e:isArray$1(n)&&isArray$1(e)?n.concat(e):extend$5({},normalizePropsOrEmits(n),normalizePropsOrEmits(e))}function createPropsRestProxy(n,e){const t={};for(const i in n)e.includes(i)||Object.defineProperty(t,i,{enumerable:!0,get:()=>n[i]});return t}function withAsyncContext(n){const e=getCurrentInstance();let t=n();return unsetCurrentInstance(),isPromise(t)&&(t=t.catch(i=>{throw setCurrentInstance(e),i})),[t,()=>setCurrentInstance(e)]}let shouldCacheAccess=!0;function applyOptions(n){const e=resolveMergedOptions(n),t=n.proxy,i=n.ctx;shouldCacheAccess=!1,e.beforeCreate&&callHook$1(e.beforeCreate,n,"bc");const{data:r,computed:s,methods:o,watch:a,provide:d,inject:y,created:v,beforeMount:_,mounted:C,beforeUpdate:E,updated:S,activated:b,deactivated:P,beforeDestroy:R,beforeUnmount:x,destroyed:T,unmounted:L,render:k,renderTracked:N,renderTriggered:G,errorCaptured:F,serverPrefetch:z,expose:B,inheritAttrs:D,components:U,directives:Y,filters:$}=e;if(y&&resolveInjections(y,i,null),o)for(const te in o){const Q=o[te];isFunction$1(Q)&&(i[te]=Q.bind(t))}if(r){const te=r.call(t,t);isObject$1(te)&&(n.data=reactive(te))}if(shouldCacheAccess=!0,s)for(const te in s){const Q=s[te],je=isFunction$1(Q)?Q.bind(t,t):isFunction$1(Q.get)?Q.get.bind(t,t):NOOP,ie=!isFunction$1(Q)&&isFunction$1(Q.set)?Q.set.bind(t):NOOP,it=computed({get:je,set:ie});Object.defineProperty(i,te,{enumerable:!0,configurable:!0,get:()=>it.value,set:le=>it.value=le})}if(a)for(const te in a)createWatcher(a[te],i,t,te);if(d){const te=isFunction$1(d)?d.call(t):d;Reflect.ownKeys(te).forEach(Q=>{provide(Q,te[Q])})}v&&callHook$1(v,n,"c");function q(te,Q){isArray$1(Q)?Q.forEach(je=>te(je.bind(t))):Q&&te(Q.bind(t))}if(q(onBeforeMount,_),q(onMounted,C),q(onBeforeUpdate,E),q(onUpdated,S),q(onActivated,b),q(onDeactivated,P),q(onErrorCaptured,F),q(onRenderTracked,N),q(onRenderTriggered,G),q(onBeforeUnmount,x),q(onUnmounted,L),q(onServerPrefetch,z),isArray$1(B))if(B.length){const te=n.exposed||(n.exposed={});B.forEach(Q=>{Object.defineProperty(te,Q,{get:()=>t[Q],set:je=>t[Q]=je})})}else n.exposed||(n.exposed={});k&&n.render===NOOP&&(n.render=k),D!=null&&(n.inheritAttrs=D),U&&(n.components=U),Y&&(n.directives=Y)}function resolveInjections(n,e,t=NOOP){isArray$1(n)&&(n=normalizeInject(n));for(const i in n){const r=n[i];let s;isObject$1(r)?"default"in r?s=inject(r.from||i,r.default,!0):s=inject(r.from||i):s=inject(r),isRef(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function callHook$1(n,e,t){callWithAsyncErrorHandling(isArray$1(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function createWatcher(n,e,t,i){const r=i.includes(".")?createPathGetter(t,i):()=>t[i];if(isString(n)){const s=e[n];isFunction$1(s)&&watch(r,s)}else if(isFunction$1(n))watch(r,n.bind(t));else if(isObject$1(n))if(isArray$1(n))n.forEach(s=>createWatcher(s,e,t,i));else{const s=isFunction$1(n.handler)?n.handler.bind(t):e[n.handler];isFunction$1(s)&&watch(r,s,n)}}function resolveMergedOptions(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=n.appContext,a=s.get(e);let d;return a?d=a:!r.length&&!t&&!i?d=e:(d={},r.length&&r.forEach(y=>mergeOptions$1(d,y,o,!0)),mergeOptions$1(d,e,o)),isObject$1(e)&&s.set(e,d),d}function mergeOptions$1(n,e,t,i=!1){const{mixins:r,extends:s}=e;s&&mergeOptions$1(n,s,t,!0),r&&r.forEach(o=>mergeOptions$1(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=internalOptionMergeStrats[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(n,e){return e?n?function(){return extend$5(isFunction$1(n)?n.call(this,this):n,isFunction$1(e)?e.call(this,this):e)}:e:n}function mergeInject(n,e){return mergeObjectOptions(normalizeInject(n),normalizeInject(e))}function normalizeInject(n){if(isArray$1(n)){const e={};for(let t=0;t1)return t&&isFunction$1(e)?e.call(i&&i.proxy):e}}function hasInjectionContext(){return!!(currentInstance||currentRenderingInstance||currentApp)}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=n=>Object.getPrototypeOf(n)===internalObjectProto;function initProps(n,e,t,i=!1){const r={},s=createInternalObject();n.propsDefaults=Object.create(null),setFullProps(n,e,r,s);for(const o in n.propsOptions[0])o in r||(r[o]=void 0);t?n.props=i?r:shallowReactive(r):n.type.props?n.props=r:n.props=s,n.attrs=s}function updateProps(n,e,t,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=n,a=toRaw(r),[d]=n.propsOptions;let y=!1;if((i||o>0)&&!(o&16)){if(o&8){const v=n.vnode.dynamicProps;for(let _=0;_{d=!0;const[C,E]=normalizePropsOptions(_,e,!0);extend$5(o,C),E&&a.push(...E)};!t&&e.mixins.length&&e.mixins.forEach(v),n.extends&&v(n.extends),n.mixins&&n.mixins.forEach(v)}if(!s&&!d)return isObject$1(n)&&i.set(n,EMPTY_ARR),EMPTY_ARR;if(isArray$1(s))for(let v=0;v-1,E[1]=b<0||S-1||hasOwn(E,"default"))&&a.push(_)}}}const y=[o,a];return isObject$1(n)&&i.set(n,y),y}function validatePropName(n){return n[0]!=="$"&&!isReservedProp(n)}function getType(n){return n===null?"null":typeof n=="function"?n.name||"":typeof n=="object"&&n.constructor&&n.constructor.name||""}function isSameType(n,e){return getType(n)===getType(e)}function getTypeIndex(n,e){return isArray$1(e)?e.findIndex(t=>isSameType(t,n)):isFunction$1(e)&&isSameType(e,n)?0:-1}const isInternalKey=n=>n[0]==="_"||n==="$stable",normalizeSlotValue=n=>isArray$1(n)?n.map(normalizeVNode):[normalizeVNode(n)],normalizeSlot$1=(n,e,t)=>{if(e._n)return e;const i=withCtx((...r)=>normalizeSlotValue(e(...r)),t);return i._c=!1,i},normalizeObjectSlots=(n,e,t)=>{const i=n._ctx;for(const r in n){if(isInternalKey(r))continue;const s=n[r];if(isFunction$1(s))e[r]=normalizeSlot$1(r,s,i);else if(s!=null){const o=normalizeSlotValue(s);e[r]=()=>o}}},normalizeVNodeSlots=(n,e)=>{const t=normalizeSlotValue(e);n.slots.default=()=>t},initSlots=(n,e)=>{const t=n.slots=createInternalObject();if(n.vnode.shapeFlag&32){const i=e._;i?(extend$5(t,e),def(t,"_",i,!0)):normalizeObjectSlots(e,t)}else e&&normalizeVNodeSlots(n,e)},updateSlots=(n,e,t)=>{const{vnode:i,slots:r}=n;let s=!0,o=EMPTY_OBJ;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:(extend$5(r,e),!t&&a===1&&delete r._):(s=!e.$stable,normalizeObjectSlots(e,r)),o=e}else e&&(normalizeVNodeSlots(n,e),o={default:1});if(s)for(const a in r)!isInternalKey(a)&&o[a]==null&&delete r[a]};function setRef(n,e,t,i,r=!1){if(isArray$1(n)){n.forEach((C,E)=>setRef(C,e&&(isArray$1(e)?e[E]:e),t,i,r));return}if(isAsyncWrapper(i)&&!r)return;const s=i.shapeFlag&4?getComponentPublicInstance(i.component):i.el,o=r?null:s,{i:a,r:d}=n,y=e&&e.r,v=a.refs===EMPTY_OBJ?a.refs={}:a.refs,_=a.setupState;if(y!=null&&y!==d&&(isString(y)?(v[y]=null,hasOwn(_,y)&&(_[y]=null)):isRef(y)&&(y.value=null)),isFunction$1(d))callWithErrorHandling(d,a,12,[o,v]);else{const C=isString(d),E=isRef(d);if(C||E){const S=()=>{if(n.f){const b=C?hasOwn(_,d)?_[d]:v[d]:d.value;r?isArray$1(b)&&remove(b,s):isArray$1(b)?b.includes(s)||b.push(s):C?(v[d]=[s],hasOwn(_,d)&&(_[d]=v[d])):(d.value=[s],n.k&&(v[n.k]=d.value))}else C?(v[d]=o,hasOwn(_,d)&&(_[d]=o)):E&&(d.value=o,n.k&&(v[n.k]=o))};o?(S.id=-1,queuePostRenderEffect(S,t)):S()}}}let hasLoggedMismatchError=!1;const logMismatchError=()=>{hasLoggedMismatchError||(console.error("Hydration completed but contains mismatches."),hasLoggedMismatchError=!0)},isSVGContainer=n=>n.namespaceURI.includes("svg")&&n.tagName!=="foreignObject",isMathMLContainer=n=>n.namespaceURI.includes("MathML"),getContainerType=n=>{if(isSVGContainer(n))return"svg";if(isMathMLContainer(n))return"mathml"},isComment=n=>n.nodeType===8;function createHydrationFunctions(n){const{mt:e,p:t,o:{patchProp:i,createText:r,nextSibling:s,parentNode:o,remove:a,insert:d,createComment:y}}=n,v=(T,L)=>{if(!L.hasChildNodes()){t(null,T,L),flushPostFlushCbs(),L._vnode=T;return}_(L.firstChild,T,null,null,null),flushPostFlushCbs(),L._vnode=T},_=(T,L,k,N,G,F=!1)=>{F=F||!!L.dynamicChildren;const z=isComment(T)&&T.data==="[",B=()=>b(T,L,k,N,G,z),{type:D,ref:U,shapeFlag:Y,patchFlag:$}=L;let K=T.nodeType;L.el=T,$===-2&&(F=!1,L.dynamicChildren=null);let q=null;switch(D){case Text$1:K!==3?L.children===""?(d(L.el=r(""),o(T),T),q=T):q=B():(T.data!==L.children&&(logMismatchError(),T.data=L.children),q=s(T));break;case Comment:x(T)?(q=s(T),R(L.el=T.content.firstChild,T,k)):K!==8||z?q=B():q=s(T);break;case Static:if(z&&(T=s(T),K=T.nodeType),K===1||K===3){q=T;const te=!L.children.length;for(let Q=0;Q{F=F||!!L.dynamicChildren;const{type:z,props:B,patchFlag:D,shapeFlag:U,dirs:Y,transition:$}=L,K=z==="input"||z==="option";if(K||D!==-1){Y&&invokeDirectiveHook(L,null,k,"created");let q=!1;if(x(T)){q=needTransition(N,$)&&k&&k.vnode.props&&k.vnode.props.appear;const Q=T.content.firstChild;q&&$.beforeEnter(Q),R(Q,T,k),L.el=T=Q}if(U&16&&!(B&&(B.innerHTML||B.textContent))){let Q=E(T.firstChild,L,T,k,N,G,F);for(;Q;){logMismatchError();const je=Q;Q=Q.nextSibling,a(je)}}else U&8&&T.textContent!==L.children&&(logMismatchError(),T.textContent=L.children);if(B)if(K||!F||D&48)for(const Q in B)(K&&(Q.endsWith("value")||Q==="indeterminate")||isOn(Q)&&!isReservedProp(Q)||Q[0]===".")&&i(T,Q,null,B[Q],void 0,void 0,k);else B.onClick&&i(T,"onClick",null,B.onClick,void 0,void 0,k);let te;(te=B&&B.onVnodeBeforeMount)&&invokeVNodeHook(te,k,L),Y&&invokeDirectiveHook(L,null,k,"beforeMount"),((te=B&&B.onVnodeMounted)||Y||q)&&queueEffectWithSuspense(()=>{te&&invokeVNodeHook(te,k,L),q&&$.enter(T),Y&&invokeDirectiveHook(L,null,k,"mounted")},N)}return T.nextSibling},E=(T,L,k,N,G,F,z)=>{z=z||!!L.dynamicChildren;const B=L.children,D=B.length;for(let U=0;U{const{slotScopeIds:z}=L;z&&(G=G?G.concat(z):z);const B=o(T),D=E(s(T),L,B,k,N,G,F);return D&&isComment(D)&&D.data==="]"?s(L.anchor=D):(logMismatchError(),d(L.anchor=y("]"),B,D),D)},b=(T,L,k,N,G,F)=>{if(logMismatchError(),L.el=null,F){const D=P(T);for(;;){const U=s(T);if(U&&U!==D)a(U);else break}}const z=s(T),B=o(T);return a(T),t(null,L,B,z,k,N,getContainerType(B),G),z},P=(T,L="[",k="]")=>{let N=0;for(;T;)if(T=s(T),T&&isComment(T)&&(T.data===L&&N++,T.data===k)){if(N===0)return s(T);N--}return T},R=(T,L,k)=>{const N=L.parentNode;N&&N.replaceChild(T,L);let G=k;for(;G;)G.vnode.el===L&&(G.vnode.el=G.subTree.el=T),G=G.parent},x=T=>T.nodeType===1&&T.tagName.toLowerCase()==="template";return[v,_]}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(n){return baseCreateRenderer(n)}function createHydrationRenderer(n){return baseCreateRenderer(n,createHydrationFunctions)}function baseCreateRenderer(n,e){const t=getGlobalThis();t.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:a,createComment:d,setText:y,setElementText:v,parentNode:_,nextSibling:C,setScopeId:E=NOOP,insertStaticContent:S}=n,b=(H,W,J,se=null,de=null,pe=null,Ge=void 0,be=null,ye=!!W.dynamicChildren)=>{if(H===W)return;H&&!isSameVNodeType(H,W)&&(se=re(H),le(H,de,pe,!0),H=null),W.patchFlag===-2&&(ye=!1,W.dynamicChildren=null);const{type:fe,ref:X,shapeFlag:ee}=W;switch(fe){case Text$1:P(H,W,J,se);break;case Comment:R(H,W,J,se);break;case Static:H==null&&x(W,J,se,Ge);break;case Fragment:U(H,W,J,se,de,pe,Ge,be,ye);break;default:ee&1?k(H,W,J,se,de,pe,Ge,be,ye):ee&6?Y(H,W,J,se,de,pe,Ge,be,ye):(ee&64||ee&128)&&fe.process(H,W,J,se,de,pe,Ge,be,ye,oe)}X!=null&&de&&setRef(X,H&&H.ref,pe,W||H,!W)},P=(H,W,J,se)=>{if(H==null)i(W.el=a(W.children),J,se);else{const de=W.el=H.el;W.children!==H.children&&y(de,W.children)}},R=(H,W,J,se)=>{H==null?i(W.el=d(W.children||""),J,se):W.el=H.el},x=(H,W,J,se)=>{[H.el,H.anchor]=S(H.children,W,J,se,H.el,H.anchor)},T=({el:H,anchor:W},J,se)=>{let de;for(;H&&H!==W;)de=C(H),i(H,J,se),H=de;i(W,J,se)},L=({el:H,anchor:W})=>{let J;for(;H&&H!==W;)J=C(H),r(H),H=J;r(W)},k=(H,W,J,se,de,pe,Ge,be,ye)=>{W.type==="svg"?Ge="svg":W.type==="math"&&(Ge="mathml"),H==null?N(W,J,se,de,pe,Ge,be,ye):z(H,W,de,pe,Ge,be,ye)},N=(H,W,J,se,de,pe,Ge,be)=>{let ye,fe;const{props:X,shapeFlag:ee,transition:ne,dirs:ue}=H;if(ye=H.el=o(H.type,pe,X&&X.is,X),ee&8?v(ye,H.children):ee&16&&F(H.children,ye,null,se,de,resolveChildrenNamespace(H,pe),Ge,be),ue&&invokeDirectiveHook(H,null,se,"created"),G(ye,H,H.scopeId,Ge,se),X){for(const ke in X)ke!=="value"&&!isReservedProp(ke)&&s(ye,ke,null,X[ke],pe,H.children,se,de,ut);"value"in X&&s(ye,"value",null,X.value,pe),(fe=X.onVnodeBeforeMount)&&invokeVNodeHook(fe,se,H)}ue&&invokeDirectiveHook(H,null,se,"beforeMount");const Oe=needTransition(de,ne);Oe&&ne.beforeEnter(ye),i(ye,W,J),((fe=X&&X.onVnodeMounted)||Oe||ue)&&queuePostRenderEffect(()=>{fe&&invokeVNodeHook(fe,se,H),Oe&&ne.enter(ye),ue&&invokeDirectiveHook(H,null,se,"mounted")},de)},G=(H,W,J,se,de)=>{if(J&&E(H,J),se)for(let pe=0;pe{for(let fe=ye;fe{const be=W.el=H.el;let{patchFlag:ye,dynamicChildren:fe,dirs:X}=W;ye|=H.patchFlag&16;const ee=H.props||EMPTY_OBJ,ne=W.props||EMPTY_OBJ;let ue;if(J&&toggleRecurse(J,!1),(ue=ne.onVnodeBeforeUpdate)&&invokeVNodeHook(ue,J,W,H),X&&invokeDirectiveHook(W,H,J,"beforeUpdate"),J&&toggleRecurse(J,!0),fe?B(H.dynamicChildren,fe,be,J,se,resolveChildrenNamespace(W,de),pe):Ge||Q(H,W,be,null,J,se,resolveChildrenNamespace(W,de),pe,!1),ye>0){if(ye&16)D(be,W,ee,ne,J,se,de);else if(ye&2&&ee.class!==ne.class&&s(be,"class",null,ne.class,de),ye&4&&s(be,"style",ee.style,ne.style,de),ye&8){const Oe=W.dynamicProps;for(let ke=0;ke{ue&&invokeVNodeHook(ue,J,W,H),X&&invokeDirectiveHook(W,H,J,"updated")},se)},B=(H,W,J,se,de,pe,Ge)=>{for(let be=0;be{if(J!==se){if(J!==EMPTY_OBJ)for(const be in J)!isReservedProp(be)&&!(be in se)&&s(H,be,J[be],null,Ge,W.children,de,pe,ut);for(const be in se){if(isReservedProp(be))continue;const ye=se[be],fe=J[be];ye!==fe&&be!=="value"&&s(H,be,fe,ye,Ge,W.children,de,pe,ut)}"value"in se&&s(H,"value",J.value,se.value,Ge)}},U=(H,W,J,se,de,pe,Ge,be,ye)=>{const fe=W.el=H?H.el:a(""),X=W.anchor=H?H.anchor:a("");let{patchFlag:ee,dynamicChildren:ne,slotScopeIds:ue}=W;ue&&(be=be?be.concat(ue):ue),H==null?(i(fe,J,se),i(X,J,se),F(W.children||[],J,X,de,pe,Ge,be,ye)):ee>0&&ee&64&&ne&&H.dynamicChildren?(B(H.dynamicChildren,ne,J,de,pe,Ge,be),(W.key!=null||de&&W===de.subTree)&&traverseStaticChildren(H,W,!0)):Q(H,W,J,X,de,pe,Ge,be,ye)},Y=(H,W,J,se,de,pe,Ge,be,ye)=>{W.slotScopeIds=be,H==null?W.shapeFlag&512?de.ctx.activate(W,J,se,Ge,ye):$(W,J,se,de,pe,Ge,ye):K(H,W,ye)},$=(H,W,J,se,de,pe,Ge)=>{const be=H.component=createComponentInstance(H,se,de);if(isKeepAlive(H)&&(be.ctx.renderer=oe),setupComponent(be),be.asyncDep){if(de&&de.registerDep(be,q,Ge),!H.el){const ye=be.subTree=createVNode(Comment);R(null,ye,W,J)}}else q(be,H,W,J,de,pe,Ge)},K=(H,W,J)=>{const se=W.component=H.component;if(shouldUpdateComponent(H,W,J))if(se.asyncDep&&!se.asyncResolved){te(se,W,J);return}else se.next=W,invalidateJob(se.update),se.effect.dirty=!0,se.update();else W.el=H.el,se.vnode=W},q=(H,W,J,se,de,pe,Ge)=>{const be=()=>{if(H.isMounted){let{next:X,bu:ee,u:ne,parent:ue,vnode:Oe}=H;{const Rt=locateNonHydratedAsyncRoot(H);if(Rt){X&&(X.el=Oe.el,te(H,X,Ge)),Rt.asyncDep.then(()=>{H.isUnmounted||be()});return}}let ke=X,Ze;toggleRecurse(H,!1),X?(X.el=Oe.el,te(H,X,Ge)):X=Oe,ee&&invokeArrayFns(ee),(Ze=X.props&&X.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Ze,ue,X,Oe),toggleRecurse(H,!0);const mt=renderComponentRoot(H),dt=H.subTree;H.subTree=mt,b(dt,mt,_(dt.el),re(dt),H,de,pe),X.el=mt.el,ke===null&&updateHOCHostEl(H,mt.el),ne&&queuePostRenderEffect(ne,de),(Ze=X.props&&X.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Ze,ue,X,Oe),de)}else{let X;const{el:ee,props:ne}=W,{bm:ue,m:Oe,parent:ke}=H,Ze=isAsyncWrapper(W);if(toggleRecurse(H,!1),ue&&invokeArrayFns(ue),!Ze&&(X=ne&&ne.onVnodeBeforeMount)&&invokeVNodeHook(X,ke,W),toggleRecurse(H,!0),ee&&Et){const mt=()=>{H.subTree=renderComponentRoot(H),Et(ee,H.subTree,H,de,null)};Ze?W.type.__asyncLoader().then(()=>!H.isUnmounted&&mt()):mt()}else{const mt=H.subTree=renderComponentRoot(H);b(null,mt,J,se,H,de,pe),W.el=mt.el}if(Oe&&queuePostRenderEffect(Oe,de),!Ze&&(X=ne&&ne.onVnodeMounted)){const mt=W;queuePostRenderEffect(()=>invokeVNodeHook(X,ke,mt),de)}(W.shapeFlag&256||ke&&isAsyncWrapper(ke.vnode)&&ke.vnode.shapeFlag&256)&&H.a&&queuePostRenderEffect(H.a,de),H.isMounted=!0,W=J=se=null}},ye=H.effect=new ReactiveEffect(be,NOOP,()=>queueJob(fe),H.scope),fe=H.update=()=>{ye.dirty&&ye.run()};fe.id=H.uid,toggleRecurse(H,!0),fe()},te=(H,W,J)=>{W.component=H;const se=H.vnode.props;H.vnode=W,H.next=null,updateProps(H,W.props,se,J),updateSlots(H,W.children,J),pauseTracking(),flushPreFlushCbs(H),resetTracking()},Q=(H,W,J,se,de,pe,Ge,be,ye=!1)=>{const fe=H&&H.children,X=H?H.shapeFlag:0,ee=W.children,{patchFlag:ne,shapeFlag:ue}=W;if(ne>0){if(ne&128){ie(fe,ee,J,se,de,pe,Ge,be,ye);return}else if(ne&256){je(fe,ee,J,se,de,pe,Ge,be,ye);return}}ue&8?(X&16&&ut(fe,de,pe),ee!==fe&&v(J,ee)):X&16?ue&16?ie(fe,ee,J,se,de,pe,Ge,be,ye):ut(fe,de,pe,!0):(X&8&&v(J,""),ue&16&&F(ee,J,se,de,pe,Ge,be,ye))},je=(H,W,J,se,de,pe,Ge,be,ye)=>{H=H||EMPTY_ARR,W=W||EMPTY_ARR;const fe=H.length,X=W.length,ee=Math.min(fe,X);let ne;for(ne=0;neX?ut(H,de,pe,!0,!1,ee):F(W,J,se,de,pe,Ge,be,ye,ee)},ie=(H,W,J,se,de,pe,Ge,be,ye)=>{let fe=0;const X=W.length;let ee=H.length-1,ne=X-1;for(;fe<=ee&&fe<=ne;){const ue=H[fe],Oe=W[fe]=ye?cloneIfMounted(W[fe]):normalizeVNode(W[fe]);if(isSameVNodeType(ue,Oe))b(ue,Oe,J,null,de,pe,Ge,be,ye);else break;fe++}for(;fe<=ee&&fe<=ne;){const ue=H[ee],Oe=W[ne]=ye?cloneIfMounted(W[ne]):normalizeVNode(W[ne]);if(isSameVNodeType(ue,Oe))b(ue,Oe,J,null,de,pe,Ge,be,ye);else break;ee--,ne--}if(fe>ee){if(fe<=ne){const ue=ne+1,Oe=uene)for(;fe<=ee;)le(H[fe],de,pe,!0),fe++;else{const ue=fe,Oe=fe,ke=new Map;for(fe=Oe;fe<=ne;fe++){const vt=W[fe]=ye?cloneIfMounted(W[fe]):normalizeVNode(W[fe]);vt.key!=null&&ke.set(vt.key,fe)}let Ze,mt=0;const dt=ne-Oe+1;let Rt=!1,Gt=0;const Ut=new Array(dt);for(fe=0;fe=dt){le(vt,de,pe,!0);continue}let Pt;if(vt.key!=null)Pt=ke.get(vt.key);else for(Ze=Oe;Ze<=ne;Ze++)if(Ut[Ze-Oe]===0&&isSameVNodeType(vt,W[Ze])){Pt=Ze;break}Pt===void 0?le(vt,de,pe,!0):(Ut[Pt-Oe]=fe+1,Pt>=Gt?Gt=Pt:Rt=!0,b(vt,W[Pt],J,null,de,pe,Ge,be,ye),mt++)}const Ot=Rt?getSequence(Ut):EMPTY_ARR;for(Ze=Ot.length-1,fe=dt-1;fe>=0;fe--){const vt=Oe+fe,Pt=W[vt],Nt=vt+1{const{el:pe,type:Ge,transition:be,children:ye,shapeFlag:fe}=H;if(fe&6){it(H.component.subTree,W,J,se);return}if(fe&128){H.suspense.move(W,J,se);return}if(fe&64){Ge.move(H,W,J,oe);return}if(Ge===Fragment){i(pe,W,J);for(let ee=0;eebe.enter(pe),de);else{const{leave:ee,delayLeave:ne,afterLeave:ue}=be,Oe=()=>i(pe,W,J),ke=()=>{ee(pe,()=>{Oe(),ue&&ue()})};ne?ne(pe,Oe,ke):ke()}else i(pe,W,J)},le=(H,W,J,se=!1,de=!1)=>{const{type:pe,props:Ge,ref:be,children:ye,dynamicChildren:fe,shapeFlag:X,patchFlag:ee,dirs:ne,memoIndex:ue}=H;if(ee===-2&&(de=!1),be!=null&&setRef(be,null,J,H,!0),ue!=null&&(W.renderCache[ue]=void 0),X&256){W.ctx.deactivate(H);return}const Oe=X&1&&ne,ke=!isAsyncWrapper(H);let Ze;if(ke&&(Ze=Ge&&Ge.onVnodeBeforeUnmount)&&invokeVNodeHook(Ze,W,H),X&6)Qe(H.component,J,se);else{if(X&128){H.suspense.unmount(J,se);return}Oe&&invokeDirectiveHook(H,null,W,"beforeUnmount"),X&64?H.type.remove(H,W,J,oe,se):fe&&(pe!==Fragment||ee>0&&ee&64)?ut(fe,W,J,!1,!0):(pe===Fragment&&ee&384||!de&&X&16)&&ut(ye,W,J),se&&ft(H)}(ke&&(Ze=Ge&&Ge.onVnodeUnmounted)||Oe)&&queuePostRenderEffect(()=>{Ze&&invokeVNodeHook(Ze,W,H),Oe&&invokeDirectiveHook(H,null,W,"unmounted")},J)},ft=H=>{const{type:W,el:J,anchor:se,transition:de}=H;if(W===Fragment){ct(J,se);return}if(W===Static){L(H);return}const pe=()=>{r(J),de&&!de.persisted&&de.afterLeave&&de.afterLeave()};if(H.shapeFlag&1&&de&&!de.persisted){const{leave:Ge,delayLeave:be}=de,ye=()=>Ge(J,pe);be?be(H.el,pe,ye):ye()}else pe()},ct=(H,W)=>{let J;for(;H!==W;)J=C(H),r(H),H=J;r(W)},Qe=(H,W,J)=>{const{bum:se,scope:de,update:pe,subTree:Ge,um:be,m:ye,a:fe}=H;invalidateMount(ye),invalidateMount(fe),se&&invokeArrayFns(se),de.stop(),pe&&(pe.active=!1,le(Ge,H,W,J)),be&&queuePostRenderEffect(be,W),queuePostRenderEffect(()=>{H.isUnmounted=!0},W),W&&W.pendingBranch&&!W.isUnmounted&&H.asyncDep&&!H.asyncResolved&&H.suspenseId===W.pendingId&&(W.deps--,W.deps===0&&W.resolve())},ut=(H,W,J,se=!1,de=!1,pe=0)=>{for(let Ge=pe;GeH.shapeFlag&6?re(H.component.subTree):H.shapeFlag&128?H.suspense.next():C(H.anchor||H.el);let Ve=!1;const Be=(H,W,J)=>{H==null?W._vnode&&le(W._vnode,null,null,!0):b(W._vnode||null,H,W,null,null,null,J),Ve||(Ve=!0,flushPreFlushCbs(),flushPostFlushCbs(),Ve=!1),W._vnode=H},oe={p:b,um:le,m:it,r:ft,mt:$,mc:F,pc:Q,pbc:B,n:re,o:n};let pt,Et;return e&&([pt,Et]=e(oe)),{render:Be,hydrate:pt,createApp:createAppAPI(Be,pt)}}function resolveChildrenNamespace({type:n,props:e},t){return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function toggleRecurse({effect:n,update:e},t){n.allowRecurse=e.allowRecurse=t}function needTransition(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function traverseStaticChildren(n,e,t=!1){const i=n.children,r=e.children;if(isArray$1(i)&&isArray$1(r))for(let s=0;s>1,n[t[a]]0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function locateNonHydratedAsyncRoot(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:locateNonHydratedAsyncRoot(e)}function invalidateMount(n){if(n)for(let e=0;einject(ssrContextKey);function watchEffect(n,e){return doWatch(n,null,e)}function watchPostEffect(n,e){return doWatch(n,null,{flush:"post"})}function watchSyncEffect(n,e){return doWatch(n,null,{flush:"sync"})}const INITIAL_WATCHER_VALUE={};function watch(n,e,t){return doWatch(n,e,t)}function doWatch(n,e,{immediate:t,deep:i,flush:r,once:s,onTrack:o,onTrigger:a}=EMPTY_OBJ){if(e&&s){const N=e;e=(...G)=>{N(...G),k()}}const d=currentInstance,y=N=>i===!0?N:traverse(N,i===!1?1:void 0);let v,_=!1,C=!1;if(isRef(n)?(v=()=>n.value,_=isShallow(n)):isReactive(n)?(v=()=>y(n),_=!0):isArray$1(n)?(C=!0,_=n.some(N=>isReactive(N)||isShallow(N)),v=()=>n.map(N=>{if(isRef(N))return N.value;if(isReactive(N))return y(N);if(isFunction$1(N))return callWithErrorHandling(N,d,2)})):isFunction$1(n)?e?v=()=>callWithErrorHandling(n,d,2):v=()=>(E&&E(),callWithAsyncErrorHandling(n,d,3,[S])):v=NOOP,e&&i){const N=v;v=()=>traverse(N())}let E,S=N=>{E=T.onStop=()=>{callWithErrorHandling(N,d,4),E=T.onStop=void 0}},b;if(isInSSRComponentSetup)if(S=NOOP,e?t&&callWithAsyncErrorHandling(e,d,3,[v(),C?[]:void 0,S]):v(),r==="sync"){const N=useSSRContext();b=N.__watcherHandles||(N.__watcherHandles=[])}else return NOOP;let P=C?new Array(n.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const R=()=>{if(!(!T.active||!T.dirty))if(e){const N=T.run();(i||_||(C?N.some((G,F)=>hasChanged(G,P[F])):hasChanged(N,P)))&&(E&&E(),callWithAsyncErrorHandling(e,d,3,[N,P===INITIAL_WATCHER_VALUE?void 0:C&&P[0]===INITIAL_WATCHER_VALUE?[]:P,S]),P=N)}else T.run()};R.allowRecurse=!!e;let x;r==="sync"?x=R:r==="post"?x=()=>queuePostRenderEffect(R,d&&d.suspense):(R.pre=!0,d&&(R.id=d.uid),x=()=>queueJob(R));const T=new ReactiveEffect(v,NOOP,x),L=getCurrentScope(),k=()=>{T.stop(),L&&remove(L.effects,T)};return e?t?R():P=T.run():r==="post"?queuePostRenderEffect(T.run.bind(T),d&&d.suspense):T.run(),b&&b.push(k),k}function instanceWatch(n,e,t){const i=this.proxy,r=isString(n)?n.includes(".")?createPathGetter(i,n):()=>i[n]:n.bind(i,i);let s;isFunction$1(e)?s=e:(s=e.handler,t=e);const o=setCurrentInstance(this),a=doWatch(r,s.bind(i),t);return o(),a}function createPathGetter(n,e){const t=e.split(".");return()=>{let i=n;for(let r=0;r{traverse(i,e,t)});else if(isPlainObject$1(n)){for(const i in n)traverse(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&traverse(n[i],e,t)}return n}const isKeepAlive=n=>n.type.__isKeepAlive,KeepAliveImpl={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(n,{slots:e}){const t=getCurrentInstance(),i=t.ctx;if(!i.renderer)return()=>{const x=e.default&&e.default();return x&&x.length===1?x[0]:x};const r=new Map,s=new Set;let o=null;const a=t.suspense,{renderer:{p:d,m:y,um:v,o:{createElement:_}}}=i,C=_("div");i.activate=(x,T,L,k,N)=>{const G=x.component;y(x,T,L,0,a),d(G.vnode,x,T,L,G,a,k,x.slotScopeIds,N),queuePostRenderEffect(()=>{G.isDeactivated=!1,G.a&&invokeArrayFns(G.a);const F=x.props&&x.props.onVnodeMounted;F&&invokeVNodeHook(F,G.parent,x)},a)},i.deactivate=x=>{const T=x.component;invalidateMount(T.m),invalidateMount(T.a),y(x,C,null,1,a),queuePostRenderEffect(()=>{T.da&&invokeArrayFns(T.da);const L=x.props&&x.props.onVnodeUnmounted;L&&invokeVNodeHook(L,T.parent,x),T.isDeactivated=!0},a)};function E(x){resetShapeFlag(x),v(x,t,a,!0)}function S(x){r.forEach((T,L)=>{const k=getComponentName(T.type);k&&(!x||!x(k))&&b(L)})}function b(x){const T=r.get(x);!o||!isSameVNodeType(T,o)?E(T):o&&resetShapeFlag(o),r.delete(x),s.delete(x)}watch(()=>[n.include,n.exclude],([x,T])=>{x&&S(L=>matches$1(x,L)),T&&S(L=>!matches$1(T,L))},{flush:"post",deep:!0});let P=null;const R=()=>{P!=null&&(isSuspense(t.subTree.type)?queuePostRenderEffect(()=>{r.set(P,getInnerChild(t.subTree))},t.subTree.suspense):r.set(P,getInnerChild(t.subTree)))};return onMounted(R),onUpdated(R),onBeforeUnmount(()=>{r.forEach(x=>{const{subTree:T,suspense:L}=t,k=getInnerChild(T);if(x.type===k.type&&x.key===k.key){resetShapeFlag(k);const N=k.component.da;N&&queuePostRenderEffect(N,L);return}E(x)})}),()=>{if(P=null,!e.default)return null;const x=e.default(),T=x[0];if(x.length>1)return o=null,x;if(!isVNode(T)||!(T.shapeFlag&4)&&!(T.shapeFlag&128))return o=null,T;let L=getInnerChild(T);const k=L.type,N=getComponentName(isAsyncWrapper(L)?L.type.__asyncResolved||{}:k),{include:G,exclude:F,max:z}=n;if(G&&(!N||!matches$1(G,N))||F&&N&&matches$1(F,N))return o=L,T;const B=L.key==null?k:L.key,D=r.get(B);return L.el&&(L=cloneVNode(L),T.shapeFlag&128&&(T.ssContent=L)),P=B,D?(L.el=D.el,L.component=D.component,L.transition&&setTransitionHooks(L,L.transition),L.shapeFlag|=512,s.delete(B),s.add(B)):(s.add(B),z&&s.size>parseInt(z,10)&&b(s.values().next().value)),L.shapeFlag|=256,o=L,isSuspense(T.type)?T:L}}},KeepAlive=KeepAliveImpl;function matches$1(n,e){return isArray$1(n)?n.some(t=>matches$1(t,e)):isString(n)?n.split(",").includes(e):isRegExp(n)?n.test(e):!1}function onActivated(n,e){registerKeepAliveHook(n,"a",e)}function onDeactivated(n,e){registerKeepAliveHook(n,"da",e)}function registerKeepAliveHook(n,e,t=currentInstance){const i=n.__wdc||(n.__wdc=()=>{let r=t;for(;r;){if(r.isDeactivated)return;r=r.parent}return n()});if(injectHook(e,i,t),t){let r=t.parent;for(;r&&r.parent;)isKeepAlive(r.parent.vnode)&&injectToKeepAliveRoot(i,e,t,r),r=r.parent}}function injectToKeepAliveRoot(n,e,t,i){const r=injectHook(e,n,i,!0);onUnmounted(()=>{remove(i[e],r)},t)}function resetShapeFlag(n){n.shapeFlag&=-257,n.shapeFlag&=-513}function getInnerChild(n){return n.shapeFlag&128?n.ssContent:n}const leaveCbKey=Symbol("_leaveCb"),enterCbKey$1=Symbol("_enterCb");function useTransitionState(){const n={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return onMounted(()=>{n.isMounted=!0}),onBeforeUnmount(()=>{n.isUnmounting=!0}),n}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=n=>{const e=n.subTree;return e.component?recursiveGetSubtree(e.component):e},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(n,{slots:e}){const t=getCurrentInstance(),i=useTransitionState();return()=>{const r=e.default&&getTransitionRawChildren(e.default(),!0);if(!r||!r.length)return;let s=r[0];if(r.length>1){for(const C of r)if(C.type!==Comment){s=C;break}}const o=toRaw(n),{mode:a}=o;if(i.isLeaving)return emptyPlaceholder(s);const d=getKeepAliveChild(s);if(!d)return emptyPlaceholder(s);let y=resolveTransitionHooks(d,o,i,t,C=>y=C);setTransitionHooks(d,y);const v=t.subTree,_=v&&getKeepAliveChild(v);if(_&&_.type!==Comment&&!isSameVNodeType(d,_)&&recursiveGetSubtree(t).type!==Comment){const C=resolveTransitionHooks(_,o,i,t);if(setTransitionHooks(_,C),a==="out-in"&&d.type!==Comment)return i.isLeaving=!0,C.afterLeave=()=>{i.isLeaving=!1,t.update.active!==!1&&(t.effect.dirty=!0,t.update())},emptyPlaceholder(s);a==="in-out"&&d.type!==Comment&&(C.delayLeave=(E,S,b)=>{const P=getLeavingNodesForType(i,_);P[String(_.key)]=_,E[leaveCbKey]=()=>{S(),E[leaveCbKey]=void 0,delete y.delayedLeave},y.delayedLeave=b})}return s}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(n,e){const{leavingVNodes:t}=n;let i=t.get(e.type);return i||(i=Object.create(null),t.set(e.type,i)),i}function resolveTransitionHooks(n,e,t,i,r){const{appear:s,mode:o,persisted:a=!1,onBeforeEnter:d,onEnter:y,onAfterEnter:v,onEnterCancelled:_,onBeforeLeave:C,onLeave:E,onAfterLeave:S,onLeaveCancelled:b,onBeforeAppear:P,onAppear:R,onAfterAppear:x,onAppearCancelled:T}=e,L=String(n.key),k=getLeavingNodesForType(t,n),N=(z,B)=>{z&&callWithAsyncErrorHandling(z,i,9,B)},G=(z,B)=>{const D=B[1];N(z,B),isArray$1(z)?z.every(U=>U.length<=1)&&D():z.length<=1&&D()},F={mode:o,persisted:a,beforeEnter(z){let B=d;if(!t.isMounted)if(s)B=P||d;else return;z[leaveCbKey]&&z[leaveCbKey](!0);const D=k[L];D&&isSameVNodeType(n,D)&&D.el[leaveCbKey]&&D.el[leaveCbKey](),N(B,[z])},enter(z){let B=y,D=v,U=_;if(!t.isMounted)if(s)B=R||y,D=x||v,U=T||_;else return;let Y=!1;const $=z[enterCbKey$1]=K=>{Y||(Y=!0,K?N(U,[z]):N(D,[z]),F.delayedLeave&&F.delayedLeave(),z[enterCbKey$1]=void 0)};B?G(B,[z,$]):$()},leave(z,B){const D=String(n.key);if(z[enterCbKey$1]&&z[enterCbKey$1](!0),t.isUnmounting)return B();N(C,[z]);let U=!1;const Y=z[leaveCbKey]=$=>{U||(U=!0,B(),$?N(b,[z]):N(S,[z]),z[leaveCbKey]=void 0,k[D]===n&&delete k[D])};k[D]=n,E?G(E,[z,Y]):Y()},clone(z){const B=resolveTransitionHooks(z,e,t,i,r);return r&&r(B),B}};return F}function emptyPlaceholder(n){if(isKeepAlive(n))return n=cloneVNode(n),n.children=null,n}function getKeepAliveChild(n){if(!isKeepAlive(n))return n;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&isFunction$1(t.default))return t.default()}}function setTransitionHooks(n,e){n.shapeFlag&6&&n.component?setTransitionHooks(n.component.subTree,e):n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}function getTransitionRawChildren(n,e=!1,t){let i=[],r=0;for(let s=0;s1)for(let s=0;sn.__isTeleport,isTeleportDisabled=n=>n&&(n.disabled||n.disabled===""),isTargetSVG=n=>typeof SVGElement<"u"&&n instanceof SVGElement,isTargetMathML=n=>typeof MathMLElement=="function"&&n instanceof MathMLElement,resolveTarget=(n,e)=>{const t=n&&n.to;return isString(t)?e?e(t):null:t},TeleportImpl={name:"Teleport",__isTeleport:!0,process(n,e,t,i,r,s,o,a,d,y){const{mc:v,pc:_,pbc:C,o:{insert:E,querySelector:S,createText:b,createComment:P}}=y,R=isTeleportDisabled(e.props);let{shapeFlag:x,children:T,dynamicChildren:L}=e;if(n==null){const k=e.el=b(""),N=e.anchor=b("");E(k,t,i),E(N,t,i);const G=e.target=resolveTarget(e.props,S),F=e.targetAnchor=b("");G&&(E(F,G),o==="svg"||isTargetSVG(G)?o="svg":(o==="mathml"||isTargetMathML(G))&&(o="mathml"));const z=(B,D)=>{x&16&&v(T,B,D,r,s,o,a,d)};R?z(t,N):G&&z(G,F)}else{e.el=n.el;const k=e.anchor=n.anchor,N=e.target=n.target,G=e.targetAnchor=n.targetAnchor,F=isTeleportDisabled(n.props),z=F?t:N,B=F?k:G;if(o==="svg"||isTargetSVG(N)?o="svg":(o==="mathml"||isTargetMathML(N))&&(o="mathml"),L?(C(n.dynamicChildren,L,z,r,s,o,a),traverseStaticChildren(n,e,!0)):d||_(n,e,z,B,r,s,o,a,!1),R)F?e.props&&n.props&&e.props.to!==n.props.to&&(e.props.to=n.props.to):moveTeleport(e,t,k,y,1);else if((e.props&&e.props.to)!==(n.props&&n.props.to)){const D=e.target=resolveTarget(e.props,S);D&&moveTeleport(e,D,null,y,0)}else F&&moveTeleport(e,N,G,y,1)}updateCssVars(e)},remove(n,e,t,{um:i,o:{remove:r}},s){const{shapeFlag:o,children:a,anchor:d,targetAnchor:y,target:v,props:_}=n;if(v&&r(y),s&&r(d),o&16){const C=s||!isTeleportDisabled(_);for(let E=0;E0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(n),n}function createElementBlock(n,e,t,i,r,s){return setupBlock(createBaseVNode(n,e,t,i,r,s,!0))}function createBlock(n,e,t,i,r){return setupBlock(createVNode(n,e,t,i,r,!0))}function isVNode(n){return n?n.__v_isVNode===!0:!1}function isSameVNodeType(n,e){return n.type===e.type&&n.key===e.key}function transformVNodeArgs(n){}const normalizeKey=({key:n})=>n??null,normalizeRef=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?isString(n)||isRef(n)||isFunction$1(n)?{i:currentRenderingInstance,r:n,k:e,f:!!t}:n:null);function createBaseVNode(n,e=null,t=null,i=0,r=null,s=n===Fragment?0:1,o=!1,a=!1){const d={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&normalizeKey(e),ref:e&&normalizeRef(e),scopeId:currentScopeId,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return a?(normalizeChildren(d,t),s&128&&n.normalize(d)):t&&(d.shapeFlag|=isString(t)?8:16),isBlockTreeEnabled>0&&!o&¤tBlock&&(d.patchFlag>0||s&6)&&d.patchFlag!==32&¤tBlock.push(d),d}const createVNode=_createVNode;function _createVNode(n,e=null,t=null,i=0,r=null,s=!1){if((!n||n===NULL_DYNAMIC_COMPONENT)&&(n=Comment),isVNode(n)){const a=cloneVNode(n,e,!0);return t&&normalizeChildren(a,t),isBlockTreeEnabled>0&&!s&¤tBlock&&(a.shapeFlag&6?currentBlock[currentBlock.indexOf(n)]=a:currentBlock.push(a)),a.patchFlag=-2,a}if(isClassComponent(n)&&(n=n.__vccOpts),e){e=guardReactiveProps(e);let{class:a,style:d}=e;a&&!isString(a)&&(e.class=normalizeClass(a)),isObject$1(d)&&(isProxy(d)&&!isArray$1(d)&&(d=extend$5({},d)),e.style=normalizeStyle(d))}const o=isString(n)?1:isSuspense(n)?128:isTeleport(n)?64:isObject$1(n)?4:isFunction$1(n)?2:0;return createBaseVNode(n,e,t,i,r,o,s,!0)}function guardReactiveProps(n){return n?isProxy(n)||isInternalObject(n)?extend$5({},n):n:null}function cloneVNode(n,e,t=!1,i=!1){const{props:r,ref:s,patchFlag:o,children:a,transition:d}=n,y=e?mergeProps(r||{},e):r,v={__v_isVNode:!0,__v_skip:!0,type:n.type,props:y,key:y&&normalizeKey(y),ref:e&&e.ref?t&&s?isArray$1(s)?s.concat(normalizeRef(e)):[s,normalizeRef(e)]:normalizeRef(e):s,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:a,target:n.target,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==Fragment?o===-1?16:o|16:o,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:d,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&cloneVNode(n.ssContent),ssFallback:n.ssFallback&&cloneVNode(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return d&&i&&setTransitionHooks(v,d.clone(v)),v}function createTextVNode(n=" ",e=0){return createVNode(Text$1,null,n,e)}function createStaticVNode(n,e){const t=createVNode(Static,null,n);return t.staticCount=e,t}function createCommentVNode(n="",e=!1){return e?(openBlock(),createBlock(Comment,null,n)):createVNode(Comment,null,n)}function normalizeVNode(n){return n==null||typeof n=="boolean"?createVNode(Comment):isArray$1(n)?createVNode(Fragment,null,n.slice()):typeof n=="object"?cloneIfMounted(n):createVNode(Text$1,null,String(n))}function cloneIfMounted(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:cloneVNode(n)}function normalizeChildren(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(isArray$1(e))t=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),normalizeChildren(n,r()),r._c&&(r._d=!0));return}else{t=32;const r=e._;!r&&!isInternalObject(e)?e._ctx=currentRenderingInstance:r===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else isFunction$1(e)?(e={default:e,_ctx:currentRenderingInstance},t=32):(e=String(e),i&64?(t=16,e=[createTextVNode(e)]):t=8);n.children=e,n.shapeFlag|=t}function mergeProps(...n){const e={};for(let t=0;tcurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const n=getGlobalThis(),e=(t,i)=>{let r;return(r=n[t])||(r=n[t]=[]),r.push(i),s=>{r.length>1?r.forEach(o=>o(s)):r[0](s)}};internalSetCurrentInstance=e("__VUE_INSTANCE_SETTERS__",t=>currentInstance=t),setInSSRSetupState=e("__VUE_SSR_SETTERS__",t=>isInSSRComponentSetup=t)}const setCurrentInstance=n=>{const e=currentInstance;return internalSetCurrentInstance(n),n.scope.on(),()=>{n.scope.off(),internalSetCurrentInstance(e)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(n){return n.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(n,e=!1){e&&setInSSRSetupState(e);const{props:t,children:i}=n.vnode,r=isStatefulComponent(n);initProps(n,t,r,e),initSlots(n,i);const s=r?setupStatefulComponent(n,e):void 0;return e&&setInSSRSetupState(!1),s}function setupStatefulComponent(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,PublicInstanceProxyHandlers);const{setup:i}=t;if(i){const r=n.setupContext=i.length>1?createSetupContext(n):null,s=setCurrentInstance(n);pauseTracking();const o=callWithErrorHandling(i,n,0,[n.props,r]);if(resetTracking(),s(),isPromise(o)){if(o.then(unsetCurrentInstance,unsetCurrentInstance),e)return o.then(a=>{handleSetupResult(n,a,e)}).catch(a=>{handleError(a,n,0)});n.asyncDep=o}else handleSetupResult(n,o,e)}else finishComponentSetup(n,e)}function handleSetupResult(n,e,t){isFunction$1(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:isObject$1(e)&&(n.setupState=proxyRefs(e)),finishComponentSetup(n,t)}let compile$1,installWithProxy;function registerRuntimeCompiler(n){compile$1=n,installWithProxy=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,RuntimeCompiledPublicInstanceProxyHandlers))}}const isRuntimeOnly=()=>!compile$1;function finishComponentSetup(n,e,t){const i=n.type;if(!n.render){if(!e&&compile$1&&!i.render){const r=i.template||resolveMergedOptions(n).template;if(r){const{isCustomElement:s,compilerOptions:o}=n.appContext.config,{delimiters:a,compilerOptions:d}=i,y=extend$5(extend$5({isCustomElement:s,delimiters:a},o),d);i.render=compile$1(r,y)}}n.render=i.render||NOOP,installWithProxy&&installWithProxy(n)}{const r=setCurrentInstance(n);pauseTracking();try{applyOptions(n)}finally{resetTracking(),r()}}}const attrsProxyHandlers={get(n,e){return track(n,"get",""),n[e]}};function createSetupContext(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,attrsProxyHandlers),slots:n.slots,emit:n.emit,expose:e}}function getComponentPublicInstance(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(proxyRefs(markRaw(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in publicPropertiesMap)return publicPropertiesMap[t](n)},has(e,t){return t in e||t in publicPropertiesMap}})):n.proxy}const classifyRE=/(?:^|[-_])(\w)/g,classify=n=>n.replace(classifyRE,e=>e.toUpperCase()).replace(/[-_]/g,"");function getComponentName(n,e=!0){return isFunction$1(n)?n.displayName||n.name:n.name||e&&n.__name}function formatComponentName(n,e,t=!1){let i=getComponentName(e);if(!i&&e.__file){const r=e.__file.match(/([^/\\]+)\.\w+$/);r&&(i=r[1])}if(!i&&n&&n.parent){const r=s=>{for(const o in s)if(s[o]===e)return o};i=r(n.components||n.parent.type.components)||r(n.appContext.components)}return i?classify(i):t?"App":"Anonymous"}function isClassComponent(n){return isFunction$1(n)&&"__vccOpts"in n}const computed=(n,e)=>computed$1(n,e,isInSSRComponentSetup);function useModel(n,e,t=EMPTY_OBJ){const i=getCurrentInstance(),r=camelize(e),s=hyphenate(e),o=customRef((d,y)=>{let v;return watchSyncEffect(()=>{const _=n[e];hasChanged(v,_)&&(v=_,y())}),{get(){return d(),t.get?t.get(v):v},set(_){const C=i.vnode.props;!(C&&(e in C||r in C||s in C)&&(`onUpdate:${e}`in C||`onUpdate:${r}`in C||`onUpdate:${s}`in C))&&hasChanged(_,v)&&(v=_,y()),i.emit(`update:${e}`,t.set?t.set(_):_)}}}),a=e==="modelValue"?"modelModifiers":`${e}Modifiers`;return o[Symbol.iterator]=()=>{let d=0;return{next(){return d<2?{value:d++?n[a]||{}:o,done:!1}:{done:!0}}}},o}function h$1(n,e,t){const i=arguments.length;return i===2?isObject$1(e)&&!isArray$1(e)?isVNode(e)?createVNode(n,null,[e]):createVNode(n,e):createVNode(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&isVNode(t)&&(t=[t]),createVNode(n,e,t))}function initCustomFormatter(){}function withMemo(n,e,t,i){const r=t[i];if(r&&isMemoSame(r,n))return r;const s=e();return s.memo=n.slice(),s.memoIndex=i,t[i]=s}function isMemoSame(n,e){const t=n.memo;if(t.length!=e.length)return!1;for(let i=0;i0&¤tBlock&¤tBlock.push(n),!0}const version$3="3.4.31",warn$2=NOOP,ErrorTypeStrings=ErrorTypeStrings$1,devtools=devtools$1,setDevtoolsHook=setDevtoolsHook$1,_ssrUtils={createComponentInstance,setupComponent,renderComponentRoot,setCurrentRenderingInstance,isVNode,normalizeVNode,getComponentPublicInstance},ssrUtils=_ssrUtils,resolveFilter=null,compatUtils=null,DeprecationTypes=null;/** +* @vue/runtime-dom v3.4.31 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const r=e==="svg"?doc.createElementNS(svgNS,n):e==="mathml"?doc.createElementNS(mathmlNS,n):t?doc.createElement(n,{is:t}):doc.createElement(n);return n==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:n=>doc.createTextNode(n),createComment:n=>doc.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>doc.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,r,s){const o=t?t.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),t),!(r===s||!(r=r.nextSibling)););else{templateContainer.innerHTML=i==="svg"?`${n}`:i==="mathml"?`${n}`:n;const a=templateContainer.content;if(i==="svg"||i==="mathml"){const d=a.firstChild;for(;d.firstChild;)a.appendChild(d.firstChild);a.removeChild(d)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),Transition=(n,{slots:e})=>h$1(BaseTransition,resolveTransitionProps(n),e);Transition.displayName="Transition";const DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=Transition.props=extend$5({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),callHook=(n,e=[])=>{isArray$1(n)?n.forEach(t=>t(...e)):n&&n(...e)},hasExplicitCallback=n=>n?isArray$1(n)?n.some(e=>e.length>1):n.length>1:!1;function resolveTransitionProps(n){const e={};for(const U in n)U in DOMTransitionPropsValidators||(e[U]=n[U]);if(n.css===!1)return e;const{name:t="v",type:i,duration:r,enterFromClass:s=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:d=s,appearActiveClass:y=o,appearToClass:v=a,leaveFromClass:_=`${t}-leave-from`,leaveActiveClass:C=`${t}-leave-active`,leaveToClass:E=`${t}-leave-to`}=n,S=normalizeDuration(r),b=S&&S[0],P=S&&S[1],{onBeforeEnter:R,onEnter:x,onEnterCancelled:T,onLeave:L,onLeaveCancelled:k,onBeforeAppear:N=R,onAppear:G=x,onAppearCancelled:F=T}=e,z=(U,Y,$)=>{removeTransitionClass(U,Y?v:a),removeTransitionClass(U,Y?y:o),$&&$()},B=(U,Y)=>{U._isLeaving=!1,removeTransitionClass(U,_),removeTransitionClass(U,E),removeTransitionClass(U,C),Y&&Y()},D=U=>(Y,$)=>{const K=U?G:x,q=()=>z(Y,U,$);callHook(K,[Y,q]),nextFrame(()=>{removeTransitionClass(Y,U?d:s),addTransitionClass(Y,U?v:a),hasExplicitCallback(K)||whenTransitionEnds(Y,i,b,q)})};return extend$5(e,{onBeforeEnter(U){callHook(R,[U]),addTransitionClass(U,s),addTransitionClass(U,o)},onBeforeAppear(U){callHook(N,[U]),addTransitionClass(U,d),addTransitionClass(U,y)},onEnter:D(!1),onAppear:D(!0),onLeave(U,Y){U._isLeaving=!0;const $=()=>B(U,Y);addTransitionClass(U,_),addTransitionClass(U,C),forceReflow(),nextFrame(()=>{U._isLeaving&&(removeTransitionClass(U,_),addTransitionClass(U,E),hasExplicitCallback(L)||whenTransitionEnds(U,i,P,$))}),callHook(L,[U,$])},onEnterCancelled(U){z(U,!1),callHook(T,[U])},onAppearCancelled(U){z(U,!0),callHook(F,[U])},onLeaveCancelled(U){B(U),callHook(k,[U])}})}function normalizeDuration(n){if(n==null)return null;if(isObject$1(n))return[NumberOf(n.enter),NumberOf(n.leave)];{const e=NumberOf(n);return[e,e]}}function NumberOf(n){return toNumber(n)}function addTransitionClass(n,e){e.split(/\s+/).forEach(t=>t&&n.classList.add(t)),(n[vtcKey]||(n[vtcKey]=new Set)).add(e)}function removeTransitionClass(n,e){e.split(/\s+/).forEach(i=>i&&n.classList.remove(i));const t=n[vtcKey];t&&(t.delete(e),t.size||(n[vtcKey]=void 0))}function nextFrame(n){requestAnimationFrame(()=>{requestAnimationFrame(n)})}let endId=0;function whenTransitionEnds(n,e,t,i){const r=n._endId=++endId,s=()=>{r===n._endId&&i()};if(t)return setTimeout(s,t);const{type:o,timeout:a,propCount:d}=getTransitionInfo(n,e);if(!o)return i();const y=o+"end";let v=0;const _=()=>{n.removeEventListener(y,C),s()},C=E=>{E.target===n&&++v>=d&&_()};setTimeout(()=>{v(t[S]||"").split(", "),r=i(`${TRANSITION}Delay`),s=i(`${TRANSITION}Duration`),o=getTimeout(r,s),a=i(`${ANIMATION}Delay`),d=i(`${ANIMATION}Duration`),y=getTimeout(a,d);let v=null,_=0,C=0;e===TRANSITION?o>0&&(v=TRANSITION,_=o,C=s.length):e===ANIMATION?y>0&&(v=ANIMATION,_=y,C=d.length):(_=Math.max(o,y),v=_>0?o>y?TRANSITION:ANIMATION:null,C=v?v===TRANSITION?s.length:d.length:0);const E=v===TRANSITION&&/\b(transform|all)(,|$)/.test(i(`${TRANSITION}Property`).toString());return{type:v,timeout:_,propCount:C,hasTransform:E}}function getTimeout(n,e){for(;n.lengthtoMs(t)+toMs(n[i])))}function toMs(n){return n==="auto"?0:Number(n.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(n,e,t){const i=n[vtcKey];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),vShow={beforeMount(n,{value:e},{transition:t}){n[vShowOriginalDisplay]=n.style.display==="none"?"":n.style.display,t&&e?t.beforeEnter(n):setDisplay(n,e)},mounted(n,{value:e},{transition:t}){t&&e&&t.enter(n)},updated(n,{value:e,oldValue:t},{transition:i}){!e!=!t&&(i?e?(i.beforeEnter(n),setDisplay(n,!0),i.enter(n)):i.leave(n,()=>{setDisplay(n,!1)}):setDisplay(n,e))},beforeUnmount(n,{value:e}){setDisplay(n,e)}};function setDisplay(n,e){n.style.display=e?n[vShowOriginalDisplay]:"none",n[vShowHidden]=!e}function initVShowForSSR(){vShow.getSSRProps=({value:n})=>{if(!n)return{style:{display:"none"}}}}const CSS_VAR_TEXT=Symbol("");function useCssVars(n){const e=getCurrentInstance();if(!e)return;const t=e.ut=(r=n(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(s=>setVarsOnNode(s,r))},i=()=>{const r=n(e.proxy);setVarsOnVNode(e.subTree,r),t(r)};onMounted(()=>{watchPostEffect(i);const r=new MutationObserver(i);r.observe(e.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>r.disconnect())})}function setVarsOnVNode(n,e){if(n.shapeFlag&128){const t=n.suspense;n=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{setVarsOnVNode(t.activeBranch,e)})}for(;n.component;)n=n.component.subTree;if(n.shapeFlag&1&&n.el)setVarsOnNode(n.el,e);else if(n.type===Fragment)n.children.forEach(t=>setVarsOnVNode(t,e));else if(n.type===Static){let{el:t,anchor:i}=n;for(;t&&(setVarsOnNode(t,e),t!==i);)t=t.nextSibling}}function setVarsOnNode(n,e){if(n.nodeType===1){const t=n.style;let i="";for(const r in e)t.setProperty(`--${r}`,e[r]),i+=`--${r}: ${e[r]};`;t[CSS_VAR_TEXT]=i}}const displayRE=/(^|;)\s*display\s*:/;function patchStyle(n,e,t){const i=n.style,r=isString(t);let s=!1;if(t&&!r){if(e)if(isString(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&setStyle(i,a,"")}else for(const o in e)t[o]==null&&setStyle(i,o,"");for(const o in t)o==="display"&&(s=!0),setStyle(i,o,t[o])}else if(r){if(e!==t){const o=i[CSS_VAR_TEXT];o&&(t+=";"+o),i.cssText=t,s=displayRE.test(t)}}else e&&n.removeAttribute("style");vShowOriginalDisplay in n&&(n[vShowOriginalDisplay]=s?i.display:"",n[vShowHidden]&&(i.display="none"))}const importantRE=/\s*!important$/;function setStyle(n,e,t){if(isArray$1(t))t.forEach(i=>setStyle(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=autoPrefix(n,e);importantRE.test(t)?n.setProperty(hyphenate(i),t.replace(importantRE,""),"important"):n[i]=t}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(n,e){const t=prefixCache[e];if(t)return t;let i=camelize(e);if(i!=="filter"&&i in n)return prefixCache[e]=i;i=capitalize(i);for(let r=0;rcachedNow||(p$1.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(i,t.value),e,5,[i])};return t.value=n,t.attached=getNow(),t}function patchStopImmediatePropagation(n,e){if(isArray$1(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const isNativeOn=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,patchProp=(n,e,t,i,r,s,o,a,d)=>{const y=r==="svg";e==="class"?patchClass(n,i,y):e==="style"?patchStyle(n,t,i):isOn(e)?isModelListener(e)||patchEvent(n,e,t,i,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):shouldSetAsProp(n,e,i,y))?(patchDOMProp(n,e,i,s,o,a,d),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&patchAttr(n,e,i,y,o,e!=="value")):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),patchAttr(n,e,i,y))};function shouldSetAsProp(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&isNativeOn(e)&&isFunction$1(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=n.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return isNativeOn(e)&&isString(t)?!1:e in n}/*! #__NO_SIDE_EFFECTS__ */function defineCustomElement(n,e,t){const i=defineComponent(n,e);class r extends VueElement{constructor(o){super(i,o,t)}}return r.def=i,r}/*! #__NO_SIDE_EFFECTS__ */const defineSSRCustomElement=(n,e)=>defineCustomElement(n,e,hydrate),BaseClass=typeof HTMLElement<"u"?HTMLElement:class{};class VueElement extends BaseClass{constructor(e,t={},i){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&i?i(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),render$1(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let i=0;i{for(const r of i)this._setAttr(r.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(i,r=!1)=>{const{props:s,styles:o}=i;let a;if(s&&!isArray$1(s))for(const d in s){const y=s[d];(y===Number||y&&y.type===Number)&&(d in this._props&&(this._props[d]=toNumber(this._props[d])),(a||(a=Object.create(null)))[camelize(d)]=!0)}this._numberProps=a,r&&this._resolveProps(i),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then(i=>e(i,!0)):e(this._def)}_resolveProps(e){const{props:t}=e,i=isArray$1(t)?t:Object.keys(t||{});for(const r of Object.keys(this))r[0]!=="_"&&i.includes(r)&&this._setProp(r,this[r],!0,!1);for(const r of i.map(camelize))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(s){this._setProp(r,s)}})}_setAttr(e){let t=this.hasAttribute(e)?this.getAttribute(e):void 0;const i=camelize(e);this._numberProps&&this._numberProps[i]&&(t=toNumber(t)),this._setProp(i,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,i=!0,r=!0){t!==this._props[e]&&(this._props[e]=t,r&&this._instance&&this._update(),i&&(t===!0?this.setAttribute(hyphenate(e),""):typeof t=="string"||typeof t=="number"?this.setAttribute(hyphenate(e),t+""):t||this.removeAttribute(hyphenate(e))))}_update(){render$1(this._createVNode(),this.shadowRoot)}_createVNode(){const e=createVNode(this._def,extend$5({},this._props));return this._instance||(e.ce=t=>{this._instance=t,t.isCE=!0;const i=(s,o)=>{this.dispatchEvent(new CustomEvent(s,{detail:o}))};t.emit=(s,...o)=>{i(s,o),hyphenate(s)!==s&&i(hyphenate(s),o)};let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof VueElement){t.parent=r._instance,t.provides=r._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach(t=>{const i=document.createElement("style");i.textContent=t,this.shadowRoot.appendChild(i)})}}function useCssModule(n="$style"){{const e=getCurrentInstance();if(!e)return EMPTY_OBJ;const t=e.type.__cssModules;if(!t)return EMPTY_OBJ;const i=t[n];return i||EMPTY_OBJ}}const positionMap=new WeakMap,newPositionMap=new WeakMap,moveCbKey=Symbol("_moveCb"),enterCbKey=Symbol("_enterCb"),TransitionGroupImpl={name:"TransitionGroup",props:extend$5({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(n,{slots:e}){const t=getCurrentInstance(),i=useTransitionState();let r,s;return onUpdated(()=>{if(!r.length)return;const o=n.moveClass||`${n.name||"v"}-move`;if(!hasCSSTransform(r[0].el,t.vnode.el,o))return;r.forEach(callPendingCbs),r.forEach(recordPosition);const a=r.filter(applyTranslation);forceReflow(),a.forEach(d=>{const y=d.el,v=y.style;addTransitionClass(y,o),v.transform=v.webkitTransform=v.transitionDuration="";const _=y[moveCbKey]=C=>{C&&C.target!==y||(!C||/transform$/.test(C.propertyName))&&(y.removeEventListener("transitionend",_),y[moveCbKey]=null,removeTransitionClass(y,o))};y.addEventListener("transitionend",_)})}),()=>{const o=toRaw(n),a=resolveTransitionProps(o);let d=o.tag||Fragment;if(r=[],s)for(let y=0;ydelete n.mode;TransitionGroupImpl.props;const TransitionGroup=TransitionGroupImpl;function callPendingCbs(n){const e=n.el;e[moveCbKey]&&e[moveCbKey](),e[enterCbKey]&&e[enterCbKey]()}function recordPosition(n){newPositionMap.set(n,n.el.getBoundingClientRect())}function applyTranslation(n){const e=positionMap.get(n),t=newPositionMap.get(n),i=e.left-t.left,r=e.top-t.top;if(i||r){const s=n.el.style;return s.transform=s.webkitTransform=`translate(${i}px,${r}px)`,s.transitionDuration="0s",n}}function hasCSSTransform(n,e,t){const i=n.cloneNode(),r=n[vtcKey];r&&r.forEach(a=>{a.split(/\s+/).forEach(d=>d&&i.classList.remove(d))}),t.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const s=e.nodeType===1?e:e.parentNode;s.appendChild(i);const{hasTransform:o}=getTransitionInfo(i);return s.removeChild(i),o}const getModelAssigner=n=>{const e=n.props["onUpdate:modelValue"]||!1;return isArray$1(e)?t=>invokeArrayFns(e,t):e};function onCompositionStart(n){n.target.composing=!0}function onCompositionEnd(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const assignKey=Symbol("_assign"),vModelText={created(n,{modifiers:{lazy:e,trim:t,number:i}},r){n[assignKey]=getModelAssigner(r);const s=i||r.props&&r.props.type==="number";addEventListener(n,e?"change":"input",o=>{if(o.target.composing)return;let a=n.value;t&&(a=a.trim()),s&&(a=looseToNumber(a)),n[assignKey](a)}),t&&addEventListener(n,"change",()=>{n.value=n.value.trim()}),e||(addEventListener(n,"compositionstart",onCompositionStart),addEventListener(n,"compositionend",onCompositionEnd),addEventListener(n,"change",onCompositionEnd))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:r,number:s}},o){if(n[assignKey]=getModelAssigner(o),n.composing)return;const a=(s||n.type==="number")&&!/^0\d/.test(n.value)?looseToNumber(n.value):n.value,d=e??"";a!==d&&(document.activeElement===n&&n.type!=="range"&&(i&&e===t||r&&n.value.trim()===d)||(n.value=d))}},vModelCheckbox={deep:!0,created(n,e,t){n[assignKey]=getModelAssigner(t),addEventListener(n,"change",()=>{const i=n._modelValue,r=getValue$1(n),s=n.checked,o=n[assignKey];if(isArray$1(i)){const a=looseIndexOf(i,r),d=a!==-1;if(s&&!d)o(i.concat(r));else if(!s&&d){const y=[...i];y.splice(a,1),o(y)}}else if(isSet(i)){const a=new Set(i);s?a.add(r):a.delete(r),o(a)}else o(getCheckboxValue(n,s))})},mounted:setChecked,beforeUpdate(n,e,t){n[assignKey]=getModelAssigner(t),setChecked(n,e,t)}};function setChecked(n,{value:e,oldValue:t},i){n._modelValue=e,isArray$1(e)?n.checked=looseIndexOf(e,i.props.value)>-1:isSet(e)?n.checked=e.has(i.props.value):e!==t&&(n.checked=looseEqual(e,getCheckboxValue(n,!0)))}const vModelRadio={created(n,{value:e},t){n.checked=looseEqual(e,t.props.value),n[assignKey]=getModelAssigner(t),addEventListener(n,"change",()=>{n[assignKey](getValue$1(n))})},beforeUpdate(n,{value:e,oldValue:t},i){n[assignKey]=getModelAssigner(i),e!==t&&(n.checked=looseEqual(e,i.props.value))}},vModelSelect={deep:!0,created(n,{value:e,modifiers:{number:t}},i){const r=isSet(e);addEventListener(n,"change",()=>{const s=Array.prototype.filter.call(n.options,o=>o.selected).map(o=>t?looseToNumber(getValue$1(o)):getValue$1(o));n[assignKey](n.multiple?r?new Set(s):s:s[0]),n._assigning=!0,nextTick(()=>{n._assigning=!1})}),n[assignKey]=getModelAssigner(i)},mounted(n,{value:e,modifiers:{number:t}}){setSelected(n,e)},beforeUpdate(n,e,t){n[assignKey]=getModelAssigner(t)},updated(n,{value:e,modifiers:{number:t}}){n._assigning||setSelected(n,e)}};function setSelected(n,e,t){const i=n.multiple,r=isArray$1(e);if(!(i&&!r&&!isSet(e))){for(let s=0,o=n.options.length;sString(v)===String(d)):a.selected=looseIndexOf(e,d)>-1}else a.selected=e.has(d);else if(looseEqual(getValue$1(a),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!i&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function getValue$1(n){return"_value"in n?n._value:n.value}function getCheckboxValue(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const vModelDynamic={created(n,e,t){callModelHook(n,e,t,null,"created")},mounted(n,e,t){callModelHook(n,e,t,null,"mounted")},beforeUpdate(n,e,t,i){callModelHook(n,e,t,i,"beforeUpdate")},updated(n,e,t,i){callModelHook(n,e,t,i,"updated")}};function resolveDynamicModel(n,e){switch(n){case"SELECT":return vModelSelect;case"TEXTAREA":return vModelText;default:switch(e){case"checkbox":return vModelCheckbox;case"radio":return vModelRadio;default:return vModelText}}}function callModelHook(n,e,t,i,r){const o=resolveDynamicModel(n.tagName,t.props&&t.props.type)[r];o&&o(n,e,t,i)}function initVModelForSSR(){vModelText.getSSRProps=({value:n})=>({value:n}),vModelRadio.getSSRProps=({value:n},e)=>{if(e.props&&looseEqual(e.props.value,n))return{checked:!0}},vModelCheckbox.getSSRProps=({value:n},e)=>{if(isArray$1(n)){if(e.props&&looseIndexOf(n,e.props.value)>-1)return{checked:!0}}else if(isSet(n)){if(e.props&&n.has(e.props.value))return{checked:!0}}else if(n)return{checked:!0}},vModelDynamic.getSSRProps=(n,e)=>{if(typeof e.type!="string")return;const t=resolveDynamicModel(e.type.toUpperCase(),e.props&&e.props.type);if(t.getSSRProps)return t.getSSRProps(n,e)}}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>systemModifiers.some(t=>n[`${t}Key`]&&!e.includes(t))},withModifiers=(n,e)=>{const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=(r,...s)=>{for(let o=0;o{const t=n._withKeys||(n._withKeys={}),i=e.join(".");return t[i]||(t[i]=r=>{if(!("key"in r))return;const s=hyphenate(r.key);if(e.some(o=>o===s||keyNames[o]===s))return n(r)})},rendererOptions=extend$5({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const render$1=(...n)=>{ensureRenderer().render(...n)},hydrate=(...n)=>{ensureHydrationRenderer().hydrate(...n)},createApp=(...n)=>{const e=ensureRenderer().createApp(...n),{mount:t}=e;return e.mount=i=>{const r=normalizeContainer(i);if(!r)return;const s=e._component;!isFunction$1(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.innerHTML="";const o=t(r,!1,resolveRootNamespace(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e},createSSRApp=(...n)=>{const e=ensureHydrationRenderer().createApp(...n),{mount:t}=e;return e.mount=i=>{const r=normalizeContainer(i);if(r)return t(r,!0,resolveRootNamespace(r))},e};function resolveRootNamespace(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function normalizeContainer(n){return isString(n)?document.querySelector(n):n}let ssrDirectiveInitialized=!1;const initDirectivesForSSR=()=>{ssrDirectiveInitialized||(ssrDirectiveInitialized=!0,initVModelForSSR(),initVShowForSSR())};/** +* vue v3.4.31 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const compile=()=>{},vue_runtime_esmBundler=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition,BaseTransitionPropsValidators,Comment,DeprecationTypes,EffectScope,ErrorCodes,ErrorTypeStrings,Fragment,KeepAlive,ReactiveEffect,Static,Suspense,Teleport,Text:Text$1,TrackOpTypes,Transition,TransitionGroup,TriggerOpTypes,VueElement,assertNumber,callWithAsyncErrorHandling,callWithErrorHandling,camelize,capitalize,cloneVNode,compatUtils,compile,computed,createApp,createBlock,createCommentVNode,createElementBlock,createElementVNode:createBaseVNode,createHydrationRenderer,createPropsRestProxy,createRenderer,createSSRApp,createSlots,createStaticVNode,createTextVNode,createVNode,customRef,defineAsyncComponent,defineComponent,defineCustomElement,defineEmits,defineExpose,defineModel,defineOptions,defineProps,defineSSRCustomElement,defineSlots,devtools,effect,effectScope,getCurrentInstance,getCurrentScope,getTransitionRawChildren,guardReactiveProps,h:h$1,handleError,hasInjectionContext,hydrate,initCustomFormatter,initDirectivesForSSR,inject,isMemoSame,isProxy,isReactive,isReadonly,isRef,isRuntimeOnly,isShallow,isVNode,markRaw,mergeDefaults,mergeModels,mergeProps,nextTick,normalizeClass,normalizeProps,normalizeStyle,onActivated,onBeforeMount,onBeforeUnmount,onBeforeUpdate,onDeactivated,onErrorCaptured,onMounted,onRenderTracked,onRenderTriggered,onScopeDispose,onServerPrefetch,onUnmounted,onUpdated,openBlock,popScopeId,provide,proxyRefs,pushScopeId,queuePostFlushCb,reactive,readonly,ref,registerRuntimeCompiler,render:render$1,renderList,renderSlot,resolveComponent,resolveDirective,resolveDynamicComponent,resolveFilter,resolveTransitionHooks,setBlockTracking,setDevtoolsHook,setTransitionHooks,shallowReactive,shallowReadonly,shallowRef,ssrContextKey,ssrUtils,stop,toDisplayString,toHandlerKey,toHandlers,toRaw,toRef,toRefs,toValue:toValue$1,transformVNodeArgs,triggerRef,unref,useAttrs,useCssModule,useCssVars,useModel,useSSRContext,useSlots,useTransitionState,vModelCheckbox,vModelDynamic,vModelRadio,vModelSelect,vModelText,vShow,version:version$3,warn:warn$2,watch,watchEffect,watchPostEffect,watchSyncEffect,withAsyncContext,withCtx,withDefaults,withDirectives,withKeys,withMemo,withModifiers,withScopeId},Symbol.toStringTag,{value:"Module"}));var isVue2=!1;/*! + * pinia v2.1.7 + * (c) 2023 Eduardo San Martin Morote + * @license MIT + */let activePinia;const setActivePinia=n=>activePinia=n,piniaSymbol=Symbol();function isPlainObject(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var MutationType;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(MutationType||(MutationType={}));function createPinia(){const n=effectScope(!0),e=n.run(()=>ref({}));let t=[],i=[];const r=markRaw({install(s){setActivePinia(r),r._a=s,s.provide(piniaSymbol,r),s.config.globalProperties.$pinia=r,i.forEach(o=>t.push(o)),i=[]},use(s){return!this._a&&!isVue2?i.push(s):t.push(s),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return r}const noop$2=()=>{};function addSubscription(n,e,t,i=noop$2){n.push(e);const r=()=>{const s=n.indexOf(e);s>-1&&(n.splice(s,1),i())};return!t&&getCurrentScope()&&onScopeDispose(r),r}function triggerSubscriptions(n,...e){n.slice().forEach(t=>{t(...e)})}const fallbackRunWithContext=n=>n();function mergeReactiveObjects(n,e){n instanceof Map&&e instanceof Map&&e.forEach((t,i)=>n.set(i,t)),n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],r=n[t];isPlainObject(r)&&isPlainObject(i)&&n.hasOwnProperty(t)&&!isRef(i)&&!isReactive(i)?n[t]=mergeReactiveObjects(r,i):n[t]=i}return n}const skipHydrateSymbol=Symbol();function shouldHydrate(n){return!isPlainObject(n)||!n.hasOwnProperty(skipHydrateSymbol)}const{assign:assign$1}=Object;function isComputed(n){return!!(isRef(n)&&n.effect)}function createOptionsStore(n,e,t,i){const{state:r,actions:s,getters:o}=e,a=t.state.value[n];let d;function y(){a||(t.state.value[n]=r?r():{});const v=toRefs(t.state.value[n]);return assign$1(v,s,Object.keys(o||{}).reduce((_,C)=>(_[C]=markRaw(computed(()=>{setActivePinia(t);const E=t._s.get(n);return o[C].call(E,E)})),_),{}))}return d=createSetupStore(n,y,e,t,i,!0),d}function createSetupStore(n,e,t={},i,r,s){let o;const a=assign$1({actions:{}},t),d={deep:!0};let y,v,_=[],C=[],E;const S=i.state.value[n];!s&&!S&&(i.state.value[n]={}),ref({});let b;function P(F){let z;y=v=!1,typeof F=="function"?(F(i.state.value[n]),z={type:MutationType.patchFunction,storeId:n,events:E}):(mergeReactiveObjects(i.state.value[n],F),z={type:MutationType.patchObject,payload:F,storeId:n,events:E});const B=b=Symbol();nextTick().then(()=>{b===B&&(y=!0)}),v=!0,triggerSubscriptions(_,z,i.state.value[n])}const R=s?function(){const{state:z}=t,B=z?z():{};this.$patch(D=>{assign$1(D,B)})}:noop$2;function x(){o.stop(),_=[],C=[],i._s.delete(n)}function T(F,z){return function(){setActivePinia(i);const B=Array.from(arguments),D=[],U=[];function Y(q){D.push(q)}function $(q){U.push(q)}triggerSubscriptions(C,{args:B,name:F,store:k,after:Y,onError:$});let K;try{K=z.apply(this&&this.$id===n?this:k,B)}catch(q){throw triggerSubscriptions(U,q),q}return K instanceof Promise?K.then(q=>(triggerSubscriptions(D,q),q)).catch(q=>(triggerSubscriptions(U,q),Promise.reject(q))):(triggerSubscriptions(D,K),K)}}const L={_p:i,$id:n,$onAction:addSubscription.bind(null,C),$patch:P,$reset:R,$subscribe(F,z={}){const B=addSubscription(_,F,z.detached,()=>D()),D=o.run(()=>watch(()=>i.state.value[n],U=>{(z.flush==="sync"?v:y)&&F({storeId:n,type:MutationType.direct,events:E},U)},assign$1({},d,z)));return B},$dispose:x},k=reactive(L);i._s.set(n,k);const G=(i._a&&i._a.runWithContext||fallbackRunWithContext)(()=>i._e.run(()=>(o=effectScope()).run(e)));for(const F in G){const z=G[F];if(isRef(z)&&!isComputed(z)||isReactive(z))s||(S&&shouldHydrate(z)&&(isRef(z)?z.value=S[F]:mergeReactiveObjects(z,S[F])),i.state.value[n][F]=z);else if(typeof z=="function"){const B=T(F,z);G[F]=B,a.actions[F]=z}}return assign$1(k,G),assign$1(toRaw(k),G),Object.defineProperty(k,"$state",{get:()=>i.state.value[n],set:F=>{P(z=>{assign$1(z,F)})}}),i._p.forEach(F=>{assign$1(k,o.run(()=>F({store:k,app:i._a,pinia:i,options:a})))}),S&&s&&t.hydrate&&t.hydrate(k.$state,S),y=!0,v=!0,k}function defineStore(n,e,t){let i,r;const s=typeof e=="function";typeof n=="string"?(i=n,r=s?t:e):(r=n,i=n.id);function o(a,d){const y=hasInjectionContext();return a=a||(y?inject(piniaSymbol,null):null),a&&setActivePinia(a),a=activePinia,a._s.has(i)||(s?createSetupStore(i,e,r,a):createOptionsStore(i,r,a)),a._s.get(i)}return o.$id=i,o}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function getAugmentedNamespace(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var dist={},logger$C={};const require$$0=getAugmentedNamespace(vue_runtime_esmBundler);Object.defineProperty(logger$C,"__esModule",{value:!0});logger$C.useLogger=logger$C.createLogger=logger$C.VueLogger=void 0;const vue_1=require$$0,isProduction=!0,loggerSymbol=Symbol("vue-logger-plugin"),levels=["debug","info","warn","error","log"],defaultOptions={enabled:!0,consoleEnabled:!0,level:"debug",callerInfo:!1,prefixFormat:({level:n,caller:e})=>e?`[${n.toUpperCase()}] [${e==null?void 0:e.fileName}:${e==null?void 0:e.functionName}:${e==null?void 0:e.lineNumber}]`:`[${n.toUpperCase()}]`};class VueLogger{constructor(e){this.apply(e),this._consoleFunctions=levels.filter(t=>typeof console[t]=="function")}apply(e){const t=this._options||defaultOptions;this._options={...t,...e},this.installHooks(this._options.beforeHooks),this.installHooks(this._options.afterHooks)}debug(...e){this.invoke("debug",...e).then(()=>{}).catch(()=>{})}info(...e){this.invoke("info",...e).then(()=>{}).catch(()=>{})}warn(...e){this.invoke("warn",...e).then(()=>{}).catch(()=>{})}error(...e){this.invoke("error",...e).then(()=>{}).catch(()=>{})}log(...e){this.invoke("log",...e).then(()=>{}).catch(()=>{})}async invoke(e,...t){if(this._options.enabled&&levels.indexOf(e)>=levels.indexOf(this._options.level)){const i=this._options.callerInfo?this.getCallerInfo():void 0,r={level:e,caller:i,argumentArray:t};if(await this.invokeHooks(this._options.beforeHooks,r),this._options.consoleEnabled){const s=this._options.prefixFormat({level:e,caller:i});this._consoleFunctions.indexOf(e)>=0?console[e](s,...t):console.log(s,...t)}await this.invokeHooks(this._options.afterHooks,r)}}installHooks(e){if(e&&e.length>0){for(const t of e)if(t.install)try{t.install(this._options)}catch(i){console.warn("LoggerHook install failure",i)}}}async invokeHooks(e,t){if(e&&e.length>0)for(const i of e)try{await i.run(t)}catch(r){console.warn("LoggerHook run failure",r)}}getCallerInfo(){const e=new Error;if(e.stack)try{const i=e.stack.split(` +`)[0].startsWith("Error")?4:3,r=e.stack.split(` +`)[i].trim().replace("(","").replace(")","");let s;r.indexOf("at ")>-1?s=r.substring(r.indexOf("at ")+3,r.lastIndexOf(" ")).split(".").reverse()[0]:r.indexOf("@")>-1&&(s=r.substring(0,r.indexOf("@")));const o=r.split(":").reverse(),a=o[2].substring(Math.max(o[2].lastIndexOf("/"),o[2].lastIndexOf("\\"))+1).split("?")[0],d=o[1];return{functionName:s,fileName:a,lineNumber:d}}catch{}}get enabled(){return this._options.enabled}get level(){return this._options.level}install(e){e.provide(loggerSymbol,this),e.config.globalProperties.$log=this,e.config.globalProperties.$logger=this}}logger$C.VueLogger=VueLogger;function createLogger(n={}){return new VueLogger(n)}logger$C.createLogger=createLogger;function useLogger(){const n=vue_1.inject(loggerSymbol);return!n&&!isProduction&&console.warn("vue-logger-plugin :: useLogger missing inject"),n}logger$C.useLogger=useLogger;var hooks={};Object.defineProperty(hooks,"__esModule",{value:!0});hooks.StringifyAndParseObjectsHook=hooks.StringifyObjectsHook=void 0;hooks.StringifyObjectsHook={run(n){for(let e=0;e":">",'"':""","'":"'","&":"&"};let h=0;var f=n=>n.replace(/[<>"&]/g,e=>l[e]||e),p=n=>n+h++;const u={},m=n=>{const{name:e,paths:t=[],d:i,polygons:r=[],points:s}=n;i&&t.push({d:i}),s&&r.push({points:s}),u[e]=Object.assign({},n,{paths:t,polygons:r}),u[e].minX||(u[e].minX=0),u[e].minY||(u[e].minY=0)},c=(...n)=>{for(const e of n)m(e)},g=defineComponent({name:"OhVueIcon",props:{name:{type:String,validator:n=>!n||n in u||(console.warn(`Invalid prop: prop "name" is referring to an unregistered icon "${n}". +Please make sure you have imported this icon before using it.`),!1)},title:String,fill:String,scale:{type:[Number,String],default:1},animation:{validator:n=>["spin","spin-pulse","wrench","ring","pulse","flash","float"].includes(n)},hover:Boolean,flip:{validator:n=>["horizontal","vertical","both"].includes(n)},speed:{validator:n=>n==="fast"||n==="slow"},label:String,inverse:Boolean},setup(n){const e=ref([]),t=reactive({outerScale:1.2,x:null,y:null}),i=reactive({width:0,height:0}),r=computed(()=>{const b=Number(n.scale);return isNaN(b)||b<=0?(console.warn('Invalid prop: prop "scale" should be a number over 0.'),t.outerScale):b*t.outerScale}),s=computed(()=>({"ov-icon":!0,"ov-inverse":n.inverse,"ov-flip-horizontal":n.flip==="horizontal","ov-flip-vertical":n.flip==="vertical","ov-flip-both":n.flip==="both","ov-spin":n.animation==="spin","ov-spin-pulse":n.animation==="spin-pulse","ov-wrench":n.animation==="wrench","ov-ring":n.animation==="ring","ov-pulse":n.animation==="pulse","ov-flash":n.animation==="flash","ov-float":n.animation==="float","ov-hover":n.hover,"ov-fast":n.speed==="fast","ov-slow":n.speed==="slow"})),o=computed(()=>n.name?u[n.name]:null),a=computed(()=>o.value?`${o.value.minX} ${o.value.minY} ${o.value.width} ${o.value.height}`:`0 0 ${y.value} ${v.value}`),d=computed(()=>{if(!o.value)return 1;const{width:b,height:P}=o.value;return Math.max(b,P)/16}),y=computed(()=>i.width||o.value&&o.value.width/d.value*r.value||0),v=computed(()=>i.height||o.value&&o.value.height/d.value*r.value||0),_=computed(()=>r.value!==1&&{fontSize:r.value+"em"}),C=computed(()=>{if(!o.value||!o.value.raw)return null;const b={};let P=o.value.raw;return P=P.replace(/\s(?:xml:)?id=(["']?)([^"')\s]+)\1/g,(R,x,T)=>{const L=p("vat-");return b[T]=L,` id="${L}"`}),P=P.replace(/#(?:([^'")\s]+)|xpointer\(id\((['"]?)([^')]+)\2\)\))/g,(R,x,T,L)=>{const k=x||L;return k&&b[k]?`#${b[k]}`:R}),P}),E=computed(()=>o.value&&o.value.attr?o.value.attr:{}),S=()=>{if(!n.name&&n.name!==null&&e.value.length===0)return void console.warn('Invalid prop: prop "name" is required.');if(o.value)return;let b=0,P=0;e.value.forEach(R=>{R.outerScale=r.value,b=Math.max(b,R.width),P=Math.max(P,R.height)}),i.width=b,i.height=P,e.value.forEach(R=>{R.x=(b-R.width)/2,R.y=(P-R.height)/2})};return onMounted(()=>{S()}),onUpdated(()=>{S()}),{...toRefs(t),children:e,icon:o,klass:s,style:_,width:y,height:v,box:a,attribs:E,raw:C}},created(){const n=this.$parent;n&&n.children&&n.children.push(this)},render(){const n=Object.assign({role:this.$attrs.role||(this.label||this.title?"img":null),"aria-label":this.label||null,"aria-hidden":!(this.label||this.title),width:this.width,height:this.height,viewBox:this.box},this.attribs);this.attribs.stroke?n.stroke=this.fill?this.fill:"currentColor":n.fill=this.fill?this.fill:"currentColor",this.x&&(n.x=this.x.toString()),this.y&&(n.y=this.y.toString());let e={class:this.klass,style:this.style};if(e=Object.assign(e,n),this.raw){const r=this.title?`${f(this.title)}${this.raw}`:this.raw;e.innerHTML=r}const t=this.title?[h$1("title",this.title)]:[],i=(r,s,o)=>h$1(r,{...s,key:`${r}-${o}`});return h$1("svg",e,this.raw?void 0:t.concat([this.$slots.default?this.$slots.default():this.icon?[...this.icon.paths.map((r,s)=>i("path",r,s)),...this.icon.polygons.map((r,s)=>i("polygon",r,s))]:[]]))}});function w(n,e){e===void 0&&(e={});var t=e.insertAt;if(n&&typeof document<"u"){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}}w(`.ov-icon { + display: inline-block; + overflow: visible; + vertical-align: -0.2em; +} +`);w(`/* ---------------- spin ---------------- */ +.ov-spin:not(.ov-hover), +.ov-spin.ov-hover:hover, +.ov-parent.ov-hover:hover > .ov-spin { + animation: ov-spin 1s linear infinite; +} + +.ov-spin:not(.ov-hover).ov-fast, +.ov-spin.ov-hover.ov-fast:hover, +.ov-parent.ov-hover:hover > .ov-spin.ov-fast { + animation: ov-spin 0.7s linear infinite; +} + +.ov-spin:not(.ov-hover).ov-slow, +.ov-spin.ov-hover.ov-slow:hover, +.ov-parent.ov-hover:hover > .ov-spin.ov-slow { + animation: ov-spin 2s linear infinite; +} + +/* ---------------- spin-pulse ---------------- */ + +.ov-spin-pulse:not(.ov-hover), +.ov-spin-pulse.ov-hover:hover, +.ov-parent.ov-hover:hover > .ov-spin-pulse { + animation: ov-spin 1s infinite steps(8); +} + +.ov-spin-pulse:not(.ov-hover).ov-fast, +.ov-spin-pulse.ov-hover.ov-fast:hover, +.ov-parent.ov-hover:hover > .ov-spin-pulse.ov-fast { + animation: ov-spin 0.7s infinite steps(8); +} + +.ov-spin-pulse:not(.ov-hover).ov-slow, +.ov-spin-pulse.ov-hover.ov-slow:hover, +.ov-parent.ov-hover:hover > .ov-spin-pulse.ov-slow { + animation: ov-spin 2s infinite steps(8); +} + +@keyframes ov-spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +/* ---------------- wrench ---------------- */ +.ov-wrench:not(.ov-hover), +.ov-wrench.ov-hover:hover, +.ov-parent.ov-hover:hover > .ov-wrench { + animation: ov-wrench 2.5s ease infinite; +} + +.ov-wrench:not(.ov-hover).ov-fast, +.ov-wrench.ov-hover.ov-fast:hover, +.ov-parent.ov-hover:hover > .ov-wrench.ov-fast { + animation: ov-wrench 1.2s ease infinite; +} + +.ov-wrench:not(.ov-hover).ov-slow, +.ov-wrench.ov-hover.ov-slow:hover, +.ov-parent.ov-hover:hover > .ov-wrench.ov-slow { + animation: ov-wrench 3.7s ease infinite; +} + +@keyframes ov-wrench { + 0% { + transform: rotate(-12deg); + } + + 8% { + transform: rotate(12deg); + } + + 10%, 28%, 30%, 48%, 50%, 68% { + transform: rotate(24deg); + } + + 18%, 20%, 38%, 40%, 58%, 60% { + transform: rotate(-24deg); + } + + 75%, 100% { + transform: rotate(0deg); + } +} + +/* ---------------- ring ---------------- */ +.ov-ring:not(.ov-hover), +.ov-ring.ov-hover:hover, +.ov-parent.ov-hover:hover > .ov-ring { + animation: ov-ring 2s ease infinite; +} + +.ov-ring:not(.ov-hover).ov-fast, +.ov-ring.ov-hover.ov-fast:hover, +.ov-parent.ov-hover:hover > .ov-ring.ov-fast { + animation: ov-ring 1s ease infinite; +} + +.ov-ring:not(.ov-hover).ov-slow, +.ov-ring.ov-hover.ov-slow:hover, +.ov-parent.ov-hover:hover > .ov-ring.ov-slow { + animation: ov-ring 3s ease infinite; +} + +@keyframes ov-ring { + 0% { + transform: rotate(-15deg); + } + + 2% { + transform: rotate(15deg); + } + + 4%, 12% { + transform: rotate(-18deg); + } + + 6% { + transform: rotate(18deg); + } + + 8% { + transform: rotate(-22deg); + } + + 10% { + transform: rotate(22deg); + } + + 12% { + transform: rotate(-18deg); + } + + 14% { + transform: rotate(18deg); + } + + 16% { + transform: rotate(-12deg); + } + + 18% { + transform: rotate(12deg); + } + + 20%, 100% { + transform: rotate(0deg); + } +} + +/* ---------------- pulse ---------------- */ +.ov-pulse:not(.ov-hover), +.ov-pulse.ov-hover:hover, +.ov-parent.ov-hover:hover > .ov-pulse { + animation: ov-pulse 2s linear infinite; +} + +.ov-pulse:not(.ov-hover).ov-fast, +.ov-pulse.ov-hover.ov-fast:hover, +.ov-parent.ov-hover:hover > .ov-pulse.ov-fast { + animation: ov-pulse 1s linear infinite; +} + +.ov-pulse:not(.ov-hover).ov-slow, +.ov-pulse.ov-hover.ov-slow:hover, +.ov-parent.ov-hover:hover > .ov-pulse.ov-slow { + animation: ov-pulse 3s linear infinite; +} + +@keyframes ov-pulse { + 0% { + transform: scale(1.1); + } + + 50% { + transform: scale(0.8); + } + + 100% { + transform: scale(1.1); + } +} + +/* ---------------- flash ---------------- */ +.ov-flash:not(.ov-hover), +.ov-flash.ov-hover:hover, +.ov-parent.ov-hover:hover > .ov-flash { + animation: ov-flash 2s ease infinite; +} + +.ov-flash:not(.ov-hover).ov-fast, +.ov-flash.ov-hover.ov-fast:hover, +.ov-parent.ov-hover:hover > .ov-flash.ov-fast { + animation: ov-flash 1s ease infinite; +} + +.ov-flash:not(.ov-hover).ov-slow, +.ov-flash.ov-hover.ov-slow:hover, +.ov-parent.ov-hover:hover > .ov-flash.ov-slow { + animation: ov-flash 3s ease infinite; +} + +@keyframes ov-flash { + 0%, 100%, 50%{ + opacity: 1; + } + 25%, 75%{ + opacity: 0; + } +} + +/* ---------------- float ---------------- */ +.ov-float:not(.ov-hover), +.ov-float.ov-hover:hover, +.ov-parent.ov-hover:hover > .ov-float { + animation: ov-float 2s linear infinite; +} + +.ov-float:not(.ov-hover).ov-fast, +.ov-float.ov-hover.ov-fast:hover, +.ov-parent.ov-hover:hover > .ov-float.ov-fast { + animation: ov-float 1s linear infinite; +} + +.ov-float:not(.ov-hover).ov-slow, +.ov-float.ov-hover.ov-slow:hover, +.ov-parent.ov-hover:hover > .ov-float.ov-slow { + animation: ov-float 3s linear infinite; +} + +@keyframes ov-float { + 0%, 100% { + transform: translateY(-3px); + } + 50% { + transform: translateY(3px); + } +} +`);w(`.ov-flip-horizontal { + transform: scale(-1, 1); +} + +.ov-flip-vertical { + transform: scale(1, -1); +} + +.ov-flip-both { + transform: scale(-1, -1); +} + +.ov-inverse { + color: #fff; +} +`);const ra="abcdefghijklmnopqrstuvwyz0123456789",Ke=ra.repeat(10),la=()=>{const n=Math.floor(Math.random()*Ke.length);return Ke[n]},sa=n=>Array.from({length:n}).map(la).join(""),j=(n="",e="")=>(n?`${n}-`:"")+sa(5)+(e?`-${e}`:""),oa="(prefers-color-scheme: dark)",Me="vue-dsfr-scheme",Ce="light",_e="dark",ge="system",We="data-fr-theme",Pe=n=>{const e=n??(localStorage.getItem(Me)||ge);return[Ce,_e,ge].includes(e)?e:ge},Ue=(n,e)=>(n=Pe(n),n===ge?e!=null&&e.matches?_e:Ce:n),Ic=n=>{if(typeof window>"u")return;const e={scheme:localStorage.getItem(Me)||ge,dataThemeAttribute:We,...n},t=window.matchMedia&&window.matchMedia(oa),i=ref(Pe(e.scheme));localStorage.setItem(Me,i.value);const r=ref(Ue(i.value,t)),s=ref(i.value!==ge);watchEffect(()=>{var v;(v=document.body.parentElement)==null||v.setAttribute(e.dataThemeAttribute||We,r.value)}),t==null||t.addEventListener("change",v=>{s.value||(v.matches?r.value=_e:r.value=Ce)}),!s.value&&t!=null&&t.matches&&(r.value=_e);const o=v=>{if(i.value=Pe(v),localStorage.setItem(Me,i.value),[Ce,_e].includes(i.value)){r.value=i.value,s.value=!0;return}r.value=Ue(i.value,t),s.value=!1},a=document.documentElement,d={subtree:!1,childList:!1,attributes:!0},y=new MutationObserver(v=>{for(const _ of v)if(_.type==="attributes"&&_.attributeName==="data-fr-theme"){const C=_.target.getAttribute(_.attributeName);C!==i.value&&o(C)}});return y.observe(a,d),window.addEventListener("unload",()=>y.disconnect()),o(i.value),{setScheme:o,theme:computed(()=>r.value),scheme:computed(()=>i.value)}},ce=()=>{const n=ref(),e=ref(!1),t=ref(!1),i=()=>{if(!n.value)return;n.value.style.setProperty("--collapser","none");const r=n.value.offsetHeight;n.value.style.setProperty("--collapse",`${-r}px`),n.value.style.setProperty("--collapser","")};return{collapse:n,collapsing:e,cssExpanded:t,doExpand:r=>{n.value&&(r===!0&&n.value.style.setProperty("--collapse-max-height","none"),window.requestAnimationFrame(()=>{e.value=!0,i(),window.requestAnimationFrame(()=>{t.value=r})}))},adjust:i,onTransitionEnd:r=>{e.value=!1,n.value&&r===!1&&n.value.style.removeProperty("--collapse-max-height")}}},Ca=["title","disabled","aria-disabled"],za={key:1},La=defineComponent({__name:"DsfrButton",props:{disabled:{type:Boolean},label:{default:void 0},secondary:{type:Boolean},tertiary:{type:Boolean},iconRight:{type:Boolean},iconOnly:{type:Boolean},noOutline:{type:Boolean},size:{default:"md"},icon:{default:void 0},onClick:{type:Function,default:()=>{}}},setup(n,{expose:e}){const t=n,i=computed(()=>["sm","small"].includes(t.size)),r=computed(()=>["md","medium"].includes(t.size)),s=computed(()=>["lg","large"].includes(t.size)),o=ref(null);e({focus:()=>{var v;(v=o.value)==null||v.focus()}});const a=computed(()=>typeof t.icon=="string"&&t.icon.startsWith("fr-icon-")),d=computed(()=>t.iconOnly?1.25:.8325),y=computed(()=>typeof t.icon=="string"?{scale:d.value,name:t.icon}:{scale:d.value,...t.icon});return(v,_)=>(openBlock(),createElementBlock("button",{ref_key:"btn",ref:o,class:normalizeClass(["fr-btn",{"fr-btn--secondary":v.secondary&&!v.tertiary,"fr-btn--tertiary":v.tertiary&&!v.secondary&&!v.noOutline,"fr-btn--tertiary-no-outline":v.tertiary&&!v.secondary&&v.noOutline,"fr-btn--sm":i.value,"fr-btn--md":r.value,"fr-btn--lg":s.value,"fr-btn--icon-right":!v.iconOnly&&a.value&&v.iconRight,"fr-btn--icon-left":!v.iconOnly&&a.value&&!v.iconRight,"inline-flex":!a.value,reverse:v.iconRight&&!a.value,"justify-center":!a.value&&v.iconOnly,[v.icon]:a.value}]),title:v.iconOnly?v.label:void 0,disabled:v.disabled,"aria-disabled":v.disabled,style:normalizeStyle(!a.value&&v.iconOnly?{"padding-inline":"0.5rem"}:{}),onClick:_[0]||(_[0]=C=>v.onClick?v.onClick(C):()=>{})},[v.icon&&!a.value?(openBlock(),createBlock(unref(g),normalizeProps(mergeProps({key:0},y.value)),null,16)):createCommentVNode("",!0),v.iconOnly?createCommentVNode("",!0):(openBlock(),createElementBlock("span",za,[createTextVNode(toDisplayString(v.label)+" ",1),renderSlot(v.$slots,"default",{},void 0,!0)]))],14,Ca))}}),ae=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},Ee=ae(La,[["__scopeId","data-v-d2e9ceaf"]]),Ae=defineComponent({__name:"DsfrButtonGroup",props:{buttons:{default:()=>[]},reverse:{type:Boolean},equisized:{type:Boolean},iconRight:{type:Boolean},align:{default:void 0},inlineLayoutWhen:{type:[String,Boolean],default:"never"},size:{default:"md"}},setup(n){const e=n,t=ref(null),i=computed(()=>["sm","small"].includes(e.size)),r=computed(()=>["md","medium"].includes(e.size)),s=computed(()=>["lg","large"].includes(e.size)),o=computed(()=>["always","",!0].includes(e.inlineLayoutWhen)),a=computed(()=>["sm","small"].includes(e.inlineLayoutWhen)),d=computed(()=>["md","medium"].includes(e.inlineLayoutWhen)),y=computed(()=>["lg","large"].includes(e.inlineLayoutWhen)),v=computed(()=>e.align==="center"),_=computed(()=>e.align==="right"),C=ref("auto"),E=computed(()=>`--equisized-width: ${C.value};`),S=async()=>{var b;let P=0;await new Promise(R=>setTimeout(R,100)),(b=t.value)==null||b.querySelectorAll(".fr-btn").forEach(R=>{const x=R,T=x.offsetWidth,L=window.getComputedStyle(x),k=+L.marginLeft.replace("px",""),N=+L.marginRight.replace("px","");x.style.width="var(--equisized-width)";const G=T+k+N;G>P&&(P=G)}),C.value=`${P}px`};return onMounted(async()=>{!t.value||!e.equisized||await S()}),(b,P)=>(openBlock(),createElementBlock("ul",{ref_key:"buttonsEl",ref:t,style:normalizeStyle(E.value),class:normalizeClass(["fr-btns-group",{"fr-btns-group--equisized":b.equisized,"fr-btns-group--sm":i.value,"fr-btns-group--md":r.value,"fr-btns-group--lg":s.value,"fr-btns-group--inline-sm":o.value||a.value,"fr-btns-group--inline-md":o.value||d.value,"fr-btns-group--inline-lg":o.value||y.value,"fr-btns-group--center":v.value,"fr-btns-group--right":_.value,"fr-btns-group--icon-right":b.iconRight,"fr-btns-group--inline-reverse":b.reverse}]),"data-testid":"fr-btns"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(b.buttons,({onClick:R,...x},T)=>(openBlock(),createElementBlock("li",{key:T},[createVNode(Ee,mergeProps({ref_for:!0},x,{onClick:R}),null,16,["onClick"])]))),128)),renderSlot(b.$slots,"default")],6))}}),qa=["id","name","checked","data-testid","data-test"],Qa=["for"],Ga={key:0,class:"required"},Ka={key:0,class:"fr-hint-text"},Wa={key:0,class:"fr-messages-group","aria-live":"assertive",role:"alert"},ht=defineComponent({inheritAttrs:!1,__name:"DsfrCheckbox",props:{id:{default:()=>j("basic","checkbox")},name:{},required:{type:Boolean},modelValue:{type:Boolean},small:{type:Boolean},inline:{type:Boolean},label:{default:""},errorMessage:{default:""},validMessage:{default:""},hint:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=computed(()=>t.errorMessage||t.validMessage),s=computed(()=>t.errorMessage?"fr-error-text":"fr-valid-text"),o=a=>{i("update:modelValue",a.target.checked)};return(a,d)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["fr-fieldset__element",{"fr-fieldset__element--inline":a.inline}])},[createBaseVNode("div",{class:normalizeClass(["fr-checkbox-group",{"fr-checkbox-group--error":a.errorMessage,"fr-checkbox-group--valid":!a.errorMessage&&a.validMessage,"fr-checkbox-group--sm":a.small}])},[createBaseVNode("input",mergeProps({id:a.id,name:a.name,type:"checkbox",checked:a.modelValue},a.$attrs,{"data-testid":`input-checkbox-${a.id}`,"data-test":`input-checkbox-${a.id}`,onChange:d[0]||(d[0]=y=>o(y))}),null,16,qa),createBaseVNode("label",{for:a.id,class:"fr-label"},[renderSlot(a.$slots,"label",{},()=>[createTextVNode(toDisplayString(a.label)+" ",1),renderSlot(a.$slots,"required-tip",{},()=>[a.required?(openBlock(),createElementBlock("span",Ga," *")):createCommentVNode("",!0)])]),a.hint?(openBlock(),createElementBlock("span",Ka,toDisplayString(a.hint),1)):createCommentVNode("",!0)],8,Qa),r.value?(openBlock(),createElementBlock("div",Wa,[createBaseVNode("p",{class:normalizeClass(["fr-message--info flex items-center",s.value])},toDisplayString(r.value),3)])):createCommentVNode("",!0)],2)],2))}}),Ua={class:"fr-form-group"},Za=["disabled","aria-labelledby","role"],Ja=["id"],xa={key:0,class:"required"},en=["id"],tn=defineComponent({__name:"DsfrCheckboxSet",props:{titleId:{default:()=>j("checkbox","group")},disabled:{type:Boolean},inline:{type:Boolean},required:{type:Boolean},small:{type:Boolean},errorMessage:{default:""},validMessage:{default:""},legend:{default:""},options:{default:()=>[]},modelValue:{default:()=>[]}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=computed(()=>t.errorMessage||t.validMessage),s=computed(()=>t.errorMessage?"fr-error-text":"fr-valid-text"),o=({name:a,checked:d})=>{const y=d?[...t.modelValue,a]:t.modelValue.filter(v=>v!==a);i("update:modelValue",y)};return(a,d)=>(openBlock(),createElementBlock("div",Ua,[createBaseVNode("fieldset",{class:normalizeClass(["fr-fieldset",{"fr-fieldset--error":a.errorMessage,"fr-fieldset--valid":!a.errorMessage&&a.validMessage}]),disabled:a.disabled,"aria-labelledby":`${a.titleId} messages-${a.titleId}`,role:a.errorMessage||a.validMessage?"group":void 0},[createBaseVNode("legend",{id:a.titleId,class:"fr-fieldset__legend fr-text--regular"},[renderSlot(a.$slots,"legend",{},()=>[createTextVNode(toDisplayString(a.legend)+" ",1),renderSlot(a.$slots,"required-tip",{},()=>[a.required?(openBlock(),createElementBlock("span",xa," *")):createCommentVNode("",!0)])])],8,Ja),renderSlot(a.$slots,"default",{},()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(a.options,y=>(openBlock(),createBlock(ht,{id:y.id,key:y.id||y.name,name:y.name,label:y.label,disabled:y.disabled,"aria-disabled":y.disabled,small:a.small,inline:a.inline,"model-value":a.modelValue.includes(y.name),hint:y.hint,"onUpdate:modelValue":v=>o({name:y.name,checked:v})},null,8,["id","name","label","disabled","aria-disabled","small","inline","model-value","hint","onUpdate:modelValue"]))),128))]),r.value?(openBlock(),createElementBlock("div",{key:0,id:`messages-${a.titleId}`,class:"fr-messages-group",role:"alert"},[createBaseVNode("p",{class:normalizeClass(["fr-message--info flex items-center",s.value])},[createBaseVNode("span",null,toDisplayString(r.value),1)],2)],8,en)):createCommentVNode("",!0)],10,Za)]))}}),ar=["innerHTML"],ze=defineComponent({__name:"DsfrLogo",props:{small:{type:Boolean},large:{type:Boolean},logoText:{default:()=>"Gouvernement"}},setup(n){const e=n,t=computed(()=>Array.isArray(e.logoText)?e.logoText.join("
"):e.logoText);return(i,r)=>(openBlock(),createElementBlock("p",{class:normalizeClass(["fr-logo",{"fr-logo--sm":i.small&&!i.large,"fr-logo--lg":i.large&&!i.small}]),innerHTML:t.value},null,10,ar))}}),nr={class:"fr-footer__partners"},rr={key:0,class:"fr-footer__partners-title"},lr={class:"fr-footer__partners-logos"},sr={key:0,class:"fr-footer__partners-main"},or=["href"],ir=["src","alt"],dr={class:"fr-footer__partners-sub"},ur=["href"],cr=["src","alt"],bt=defineComponent({__name:"DsfrFooterPartners",props:{mainPartner:{default:void 0},subPartners:{default:()=>[]},title:{default:""}},setup(n){return(e,t)=>(openBlock(),createElementBlock("div",nr,[e.title?(openBlock(),createElementBlock("h4",rr,toDisplayString(e.title),1)):createCommentVNode("",!0),createBaseVNode("div",lr,[e.mainPartner?(openBlock(),createElementBlock("div",sr,[createBaseVNode("a",{class:"fr-footer__partners-link",href:e.mainPartner.href,target:"_blank",rel:"noopener noreferrer"},[createBaseVNode("img",{class:"fr-footer__logo",src:e.mainPartner.logo,alt:e.mainPartner.name},null,8,ir)],8,or)])):createCommentVNode("",!0),createBaseVNode("div",dr,[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.subPartners,(i,r)=>(openBlock(),createElementBlock("li",{key:r},[createBaseVNode("a",{class:"fr-footer__partners-link",href:i.href,target:"_blank",rel:"noopener noreferrer"},[createBaseVNode("img",{class:"fr-footer__logo",src:i.logo,alt:i.name},null,8,cr)],8,ur)]))),128))])])])]))}}),Je=1,fr=defineComponent({__name:"DsfrFooterLink",props:{button:{type:Boolean},icon:{default:void 0},iconAttrs:{default:()=>({})},iconRight:{type:Boolean},label:{default:""},target:{default:void 0},onClick:{type:Function,default:()=>{}},to:{default:void 0},href:{default:void 0}},setup(n){const e=n,t=computed(()=>{var v;return(v=e.href)==null?void 0:v.startsWith("http")}),i=computed(()=>{var v;return(v=e.href)==null?void 0:v.startsWith("mailto")}),r=computed(()=>e.button?"button":t.value||i.value?"a":"RouterLink"),s=computed(()=>{if(!(!t.value&&!i.value))return e.href}),o=computed(()=>{if(!(t.value||i.value))return e.to}),a=computed(()=>o.value?{to:o.value}:{href:s.value}),d=computed(()=>typeof e.icon=="string"&&e.icon.startsWith("fr-icon-")),y=computed(()=>typeof e.icon=="string"?{name:e.icon,scale:Je,...e.iconAttrs??{}}:{scale:Je,...e.icon??{},...e.iconAttrs??{}});return(v,_)=>(openBlock(),createBlock(resolveDynamicComponent(r.value),mergeProps({class:["fr-footer__bottom-link",{"fr-btn--icon-right":d.value&&v.iconRight,"fr-btn--icon-left":d.value&&!v.iconRight,[String(v.icon)]:d.value}]},a.value,{target:v.target,onClick:withModifiers(v.onClick,["stop"])}),{default:withCtx(()=>{var C,E;return[!d.value&&(v.icon||(C=v.iconAttrs)!=null&&C.name)&&!v.iconRight?(openBlock(),createBlock(unref(g),mergeProps({key:0,class:"fr-mr-1w"},y.value),null,16)):createCommentVNode("",!0),createTextVNode(" "+toDisplayString(v.label)+" ",1),!d.value&&(v.icon||(E=v.iconAttrs)!=null&&E.name)&&v.iconRight?(openBlock(),createBlock(unref(g),mergeProps({key:1,class:"fr-ml-1w"},y.value),null,16)):createCommentVNode("",!0)]}),_:1},16,["class","target","onClick"]))}}),pr={id:"footer",class:"fr-footer",role:"contentinfo"},hr={key:0,class:"fr-footer__top"},vr={class:"fr-container"},mr={class:"fr-grid-row fr-grid-row--start fr-grid-row--gutters"},gr={class:"fr-container"},br={class:"fr-footer__body"},yr={key:0,class:"fr-footer__brand fr-enlarge-link"},kr=["href"],wr=["src","alt"],_r=["src","alt"],$r={key:1,class:"fr-footer__brand fr-enlarge-link"},Dr={class:"fr-footer__content"},Mr={class:"fr-footer__content-desc"},Cr={class:"fr-footer__content-list"},zr=["href"],Lr={class:"fr-footer__bottom"},Ir={class:"fr-footer__bottom-list"},Sr={key:0,class:"fr-footer__bottom-copy"},Tr=defineComponent({__name:"DsfrFooter",props:{a11yCompliance:{default:"non conforme"},a11yComplianceLink:{default:"/a11y"},legalLink:{default:"/mentions-legales"},homeLink:{default:"/"},homeTitle:{default:"Retour à l’accueil"},partners:{default:()=>{}},personalDataLink:{default:"/donnees-personnelles"},cookiesLink:{default:"/cookies"},logoText:{default:()=>["République","Française"]},descText:{default:void 0},beforeMandatoryLinks:{default:()=>[]},afterMandatoryLinks:{default:()=>[]},mandatoryLinks:{default:n=>[{label:`Accessibilité : ${n.a11yCompliance}`,to:n.a11yComplianceLink},{label:"Mentions légales",to:n.legalLink,"data-testid":"/mentions-legales"},{label:"Données personnelles",to:n.personalDataLink},{label:"Gestion des cookies",to:n.cookiesLink}]},ecosystemLinks:{default:()=>[{label:"legifrance.gouv.fr",href:"https://legifrance.gouv.fr"},{label:"info.gouv.fr",href:"https://info.gouv.fr"},{label:"service-public.fr",href:"https://service-public.fr"},{label:"data.gouv.fr",href:"https://data.gouv.fr"}]},operatorLinkText:{default:"Revenir à l’accueil"},operatorTo:{default:"/"},operatorImgStyle:{type:[Boolean,null,String,Object,Array],default:void 0},operatorImgSrc:{default:void 0},operatorImgAlt:{default:""},licenceTo:{default:"https://github.com/etalab/licence-ouverte/blob/master/LO.md"},licenceLinkProps:{default:()=>{}},licenceText:{default:"Sauf mention contraire, tous les textes de ce site sont sous"},licenceName:{default:"licence etalab-2.0"}},setup(n){const e=n,t=computed(()=>[...e.beforeMandatoryLinks,...e.mandatoryLinks,...e.afterMandatoryLinks]),i=useSlots(),r=computed(()=>{var y;return(y=i["footer-link-lists"])==null?void 0:y.call(i).length}),s=computed(()=>{const y=e.licenceTo||e.licenceLinkProps.to;return y&&typeof y=="string"&&y.startsWith("http")}),o=computed(()=>s.value?"":e.licenceTo),a=computed(()=>s.value?e.licenceTo:""),d=computed(()=>typeof e.operatorTo=="string"&&e.operatorTo.startsWith("http"));return(y,v)=>{const _=resolveComponent("RouterLink");return openBlock(),createElementBlock("footer",pr,[r.value?(openBlock(),createElementBlock("div",hr,[createBaseVNode("div",vr,[createBaseVNode("div",mr,[renderSlot(y.$slots,"footer-link-lists",{},void 0,!0)])])])):createCommentVNode("",!0),createBaseVNode("div",gr,[createBaseVNode("div",br,[y.operatorImgSrc?(openBlock(),createElementBlock("div",yr,[createVNode(ze,{"logo-text":y.logoText},null,8,["logo-text"]),d.value?(openBlock(),createElementBlock("a",{key:0,href:y.operatorTo,"data-testid":"card-link",class:"fr-footer__brand-link"},[createBaseVNode("img",{class:"fr-footer__logo",style:normalizeStyle(y.operatorImgStyle),src:y.operatorImgSrc,alt:y.operatorImgAlt},null,12,wr)],8,kr)):(openBlock(),createBlock(_,{key:1,class:"fr-footer__brand-link",to:y.homeLink,title:y.homeTitle},{default:withCtx(()=>[createBaseVNode("img",{class:"fr-footer__logo",style:normalizeStyle(y.operatorImgStyle),src:y.operatorImgSrc,alt:y.operatorImgAlt},null,12,_r)]),_:1},8,["to","title"]))])):(openBlock(),createElementBlock("div",$r,[createVNode(_,{to:y.homeLink,title:y.homeTitle},{default:withCtx(()=>[createVNode(ze,{"logo-text":y.logoText},null,8,["logo-text"])]),_:1},8,["to","title"])])),createBaseVNode("div",Dr,[createBaseVNode("p",Mr,[renderSlot(y.$slots,"description",{},()=>[createTextVNode(toDisplayString(y.descText),1)],!0)]),createBaseVNode("ul",Cr,[(openBlock(!0),createElementBlock(Fragment,null,renderList(y.ecosystemLinks,(C,E)=>(openBlock(),createElementBlock("li",{key:E,class:"fr-footer__content-item"},[createBaseVNode("a",{class:"fr-footer__content-link",href:C.href,target:"_blank",rel:"noopener noreferrer"},toDisplayString(C.label),9,zr)]))),128))])])]),y.partners?(openBlock(),createBlock(bt,normalizeProps(mergeProps({key:0},y.partners)),null,16)):createCommentVNode("",!0),createBaseVNode("div",Lr,[createBaseVNode("ul",Ir,[(openBlock(!0),createElementBlock(Fragment,null,renderList(t.value,(C,E)=>(openBlock(),createElementBlock("li",{key:E,class:"fr-footer__bottom-item"},[createVNode(fr,mergeProps({ref_for:!0},C),null,16)]))),128))]),y.licenceText?(openBlock(),createElementBlock("div",Sr,[createBaseVNode("p",null,[createTextVNode(toDisplayString(y.licenceText)+" ",1),(openBlock(),createBlock(resolveDynamicComponent(s.value?"a":"RouterLink"),mergeProps({class:"fr-link-licence no-content-after",to:s.value?null:o.value,href:a.value,target:s.value?"_blank":void 0,rel:"noopener noreferrer"},y.licenceLinkProps),{default:withCtx(()=>[createTextVNode(toDisplayString(y.licenceName),1)]),_:1},16,["to","href","target"]))])])):createCommentVNode("",!0)])])])}}}),Er=ae(Tr,[["__scopeId","data-v-a64fdd76"]]),Yr=["for"],Or={key:0,class:"required"},jr={key:0,class:"fr-hint-text"},qr=defineComponent({inheritAttrs:!1,__name:"DsfrInput",props:{id:{default:()=>j("basic","input")},descriptionId:{default:void 0},hint:{default:""},isInvalid:{type:Boolean},isValid:{type:Boolean},isTextarea:{type:Boolean},isWithWrapper:{type:Boolean},labelVisible:{type:Boolean},label:{default:""},labelClass:{default:""},modelValue:{default:""},wrapperClass:{default:""}},emits:["update:modelValue"],setup(n,{expose:e}){const t=n,i=useAttrs(),r=ref(null),s=()=>{var y;return(y=r.value)==null?void 0:y.focus()},o=computed(()=>t.isTextarea?"textarea":"input"),a=computed(()=>t.isWithWrapper||i.type==="date"||!!t.wrapperClass),d=computed(()=>["fr-label",{invisible:!t.labelVisible},t.labelClass]);return e({focus:s}),(y,v)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("label",{class:normalizeClass(d.value),for:y.id},[renderSlot(y.$slots,"label",{},()=>[createTextVNode(toDisplayString(y.label)+" ",1),renderSlot(y.$slots,"required-tip",{},()=>["required"in y.$attrs&&y.$attrs.required!==!1?(openBlock(),createElementBlock("span",Or,"*")):createCommentVNode("",!0)],!0)],!0),y.hint?(openBlock(),createElementBlock("span",jr,toDisplayString(y.hint),1)):createCommentVNode("",!0)],10,Yr),a.value?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass([{"fr-input-wrap":y.isWithWrapper||y.$attrs.type==="date"},y.wrapperClass])},[(openBlock(),createBlock(resolveDynamicComponent(o.value),mergeProps({id:y.id},y.$attrs,{ref_key:"__input",ref:r,class:["fr-input",{"fr-input--error":y.isInvalid,"fr-input--valid":y.isValid}],value:y.modelValue,"aria-describedby":y.descriptionId||void 0,onInput:v[1]||(v[1]=_=>y.$emit("update:modelValue",_.target.value))}),null,16,["id","class","value","aria-describedby"]))],2)):(openBlock(),createBlock(resolveDynamicComponent(o.value),mergeProps({key:0,id:y.id},y.$attrs,{ref_key:"__input",ref:r,class:["fr-input",{"fr-input--error":y.isInvalid,"fr-input--valid":y.isValid}],value:y.modelValue,"aria-describedby":y.descriptionId||void 0,onInput:v[0]||(v[0]=_=>y.$emit("update:modelValue",_.target.value))}),null,16,["id","class","value","aria-describedby"]))],64))}}),qe=ae(qr,[["__scopeId","data-v-771f90df"]]),Fe=defineComponent({__name:"DsfrSearchBar",props:{id:{default:()=>j("search","input")},label:{default:""},labelVisible:{type:Boolean},large:{type:Boolean},buttonText:{default:""},modelValue:{default:""},placeholder:{default:"Rechercher"},disabled:{type:Boolean}},emits:["update:modelValue","search"],setup(n,{emit:e}){const t=e;return(i,r)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["fr-search-bar",{"fr-search-bar--lg":i.large}]),role:"search"},[createVNode(qe,{id:i.id,type:"search",placeholder:i.placeholder,"model-value":i.modelValue,"label-visible":i.labelVisible,label:i.label,disabled:i.disabled,"aria-disabled":i.disabled,"onUpdate:modelValue":r[0]||(r[0]=s=>t("update:modelValue",s)),onKeydown:r[1]||(r[1]=withKeys(s=>t("search",i.modelValue),["enter"]))},null,8,["id","placeholder","model-value","label-visible","label","disabled","aria-disabled"]),createVNode(Ee,{title:"Rechercher",disabled:i.disabled,"aria-disabled":i.disabled,onClick:r[2]||(r[2]=s=>t("search",i.modelValue))},{default:withCtx(()=>[createTextVNode(toDisplayString(i.buttonText),1)]),_:1},8,["disabled","aria-disabled"])],2))}}),xe=1,yt=defineComponent({__name:"DsfrHeaderMenuLink",props:{button:{type:Boolean},icon:{default:void 0},iconAttrs:{default:()=>({})},iconRight:{type:Boolean},label:{default:""},target:{default:"_self"},onClick:{type:Function,default:()=>{}},to:{default:void 0},href:{default:void 0}},setup(n){const e=n,t=computed(()=>typeof e.path=="string"),i=computed(()=>{var _;return((_=e.href)==null?void 0:_.startsWith("http"))||t.value&&e.path.startsWith("http")}),r=computed(()=>{var _;return((_=e.href)==null?void 0:_.startsWith("mailto"))||t.value&&e.path.startsWith("mailto")}),s=computed(()=>e.button?"button":i.value||r.value?"a":"RouterLink"),o=computed(()=>{if(!(!i.value&&!r.value))return e.href!==void 0?e.href:e.path}),a=computed(()=>{if(!(i.value||r.value))return e.to||e.path}),d=computed(()=>a.value?{to:a.value}:{href:o.value}),y=computed(()=>typeof e.icon=="string"&&e.icon.startsWith("fr-icon-")),v=computed(()=>typeof e.icon=="string"?{name:e.icon,scale:xe,...e.iconAttrs??{}}:{scale:xe,...e.icon??{},...e.iconAttrs??{}});return(_,C)=>(openBlock(),createBlock(resolveDynamicComponent(s.value),mergeProps({class:["fr-btn",{"fr-btn--icon-right":y.value&&_.iconRight,"fr-btn--icon-left":y.value&&!_.iconRight,[String(_.icon)]:y.value}]},d.value,{target:_.target,onClick:withModifiers(_.onClick,["stop"])}),{default:withCtx(()=>{var E,S;return[!y.value&&(_.icon||(E=_.iconAttrs)!=null&&E.name)&&!_.iconRight?(openBlock(),createBlock(unref(g),mergeProps({key:0,class:"fr-mr-1w"},v.value),null,16)):createCommentVNode("",!0),createTextVNode(" "+toDisplayString(_.label)+" ",1),!y.value&&(_.icon||(S=_.iconAttrs)!=null&&S.name)&&_.iconRight?(openBlock(),createBlock(unref(g),mergeProps({key:1,class:"fr-ml-1w"},v.value),null,16)):createCommentVNode("",!0)]}),_:1},16,["class","target","onClick"]))}}),Qr=["aria-label"],Gr={class:"fr-btns-group"},Ne=defineComponent({__name:"DsfrHeaderMenuLinks",props:{links:{default:()=>[]},navAriaLabel:{default:"Menu secondaire"}},emits:["linkClick"],setup(n,{emit:e}){const t=e;return(i,r)=>(openBlock(),createElementBlock("nav",{role:"navigation","aria-label":i.navAriaLabel},[createBaseVNode("ul",Gr,[(openBlock(!0),createElementBlock(Fragment,null,renderList(i.links,(s,o)=>(openBlock(),createElementBlock("li",{key:o},[createVNode(yt,mergeProps({ref_for:!0},s,{"on-click":a=>{var d;t("linkClick",a),(d=s.onClick)==null||d.call(s,a)}}),null,16,["on-click"])]))),128))])],8,Qr))}}),Kr={role:"navigation",class:"fr-translate fr-nav"},Wr={class:"fr-nav__item"},Ur=["aria-controls","aria-expanded"],Zr={class:"fr-hidden-lg"},Jr=["id"],xr={class:"fr-menu__list"},el=["hreflang","lang","aria-current","href","onClick"],Xe=defineComponent({__name:"DsfrLanguageSelector",props:{id:{default:()=>j("translate")},languages:{default:()=>[]},currentLanguage:{default:"fr"}},emits:["select"],setup(n,{emit:e}){const t=n,i=e,{collapse:r,collapsing:s,cssExpanded:o,doExpand:a,onTransitionEnd:d}=ce(),y=ref(!1);function v(C){y.value=!1,i("select",C)}const _=computed(()=>t.languages.find(({codeIso:C})=>C===t.currentLanguage));return watch(y,(C,E)=>{C!==E&&a(C)}),(C,E)=>{var S,b;return openBlock(),createElementBlock("nav",Kr,[createBaseVNode("div",Wr,[createBaseVNode("button",{class:"fr-translate__btn fr-btn fr-btn--tertiary","aria-controls":C.id,"aria-expanded":y.value,title:"Sélectionner une langue",type:"button",onClick:E[0]||(E[0]=withModifiers(P=>y.value=!y.value,["prevent","stop"]))},[createTextVNode(toDisplayString((S=_.value)==null?void 0:S.codeIso.toUpperCase()),1),createBaseVNode("span",Zr," - "+toDisplayString((b=_.value)==null?void 0:b.label),1)],8,Ur),createBaseVNode("div",{id:C.id,ref_key:"collapse",ref:r,class:normalizeClass(["fr-collapse fr-translate__menu fr-menu",{"fr-collapse--expanded":unref(o),"fr-collapsing":unref(s)}]),onTransitionend:E[1]||(E[1]=P=>unref(d)(y.value))},[createBaseVNode("ul",xr,[(openBlock(!0),createElementBlock(Fragment,null,renderList(C.languages,(P,R)=>(openBlock(),createElementBlock("li",{key:R},[createBaseVNode("a",{class:"fr-translate__language fr-nav__link",hreflang:P.codeIso,lang:P.codeIso,"aria-current":C.currentLanguage===P.codeIso?!0:void 0,href:`#${P.codeIso}`,onClick:withModifiers(x=>v(P),["prevent","stop"])},toDisplayString(`${P.codeIso.toUpperCase()} - ${P.label}`),9,el)]))),128))])],42,Jr)])])}}}),tl={role:"banner",class:"fr-header"},al={class:"fr-header__body"},nl={class:"fr-container width-inherit"},rl={class:"fr-header__body-row"},ll={class:"fr-header__brand fr-enlarge-link"},sl={class:"fr-header__brand-top"},ol={class:"fr-header__logo"},il={key:0,class:"fr-header__operator"},dl=["src","alt"],ul={key:1,class:"fr-header__navbar"},cl=["aria-label","title","data-fr-opened"],fl=["aria-label","title"],pl={key:0,class:"fr-header__service"},hl={class:"fr-header__service-title"},vl={key:0,class:"fr-badge fr-badge--sm fr-badge--green-emeraude"},ml={key:0,class:"fr-header__service-tagline"},gl={key:1,class:"fr-header__service"},bl=createBaseVNode("p",{class:"fr-header__service-title"},[createBaseVNode("span",{class:"fr-badge fr-badge--sm fr-badge--green-emeraude"},"BETA")],-1),yl=[bl],kl={class:"fr-header__tools"},wl={key:0,class:"fr-header__tools-links"},_l={key:1,class:"fr-header__search fr-modal"},$l=["aria-label"],Dl={class:"fr-container"},Ml={class:"fr-header__menu-links"},Cl={role:"navigation"},zl={key:1,class:"flex justify-center items-center"},Ll={key:1,class:"fr-hidden fr-unhidden-lg"},Il=defineComponent({__name:"DsfrHeader",props:{searchbarId:{default:"searchbar-header"},serviceTitle:{default:void 0},serviceDescription:{default:void 0},homeTo:{default:"/"},logoText:{default:()=>"Gouvernement"},modelValue:{default:""},operatorImgAlt:{default:""},operatorImgSrc:{default:""},operatorImgStyle:{type:[Boolean,null,String,Object,Array],default:()=>({})},placeholder:{default:"Rechercher..."},quickLinks:{default:()=>[]},languageSelector:{default:void 0},searchLabel:{default:"Recherche"},quickLinksAriaLabel:{default:"Menu secondaire"},showSearch:{type:Boolean},showSearchLabel:{default:"Recherche"},showBeta:{type:Boolean},menuLabel:{default:"Menu"},menuModalLabel:{default:"Menu modal"},closeMenuModalLabel:{default:"Fermer"},homeLabel:{default:"Accueil"}},emits:["update:modelValue","search","language-select"],setup(n,{emit:e}){const t=n,i=e,r=toRef(t,"languageSelector"),s=ref(!1),o=ref(!1),a=ref(!1),d=()=>{var P;a.value=!1,s.value=!1,o.value=!1,(P=document.getElementById("button-menu"))==null||P.focus()},y=P=>{P.key==="Escape"&&d()};onMounted(()=>{document.addEventListener("keydown",y)}),onUnmounted(()=>{document.removeEventListener("keydown",y)});const v=()=>{var P;a.value=!0,s.value=!0,o.value=!1,(P=document.getElementById("close-button"))==null||P.focus()},_=()=>{a.value=!0,s.value=!1,o.value=!0},C=d,E=useSlots(),S=computed(()=>{var P;return!!((P=E.operator)!=null&&P.call(E).length)||!!t.operatorImgSrc}),b=computed(()=>!!E.mainnav);return(P,R)=>{var x,T,L;const k=resolveComponent("RouterLink");return openBlock(),createElementBlock("header",tl,[createBaseVNode("div",al,[createBaseVNode("div",nl,[createBaseVNode("div",rl,[createBaseVNode("div",ll,[createBaseVNode("div",sl,[createBaseVNode("div",ol,[createVNode(ze,{"logo-text":P.logoText,"data-testid":"header-logo"},null,8,["logo-text"])]),S.value?(openBlock(),createElementBlock("div",il,[renderSlot(P.$slots,"operator",{},()=>[P.operatorImgSrc?(openBlock(),createElementBlock("img",{key:0,class:"fr-responsive-img",src:P.operatorImgSrc,alt:P.operatorImgAlt,style:normalizeStyle(P.operatorImgStyle)},null,12,dl)):createCommentVNode("",!0)])])):createCommentVNode("",!0),P.showSearch||b.value||(x=P.quickLinks)!=null&&x.length?(openBlock(),createElementBlock("div",ul,[P.showSearch?(openBlock(),createElementBlock("button",{key:0,class:"fr-btn fr-btn--search","aria-controls":"header-search","aria-label":P.showSearchLabel,title:P.showSearchLabel,"data-fr-opened":o.value,onClick:R[0]||(R[0]=withModifiers(N=>_(),["prevent","stop"]))},null,8,cl)):createCommentVNode("",!0),b.value||(T=P.quickLinks)!=null&&T.length?(openBlock(),createElementBlock("button",{key:1,id:"button-menu",class:"fr-btn--menu fr-btn","data-fr-opened":v,"aria-controls":"header-navigation","aria-haspopup":"menu","aria-label":P.menuLabel,title:P.menuLabel,"data-testid":"open-menu-btn",onClick:R[1]||(R[1]=withModifiers(N=>v(),["prevent","stop"]))},null,8,fl)):createCommentVNode("",!0)])):createCommentVNode("",!0)]),P.serviceTitle?(openBlock(),createElementBlock("div",pl,[createVNode(k,mergeProps({to:P.homeTo,title:`${P.homeLabel} - ${P.serviceTitle}`},P.$attrs),{default:withCtx(()=>[createBaseVNode("p",hl,[createTextVNode(toDisplayString(P.serviceTitle)+" ",1),P.showBeta?(openBlock(),createElementBlock("span",vl," BETA ")):createCommentVNode("",!0)])]),_:1},16,["to","title"]),P.serviceDescription?(openBlock(),createElementBlock("p",ml,toDisplayString(P.serviceDescription),1)):createCommentVNode("",!0)])):createCommentVNode("",!0),!P.serviceTitle&&P.showBeta?(openBlock(),createElementBlock("div",gl,yl)):createCommentVNode("",!0)]),createBaseVNode("div",kl,[(L=P.quickLinks)!=null&&L.length||r.value?(openBlock(),createElementBlock("div",wl,[s.value?createCommentVNode("",!0):(openBlock(),createBlock(Ne,{key:0,links:P.quickLinks,"nav-aria-label":P.quickLinksAriaLabel},null,8,["links","nav-aria-label"])),r.value?(openBlock(),createBlock(Xe,mergeProps({key:1},r.value,{onSelect:R[2]||(R[2]=N=>i("language-select",N))}),null,16)):createCommentVNode("",!0)])):createCommentVNode("",!0),P.showSearch?(openBlock(),createElementBlock("div",_l,[createVNode(Fe,{"searchbar-id":P.searchbarId,label:P.searchLabel,"model-value":P.modelValue,placeholder:P.placeholder,style:{"justify-content":"flex-end"},"onUpdate:modelValue":R[3]||(R[3]=N=>i("update:modelValue",N)),onSearch:R[4]||(R[4]=N=>i("search",N))},null,8,["searchbar-id","label","model-value","placeholder"])])):createCommentVNode("",!0)])]),P.showSearch||b.value||P.quickLinks&&P.quickLinks.length||r.value?(openBlock(),createElementBlock("div",{key:0,id:"header-navigation",class:normalizeClass(["fr-header__menu fr-modal",{"fr-modal--opened":a.value}]),"aria-label":P.menuModalLabel,role:"dialog","aria-modal":"true"},[createBaseVNode("div",Dl,[createBaseVNode("button",{id:"close-button",class:"fr-btn fr-btn--close","aria-controls":"header-navigation","data-testid":"close-modal-btn",onClick:R[5]||(R[5]=withModifiers(N=>d(),["prevent","stop"]))},toDisplayString(P.closeMenuModalLabel),1),createBaseVNode("div",Ml,[r.value?(openBlock(),createBlock(Xe,mergeProps({key:0},r.value,{onSelect:R[6]||(R[6]=N=>r.value.currentLanguage=N.codeIso)}),null,16)):createCommentVNode("",!0),createBaseVNode("nav",Cl,[s.value?(openBlock(),createBlock(Ne,{key:0,role:"navigation",links:P.quickLinks,"nav-aria-label":P.quickLinksAriaLabel,onLinkClick:unref(C)},null,8,["links","nav-aria-label","onLinkClick"])):createCommentVNode("",!0)])]),a.value?renderSlot(P.$slots,"mainnav",{key:0,hidemodal:d}):createCommentVNode("",!0),o.value?(openBlock(),createElementBlock("div",zl,[createVNode(Fe,{"searchbar-id":P.searchbarId,"model-value":P.modelValue,placeholder:P.placeholder,"onUpdate:modelValue":R[7]||(R[7]=N=>i("update:modelValue",N)),onSearch:R[8]||(R[8]=N=>i("search",N))},null,8,["searchbar-id","model-value","placeholder"])])):createCommentVNode("",!0)])],10,$l)):createCommentVNode("",!0),b.value&&!a.value?(openBlock(),createElementBlock("div",Ll,[renderSlot(P.$slots,"mainnav",{hidemodal:d})])):createCommentVNode("",!0),renderSlot(P.$slots,"default")])])])}}});/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var kt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Le=kt.join(","),wt=typeof Element>"u",ve=wt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ie=!wt&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n==null?void 0:n.ownerDocument},Se=function n(e,t){var i;t===void 0&&(t=!0);var r=e==null||(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"inert"),s=r===""||r==="true",o=s||t&&e&&n(e.parentNode);return o},Bl=function(n){var e,t=n==null||(e=n.getAttribute)===null||e===void 0?void 0:e.call(n,"contenteditable");return t===""||t==="true"},_t=function(n,e,t){if(Se(n))return[];var i=Array.prototype.slice.apply(n.querySelectorAll(Le));return e&&ve.call(n,Le)&&i.unshift(n),i=i.filter(t),i},$t=function n(e,t,i){for(var r=[],s=Array.from(e);s.length;){var o=s.shift();if(!Se(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),d=a.length?a:o.children,y=n(d,!0,i);i.flatten?r.push.apply(r,y):r.push({scopeParent:o,candidates:y})}else{var v=ve.call(o,Le);v&&i.filter(o)&&(t||!e.includes(o))&&r.push(o);var _=o.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(o),C=!Se(_,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(o));if(_&&C){var E=n(_===!0?o.children:_.children,!0,i);i.flatten?r.push.apply(r,E):r.push({scopeParent:o,candidates:E})}else s.unshift.apply(s,o.children)}}return r},Dt=function(n){return!isNaN(parseInt(n.getAttribute("tabindex"),10))},he=function(n){if(!n)throw new Error("No node provided");return n.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||Bl(n))&&!Dt(n)?0:n.tabIndex},Vl=function(n,e){var t=he(n);return t<0&&e&&!Dt(n)?0:t},Rl=function(n,e){return n.tabIndex===e.tabIndex?n.documentOrder-e.documentOrder:n.tabIndex-e.tabIndex},Mt=function(n){return n.tagName==="INPUT"},Pl=function(n){return Mt(n)&&n.type==="hidden"},Fl=function(n){var e=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return e},Nl=function(n,e){for(var t=0;tsummary:first-of-type"),s=r?n.parentElement:n;if(ve.call(s,"details:not([open]) *"))return!0;if(!t||t==="full"||t==="legacy-full"){if(typeof i=="function"){for(var o=n;n;){var a=n.parentElement,d=Ie(n);if(a&&!a.shadowRoot&&i(a)===!0)return et(n);n.assignedSlot?n=n.assignedSlot:!a&&d!==n.ownerDocument?n=d.host:n=a}n=o}if(jl(n))return!n.getClientRects().length;if(t!=="legacy-full")return!0}else if(t==="non-zero-area")return et(n);return!1},Ql=function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var e=n.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var t=0;t=0)},Kl=function n(e){var t=[],i=[];return e.forEach(function(r,s){var o=!!r.scopeParent,a=o?r.scopeParent:r,d=Vl(a,o),y=o?n(r.candidates):a;d===0?o?t.push.apply(t,y):t.push(a):i.push({documentOrder:s,tabIndex:d,item:r,isScope:o,content:y})}),i.sort(Rl).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(t)},Wl=function(n,e){e=e||{};var t;return e.getShadowRoot?t=$t([n],e.includeContainer,{filter:Ye.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Gl}):t=_t(n,e.includeContainer,Ye.bind(null,e)),Kl(t)},Ul=function(n,e){e=e||{};var t;return e.getShadowRoot?t=$t([n],e.includeContainer,{filter:Te.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):t=_t(n,e.includeContainer,Te.bind(null,e)),t},me=function(n,e){if(e=e||{},!n)throw new Error("No node provided");return ve.call(n,Le)===!1?!1:Ye(e,n)},Zl=kt.concat("iframe").join(","),Re=function(n,e){if(e=e||{},!n)throw new Error("No node provided");return ve.call(n,Zl)===!1?!1:Te(e,n)};/*! +* focus-trap 7.5.4 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function tt(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function at(n){for(var e=1;e0){var t=n[n.length-1];t!==e&&t.pause()}var i=n.indexOf(e);i===-1||n.splice(i,1),n.push(e)},deactivateTrap:function(n,e){var t=n.indexOf(e);t!==-1&&n.splice(t,1),n.length>0&&n[n.length-1].unpause()}},ts=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},as=function(n){return(n==null?void 0:n.key)==="Escape"||(n==null?void 0:n.key)==="Esc"||(n==null?void 0:n.keyCode)===27},$e=function(n){return(n==null?void 0:n.key)==="Tab"||(n==null?void 0:n.keyCode)===9},ns$1=function(n){return $e(n)&&!n.shiftKey},rs=function(n){return $e(n)&&n.shiftKey},rt=function(n){return setTimeout(n,0)},lt$1=function(n,e){var t=-1;return n.every(function(i,r){return e(i)?(t=r,!1):!0}),t},we=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i1?U-1:0),$=1;$=0)B=t.activeElement;else{var D=s.tabbableGroups[0],U=D&&D.firstTabbableNode;B=U||y("fallbackFocus")}if(!B)throw new Error("Your focus-trap needs to have at least one focusable element");return B},_=function(){if(s.containerGroups=s.containers.map(function(B){var D=Wl(B,r.tabbableOptions),U=Ul(B,r.tabbableOptions),Y=D.length>0?D[0]:void 0,$=D.length>0?D[D.length-1]:void 0,K=U.find(function(Q){return me(Q)}),q=U.slice().reverse().find(function(Q){return me(Q)}),te=!!D.find(function(Q){return he(Q)>0});return{container:B,tabbableNodes:D,focusableNodes:U,posTabIndexesFound:te,firstTabbableNode:Y,lastTabbableNode:$,firstDomTabbableNode:K,lastDomTabbableNode:q,nextTabbableNode:function(Q){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ie=D.indexOf(Q);return ie<0?je?U.slice(U.indexOf(Q)+1).find(function(it){return me(it)}):U.slice(0,U.indexOf(Q)).reverse().find(function(it){return me(it)}):D[ie+(je?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(B){return B.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!y("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(B){return B.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},C=function B(D){var U=D.activeElement;if(U)return U.shadowRoot&&U.shadowRoot.activeElement!==null?B(U.shadowRoot):U},E=function B(D){if(D!==!1&&D!==C(document)){if(!D||!D.focus){B(v());return}D.focus({preventScroll:!!r.preventScroll}),s.mostRecentlyFocusedNode=D,ts(D)&&D.select()}},S=function(B){var D=y("setReturnFocus",B);return D||(D===!1?!1:B)},b=function(B){var D=B.target,U=B.event,Y=B.isBackward,$=Y===void 0?!1:Y;D=D||De(U),_();var K=null;if(s.tabbableGroups.length>0){var q=d(D,U),te=q>=0?s.containerGroups[q]:void 0;if(q<0)$?K=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:K=s.tabbableGroups[0].firstTabbableNode;else if($){var Q=lt$1(s.tabbableGroups,function(ct){var Qe=ct.firstTabbableNode;return D===Qe});if(Q<0&&(te.container===D||Re(D,r.tabbableOptions)&&!me(D,r.tabbableOptions)&&!te.nextTabbableNode(D,!1))&&(Q=q),Q>=0){var je=Q===0?s.tabbableGroups.length-1:Q-1,ie=s.tabbableGroups[je];K=he(D)>=0?ie.lastTabbableNode:ie.lastDomTabbableNode}else $e(U)||(K=te.nextTabbableNode(D,!1))}else{var it=lt$1(s.tabbableGroups,function(ct){var Qe=ct.lastTabbableNode;return D===Qe});if(it<0&&(te.container===D||Re(D,r.tabbableOptions)&&!me(D,r.tabbableOptions)&&!te.nextTabbableNode(D))&&(it=q),it>=0){var le=it===s.tabbableGroups.length-1?0:it+1,ft=s.tabbableGroups[le];K=he(D)>=0?ft.firstTabbableNode:ft.firstDomTabbableNode}else $e(U)||(K=te.nextTabbableNode(D))}}else K=y("fallbackFocus");return K},P=function(B){var D=De(B);if(!(d(D,B)>=0)){if(we(r.clickOutsideDeactivates,B)){o.deactivate({returnFocus:r.returnFocusOnDeactivate});return}we(r.allowOutsideClick,B)||B.preventDefault()}},R=function(B){var D=De(B),U=d(D,B)>=0;if(U||D instanceof Document)U&&(s.mostRecentlyFocusedNode=D);else{B.stopImmediatePropagation();var Y,$=!0;if(s.mostRecentlyFocusedNode)if(he(s.mostRecentlyFocusedNode)>0){var K=d(s.mostRecentlyFocusedNode),q=s.containerGroups[K].tabbableNodes;if(q.length>0){var te=q.findIndex(function(Q){return Q===s.mostRecentlyFocusedNode});te>=0&&(r.isKeyForward(s.recentNavEvent)?te+1=0&&(Y=q[te-1],$=!1))}}else s.containerGroups.some(function(Q){return Q.tabbableNodes.some(function(je){return he(je)>0})})||($=!1);else $=!1;$&&(Y=b({target:s.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(s.recentNavEvent)})),E(Y||s.mostRecentlyFocusedNode||v())}s.recentNavEvent=void 0},x=function(B){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=B;var U=b({event:B,isBackward:D});U&&($e(B)&&B.preventDefault(),E(U))},T=function(B){if(as(B)&&we(r.escapeDeactivates,B)!==!1){B.preventDefault(),o.deactivate();return}(r.isKeyForward(B)||r.isKeyBackward(B))&&x(B,r.isKeyBackward(B))},L=function(B){var D=De(B);d(D,B)>=0||we(r.clickOutsideDeactivates,B)||we(r.allowOutsideClick,B)||(B.preventDefault(),B.stopImmediatePropagation())},k=function(){if(s.active)return nt.activateTrap(i,o),s.delayInitialFocusTimer=r.delayInitialFocus?rt(function(){E(v())}):E(v()),t.addEventListener("focusin",R,!0),t.addEventListener("mousedown",P,{capture:!0,passive:!1}),t.addEventListener("touchstart",P,{capture:!0,passive:!1}),t.addEventListener("click",L,{capture:!0,passive:!1}),t.addEventListener("keydown",T,{capture:!0,passive:!1}),o},N=function(){if(s.active)return t.removeEventListener("focusin",R,!0),t.removeEventListener("mousedown",P,!0),t.removeEventListener("touchstart",P,!0),t.removeEventListener("click",L,!0),t.removeEventListener("keydown",T,!0),o},G=function(B){var D=B.some(function(U){var Y=Array.from(U.removedNodes);return Y.some(function($){return $===s.mostRecentlyFocusedNode})});D&&E(v())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(G):void 0,z=function(){F&&(F.disconnect(),s.active&&!s.paused&&s.containers.map(function(B){F.observe(B,{subtree:!0,childList:!0})}))};return o={get active(){return s.active},get paused(){return s.paused},activate:function(B){if(s.active)return this;var D=a(B,"onActivate"),U=a(B,"onPostActivate"),Y=a(B,"checkCanFocusTrap");Y||_(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=t.activeElement,D==null||D();var $=function(){Y&&_(),k(),z(),U==null||U()};return Y?(Y(s.containers.concat()).then($,$),this):($(),this)},deactivate:function(B){if(!s.active)return this;var D=at({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},B);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,N(),s.active=!1,s.paused=!1,z(),nt.deactivateTrap(i,o);var U=a(D,"onDeactivate"),Y=a(D,"onPostDeactivate"),$=a(D,"checkCanReturnFocus"),K=a(D,"returnFocus","returnFocusOnDeactivate");U==null||U();var q=function(){rt(function(){K&&E(S(s.nodeFocusedBeforeActivation)),Y==null||Y()})};return K&&$?($(S(s.nodeFocusedBeforeActivation)).then(q,q),this):(q(),this)},pause:function(B){if(s.paused||!s.active)return this;var D=a(B,"onPause"),U=a(B,"onPostPause");return s.paused=!0,D==null||D(),N(),z(),U==null||U(),this},unpause:function(B){if(!s.paused||!s.active)return this;var D=a(B,"onUnpause"),U=a(B,"onPostUnpause");return s.paused=!1,D==null||D(),_(),k(),z(),U==null||U(),this},updateContainerElements:function(B){var D=[].concat(B).filter(Boolean);return s.containers=D.map(function(U){return typeof U=="string"?t.querySelector(U):U}),s.active&&_(),z(),this}},o.updateContainerElements(n),o};/*! + * focus-trap-vue v4.0.2 + * (c) 2023 Eduardo San Martin Morote + * @license MIT + */const os={escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:[Boolean,Function],default:!0},clickOutsideDeactivates:[Boolean,Function],initialFocus:[String,Function,Boolean],fallbackFocus:[String,Function],checkCanFocusTrap:Function,checkCanReturnFocus:Function,delayInitialFocus:{type:Boolean,default:!0},document:Object,preventScroll:Boolean,setReturnFocus:[Object,String,Boolean,Function],tabbableOptions:Object},is=defineComponent({props:Object.assign({active:{type:Boolean,default:!0}},os),emits:["update:active","activate","postActivate","deactivate","postDeactivate"],render(){return this.renderImpl()},setup(n,{slots:e,emit:t}){let i;const r=ref(null),s=computed(()=>{const a=r.value;return a&&(a instanceof HTMLElement?a:a.$el)});function o(){return i||(i=ss(s.value,{escapeDeactivates:n.escapeDeactivates,allowOutsideClick:n.allowOutsideClick,returnFocusOnDeactivate:n.returnFocusOnDeactivate,clickOutsideDeactivates:n.clickOutsideDeactivates,onActivate:()=>{t("update:active",!0),t("activate")},onDeactivate:()=>{t("update:active",!1),t("deactivate")},onPostActivate:()=>t("postActivate"),onPostDeactivate:()=>t("postDeactivate"),initialFocus:n.initialFocus,fallbackFocus:n.fallbackFocus,tabbableOptions:n.tabbableOptions,delayInitialFocus:n.delayInitialFocus,preventScroll:n.preventScroll}))}return onMounted(()=>{watch(()=>n.active,a=>{a&&s.value?o().activate():i&&(i.deactivate(),(!s.value||s.value.nodeType===Node.COMMENT_NODE)&&(i=null))},{immediate:!0,flush:"post"})}),onUnmounted(()=>{i&&i.deactivate(),i=null}),{activate(){o().activate()},deactivate(){i&&i.deactivate()},renderImpl(){if(!e.default)return null;const a=e.default().filter(d=>d.type!==Comment);return!a||!a.length||a.length>1?(console.error("[focus-trap-vue]: FocusTrap requires exactly one child."),a):cloneVNode(a[0],{ref:r})}}}}),ds=["aria-labelledby","role","open"],us={class:"fr-container fr-container--fluid fr-container-md"},cs={class:"fr-grid-row fr-grid-row--center"},fs={class:"fr-modal__body"},ps={class:"fr-modal__header"},hs=["title"],vs={class:"fr-modal__content"},ms=["id"],gs={key:0,class:"fr-modal__footer"},st=2,bs=defineComponent({__name:"DsfrModal",props:{modalId:{default:()=>j("modal","dialog")},opened:{type:Boolean},actions:{default:()=>[]},isAlert:{type:Boolean},origin:{default:()=>({focus(){}})},title:{},icon:{default:void 0},size:{default:"md"},closeButtonLabel:{default:"Fermer"},closeButtonTitle:{default:"Fermer la fenêtre modale"}},emits:["close"],setup(n,{emit:e}){const t=n,i=e,r=S=>{S.key==="Escape"&&_()},s=computed(()=>t.isAlert?"alertdialog":"dialog"),o=ref(null),a=ref();watch(()=>t.opened,S=>{var b,P;S?((b=a.value)==null||b.showModal(),setTimeout(()=>{var R;(R=o.value)==null||R.focus()},100)):(P=a.value)==null||P.close(),d(S)});function d(S){typeof window<"u"&&document.body.classList.toggle("modal-open",S)}onMounted(()=>{y(),d(t.opened)}),onBeforeUnmount(()=>{v(),d(!1)});function y(){document.addEventListener("keydown",r)}function v(){document.removeEventListener("keydown",r)}async function _(){var S;await nextTick(),(S=t.origin)==null||S.focus(),i("close")}const C=computed(()=>typeof t.icon=="string"&&t.icon.startsWith("fr-icon-")),E=computed(()=>C.value?void 0:typeof t.icon=="string"?{name:t.icon,scale:st}:{scale:st,...t.icon??{}});return(S,b)=>S.opened?(openBlock(),createBlock(unref(is),{key:0},{default:withCtx(()=>{var P,R;return[createBaseVNode("dialog",{id:"fr-modal-1",ref_key:"modal",ref:a,"aria-labelledby":S.modalId,role:s.value,class:normalizeClass(["fr-modal",{"fr-modal--opened":S.opened}]),open:S.opened},[createBaseVNode("div",us,[createBaseVNode("div",cs,[createBaseVNode("div",{class:normalizeClass(["fr-col-12",{"fr-col-md-8":S.size==="lg","fr-col-md-6":S.size==="md","fr-col-md-4":S.size==="sm"}])},[createBaseVNode("div",fs,[createBaseVNode("div",ps,[createBaseVNode("button",{ref_key:"closeBtn",ref:o,class:"fr-btn fr-btn--close",title:S.closeButtonTitle,"aria-controls":"fr-modal-1",type:"button",onClick:b[0]||(b[0]=x=>_())},[createBaseVNode("span",null,toDisplayString(S.closeButtonLabel),1)],8,hs)]),createBaseVNode("div",vs,[createBaseVNode("h1",{id:S.modalId,class:"fr-modal__title"},[C.value||E.value?(openBlock(),createElementBlock("span",{key:0,class:normalizeClass({[String(S.icon)]:C.value})},[S.icon&&E.value?(openBlock(),createBlock(unref(g),normalizeProps(mergeProps({key:0},E.value)),null,16)):createCommentVNode("",!0)],2)):createCommentVNode("",!0),createTextVNode(" "+toDisplayString(S.title),1)],8,ms),renderSlot(S.$slots,"default",{},void 0,!0)]),(P=S.actions)!=null&&P.length||S.$slots.footer?(openBlock(),createElementBlock("div",gs,[renderSlot(S.$slots,"footer",{},void 0,!0),(R=S.actions)!=null&&R.length?(openBlock(),createBlock(Ae,{key:0,align:"right",buttons:S.actions,"inline-layout-when":"large",reverse:""},null,8,["buttons"])):createCommentVNode("",!0)])):createCommentVNode("",!0)])],2)])])],10,ds)]}),_:3})):createCommentVNode("",!0)}}),ys=ae(bs,[["__scopeId","data-v-43ec81d5"]]),ks=["id","aria-current"],ws=defineComponent({__name:"DsfrNavigationItem",props:{id:{default:()=>j("nav","item")},active:{type:Boolean}},setup(n){return(e,t)=>(openBlock(),createElementBlock("li",{id:e.id,class:"fr-nav__item","aria-current":e.active?"page":void 0},[renderSlot(e.$slots,"default",{},void 0,!0)],8,ks))}}),Ct=ae(ws,[["__scopeId","data-v-5909c19f"]]),_s=["href"],ot=2,He=defineComponent({__name:"DsfrNavigationMenuLink",props:{id:{default:()=>j("menu-link")},to:{default:"#"},text:{default:""},icon:{default:void 0},onClick:{type:Function,default:()=>{}}},emits:["toggleId"],setup(n){const e=n,t=computed(()=>typeof e.to=="string"&&e.to.startsWith("http")),i=computed(()=>e.icon&&typeof e.icon=="string"&&e.icon.startsWith("fr-icon-")),r=computed(()=>i.value||!e.icon?void 0:typeof e.icon=="string"?{scale:ot,name:e.icon}:{scale:ot,...e.icon||{}});return(s,o)=>{const a=resolveComponent("RouterLink");return t.value?(openBlock(),createElementBlock("a",{key:0,class:"fr-nav__link","data-testid":"nav-external-link",href:s.to,onClick:o[0]||(o[0]=d=>s.$emit("toggleId",s.id))},toDisplayString(s.text),9,_s)):(openBlock(),createBlock(a,{key:1,class:normalizeClass(["fr-nav__link",{[String(s.icon)]:i.value}]),"data-testid":"nav-router-link",to:s.to,onClick:o[1]||(o[1]=d=>s.$emit("toggleId",s.id))},{default:withCtx(()=>[s.icon&&r.value?(openBlock(),createBlock(unref(g),normalizeProps(mergeProps({key:0},r.value)),null,16)):createCommentVNode("",!0),createTextVNode(" "+toDisplayString(s.text),1)]),_:1},8,["to","class"]))}}}),$s=["id","aria-current"],zt=defineComponent({__name:"DsfrNavigationMenuItem",props:{id:{default:()=>j("menu","item")},active:{type:Boolean}},setup(n){return(e,t)=>(openBlock(),createElementBlock("li",{id:e.id,class:"fr-menu__item","aria-current":e.active?"page":void 0},[renderSlot(e.$slots,"default")],8,$s))}}),Ds=["aria-expanded","aria-current","aria-controls"],Ms=["id"],Cs={class:"fr-menu__list"},Lt=defineComponent({__name:"DsfrNavigationMenu",props:{id:{default:()=>j("menu")},title:{},links:{default:()=>[]},expandedId:{default:""},active:{type:Boolean}},emits:["toggleId"],setup(n){const e=n,{collapse:t,collapsing:i,cssExpanded:r,doExpand:s,onTransitionEnd:o}=ce(),a=computed(()=>e.id===e.expandedId);return watch(a,(d,y)=>{d!==y&&s(d)}),onMounted(()=>{a.value&&s(!0)}),(d,y)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("button",{class:"fr-nav__btn","aria-expanded":a.value,"aria-current":d.active||void 0,"aria-controls":d.id,onClick:y[0]||(y[0]=v=>d.$emit("toggleId",d.id))},[createBaseVNode("span",null,toDisplayString(d.title),1)],8,Ds),createBaseVNode("div",{id:d.id,ref_key:"collapse",ref:t,class:normalizeClass(["fr-collapse fr-menu",{"fr-collapse--expanded":unref(r),"fr-collapsing":unref(i)}]),"data-testid":"navigation-menu",onTransitionend:y[2]||(y[2]=v=>unref(o)(a.value))},[createBaseVNode("ul",Cs,[renderSlot(d.$slots,"default"),(openBlock(!0),createElementBlock(Fragment,null,renderList(d.links,(v,_)=>(openBlock(),createBlock(zt,{key:_},{default:withCtx(()=>[createVNode(He,mergeProps({ref_for:!0},v,{onToggleId:y[1]||(y[1]=C=>d.$emit("toggleId",d.expandedId))}),null,16)]),_:2},1024))),128))])],42,Ms)],64))}}),zs={class:"fr-col-12 fr-col-lg-3"},Ls={class:"fr-mega-menu__category"},Is={class:"fr-mega-menu__list"},It=defineComponent({__name:"DsfrNavigationMegaMenuCategory",props:{title:{},active:{type:Boolean},links:{}},setup(n){return(e,t)=>(openBlock(),createElementBlock("div",zs,[createBaseVNode("h5",Ls,[createBaseVNode("a",{class:"fr-nav__link",href:"#",onClick:t[0]||(t[0]=withModifiers(()=>{},["prevent"]))},toDisplayString(e.title),1)]),createBaseVNode("ul",Is,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.links,(i,r)=>(openBlock(),createElementBlock("li",{key:r,class:"fr-nav__link"},[createVNode(He,mergeProps({ref_for:!0},i),null,16)]))),128))])]))}}),Ss=["aria-expanded","aria-current","aria-controls"],Ts=["id"],Es={class:"fr-container fr-container--fluid fr-container-lg"},As={class:"fr-grid-row fr-grid-row-lg--gutters"},Hs={class:"fr-col-12 fr-col-lg-8 fr-col-offset-lg-4--right fr-mb-4v"},Bs={class:"fr-mega-menu__leader"},Vs={class:"fr-h4 fr-mb-2v"},Rs={class:"fr-hidden fr-displayed-lg"},Ps=defineComponent({__name:"DsfrNavigationMegaMenu",props:{id:{default:()=>j("menu")},title:{},description:{default:""},link:{default:()=>({to:"#",text:"Voir toute la rubrique"})},menus:{default:()=>[]},expandedId:{default:""},active:{type:Boolean}},emits:["toggleId"],setup(n){const e=n,{collapse:t,collapsing:i,cssExpanded:r,doExpand:s,onTransitionEnd:o}=ce(),a=computed(()=>e.id===e.expandedId);return watch(a,(d,y)=>{d!==y&&s(d)}),onMounted(()=>{a.value&&s(!0)}),(d,y)=>{const v=resolveComponent("RouterLink");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("button",{class:"fr-nav__btn","aria-expanded":a.value,"aria-current":d.active||void 0,"aria-controls":d.id,onClick:y[0]||(y[0]=_=>d.$emit("toggleId",d.id))},toDisplayString(d.title),9,Ss),createBaseVNode("div",{id:d.id,ref_key:"collapse",ref:t,"data-testid":"mega-menu-wrapper",class:normalizeClass(["fr-collapse fr-mega-menu",{"fr-collapse--expanded":unref(r),"fr-collapsing":unref(i)}]),tabindex:"-1",onTransitionend:y[2]||(y[2]=_=>unref(o)(a.value))},[createBaseVNode("div",Es,[createBaseVNode("button",{class:"fr-link--close fr-link","aria-controls":"mega-menu-695",onClick:y[1]||(y[1]=_=>d.$emit("toggleId",d.id))}," Fermer "),createBaseVNode("div",As,[createBaseVNode("div",Hs,[createBaseVNode("div",Bs,[createBaseVNode("h4",Vs,toDisplayString(d.title),1),createBaseVNode("p",Rs,[createTextVNode(toDisplayString(d.description)+" ",1),renderSlot(d.$slots,"description",{},void 0,!0)]),createVNode(v,{class:"fr-link fr-icon-arrow-right-line fr-link--icon-right fr-link--align-on-content",to:d.link.to},{default:withCtx(()=>[createTextVNode(toDisplayString(d.link.text),1)]),_:1},8,["to"])])]),renderSlot(d.$slots,"default",{},void 0,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(d.menus,(_,C)=>(openBlock(),createBlock(It,mergeProps({key:C,ref_for:!0},_),null,16))),128))])])],42,Ts)],64)}}}),St=ae(Ps,[["__scopeId","data-v-020a2672"]]),Fs=["id","aria-label"],Ns={class:"fr-nav__list"},Xs=defineComponent({__name:"DsfrNavigation",props:{id:{default:()=>j("menu")},label:{default:"Menu principal"},navItems:{default:()=>[]}},setup(n){const e=n,t=ref(void 0),i=a=>{if(a===t.value){t.value=void 0;return}t.value=a},r=a=>{if(a!==document.getElementById(e.id)){if(!(a!=null&&a.parentNode)){i(t.value);return}r(a.parentNode)}},s=a=>{r(a.target)},o=a=>{a.key==="Escape"&&i(t.value)};return onMounted(()=>{document.addEventListener("click",s),document.addEventListener("keydown",o)}),onUnmounted(()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",o)}),(a,d)=>(openBlock(),createElementBlock("nav",{id:a.id,class:"fr-nav",role:"navigation","aria-label":a.label},[createBaseVNode("ul",Ns,[renderSlot(a.$slots,"default"),(openBlock(!0),createElementBlock(Fragment,null,renderList(a.navItems,(y,v)=>(openBlock(),createBlock(Ct,{key:v},{default:withCtx(()=>[y.to&&y.text?(openBlock(),createBlock(He,mergeProps({key:0,ref_for:!0},y,{"expanded-id":t.value,onToggleId:d[0]||(d[0]=_=>i(_))}),null,16,["expanded-id"])):y.title&&y.links?(openBlock(),createBlock(Lt,mergeProps({key:1,ref_for:!0},y,{"expanded-id":t.value,onToggleId:d[1]||(d[1]=_=>i(_))}),null,16,["expanded-id"])):y.title&&y.menus?(openBlock(),createBlock(St,mergeProps({key:2,ref_for:!0},y,{"expanded-id":t.value,onToggleId:d[2]||(d[2]=_=>i(_))}),null,16,["expanded-id"])):createCommentVNode("",!0)]),_:2},1024))),128))])],8,Fs))}}),bo=["id","name","value","checked","disabled"],yo=["for"],ko={key:0,class:"required"},wo={key:0,class:"fr-hint-text"},_o={key:0,class:"fr-radio-rich__pictogram"},$o=["src"],Do=["href"],Mo=["href"],Co=["href"],Tt=defineComponent({__name:"DsfrRadioButton",props:{id:{default:()=>j("basic","radio")},name:{},modelValue:{type:[String,Number,Boolean],default:""},disabled:{type:Boolean},small:{type:Boolean},inline:{type:Boolean},value:{type:[String,Number,Boolean]},label:{default:""},hint:{default:""},img:{default:void 0},svgPath:{default:void 0},svgAttrs:{default:()=>({viewBox:"0 0 80 80",width:"80px",height:"80px"})}},emits:["update:modelValue"],setup(n){const e=n,t={viewBox:"0 0 80 80",width:"80px",height:"80px"},i=computed(()=>!!e.img||!!e.svgPath);return(r,s)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["fr-fieldset__element",{"fr-fieldset__element--inline":r.inline}])},[createBaseVNode("div",{class:normalizeClass(["fr-radio-group",{"fr-radio-rich":i.value,"fr-radio-group--sm":r.small}])},[createBaseVNode("input",mergeProps({id:r.id,type:"radio",name:r.name,value:r.value,checked:r.modelValue===r.value,disabled:r.disabled},r.$attrs,{onClick:s[0]||(s[0]=o=>r.$emit("update:modelValue",r.value))}),null,16,bo),createBaseVNode("label",{for:r.id,class:"fr-label"},[renderSlot(r.$slots,"label",{},()=>[createTextVNode(toDisplayString(r.label)+" ",1),renderSlot(r.$slots,"required-tip",{},()=>[r.$attrs.required?(openBlock(),createElementBlock("span",ko," *")):createCommentVNode("",!0)])]),r.hint?(openBlock(),createElementBlock("span",wo,toDisplayString(r.hint),1)):createCommentVNode("",!0)],8,yo),r.img||r.svgPath?(openBlock(),createElementBlock("div",_o,[r.img?(openBlock(),createElementBlock("img",{key:0,src:r.img,class:"fr-artwork",alt:""},null,8,$o)):(openBlock(),createElementBlock("svg",mergeProps({key:1,"aria-hidden":"true",class:"fr-artwork"},{...t,...r.svgAttrs}),[createBaseVNode("use",{class:"fr-artwork-decorative",href:`${r.svgPath}#artwork-decorative`},null,8,Do),createBaseVNode("use",{class:"fr-artwork-minor",href:`${r.svgPath}#artwork-minor`},null,8,Mo),createBaseVNode("use",{class:"fr-artwork-major",href:`${r.svgPath}#artwork-major`},null,8,Co)],16))])):createCommentVNode("",!0)],2)],2))}}),zo={class:"fr-form-group"},Lo=["disabled","aria-labelledby","role"],Io=["id"],So={key:0,class:"required"},To=["id"],Eo={class:"line-1"},Ao=defineComponent({__name:"DsfrRadioButtonSet",props:{titleId:{default:()=>j("radio-button","group")},disabled:{type:Boolean},required:{type:Boolean},small:{type:Boolean},inline:{type:Boolean},name:{},errorMessage:{default:""},validMessage:{default:""},legend:{default:""},modelValue:{type:[String,Number,Boolean]},options:{default:()=>[]}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=computed(()=>t.errorMessage||t.validMessage),s=computed(()=>t.errorMessage?"fr-error-text":"fr-valid-text"),o=a=>{a!==t.modelValue&&i("update:modelValue",a)};return(a,d)=>(openBlock(),createElementBlock("div",zo,[createBaseVNode("fieldset",{class:normalizeClass(["fr-fieldset",{"fr-fieldset--error":a.errorMessage,"fr-fieldset--valid":a.validMessage}]),disabled:a.disabled,"aria-labelledby":`${a.titleId} messages-${a.titleId}`,role:a.errorMessage||a.validMessage?"group":void 0},[a.legend?(openBlock(),createElementBlock("legend",{key:0,id:a.titleId,class:"fr-fieldset__legend fr-fieldset__legend--regular"},[renderSlot(a.$slots,"legend",{},()=>[createTextVNode(toDisplayString(a.legend)+" ",1),renderSlot(a.$slots,"required-tip",{},()=>[a.required?(openBlock(),createElementBlock("span",So," *")):createCommentVNode("",!0)])])],8,Io)):createCommentVNode("",!0),renderSlot(a.$slots,"default",{},()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(a.options,(y,v)=>(openBlock(),createBlock(Tt,mergeProps({key:typeof y.value=="boolean"?v:y.value||v,name:a.name,"aria-disabled":y.disabled,ref_for:!0},y,{small:a.small,inline:a.inline,"model-value":a.modelValue,"onUpdate:modelValue":d[0]||(d[0]=_=>o(_))}),null,16,["name","aria-disabled","small","inline","model-value"]))),128))]),r.value?(openBlock(),createElementBlock("div",{key:1,id:`messages-${a.titleId}`,class:"fr-messages-group","aria-live":"assertive",role:"alert"},[createBaseVNode("p",{class:normalizeClass(["fr-message--info flex items-center",s.value])},[createBaseVNode("span",Eo,toDisplayString(r.value),1)],2)],8,To)):createCommentVNode("",!0)],10,Lo)]))}}),At$2=defineComponent({__name:"DsfrSideMenuListItem",props:{active:{type:Boolean}},setup(n){return(e,t)=>(openBlock(),createElementBlock("li",{class:normalizeClass(["fr-sidemenu__item",{"fr-sidemenu__item--active":e.active}])},[renderSlot(e.$slots,"default")],2))}}),gi=["aria-current","aria-expanded","aria-controls"],Ht=defineComponent({__name:"DsfrSideMenuButton",props:{active:{type:Boolean},expanded:{type:Boolean},controlId:{}},emits:["toggleExpand"],setup(n){return(e,t)=>(openBlock(),createElementBlock("button",{class:"fr-sidemenu__btn","aria-current":e.active?"page":void 0,"aria-expanded":!!e.expanded,"aria-controls":e.controlId,onClick:t[0]||(t[0]=i=>e.$emit("toggleExpand",e.controlId))},[renderSlot(e.$slots,"default")],8,gi))}}),bi=["id"],yi={class:"fr-sidemenu__list"},Bt=defineComponent({__name:"DsfrSideMenuList",props:{id:{},collapsable:{type:Boolean},expanded:{type:Boolean},menuItems:{default:()=>[]}},emits:["toggleExpand"],setup(n){const e=n,{collapse:t,collapsing:i,cssExpanded:r,doExpand:s,onTransitionEnd:o}=ce();watch(()=>e.expanded,(v,_)=>{v!==_&&s(v)}),onMounted(()=>{e.expanded&&s(!0)});const a=v=>typeof v=="string"&&v.startsWith("http"),d=v=>a(v)?"a":"RouterLink",y=v=>({[a(v)?"href":"to"]:v});return(v,_)=>{const C=resolveComponent("DsfrSideMenuList",!0);return openBlock(),createElementBlock("div",{id:v.id,ref_key:"collapse",ref:t,class:normalizeClass({"fr-collapse":v.collapsable,"fr-collapsing":unref(i),"fr-collapse--expanded":unref(r)}),onTransitionend:_[2]||(_[2]=E=>unref(o)(!!v.expanded))},[createBaseVNode("ul",yi,[renderSlot(v.$slots,"default"),(openBlock(!0),createElementBlock(Fragment,null,renderList(v.menuItems,(E,S)=>(openBlock(),createBlock(At$2,{key:S,active:E.active},{default:withCtx(()=>[E.menuItems?createCommentVNode("",!0):(openBlock(),createBlock(resolveDynamicComponent(d(E.to)),mergeProps({key:0,class:"fr-sidemenu__link","aria-current":E.active?"page":void 0,ref_for:!0},y(E.to)),{default:withCtx(()=>[createTextVNode(toDisplayString(E.text),1)]),_:2},1040,["aria-current"])),E.menuItems?(openBlock(),createElementBlock(Fragment,{key:1},[createVNode(Ht,{active:!!E.active,expanded:!!E.expanded,"control-id":E.id,onToggleExpand:_[0]||(_[0]=b=>v.$emit("toggleExpand",b))},{default:withCtx(()=>[createTextVNode(toDisplayString(E.text),1)]),_:2},1032,["active","expanded","control-id"]),E.menuItems?(openBlock(),createBlock(C,{key:0,id:E.id,collapsable:"",expanded:E.expanded,"menu-items":E.menuItems,onToggleExpand:_[1]||(_[1]=b=>v.$emit("toggleExpand",b))},null,8,["id","expanded","menu-items"])):createCommentVNode("",!0)],64)):createCommentVNode("",!0)]),_:2},1032,["active"]))),128))])],42,bi)}}}),ki=["aria-labelledby"],wi={class:"fr-sidemenu__inner"},_i=["aria-controls","aria-expanded"],$i=["id"],Di={class:"fr-sidemenu__title"},Mi=defineComponent({__name:"DsfrSideMenu",props:{buttonLabel:{default:"Dans cette rubrique"},id:{default:()=>j("sidemenu")},collapseValue:{default:"-492px"},menuItems:{default:()=>{}},headingTitle:{default:""}},emits:["toggleExpand"],setup(n){const{collapse:e,collapsing:t,cssExpanded:i,doExpand:r,onTransitionEnd:s}=ce(),o=ref(!1);return watch(o,(a,d)=>{a!==d&&r(a)}),(a,d)=>(openBlock(),createElementBlock("nav",{class:"fr-sidemenu","aria-labelledby":a.id},[createBaseVNode("div",wi,[createBaseVNode("button",{class:"fr-sidemenu__btn","aria-controls":a.id,"aria-expanded":o.value,onClick:d[0]||(d[0]=withModifiers(y=>o.value=!o.value,["prevent","stop"]))},toDisplayString(a.buttonLabel),9,_i),createBaseVNode("div",{id:a.id,ref_key:"collapse",ref:e,class:normalizeClass(["fr-collapse",{"fr-collapse--expanded":unref(i),"fr-collapsing":unref(t)}]),onTransitionend:d[2]||(d[2]=y=>unref(s)(o.value))},[createBaseVNode("div",Di,toDisplayString(a.headingTitle),1),renderSlot(a.$slots,"default",{},()=>[createVNode(Bt,{id:unref(j)("sidemenu","list"),"menu-items":a.menuItems,onToggleExpand:d[1]||(d[1]=y=>a.$emit("toggleExpand",y))},null,8,["id","menu-items"])])],42,$i)])],8,ki))}});/*! + * vue-router v4.4.0 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */const isBrowser=typeof document<"u";function isESModule(n){return n.__esModule||n[Symbol.toStringTag]==="Module"}const assign=Object.assign;function applyToParams(n,e){const t={};for(const i in e){const r=e[i];t[i]=isArray(r)?r.map(n):n(r)}return t}const noop$1=()=>{},isArray=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(n){return encodeURI(""+n).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(n){return commonEncode(n).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(n){return commonEncode(n).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(n){return encodeQueryValue(n).replace(EQUAL_RE,"%3D")}function encodePath(n){return commonEncode(n).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(n){return n==null?"":encodePath(n).replace(SLASH_RE,"%2F")}function decode$2(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=n=>n.replace(TRAILING_SLASH_RE,"");function parseURL(n,e,t="/"){let i,r={},s="",o="";const a=e.indexOf("#");let d=e.indexOf("?");return a=0&&(d=-1),d>-1&&(i=e.slice(0,d),s=e.slice(d+1,a>-1?a:e.length),r=n(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=resolveRelativePath(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:r,hash:decode$2(o)}}function stringifyURL(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function stripBase(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function isSameRouteLocation(n,e,t){const i=e.matched.length-1,r=t.matched.length-1;return i>-1&&i===r&&isSameRouteRecord(e.matched[i],t.matched[r])&&isSameRouteLocationParams(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function isSameRouteRecord(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function isSameRouteLocationParams(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!isSameRouteLocationParamsValue(n[t],e[t]))return!1;return!0}function isSameRouteLocationParamsValue(n,e){return isArray(n)?isEquivalentArray(n,e):isArray(e)?isEquivalentArray(e,n):n===e}function isEquivalentArray(n,e){return isArray(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function resolveRelativePath(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var NavigationType;(function(n){n.pop="pop",n.push="push"})(NavigationType||(NavigationType={}));var NavigationDirection;(function(n){n.back="back",n.forward="forward",n.unknown=""})(NavigationDirection||(NavigationDirection={}));function normalizeBase(n){if(!n)if(isBrowser){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),removeTrailingSlash(n)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(n,e){return n.replace(BEFORE_HASH_RE,"#")+e}function getElementPosition(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),r=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!r)return;e=getElementPosition(r,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function getScrollKey(n,e){return(history.state?history.state.position-e:-1)+n}const scrollPositions=new Map;function saveScrollPosition(n,e){scrollPositions.set(n,e)}function getSavedScrollPosition(n){const e=scrollPositions.get(n);return scrollPositions.delete(n),e}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(n,e){const{pathname:t,search:i,hash:r}=e,s=n.indexOf("#");if(s>-1){let a=r.includes(n.slice(s))?n.slice(s).length:1,d=r.slice(a);return d[0]!=="/"&&(d="/"+d),stripBase(d,"")}return stripBase(t,n)+i+r}function useHistoryListeners(n,e,t,i){let r=[],s=[],o=null;const a=({state:C})=>{const E=createCurrentLocation(n,location),S=t.value,b=e.value;let P=0;if(C){if(t.value=E,e.value=C,o&&o===S){o=null;return}P=b?C.position-b.position:0}else i(E);r.forEach(R=>{R(t.value,S,{delta:P,type:NavigationType.pop,direction:P?P>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function d(){o=t.value}function y(C){r.push(C);const E=()=>{const S=r.indexOf(C);S>-1&&r.splice(S,1)};return s.push(E),E}function v(){const{history:C}=window;C.state&&C.replaceState(assign({},C.state,{scroll:computeScrollPosition()}),"")}function _(){for(const C of s)C();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",v)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",v,{passive:!0}),{pauseListeners:d,listen:y,destroy:_}}function buildState(n,e,t,i=!1,r=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:r?computeScrollPosition():null}}function useHistoryStateNavigation(n){const{history:e,location:t}=window,i={value:createCurrentLocation(n,t)},r={value:e.state};r.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(d,y,v){const _=n.indexOf("#"),C=_>-1?(t.host&&document.querySelector("base")?n:n.slice(_))+d:createBaseLocation()+n+d;try{e[v?"replaceState":"pushState"](y,"",C),r.value=y}catch(E){console.error(E),t[v?"replace":"assign"](C)}}function o(d,y){const v=assign({},e.state,buildState(r.value.back,d,r.value.forward,!0),y,{position:r.value.position});s(d,v,!0),i.value=d}function a(d,y){const v=assign({},r.value,e.state,{forward:d,scroll:computeScrollPosition()});s(v.current,v,!0);const _=assign({},buildState(i.value,d,null),{position:v.position+1},y);s(d,_,!1),i.value=d}return{location:i,state:r,push:a,replace:o}}function createWebHistory(n){n=normalizeBase(n);const e=useHistoryStateNavigation(n),t=useHistoryListeners(n,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const r=assign({location:"",base:n,go:i,createHref:createHref.bind(null,n)},e,t);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function isRouteLocation(n){return typeof n=="string"||n&&typeof n=="object"}function isRouteName(n){return typeof n=="string"||typeof n=="symbol"}const NavigationFailureSymbol=Symbol("");var NavigationFailureType;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(NavigationFailureType||(NavigationFailureType={}));function createRouterError(n,e){return assign(new Error,{type:n,[NavigationFailureSymbol]:!0},e)}function isNavigationFailure(n,e){return n instanceof Error&&NavigationFailureSymbol in n&&(e==null||!!(n.type&e))}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(n,e){const t=assign({},BASE_PATH_PARSER_OPTIONS,e),i=[];let r=t.start?"^":"";const s=[];for(const y of n){const v=y.length?[]:[90];t.strict&&!y.length&&(r+="/");for(let _=0;_e.length?e.length===1&&e[0]===80?1:-1:0}function comparePathParserScore(n,e){let t=0;const i=n.score,r=e.score;for(;t0&&e[e.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(n){if(!n)return[[]];if(n==="/")return[[ROOT_TOKEN]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(E){throw new Error(`ERR (${t})/"${y}": ${E}`)}let t=0,i=t;const r=[];let s;function o(){s&&r.push(s),s=[]}let a=0,d,y="",v="";function _(){y&&(t===0?s.push({type:0,value:y}):t===1||t===2||t===3?(s.length>1&&(d==="*"||d==="+")&&e(`A repeatable param (${y}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:y,regexp:v,repeatable:d==="*"||d==="+",optional:d==="*"||d==="?"})):e("Invalid state to consume buffer"),y="")}function C(){y+=d}for(;a{o(T)}:noop$1}function o(_){if(isRouteName(_)){const C=i.get(_);C&&(i.delete(_),t.splice(t.indexOf(C),1),C.children.forEach(o),C.alias.forEach(o))}else{const C=t.indexOf(_);C>-1&&(t.splice(C,1),_.record.name&&i.delete(_.record.name),_.children.forEach(o),_.alias.forEach(o))}}function a(){return t}function d(_){const C=findInsertionIndex(_,t);t.splice(C,0,_),_.record.name&&!isAliasRecord(_)&&i.set(_.record.name,_)}function y(_,C){let E,S={},b,P;if("name"in _&&_.name){if(E=i.get(_.name),!E)throw createRouterError(1,{location:_});P=E.record.name,S=assign(paramsFromLocation(C.params,E.keys.filter(T=>!T.optional).concat(E.parent?E.parent.keys.filter(T=>T.optional):[]).map(T=>T.name)),_.params&¶msFromLocation(_.params,E.keys.map(T=>T.name))),b=E.stringify(S)}else if(_.path!=null)b=_.path,E=t.find(T=>T.re.test(b)),E&&(S=E.parse(b),P=E.record.name);else{if(E=C.name?i.get(C.name):t.find(T=>T.re.test(C.path)),!E)throw createRouterError(1,{location:_,currentLocation:C});P=E.record.name,S=assign({},C.params,_.params),b=E.stringify(S)}const R=[];let x=E;for(;x;)R.unshift(x.record),x=x.parent;return{name:P,path:b,params:S,matched:R,meta:mergeMetaFields(R)}}n.forEach(_=>s(_));function v(){t.length=0,i.clear()}return{addRoute:s,resolve:y,removeRoute:o,clearRoutes:v,getRoutes:a,getRecordMatcher:r}}function paramsFromLocation(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function normalizeRouteRecord(n){return{path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:void 0,beforeEnter:n.beforeEnter,props:normalizeRecordProps(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}}}function normalizeRecordProps(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function isAliasRecord(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function mergeMetaFields(n){return n.reduce((e,t)=>assign(e,t.meta),{})}function mergeOptions(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function findInsertionIndex(n,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;comparePathParserScore(n,e[s])<0?i=s:t=s+1}const r=getInsertionAncestor(n);return r&&(i=e.lastIndexOf(r,i-1)),i}function getInsertionAncestor(n){let e=n;for(;e=e.parent;)if(isMatchable(e)&&comparePathParserScore(n,e)===0)return e}function isMatchable({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function parseQuery(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let r=0;rs&&encodeQueryValue(s)):[i&&encodeQueryValue(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function normalizeQuery(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=isArray(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return e}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let n=[];function e(i){return n.push(i),()=>{const r=n.indexOf(i);r>-1&&n.splice(r,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function guardToPromiseFn(n,e,t,i,r,s=o=>o()){const o=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((a,d)=>{const y=C=>{C===!1?d(createRouterError(4,{from:t,to:e})):C instanceof Error?d(C):isRouteLocation(C)?d(createRouterError(2,{from:e,to:C})):(o&&i.enterCallbacks[r]===o&&typeof C=="function"&&o.push(C),a())},v=s(()=>n.call(i&&i.instances[r],e,t,y));let _=Promise.resolve(v);n.length<3&&(_=_.then(y)),_.catch(C=>d(C))})}function extractComponentsGuards(n,e,t,i,r=s=>s()){const s=[];for(const o of n)for(const a in o.components){let d=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(isRouteComponent(d)){const v=(d.__vccOpts||d)[e];v&&s.push(guardToPromiseFn(v,t,i,o,a,r))}else{let y=d();s.push(()=>y.then(v=>{if(!v)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const _=isESModule(v)?v.default:v;o.components[a]=_;const E=(_.__vccOpts||_)[e];return E&&guardToPromiseFn(E,t,i,o,a,r)()}))}}return s}function isRouteComponent(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function useLink(n){const e=inject(routerKey),t=inject(routeLocationKey),i=computed(()=>{const d=unref(n.to);return e.resolve(d)}),r=computed(()=>{const{matched:d}=i.value,{length:y}=d,v=d[y-1],_=t.matched;if(!v||!_.length)return-1;const C=_.findIndex(isSameRouteRecord.bind(null,v));if(C>-1)return C;const E=getOriginalPath(d[y-2]);return y>1&&getOriginalPath(v)===E&&_[_.length-1].path!==E?_.findIndex(isSameRouteRecord.bind(null,d[y-2])):C}),s=computed(()=>r.value>-1&&includesParams(t.params,i.value.params)),o=computed(()=>r.value>-1&&r.value===t.matched.length-1&&isSameRouteLocationParams(t.params,i.value.params));function a(d={}){return guardEvent(d)?e[unref(n.replace)?"replace":"push"](unref(n.to)).catch(noop$1):Promise.resolve()}return{route:i,href:computed(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}const RouterLinkImpl=defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink,setup(n,{slots:e}){const t=reactive(useLink(n)),{options:i}=inject(routerKey),r=computed(()=>({[getLinkClass(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[getLinkClass(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&e.default(t);return n.custom?s:h$1("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:r.value},s)}}}),RouterLink=RouterLinkImpl;function guardEvent(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function includesParams(n,e){for(const t in e){const i=e[t],r=n[t];if(typeof i=="string"){if(i!==r)return!1}else if(!isArray(r)||r.length!==i.length||i.some((s,o)=>s!==r[o]))return!1}return!0}function getOriginalPath(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const getLinkClass=(n,e,t)=>n??e??t,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=inject(routerViewLocationKey),r=computed(()=>n.route||i.value),s=inject(viewDepthKey,0),o=computed(()=>{let y=unref(s);const{matched:v}=r.value;let _;for(;(_=v[y])&&!_.components;)y++;return y}),a=computed(()=>r.value.matched[o.value]);provide(viewDepthKey,computed(()=>o.value+1)),provide(matchedRouteKey,a),provide(routerViewLocationKey,r);const d=ref();return watch(()=>[d.value,a.value,n.name],([y,v,_],[C,E,S])=>{v&&(v.instances[_]=y,E&&E!==v&&y&&y===C&&(v.leaveGuards.size||(v.leaveGuards=E.leaveGuards),v.updateGuards.size||(v.updateGuards=E.updateGuards))),y&&v&&(!E||!isSameRouteRecord(v,E)||!C)&&(v.enterCallbacks[_]||[]).forEach(b=>b(y))},{flush:"post"}),()=>{const y=r.value,v=n.name,_=a.value,C=_&&_.components[v];if(!C)return normalizeSlot(t.default,{Component:C,route:y});const E=_.props[v],S=E?E===!0?y.params:typeof E=="function"?E(y):E:null,P=h$1(C,assign({},S,e,{onVnodeUnmounted:R=>{R.component.isUnmounted&&(_.instances[v]=null)},ref:d}));return normalizeSlot(t.default,{Component:P,route:y})||P}}});function normalizeSlot(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const RouterView=RouterViewImpl;function createRouter(n){const e=createRouterMatcher(n.routes,n),t=n.parseQuery||parseQuery,i=n.stringifyQuery||stringifyQuery,r=n.history,s=useCallbacks(),o=useCallbacks(),a=useCallbacks(),d=shallowRef(START_LOCATION_NORMALIZED);let y=START_LOCATION_NORMALIZED;isBrowser&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const v=applyToParams.bind(null,re=>""+re),_=applyToParams.bind(null,encodeParam),C=applyToParams.bind(null,decode$2);function E(re,Ve){let Be,oe;return isRouteName(re)?(Be=e.getRecordMatcher(re),oe=Ve):oe=re,e.addRoute(oe,Be)}function S(re){const Ve=e.getRecordMatcher(re);Ve&&e.removeRoute(Ve)}function b(){return e.getRoutes().map(re=>re.record)}function P(re){return!!e.getRecordMatcher(re)}function R(re,Ve){if(Ve=assign({},Ve||d.value),typeof re=="string"){const W=parseURL(t,re,Ve.path),J=e.resolve({path:W.path},Ve),se=r.createHref(W.fullPath);return assign(W,J,{params:C(J.params),hash:decode$2(W.hash),redirectedFrom:void 0,href:se})}let Be;if(re.path!=null)Be=assign({},re,{path:parseURL(t,re.path,Ve.path).path});else{const W=assign({},re.params);for(const J in W)W[J]==null&&delete W[J];Be=assign({},re,{params:_(W)}),Ve.params=_(Ve.params)}const oe=e.resolve(Be,Ve),pt=re.hash||"";oe.params=v(C(oe.params));const Et=stringifyURL(i,assign({},re,{hash:encodeHash(pt),path:oe.path})),H=r.createHref(Et);return assign({fullPath:Et,hash:pt,query:i===stringifyQuery?normalizeQuery(re.query):re.query||{}},oe,{redirectedFrom:void 0,href:H})}function x(re){return typeof re=="string"?parseURL(t,re,d.value.path):assign({},re)}function T(re,Ve){if(y!==re)return createRouterError(8,{from:Ve,to:re})}function L(re){return G(re)}function k(re){return L(assign(x(re),{replace:!0}))}function N(re){const Ve=re.matched[re.matched.length-1];if(Ve&&Ve.redirect){const{redirect:Be}=Ve;let oe=typeof Be=="function"?Be(re):Be;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=x(oe):{path:oe},oe.params={}),assign({query:re.query,hash:re.hash,params:oe.path!=null?{}:re.params},oe)}}function G(re,Ve){const Be=y=R(re),oe=d.value,pt=re.state,Et=re.force,H=re.replace===!0,W=N(Be);if(W)return G(assign(x(W),{state:typeof W=="object"?assign({},pt,W.state):pt,force:Et,replace:H}),Ve||Be);const J=Be;J.redirectedFrom=Ve;let se;return!Et&&isSameRouteLocation(i,oe,Be)&&(se=createRouterError(16,{to:J,from:oe}),it(oe,oe,!0,!1)),(se?Promise.resolve(se):B(J,oe)).catch(de=>isNavigationFailure(de)?isNavigationFailure(de,2)?de:ie(de):Q(de,J,oe)).then(de=>{if(de){if(isNavigationFailure(de,2))return G(assign({replace:H},x(de.to),{state:typeof de.to=="object"?assign({},pt,de.to.state):pt,force:Et}),Ve||J)}else de=U(J,oe,!0,H,pt);return D(J,oe,de),de})}function F(re,Ve){const Be=T(re,Ve);return Be?Promise.reject(Be):Promise.resolve()}function z(re){const Ve=ct.values().next().value;return Ve&&typeof Ve.runWithContext=="function"?Ve.runWithContext(re):re()}function B(re,Ve){let Be;const[oe,pt,Et]=extractChangingRecords(re,Ve);Be=extractComponentsGuards(oe.reverse(),"beforeRouteLeave",re,Ve);for(const W of oe)W.leaveGuards.forEach(J=>{Be.push(guardToPromiseFn(J,re,Ve))});const H=F.bind(null,re,Ve);return Be.push(H),ut(Be).then(()=>{Be=[];for(const W of s.list())Be.push(guardToPromiseFn(W,re,Ve));return Be.push(H),ut(Be)}).then(()=>{Be=extractComponentsGuards(pt,"beforeRouteUpdate",re,Ve);for(const W of pt)W.updateGuards.forEach(J=>{Be.push(guardToPromiseFn(J,re,Ve))});return Be.push(H),ut(Be)}).then(()=>{Be=[];for(const W of Et)if(W.beforeEnter)if(isArray(W.beforeEnter))for(const J of W.beforeEnter)Be.push(guardToPromiseFn(J,re,Ve));else Be.push(guardToPromiseFn(W.beforeEnter,re,Ve));return Be.push(H),ut(Be)}).then(()=>(re.matched.forEach(W=>W.enterCallbacks={}),Be=extractComponentsGuards(Et,"beforeRouteEnter",re,Ve,z),Be.push(H),ut(Be))).then(()=>{Be=[];for(const W of o.list())Be.push(guardToPromiseFn(W,re,Ve));return Be.push(H),ut(Be)}).catch(W=>isNavigationFailure(W,8)?W:Promise.reject(W))}function D(re,Ve,Be){a.list().forEach(oe=>z(()=>oe(re,Ve,Be)))}function U(re,Ve,Be,oe,pt){const Et=T(re,Ve);if(Et)return Et;const H=Ve===START_LOCATION_NORMALIZED,W=isBrowser?history.state:{};Be&&(oe||H?r.replace(re.fullPath,assign({scroll:H&&W&&W.scroll},pt)):r.push(re.fullPath,pt)),d.value=re,it(re,Ve,Be,H),ie()}let Y;function $(){Y||(Y=r.listen((re,Ve,Be)=>{if(!Qe.listening)return;const oe=R(re),pt=N(oe);if(pt){G(assign(pt,{replace:!0}),oe).catch(noop$1);return}y=oe;const Et=d.value;isBrowser&&saveScrollPosition(getScrollKey(Et.fullPath,Be.delta),computeScrollPosition()),B(oe,Et).catch(H=>isNavigationFailure(H,12)?H:isNavigationFailure(H,2)?(G(H.to,oe).then(W=>{isNavigationFailure(W,20)&&!Be.delta&&Be.type===NavigationType.pop&&r.go(-1,!1)}).catch(noop$1),Promise.reject()):(Be.delta&&r.go(-Be.delta,!1),Q(H,oe,Et))).then(H=>{H=H||U(oe,Et,!1),H&&(Be.delta&&!isNavigationFailure(H,8)?r.go(-Be.delta,!1):Be.type===NavigationType.pop&&isNavigationFailure(H,20)&&r.go(-1,!1)),D(oe,Et,H)}).catch(noop$1)}))}let K=useCallbacks(),q=useCallbacks(),te;function Q(re,Ve,Be){ie(re);const oe=q.list();return oe.length?oe.forEach(pt=>pt(re,Ve,Be)):console.error(re),Promise.reject(re)}function je(){return te&&d.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((re,Ve)=>{K.add([re,Ve])})}function ie(re){return te||(te=!re,$(),K.list().forEach(([Ve,Be])=>re?Be(re):Ve()),K.reset()),re}function it(re,Ve,Be,oe){const{scrollBehavior:pt}=n;if(!isBrowser||!pt)return Promise.resolve();const Et=!Be&&getSavedScrollPosition(getScrollKey(re.fullPath,0))||(oe||!Be)&&history.state&&history.state.scroll||null;return nextTick().then(()=>pt(re,Ve,Et)).then(H=>H&&scrollToPosition(H)).catch(H=>Q(H,re,Ve))}const le=re=>r.go(re);let ft;const ct=new Set,Qe={currentRoute:d,listening:!0,addRoute:E,removeRoute:S,clearRoutes:e.clearRoutes,hasRoute:P,getRoutes:b,resolve:R,options:n,push:L,replace:k,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:q.add,isReady:je,install(re){const Ve=this;re.component("RouterLink",RouterLink),re.component("RouterView",RouterView),re.config.globalProperties.$router=Ve,Object.defineProperty(re.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(d)}),isBrowser&&!ft&&d.value===START_LOCATION_NORMALIZED&&(ft=!0,L(r.location).catch(pt=>{}));const Be={};for(const pt in START_LOCATION_NORMALIZED)Object.defineProperty(Be,pt,{get:()=>d.value[pt],enumerable:!0});re.provide(routerKey,Ve),re.provide(routeLocationKey,shallowReactive(Be)),re.provide(routerViewLocationKey,d);const oe=re.unmount;ct.add(re),re.unmount=function(){ct.delete(re),ct.size<1&&(y=START_LOCATION_NORMALIZED,Y&&Y(),Y=null,d.value=START_LOCATION_NORMALIZED,ft=!1,te=!1),oe()}}};function ut(re){return re.reduce((Ve,Be)=>Ve.then(()=>z(Be)),Promise.resolve())}return Qe}function extractChangingRecords(n,e){const t=[],i=[],r=[],s=Math.max(e.matched.length,n.matched.length);for(let o=0;oisSameRouteRecord(y,a))?i.push(a):t.push(a));const d=n.matched[o];d&&(e.matched.find(y=>isSameRouteRecord(y,d))||r.push(d))}return[t,i,r]}function useRoute(n){return inject(routeLocationKey)}function tryOnScopeDispose(n){return getCurrentScope()?(onScopeDispose(n),!0):!1}function toValue(n){return typeof n=="function"?n():unref(n)}const isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString$4=Object.prototype.toString,isObject=n=>toString$4.call(n)==="[object Object]",noop=()=>{};function createFilterWrapper(n,e){function t(...i){return new Promise((r,s)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(r).catch(s)})}return t}const bypassFilter=n=>n();function pausableFilter(n=bypassFilter){const e=ref(!0);function t(){e.value=!1}function i(){e.value=!0}const r=(...s)=>{e.value&&n(...s)};return{isActive:readonly(e),pause:t,resume:i,eventFilter:r}}function getLifeCycleTarget(n){return getCurrentInstance()}function watchWithFilter(n,e,t={}){const{eventFilter:i=bypassFilter,...r}=t;return watch(n,createFilterWrapper(i,e),r)}function watchPausable(n,e,t={}){const{eventFilter:i,...r}=t,{eventFilter:s,pause:o,resume:a,isActive:d}=pausableFilter(i);return{stop:watchWithFilter(n,e,{...r,eventFilter:s}),pause:o,resume:a,isActive:d}}function tryOnMounted(n,e=!0,t){getLifeCycleTarget()?onMounted(n,t):e?n():nextTick(n)}function unrefElement(n){var e;const t=toValue(n);return(e=t==null?void 0:t.$el)!=null?e:t}const defaultWindow=isClient?window:void 0;function useEventListener(...n){let e,t,i,r;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,r]=n,e=defaultWindow):[e,t,i,r]=n,!e)return noop;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const s=[],o=()=>{s.forEach(v=>v()),s.length=0},a=(v,_,C,E)=>(v.addEventListener(_,C,E),()=>v.removeEventListener(_,C,E)),d=watch(()=>[unrefElement(e),toValue(r)],([v,_])=>{if(o(),!v)return;const C=isObject(_)?{..._}:_;s.push(...t.flatMap(E=>i.map(S=>a(v,E,S,C))))},{immediate:!0,flush:"post"}),y=()=>{d(),o()};return tryOnScopeDispose(y),y}function useMounted(){const n=ref(!1),e=getCurrentInstance();return e&&onMounted(()=>{n.value=!0},e),n}function useSupported(n){const e=useMounted();return computed(()=>(e.value,!!n()))}function useMediaQuery(n,e={}){const{window:t=defaultWindow}=e,i=useSupported(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let r;const s=ref(!1),o=y=>{s.value=y.matches},a=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o))},d=watchEffect(()=>{i.value&&(a(),r=t.matchMedia(toValue(n)),"addEventListener"in r?r.addEventListener("change",o):r.addListener(o),s.value=r.matches)});return tryOnScopeDispose(()=>{d(),a(),r=void 0}),s}const _global=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global||(_global[globalKey]=_global[globalKey]||{}),_global[globalKey]}function getSSRHandler(n,e){return handlers[n]||e}function guessSerializerType(n){return n==null?"any":n instanceof Set?"set":n instanceof Map?"map":n instanceof Date?"date":typeof n=="boolean"?"boolean":typeof n=="string"?"string":typeof n=="object"?"object":Number.isNaN(n)?"any":"number"}const StorageSerializers={boolean:{read:n=>n==="true",write:n=>String(n)},object:{read:n=>JSON.parse(n),write:n=>JSON.stringify(n)},number:{read:n=>Number.parseFloat(n),write:n=>String(n)},any:{read:n=>n,write:n=>String(n)},string:{read:n=>n,write:n=>String(n)},map:{read:n=>new Map(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n.entries()))},set:{read:n=>new Set(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n))},date:{read:n=>new Date(n),write:n=>n.toISOString()}},customStorageEventName="vueuse-storage";function useStorage(n,e,t,i={}){var r;const{flush:s="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:d=!0,mergeDefaults:y=!1,shallow:v,window:_=defaultWindow,eventFilter:C,onError:E=B=>{console.error(B)},initOnMounted:S}=i,b=(v?shallowRef:ref)(typeof e=="function"?e():e);if(!t)try{t=getSSRHandler("getDefaultStorage",()=>{var B;return(B=defaultWindow)==null?void 0:B.localStorage})()}catch(B){E(B)}if(!t)return b;const P=toValue(e),R=guessSerializerType(P),x=(r=i.serializer)!=null?r:StorageSerializers[R],{pause:T,resume:L}=watchPausable(b,()=>N(b.value),{flush:s,deep:o,eventFilter:C});_&&a&&tryOnMounted(()=>{useEventListener(_,"storage",F),useEventListener(_,customStorageEventName,z),S&&F()}),S||F();function k(B,D){_&&_.dispatchEvent(new CustomEvent(customStorageEventName,{detail:{key:n,oldValue:B,newValue:D,storageArea:t}}))}function N(B){try{const D=t.getItem(n);if(B==null)k(D,null),t.removeItem(n);else{const U=x.write(B);D!==U&&(t.setItem(n,U),k(D,U))}}catch(D){E(D)}}function G(B){const D=B?B.newValue:t.getItem(n);if(D==null)return d&&P!=null&&t.setItem(n,x.write(P)),P;if(!B&&y){const U=x.read(D);return typeof y=="function"?y(U,P):R==="object"&&!Array.isArray(U)?{...P,...U}:U}else return typeof D!="string"?D:x.read(D)}function F(B){if(!(B&&B.storageArea!==t)){if(B&&B.key==null){b.value=P;return}if(!(B&&B.key!==n)){T();try{(B==null?void 0:B.newValue)!==x.write(b.value)&&(b.value=G(B))}catch(D){E(D)}finally{B?nextTick(L):L()}}}}function z(B){F(B.detail)}return b}function useMatchMedia(n){var e={SM:"576px",MD:"768px",LG:"992px",XL:"1440px"};if(e[n]!==void 0){const t="(max-width: "+e[n]+")";return useMediaQuery(t)}}function useBaseUrl(){return"https://cartes.gouv.fr"}function useHeaderParams(){return{serviceTitle:"cartes.gouv.fr",serviceDescription:"Le service public des cartes et données du territoire",logoText:["RÉPUBLIQUE","FRANÇAISE"],quickLinks:[{label:"Accueil",to:"/",href:useBaseUrl()+"/",icon:"ri-arrow-right-line",iconRight:!0},{label:"Catalogue",to:"/catalogue",href:useBaseUrl()+"/catalogue",icon:"ri-arrow-right-line",iconRight:!0}],searchQuery:ref("")}}const LogoIGN="data:image/png;base64,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",LogoTRANSFO="/cartes.gouv.fr-entree-carto/assets/logo-transformation-fonction-publiques-C9P2QqWZ.png",LogoECOLO="/cartes.gouv.fr-entree-carto/assets/logo-transition-ecologique-D0O5Izlc.png",LogoCNIG="/cartes.gouv.fr-entree-carto/assets/logo-cnig-CXEVuuxB.png",LogoSun="data:image/svg+xml,%3csvg%20width='80px'%20height='80px'%20viewBox='0%200%2080%2080'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.fr-artwork-decorative%20{%20fill:%20%23ECECFF;%20}%20.fr-artwork-minor%20{%20fill:%20%23E1000F;%20}%20.fr-artwork-major%20{%20fill:%20%23000091;%20}%20%3c/style%3e%3csymbol%20id='artwork-decorative'%3e%3cpath%20d='M19,72c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S19.5514,72,19,72z%20M31,10c-0.5514,0-1-0.4486-1-1%20c0-0.55145,0.4486-1,1-1s1,0.44855,1,1C32,9.5514,31.5514,10,31,10z%20M67,66c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1%20S67.5514,66,67,66z%20M67,16c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S67.5514,16,67,16z%20M9,32c-0.5514,0-1-0.4486-1-1%20s0.4486-1,1-1s1,0.4486,1,1S9.5514,32,9,32z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-minor'%3e%3cpath%20d='M32.4453,44.1679c0.4595-0.3063,1.0804-0.1821,1.3867,0.2774C35.3156,46.6706,38.5061,48,41,48%20c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1c-3.1061,0-6.931-1.5937-8.8321-4.4453C31.8616,45.0952,31.9858,44.4743,32.4453,44.1679z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-major'%3e%3cpath%20d='M39.00671,20.04651L39,19.92981v-5.47369c0-0.55225,0.44769-1,1-1c0.51282,0,0.93549,0.38611,0.99329,0.88336%20L41,14.45612v5.47369c0,0.55231-0.44769,1-1,1C39.48718,20.92981,39.06451,20.54382,39.00671,20.04651z%20M19.37927,39H14%20l-0.11658,0.00671C13.38599,39.06451,13,39.48718,13,40c0,0.55231,0.44769,1,1,1h5.37927l0.11664-0.00671%20c0.49738-0.0578,0.88336-0.48047,0.88336-0.99329C20.37927,39.44769,19.93158,39,19.37927,39z%20M66,39h-5.37927l-0.11664,0.00671%20c-0.49738,0.0578-0.88336,0.48047-0.88336,0.99329c0,0.55231,0.44769,1,1,1H66l0.11658-0.00671C66.61401,40.93549,67,40.51282,67,40%20C67,39.44769,66.55231,39,66,39z%20M40,59.07019c-0.55231,0-1,0.44769-1,1v5.47369l0.00671,0.11664%20c0.0578,0.49725,0.48047,0.88336,0.99329,0.88336c0.55231,0,1-0.44769,1-1v-5.47369l-0.00671-0.11658%20C40.93549,59.45618,40.51282,59.07019,40,59.07019z%20M24.04541,53.89557l-1.79309,1.82452l-0.0824,0.09503%20c-0.30164,0.3949-0.26892,0.96185,0.09467,1.31915c0.39392,0.38715,1.02704,0.38159,1.41412-0.01227l1.79309-1.82458l0.0824-0.09491%20c0.30157-0.3949,0.26898-0.96191-0.0946-1.31921C25.06561,53.49622,24.4325,53.50171,24.04541,53.89557z%20M55.95459,24.27991%20l1.79309-1.82458l0.0824-0.09491c0.30164-0.3949,0.26892-0.96191-0.09467-1.31921c-0.39392-0.38721-1.02704-0.38159-1.41412,0.01233%20l-1.79321,1.82446L54.4458,22.9729c-0.30157,0.39502-0.26898,0.96191,0.0946,1.31927%20C54.93439,24.67932,55.5675,24.67383,55.95459,24.27991z%20M23.67871,21.05353l-0.09338-0.08405%20c-0.38971-0.30847-0.95715-0.28571-1.32074,0.07172c-0.39386,0.38708-0.39941,1.0202-0.01227,1.41412l1.79309,1.82458%20l0.09351,0.08398c0.38959,0.30841,0.95697,0.28558,1.32068-0.07172c0.39392-0.38708,0.39941-1.02026,0.01221-1.41418%20L23.67871,21.05353z%20M55.95459,53.89557l-0.09351-0.08398c-0.38959-0.30847-0.95697-0.28571-1.32068,0.07172%20c-0.39392,0.38708-0.39941,1.0202-0.01233,1.41412l1.79321,1.82458l0.09338,0.08398%20c0.38971,0.30841,0.95715,0.28558,1.32074-0.07172c0.39386-0.38708,0.39941-1.02026,0.01227-1.41418L55.95459,53.89557z%20M40,26%20c-7.73199,0-14,6.26801-14,14c0,1.91528,0.38538,3.77838,1.12323,5.50281c0.21716,0.50781,0.80499,0.74329,1.31268,0.52606%20c0.50781-0.21729,0.74329-0.80499,0.52606-1.31274C28.33002,43.2392,28,41.64362,28,40c0-6.62738,5.37262-12,12-12s12,5.37262,12,12%20s-5.37262,12-12,12c-3.5495,0-6.84521-1.54871-9.11212-4.19141c-0.35956-0.41907-0.99091-0.46747-1.4101-0.10791%20c-0.41919,0.35962-0.46747,0.99091-0.10791,1.4101C32.01282,52.19177,35.86072,54,40,54c7.73199,0,14-6.26801,14-14%20S47.73199,26,40,26z'/%3e%3c/symbol%3e%3cuse%20class='fr-artwork-decorative'%20href='%23artwork-decorative'/%3e%3cuse%20class='fr-artwork-minor'%20href='%23artwork-minor'/%3e%3cuse%20class='fr-artwork-major'%20href='%23artwork-major'/%3e%3c/svg%3e",LogoMoon="data:image/svg+xml,%3csvg%20width='80px'%20height='80px'%20viewBox='0%200%2080%2080'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.fr-artwork-decorative%20{%20fill:%20%23ECECFF;%20}%20.fr-artwork-minor%20{%20fill:%20%23E1000F;%20}%20.fr-artwork-major%20{%20fill:%20%23000091;%20}%20%3c/style%3e%3csymbol%20id='artwork-decorative'%3e%3cpath%20d='M67,16c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S67.5514,16,67,16z%20M19,72c-0.5514,0-1-0.4486-1-1%20s0.4486-1,1-1s1,0.4486,1,1S19.5514,72,19,72z%20M31,10c-0.5514,0-1-0.4486-1-1c0-0.55145,0.4486-1,1-1s1,0.44855,1,1%20C32,9.5514,31.5514,10,31,10z%20M69,60c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S69.5514,60,69,60z%20M45,70%20c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S45.5514,70,45,70z%20M9,32c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1%20S9.5514,32,9,32z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-minor'%3e%3cpath%20d='M41,30c-0.5523,0-1,0.4477-1,1s0.4477,1,1,1s1-0.4477,1-1S41.5523,30,41,30z%20M59,38c-0.5523,0-1,0.4477-1,1%20s0.4477,1,1,1s1-0.4477,1-1S59.5523,38,59,38z%20M55,38c0.5523,0,1,0.4477,1,1c0,0.5128-0.386,0.9355-0.8834,0.9933L55,40h-2%20c-0.5523,0-1-0.4477-1-1c0-0.5128,0.386-0.9355,0.8834-0.9933L53,38H55z%20M48,31c0-0.5523-0.4477-1-1-1h-2l-0.1166,0.0067%20C44.386,30.0645,44,30.4872,44,31c0,0.5523,0.4477,1,1,1h2l0.1166-0.0067C47.614,31.9355,48,31.5128,48,31z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-major'%3e%3cpath%20d='M59.90668,47.08899c-2.4024,7.6662-9.49188,12.91333-17.52948,12.91333%20c-10.14819,0-18.37512-8.26733-18.37512-18.46643c0-7.85461,4.93793-14.82916,12.2738-17.42346%20c1.87921-0.66461,3.32355,1.68457,1.9613,3.1073c-2.30841,2.41095-3.5921,5.59399-3.5921,8.95575%20c0,6.76794,5.2041,12.37939,11.8927,12.89435c0.5506,0.04236,0.96271,0.52319,0.92035,1.07379%20c-0.04242,0.55066-0.52325,0.96271-1.07385,0.92029c-7.72986-0.59503-13.7392-7.07483-13.7392-14.88843%20c0-3.61078,1.28583-7.04816,3.61322-9.75067l0.22668-0.25684L36.2854,26.2464c-6.06519,2.4425-10.13849,8.30981-10.2796,14.9339%20l-0.00372,0.35559c0,9.09668,7.33374,16.46643,16.37512,16.46643c6.92578,0,13.0639-4.375,15.39703-10.84619l0.06879-0.19916%20l-0.19684,0.18811c-1.96747,1.82373-4.37738,3.07861-6.99451,3.63629l-0.39404,0.07843%20c-0.54303,0.1004-1.0647-0.25842-1.1651-0.80151c-0.10052-0.54309,0.25836-1.0647,0.80145-1.16516%20c2.62329-0.48511,5.02313-1.77515,6.89282-3.70404C58.17792,43.75378,60.4975,45.2038,59.90668,47.08899z%20M15,58%20c-0.55231,0-1,0.44769-1,1s0.44769,1,1,1s1-0.44769,1-1S15.55231,58,15,58z%20M55,28h2l0.11658-0.00671%20C57.61401,27.93549,58,27.51282,58,27c0-0.55231-0.44769-1-1-1h-2l-0.11658,0.00671C54.38599,26.06451,54,26.48718,54,27%20C54,27.55231,54.44769,28,55,28z%20M23,58h-4l-0.11658,0.00671C18.38599,58.06451,18,58.48718,18,59c0,0.55231,0.44769,1,1,1h4%20l0.11658-0.00671C23.61401,59.93549,24,59.51282,24,59C24,58.44769,23.55231,58,23,58z'/%3e%3c/symbol%3e%3cuse%20class='fr-artwork-decorative'%20href='%23artwork-decorative'/%3e%3cuse%20class='fr-artwork-minor'%20href='%23artwork-minor'/%3e%3cuse%20class='fr-artwork-major'%20href='%23artwork-major'/%3e%3c/svg%3e",LogoSystem="/cartes.gouv.fr-entree-carto/assets/system-DTLRiYhn.svg";function useFooterParams(){return{beforeMandatoryLinks:[{label:"Plan du site",href:useBaseUrl()+"/plan-du-site"}],a11yCompliance:"partiellement conforme",legalLink:"/mentions-legales",personalDataLink:"/donnees-personnelles",cookiesLink:"/cookies",a11yComplianceLink:"/accessibilite",descText:"Cartes.gouv.fr est développé par l’Institut national de l’information géographique et forestière (IGN) et ses partenaires. Le site s’appuie sur la Géoplateforme, la nouvelle infrastructure publique, ouverte et collaborative des données géographiques.",homeLink:"/",licenceText:void 0,licenceTo:void 0,licenceName:void 0,licenceLinkProps:void 0,ecosystemLinks:[{label:"legifrance.gouv.fr",href:"https://legifrance.gouv.fr"},{label:"gouvernement.fr",href:"https://gouvernement.fr"},{label:"service-public.fr",href:"https://service-public.fr"},{label:"data.gouv.fr",href:"https://data.gouv.fr"}],partners:{title:"Nos partenaires",mainPartner:{},subPartners:[{href:"https://www.ign.fr/",logo:LogoIGN,name:"IGN"},{href:"https://www.transformation.gouv.fr/",logo:LogoTRANSFO,name:"Ministère de la transformation et de la fonction publiques"},{href:"https://www.ecologie.gouv.fr/",logo:LogoECOLO,name:"Ministère de la Transition Écologique et de la Cohésion des Territoires"},{href:"https://cnig.gouv.fr/",logo:LogoCNIG,name:"Conseil national de l’information géolocalisée"}]},themeModale:{title:"Paramètres d'affichage",size:"md",legend:"Choisissez un thème pour personnaliser l'apparence du site.",themeOptions:[{label:"Thème clair",value:"light",id:"fr-radios-theme-light",name:"fr-radios-theme",img:LogoSun},{label:"Thème sombre",id:"fr-radios-theme-dark",value:"dark",name:"fr-radios-theme",img:LogoMoon},{label:"Système",id:"fr-radios-theme-system",value:"system",name:"fr-radios-theme",hint:"Utilise les paramètres sytème.",img:LogoSystem}]},mandatoryLinks:[{label:"Accessibilité : partiellement conforme",href:useBaseUrl()+"/accessibilite"},{label:"Mentions légales",href:useBaseUrl()+"/mentions-legales"},{label:"Données personnelles",href:useBaseUrl()+"/donnees-personnelles"},{label:"Gestion des cookies",href:useBaseUrl()+"/cookies"}]}}const _hoisted_1$5={class:"fr-container fr-container--fluid fr-container-md"},_sfc_main$t=defineComponent({__name:"Main",setup(n){dist.useLogger(),Ic();const e=useMatchMedia("LG"),t=useHeaderParams(),i=useFooterParams(),r=ref(),{setScheme:s,theme:o}=Ic(),a=()=>{s(r.value)},d=ref(!1),y=()=>{console.log(d),d.value=!0},v=()=>{d.value=!1},_=[{label:"Paramètres d’affichage",button:!0,class:"fr-icon-theme-fill fr-link--icon-left fr-px-2v",to:"/settings",onclick:y}],C=useRoute(),E=[{title:"Commencer avec cartes.gouv",get active(){return["Documentation","Offre","Nous rejoindre"].includes(C.name)},links:[{to:useBaseUrl()+"/documentation",text:"Documentation"},{to:useBaseUrl()+"/offre",text:"Offre"},{to:useBaseUrl()+"/nous-rejoindre",text:"Nous rejoindre"}]},{to:useBaseUrl()+"/catalogue",text:"Catalogue"},{to:useBaseUrl()+"/actualites",text:"Actualités"},{title:"Assistance",get active(){return["Questions fréquentes","Nous écrire","Niveau de service"].includes(C.name)},links:[{to:useBaseUrl()+"/faq",text:"Questions fréquentes"},{to:useBaseUrl()+"/nous-ecrire",text:"Nous écrire"},{to:useBaseUrl()+"/niveau-de-service",text:"Niveau de service"}]},{to:useBaseUrl()+"/a-propos",text:"À propos"}];return(S,b)=>{const P=Xs,R=Il,x=resolveComponent("router-view"),T=Er,L=Ao,k=ys;return openBlock(),createElementBlock(Fragment,null,[createVNode(R,{modelValue:unref(t).serviceTitle,"onUpdate:modelValue":b[0]||(b[0]=N=>unref(t).serviceTitle=N),"service-title":unref(t).serviceTitle,"service-description":unref(t).serviceDescription,"logo-text":unref(t).logoText,"quick-links":unref(t).quickLinks},{default:withCtx(()=>[withDirectives(createVNode(P,{"nav-items":E},null,512),[[vShow,!unref(e)]])]),_:1},8,["modelValue","service-title","service-description","logo-text","quick-links"]),createBaseVNode("div",null,[createVNode(x)]),createVNode(T,{"before-mandatory-links":unref(i).beforeMandatoryLinks,"after-mandatory-links":_,"logo-text":unref(i).logoText,"desc-text":unref(i).descText,"home-link":unref(i).homeLink,partners:unref(i).partners,"licence-text":unref(i).licenceText,"licence-to":unref(i).licenceTo,"licence-name":unref(i).licenceName,"licence-link-props":unref(i).licenceLinkProps,"ecosystem-links":unref(i).ecosystemLinks,"mandatory-links":unref(i).mandatoryLinks},null,8,["before-mandatory-links","logo-text","desc-text","home-link","partners","licence-text","licence-to","licence-name","licence-link-props","ecosystem-links","mandatory-links"]),createBaseVNode("div",_hoisted_1$5,[createVNode(k,{ref:"modal",opened:unref(d),title:unref(i).themeModale.title,size:unref(i).themeModale.size,onClose:v},{default:withCtx(()=>[createVNode(L,{modelValue:unref(r),"onUpdate:modelValue":[b[1]||(b[1]=N=>isRef(r)?r.value=N:null),a],legend:unref(i).themeModale.legend,name:"fr-radios-theme",options:unref(i).themeModale.themeOptions},null,8,["modelValue","legend","options"])]),_:1},8,["opened","title","size"])])],64)}}}),_sfc_main$s=defineComponent({__name:"App",setup(n){return(e,t)=>(openBlock(),createBlock(_sfc_main$t))}});class BaseEvent{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const ObjectEventType={PROPERTYCHANGE:"propertychange"};class Disposable{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function binarySearch$1(n,e,t){let i,r;t=t||ascending;let s=0,o=n.length,a=!1;for(;s>1),r=+t(n[i],e),r<0?s=i+1:(o=i,a=!r);return a?s:~s}function ascending(n,e){return n>e?1:n0?r-1:r}return i-1}if(t>0){for(let r=1;r0||o===0)})}function TRUE(){return!0}function FALSE(){return!1}function VOID(){}function memoizeOne(n){let e=!1,t,i,r;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==r||!equals$2(s,i))&&(e=!0,r=this,i=s,t=n.apply(this,arguments)),t}}function toPromise(n){function e(){let t;try{t=n()}catch(i){return Promise.reject(i)}return t instanceof Promise?t:Promise.resolve(t)}return e()}function clear$1(n){for(const e in n)delete n[e]}function isEmpty$1(n){let e;for(e in n)return!1;return!e}class Target extends Disposable{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;const i=this.listeners_||(this.listeners_={}),r=i[e]||(i[e]=[]);r.includes(t)||r.push(t)}dispatchEvent(e){const t=typeof e=="string",i=t?e:e.type,r=this.listeners_&&this.listeners_[i];if(!r)return;const s=t?new BaseEvent(e):e;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let d;for(let y=0,v=r.length;y0:!1}removeEventListener(e,t){if(!this.listeners_)return;const i=this.listeners_[e];if(!i)return;const r=i.indexOf(t);r!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[r]=VOID,++this.pendingRemovals_[e]):(i.splice(r,1),i.length===0&&delete this.listeners_[e]))}}const EventType$1={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function listen(n,e,t,i,r){if(i&&i!==n&&(t=t.bind(i)),r){const o=t;t=function(){n.removeEventListener(e,t),o.apply(this,arguments)}}const s={target:n,type:e,listener:t};return n.addEventListener(e,t),s}function listenOnce(n,e,t,i){return listen(n,e,t,i,!0)}function unlistenByKey(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),clear$1(n))}class Observable extends Target{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(EventType$1.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){const i=e.length,r=new Array(i);for(let s=0;s0;)this.pop()}extend(e){for(let t=0,i=e.length;tthis.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD,t,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const t=this.getLength();return this.insertAt(t,e),this.getLength()}remove(e){const t=this.array_;for(let i=0,r=t.length;i=this.getLength())return;const t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE,t,e)),t}setAt(e,t){const i=this.getLength();if(e>=i){this.insertAt(e,t);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);const r=this.array_[e];this.array_[e]=t,this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE,r,e)),this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD,t,e))}updateLength_(){this.set(Property$3.LENGTH,this.array_.length)}assertUnique_(e,t){for(let i=0,r=this.array_.length;ir&&(d=d|Relationship.RIGHT),as&&(d=d|Relationship.ABOVE),d===Relationship.UNKNOWN&&(d=Relationship.INTERSECTING),d}function createEmpty(){return[1/0,1/0,-1/0,-1/0]}function createOrUpdate$2(n,e,t,i,r){return r?(r[0]=n,r[1]=e,r[2]=t,r[3]=i,r):[n,e,t,i]}function createOrUpdateEmpty(n){return createOrUpdate$2(1/0,1/0,-1/0,-1/0,n)}function createOrUpdateFromCoordinate(n,e){const t=n[0],i=n[1];return createOrUpdate$2(t,i,t,i,e)}function createOrUpdateFromFlatCoordinates(n,e,t,i,r){const s=createOrUpdateEmpty(r);return extendFlatCoordinates(s,n,e,t,i)}function equals$1(n,e){return n[0]==e[0]&&n[2]==e[2]&&n[1]==e[1]&&n[3]==e[3]}function extend$3(n,e){return e[0]n[2]&&(n[2]=e[2]),e[1]n[3]&&(n[3]=e[3]),n}function extendCoordinate(n,e){e[0]n[2]&&(n[2]=e[0]),e[1]n[3]&&(n[3]=e[1])}function extendFlatCoordinates(n,e,t,i,r){for(;te[0]?i[0]=n[0]:i[0]=e[0],n[1]>e[1]?i[1]=n[1]:i[1]=e[1],n[2]=e[0]&&n[1]<=e[3]&&n[3]>=e[1]}function isEmpty(n){return n[2]=o&&b<=d),!i&&s&Relationship.RIGHT&&!(r&Relationship.RIGHT)&&(P=E-(C-d)*S,i=P>=a&&P<=y),!i&&s&Relationship.BELOW&&!(r&Relationship.BELOW)&&(b=C-(E-a)/S,i=b>=o&&b<=d),!i&&s&Relationship.LEFT&&!(r&Relationship.LEFT)&&(P=E-(C-o)*S,i=P>=a&&P<=y)}return i}function applyTransform(n,e,t,i){if(isEmpty(n))return createOrUpdateEmpty(t);let r=[];r=[n[0],n[1],n[2],n[1],n[2],n[3],n[0],n[3]],e(r,r,2);const s=[],o=[];for(let a=0,d=r.length;a=t[2])){const r=getWidth(t),o=Math.floor((i[0]-t[0])/r)*r;n[0]-=o,n[2]-=o}return n}function wrapAndSliceX(n,e){if(e.canWrapX()){const t=e.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[t[0],n[1],t[2],n[3]]];wrapX$2(n,e);const i=getWidth(t);if(getWidth(n)>i)return[[t[0],n[1],t[2],n[3]]];if(n[0]t[2])return[[n[0],n[1],t[2],n[3]],[t[0],n[1],n[2]-i,n[3]]]}return[n]}const rgb={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var xyz={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};xyz.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}};xyz.max=xyz.whitepoint[2].D65;xyz.rgb=function(n,e){e=e||xyz.whitepoint[2].E;var t=n[0]/e[0],i=n[1]/e[1],r=n[2]/e[2],s,o,a;return s=t*3.240969941904521+i*-1.537383177570093+r*-.498610760293,o=t*-.96924363628087+i*1.87596750150772+r*.041555057407175,a=t*.055630079696993+i*-.20397695888897+r*1.056971514242878,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s=s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[s*255,o*255,a*255]};rgb.xyz=function(n,e){var t=n[0]/255,i=n[1]/255,r=n[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var s=t*.41239079926595+i*.35758433938387+r*.18048078840183,o=t*.21263900587151+i*.71516867876775+r*.072192315360733,a=t*.019330818715591+i*.11919477979462+r*.95053215224966;return e=e||xyz.whitepoint[2].E,[s*e[0],o*e[1],a*e[2]]};const luv={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(n,e,t){var i,r,s,o,a,d,y,v,_,C,E,S,b;if(s=n[0],o=n[1],a=n[2],s===0)return[0,0,0];var P=.0011070564598794539;return e=e||"D65",t=t||2,_=xyz.whitepoint[t][e][0],C=xyz.whitepoint[t][e][1],E=xyz.whitepoint[t][e][2],S=4*_/(_+15*C+3*E),b=9*C/(_+15*C+3*E),i=o/(13*s)+S||0,r=a/(13*s)+b||0,y=s>8?C*Math.pow((s+16)/116,3):C*s*P,d=y*9*i/(4*r)||0,v=y*(12-3*i-20*r)/(4*r)||0,[d,y,v]}};xyz.luv=function(n,e,t){var i,r,s,o,a,d,y,v,_,C,E,S,b,P=.008856451679035631,R=903.2962962962961;e=e||"D65",t=t||2,_=xyz.whitepoint[t][e][0],C=xyz.whitepoint[t][e][1],E=xyz.whitepoint[t][e][2],S=4*_/(_+15*C+3*E),b=9*C/(_+15*C+3*E),d=n[0],y=n[1],v=n[2],i=4*d/(d+15*y+3*v)||0,r=9*y/(d+15*y+3*v)||0;var x=y/C;return s=x<=P?R*x:116*Math.pow(x,1/3)-16,o=13*s*(i-S),a=13*s*(r-b),[s,o,a]};var lchuv={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(n){var e=n[0],t=n[1],i=n[2],r,s,o;return o=i/360*2*Math.PI,r=t*Math.cos(o),s=t*Math.sin(o),[e,r,s]},xyz:function(n){return luv.xyz(lchuv.luv(n))}};luv.lchuv=function(n){var e=n[0],t=n[1],i=n[2],r=Math.sqrt(t*t+i*i),s=Math.atan2(i,t),o=s*360/2/Math.PI;return o<0&&(o+=360),[e,r,o]};xyz.lchuv=function(n){return luv.lchuv(xyz.luv(n))};const names$y={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var baseHues={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function parse$3(n){var v,_;var e,t=[],i=1,r;if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(n=String(n).toLowerCase(),names$y[n])t=names$y[n].slice(),r="rgb";else if(n==="transparent")i=0,r="rgb",t=[0,0,0];else if(n[0]==="#"){var s=n.slice(1),o=s.length,a=o<=4;i=1,a?(t=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],o===4&&(i=parseInt(s[3]+s[3],16)/255)):(t=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],o===8&&(i=parseInt(s[6]+s[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),r="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(n)){var d=e[1];r=d.replace(/a$/,"");var y=r==="cmyk"?4:r==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/),r==="color"&&(r=t.shift()),t=t.map(function(C,E){if(C[C.length-1]==="%")return C=parseFloat(C)/100,E===3?C:r==="rgb"?C*255:r[0]==="h"||r[0]==="l"&&!E?C*100:r==="lab"?C*125:r==="lch"?E<2?C*150:C*360:r[0]==="o"&&!E?C:r==="oklab"?C*.4:r==="oklch"?E<2?C*.4:C*360:C;if(r[E]==="h"||E===2&&r[r.length-1]==="h"){if(baseHues[C]!==void 0)return baseHues[C];if(C.endsWith("deg"))return parseFloat(C);if(C.endsWith("turn"))return parseFloat(C)*360;if(C.endsWith("grad"))return parseFloat(C)*360/400;if(C.endsWith("rad"))return parseFloat(C)*180/Math.PI}return C==="none"?0:parseFloat(C)}),i=t.length>y?t.pop():1}else/[0-9](?:\s|\/|,)/.test(n)&&(t=n.match(/([0-9]+)/g).map(function(C){return parseFloat(C)}),r=((_=(v=n.match(/([a-z])/ig))==null?void 0:v.join(""))==null?void 0:_.toLowerCase())||"rgb");return{space:r,values:t,alpha:i}}const hsl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(n){var e=n[0]/360,t=n[1]/100,i=n[2]/100,r,s,o,a,d,y=0;if(t===0)return d=i*255,[d,d,d];for(s=i<.5?i*(1+t):i+t-i*t,r=2*i-s,a=[0,0,0];y<3;)o=e+1/3*-(y-1),o<0?o++:o>1&&o--,d=6*o<1?r+(s-r)*6*o:2*o<1?s:3*o<2?r+(s-r)*(2/3-o)*6:r,a[y++]=d*255;return a}};rgb.hsl=function(n){var e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.min(e,t,i),s=Math.max(e,t,i),o=s-r,a,d,y;return s===r?a=0:e===s?a=(t-i)/o:t===s?a=2+(i-e)/o:i===s&&(a=4+(e-t)/o),a=Math.min(a*60,360),a<0&&(a+=360),y=(r+s)/2,s===r?d=0:y<=.5?d=o/(s+r):d=o/(2-s-r),[a,d*100,y*100]};function rgba$1(n){Array.isArray(n)&&n.raw&&(n=String.raw(...arguments)),n instanceof Number&&(n=+n);var e,t=parse$3(n);if(!t.space)return[];const i=t.space[0]==="h"?hsl.min:rgb.min,r=t.space[0]==="h"?hsl.max:rgb.max;return e=Array(3),e[0]=Math.min(Math.max(t.values[0],i[0]),r[0]),e[1]=Math.min(Math.max(t.values[1],i[1]),r[1]),e[2]=Math.min(Math.max(t.values[2],i[2]),r[2]),t.space[0]==="h"&&(e=hsl.rgb(e)),e.push(Math.min(Math.max(t.alpha,0),1)),e}function clamp(n,e,t){return Math.min(Math.max(n,e),t)}function squaredSegmentDistance(n,e,t,i,r,s){const o=r-t,a=s-i;if(o!==0||a!==0){const d=((n-t)*o+(e-i)*a)/(o*o+a*a);d>1?(t=r,i=s):d>0&&(t+=o*d,i+=a*d)}return squaredDistance$1(n,e,t,i)}function squaredDistance$1(n,e,t,i){const r=t-n,s=i-e;return r*r+s*s}function solveLinearSystem(n){const e=n.length;for(let i=0;is&&(s=d,r=a)}if(s===0)return null;const o=n[r];n[r]=n[i],n[i]=o;for(let a=i+1;a=0;i--){t[i]=n[i][e]/n[i][i];for(let r=i-1;r>=0;r--)n[r][e]-=n[r][i]*t[i]}return t}function toRadians(n){return n*Math.PI/180}function modulo(n,e){const t=n%e;return t*e<0?t+e:t}function lerp(n,e,t){return n+t*(e-n)}function toFixed(n,e){const t=Math.pow(10,e);return Math.round(n*t)/t}function round(n,e){return Math.round(toFixed(n,e))}function floor(n,e){return Math.floor(toFixed(n,e))}function ceil(n,e){return Math.ceil(toFixed(n,e))}function asString(n){return typeof n=="string"?n:toString$2(n)}const MAX_CACHE_SIZE=1024,cache$1={};let cacheSize=0;function withAlpha(n){if(n.length===4)return n;const e=n.slice();return e[3]=1,e}function rgbaToLcha(n){const e=xyz.lchuv(rgb.xyz(n));return e[3]=n[3],e}function lchaToRgba(n){const e=xyz.rgb(lchuv.xyz(n));return e[3]=n[3],e}function fromString(n){if(cache$1.hasOwnProperty(n))return cache$1[n];if(cacheSize>=MAX_CACHE_SIZE){let t=0;for(const i in cache$1)t++&3||(delete cache$1[i],--cacheSize)}const e=rgba$1(n);if(e.length!==4)throw new Error('Failed to parse "'+n+'" as color');for(const t of e)if(isNaN(t))throw new Error('Failed to parse "'+n+'" as color');return normalize(e),cache$1[n]=e,++cacheSize,e}function asArray(n){return Array.isArray(n)?n:fromString(n)}function normalize(n){return n[0]=clamp(n[0]+.5|0,0,255),n[1]=clamp(n[1]+.5|0,0,255),n[2]=clamp(n[2]+.5|0,0,255),n[3]=clamp(n[3],0,1),n}function toString$2(n){let e=n[0];e!=(e|0)&&(e=e+.5|0);let t=n[1];t!=(t|0)&&(t=t+.5|0);let i=n[2];i!=(i|0)&&(i=i+.5|0);const r=n[3]===void 0?1:Math.round(n[3]*100)/100;return"rgba("+e+","+t+","+i+","+r+")"}function isStringColor(n){try{return fromString(n),!0}catch{return!1}}class IconImageCache{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const t in this.cache_){const i=this.cache_[t];!(e++&3)&&!i.hasListener()&&(delete this.cache_[t],--this.cacheSize_)}}}get(e,t,i){const r=getKey$1(e,t,i);return r in this.cache_?this.cache_[r]:null}set(e,t,i,r){const s=getKey$1(e,t,i);this.cache_[s]=r,++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function getKey$1(n,e,t){const i=t?asString(t):"null";return e+":"+n+":"+i}const shared=new IconImageCache,LayerProperty={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class BaseLayer extends BaseObject{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const t=Object.assign({},e);typeof e.properties=="object"&&(delete t.properties,Object.assign(t,e.properties)),t[LayerProperty.OPACITY]=e.opacity!==void 0?e.opacity:1,assert(typeof t[LayerProperty.OPACITY]=="number","Layer opacity must be a number"),t[LayerProperty.VISIBLE]=e.visible!==void 0?e.visible:!0,t[LayerProperty.Z_INDEX]=e.zIndex,t[LayerProperty.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,t[LayerProperty.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,t[LayerProperty.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,t[LayerProperty.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=t.className!==void 0?t.className:"ol-layer",delete t.className,this.setProperties(t),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const t=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return t.opacity=clamp(Math.round(this.getOpacity()*100)/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=i===void 0&&!t.managed?1/0:i,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}getLayersArray(e){return abstract()}getLayerStatesArray(e){return abstract()}getExtent(){return this.get(LayerProperty.EXTENT)}getMaxResolution(){return this.get(LayerProperty.MAX_RESOLUTION)}getMinResolution(){return this.get(LayerProperty.MIN_RESOLUTION)}getMinZoom(){return this.get(LayerProperty.MIN_ZOOM)}getMaxZoom(){return this.get(LayerProperty.MAX_ZOOM)}getOpacity(){return this.get(LayerProperty.OPACITY)}getSourceState(){return abstract()}getVisible(){return this.get(LayerProperty.VISIBLE)}getZIndex(){return this.get(LayerProperty.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(LayerProperty.EXTENT,e)}setMaxResolution(e){this.set(LayerProperty.MAX_RESOLUTION,e)}setMinResolution(e){this.set(LayerProperty.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(LayerProperty.MAX_ZOOM,e)}setMinZoom(e){this.set(LayerProperty.MIN_ZOOM,e)}setOpacity(e){assert(typeof e=="number","Layer opacity must be a number"),this.set(LayerProperty.OPACITY,e)}setVisible(e){this.set(LayerProperty.VISIBLE,e)}setZIndex(e){this.set(LayerProperty.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const EventType={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},ViewHint={ANIMATING:0,INTERACTING:1},ViewProperty={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},DEFAULT_MAX_ZOOM=42,DEFAULT_TILE_SIZE=256,METERS_PER_UNIT$1={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};let Projection$1=class{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||METERS_PER_UNIT$1[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const RADIUS$1=6378137,HALF_SIZE=Math.PI*RADIUS$1,EXTENT$2=[-HALF_SIZE,-HALF_SIZE,HALF_SIZE,HALF_SIZE],WORLD_EXTENT=[-180,-85,180,85],MAX_SAFE_Y=RADIUS$1*Math.log(Math.tan(Math.PI/2));class EPSG3857Projection extends Projection$1{constructor(e){super({code:e,units:"m",extent:EXTENT$2,global:!0,worldExtent:WORLD_EXTENT,getPointResolution:function(t,i){return t/Math.cosh(i[1]/RADIUS$1)}})}}const PROJECTIONS$1=[new EPSG3857Projection("EPSG:3857"),new EPSG3857Projection("EPSG:102100"),new EPSG3857Projection("EPSG:102113"),new EPSG3857Projection("EPSG:900913"),new EPSG3857Projection("http://www.opengis.net/def/crs/EPSG/0/3857"),new EPSG3857Projection("http://www.opengis.net/gml/srs/epsg.xml#3857")];function fromEPSG4326(n,e,t){const i=n.length;t=t>1?t:2,e===void 0&&(t>2?e=n.slice():e=new Array(i));for(let r=0;rMAX_SAFE_Y?s=MAX_SAFE_Y:s<-MAX_SAFE_Y&&(s=-MAX_SAFE_Y),e[r+1]=s}return e}function toEPSG4326(n,e,t){const i=n.length;t=t>1?t:2,e===void 0&&(t>2?e=n.slice():e=new Array(i));for(let r=0;re?i:new Array(1+e-r).join("0")+i}function compareVersions(n,e){const t=(""+n).split("."),i=(""+e).split(".");for(let r=0;ro)return 1;if(o>s)return-1}return 0}function add$1(n,e){return n[0]+=+e[0],n[1]+=+e[1],n}function closestOnSegment(n,e){const t=n[0],i=n[1],r=e[0],s=e[1],o=r[0],a=r[1],d=s[0],y=s[1],v=d-o,_=y-a,C=v===0&&_===0?0:(v*(t-o)+_*(i-a))/(v*v+_*_||0);let E,S;return C<=0?(E=o,S=a):C>=1?(E=d,S=y):(E=o+C*v,S=a+C*_),[E,S]}function equals(n,e){let t=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=e[i]){t=!1;break}return t}function rotate$1(n,e){const t=Math.cos(e),i=Math.sin(e),r=n[0]*t-n[1]*i,s=n[1]*t+n[0]*i;return n[0]=r,n[1]=s,n}function scale$2(n,e){return n[0]*=e,n[1]*=e,n}function squaredDistance(n,e){const t=n[0]-e[0],i=n[1]-e[1];return t*t+i*i}function distance(n,e){return Math.sqrt(squaredDistance(n,e))}function squaredDistanceToSegment(n,e){return squaredDistance(n,closestOnSegment(n,e))}function wrapX$1(n,e){if(e.canWrapX()){const t=getWidth(e.getExtent()),i=getWorldsAway(n,e,t);i&&(n[0]-=i*t)}return n}function getWorldsAway(n,e,t){const i=e.getExtent();let r=0;return e.canWrapX()&&(n[0]i[2])&&(t=t||getWidth(i),r=Math.floor((n[0]-i[0])/t)),r}const DEFAULT_RADIUS=63710088e-1;function getDistance(n,e,t){t=t||DEFAULT_RADIUS;const i=toRadians(n[1]),r=toRadians(e[1]),s=(r-i)/2,o=toRadians(e[0]-n[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(r);return 2*t*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function getAreaInternal(n,e){let t=0;const i=n.length;let r=n[i-1][0],s=n[i-1][1];for(let o=0;o=a?e[s+d]:o[d]}return t}}function addCoordinateTransforms(n,e,t,i){const r=get$3(n),s=get$3(e);add$2(r,s,createTransformFromCoordinateTransform(t)),add$2(s,r,createTransformFromCoordinateTransform(i))}function fromLonLat(n,e){return disableCoordinateWarning(),transform$1(n,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function toLonLat(n,e){const t=transform$1(n,"EPSG:3857","EPSG:4326"),i=t[0];return(i<-180||i>180)&&(t[0]=modulo(i+180,360)-180),t}function equivalent(n,e){if(n===e)return!0;const t=n.getUnits()===e.getUnits();return(n.getCode()===e.getCode()||getTransformFromProjections(n,e)===cloneTransform)&&t}function getTransformFromProjections(n,e){const t=n.getCode(),i=e.getCode();let r=get$4(t,i);return r||(r=identityTransform),r}function getTransform(n,e){const t=get$3(n),i=get$3(e);return getTransformFromProjections(t,i)}function transform$1(n,e,t){return getTransform(e,t)(n,void 0,n.length)}function transformExtent(n,e,t,i){const r=getTransform(e,t);return applyTransform(n,r,void 0)}function toUserCoordinate(n,e){return n}function fromUserCoordinate(n,e){return showCoordinateWarning&&!equals(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(showCoordinateWarning=!1,warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function toUserExtent(n,e){return n}function fromUserExtent(n,e){return n}function addCommon(){addEquivalentProjections(PROJECTIONS$1),addEquivalentProjections(PROJECTIONS),addEquivalentTransforms(PROJECTIONS,PROJECTIONS$1,fromEPSG4326,toEPSG4326)}addCommon();function createExtent(n,e,t){return function(i,r,s,o,a){if(!i)return;if(!r&&!e)return i;const d=e?0:s[0]*r,y=e?0:s[1]*r,v=a?a[0]:0,_=a?a[1]:0;let C=n[0]+d/2+v,E=n[2]-d/2+v,S=n[1]+y/2+_,b=n[3]-y/2+_;C>E&&(C=(E+C)/2,E=C),S>b&&(S=(b+S)/2,b=S);let P=clamp(i[0],C,E),R=clamp(i[1],S,b);if(o&&t&&r){const x=30*r;P+=-x*Math.log(1+Math.max(0,C-i[0])/x)+x*Math.log(1+Math.max(0,i[0]-E)/x),R+=-x*Math.log(1+Math.max(0,S-i[1])/x)+x*Math.log(1+Math.max(0,i[1]-b)/x)}return[P,R]}}function none$1(n){return n}function getViewportClampedResolution(n,e,t,i){const r=getWidth(e)/t[0],s=getHeight(e)/t[1];return i?Math.min(n,Math.max(r,s)):Math.min(n,Math.min(r,s))}function getSmoothClampedResolution(n,e,t){let i=Math.min(n,e);const r=50;return i*=Math.log(1+r*Math.max(0,n/e-1))/r+1,t&&(i=Math.max(i,t),i/=Math.log(1+r*Math.max(0,t/n-1))/r+1),clamp(i,t/2,e*2)}function createSnapToResolutions(n,e,t,i){return e=e!==void 0?e:!0,function(r,s,o,a){if(r!==void 0){const d=n[0],y=n[n.length-1],v=t?getViewportClampedResolution(d,t,o,i):d;if(a)return e?getSmoothClampedResolution(r,v,y):clamp(r,y,v);const _=Math.min(v,r),C=Math.floor(linearFindNearest(n,_,s));return n[C]>v&&C{if(!i)return this.getSimplifiedGeometry(t);const r=this.clone();return r.applyTransform(i),r.getSimplifiedGeometry(t)})}simplifyTransformed(e,t){return this.simplifyTransformedInternal(this.getRevision(),e,t)}clone(){return abstract()}closestPointXY(e,t,i,r){return abstract()}containsXY(e,t){const i=this.getClosestPoint([e,t]);return i[0]===e&&i[1]===t}getClosestPoint(e,t){return t=t||[NaN,NaN],this.closestPointXY(e[0],e[1],t,1/0),t}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return abstract()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&createOrUpdateEmpty(t),this.extentRevision_=this.getRevision()}return returnOrUpdate(this.extent_,e)}rotate(e,t){abstract()}scale(e,t,i){abstract()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return abstract()}getType(){return abstract()}applyTransform(e){abstract()}intersectsExtent(e){return abstract()}translate(e,t){abstract()}transform(e,t){const i=get$3(e),r=i.getUnits()=="tile-pixels"?function(s,o,a){const d=i.getExtent(),y=i.getWorldExtent(),v=getHeight(y)/getHeight(d);return compose(tmpTransform$1,y[0],y[3],v,-v,0,0,0),transform2D(s,0,s.length,a,tmpTransform$1,o),getTransform(i,t)(s,o,a)}:getTransform(i,t);return this.applyTransform(r),this}}class SimpleGeometry extends Geometry{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return abstract()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length1)_=t;else if(C>0){for(let E=0;Er&&(r=y),s=a,o=d}return r}function arrayMaxSquaredDelta(n,e,t,i,r){for(let s=0,o=t.length;s0;){const _=y.pop(),C=y.pop();let E=0;const S=n[C],b=n[C+1],P=n[_],R=n[_+1];for(let x=C+i;x<_;x+=i){const T=n[x],L=n[x+1],k=squaredSegmentDistance(T,L,S,b,P,R);k>E&&(v=x,E=k)}E>r&&(d[(v-e)/i]=1,C+i0&&b>E)&&(S<0&&P0&&P>S)){y=_,v=C;continue}s[o++]=y,s[o++]=v,a=y,d=v,y=_,v=C}return s[o++]=y,s[o++]=v,o}function quantizeArray(n,e,t,i,r,s,o,a){for(let d=0,y=t.length;ds&&(y-a)*(s-d)-(r-a)*(v-d)>0&&o++:v<=s&&(y-a)*(s-d)-(r-a)*(v-d)<0&&o--,a=y,d=v}return o!==0}function linearRingsContainsXY(n,e,t,i,r,s){if(t.length===0||!linearRingContainsXY(n,e,t[0],i,r,s))return!1;for(let o=1,a=t.length;oR&&(y=(v+_)/2,linearRingsContainsXY(n,e,t,i,y,S)&&(P=y,R=x)),v=_}return isNaN(P)&&(P=r[s]),o?(o.push(P,S,R),o):[P,S,R]}function getInteriorPointsOfMultiArray(n,e,t,i,r){let s=[];for(let o=0,a=t.length;o=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]?!0:forEach(n,e,t,i,function(o,a){return intersectsSegment(r,o,a)}):!1}function intersectsLineStringArray(n,e,t,i,r){for(let s=0,o=t.length;s0}function linearRingsAreOriented(n,e,t,i,r){r=r!==void 0?r:!1;for(let s=0,o=t.length;s1&&typeof arguments[t-1]=="function"&&(i=arguments[t-1],--t);let r=0;for(;r0}getInteracting(){return this.hints_[ViewHint.INTERACTING]>0}cancelAnimations(){this.setHint(ViewHint.ANIMATING,-this.hints_[ViewHint.ANIMATING]);let e;for(let t=0,i=this.animations_.length;t=0;--i){const r=this.animations_[i];let s=!0;for(let o=0,a=r.length;o0?y/d.duration:1;v>=1?(d.complete=!0,v=1):s=!1;const _=d.easing(v);if(d.sourceCenter){const C=d.sourceCenter[0],E=d.sourceCenter[1],S=d.targetCenter[0],b=d.targetCenter[1];this.nextCenter_=d.targetCenter;const P=C+_*(S-C),R=E+_*(b-E);this.targetCenter_=[P,R]}if(d.sourceResolution&&d.targetResolution){const C=_===1?d.targetResolution:d.sourceResolution+_*(d.targetResolution-d.sourceResolution);if(d.anchor){const E=this.getViewportSize_(this.getRotation()),S=this.constraints_.resolution(C,0,E,!0);this.targetCenter_=this.calculateCenterZoom(S,d.anchor)}this.nextResolution_=d.targetResolution,this.targetResolution_=C,this.applyTargetState_(!0)}if(d.sourceRotation!==void 0&&d.targetRotation!==void 0){const C=_===1?modulo(d.targetRotation+Math.PI,2*Math.PI)-Math.PI:d.sourceRotation+_*(d.targetRotation-d.sourceRotation);if(d.anchor){const E=this.constraints_.rotation(C,!0);this.targetCenter_=this.calculateCenterRotate(E,d.anchor)}this.nextRotation_=d.targetRotation,this.targetRotation_=C}if(this.applyTargetState_(!0),t=!0,!d.complete)break}if(s){this.animations_[i]=null,this.setHint(ViewHint.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=r[0].callback;o&&animationCallback(o,!0)}}this.animations_=this.animations_.filter(Boolean),t&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,t){let i;const r=this.getCenterInternal();return r!==void 0&&(i=[r[0]-t[0],r[1]-t[1]],rotate$1(i,e-this.getRotation()),add$1(i,t)),i}calculateCenterZoom(e,t){let i;const r=this.getCenterInternal(),s=this.getResolution();if(r!==void 0&&s!==void 0){const o=t[0]-e*(t[0]-r[0])/s,a=t[1]-e*(t[1]-r[1])/s;i=[o,a]}return i}getViewportSize_(e){const t=this.viewportSize_;if(e){const i=t[0],r=t[1];return[Math.abs(i*Math.cos(e))+Math.abs(r*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(r*Math.cos(e))]}return t}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&toUserCoordinate(e,this.getProjection())}getCenterInternal(){return this.get(ViewProperty.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const t=this.calculateExtentInternal(e);return toUserExtent(t,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const t=this.getCenterInternal();assert(t,"The view center is not defined");const i=this.getResolution();assert(i!==void 0,"The view resolution is not defined");const r=this.getRotation();return assert(r!==void 0,"The view rotation is not defined"),getForViewAndSize(t,i,r,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(ViewProperty.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(fromUserExtent(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();const i=getWidth(e)/t[0],r=getHeight(e)/t[1];return Math.max(i,r)}getResolutionForValueFunction(e){e=e||2;const t=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(t/i)/Math.log(e);return function(s){return t/Math.pow(e,s*r)}}getRotation(){return this.get(ViewProperty.ROTATION)}getValueForResolutionFunction(e){const t=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,s=Math.log(i/r)/t;return function(o){return Math.log(i/o)/t/s}}getViewportSizeMinusPadding_(e){let t=this.getViewportSize_(e);const i=this.padding_;return i&&(t=[t[0]-i[1]-i[3],t[1]-i[0]-i[2]]),t}getState(){const e=this.getProjection(),t=this.getResolution(),i=this.getRotation();let r=this.getCenterInternal();const s=this.padding_;if(s){const o=this.getViewportSizeMinusPadding_();r=calculateCenterOn(r,this.getViewportSize_(),[o[0]/2+s[3],o[1]/2+s[0]],t,i)}return{center:r.slice(0),projection:e!==void 0?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const t=this.getResolution();return t!==void 0&&(e=this.getZoomForResolution(t)),e}getZoomForResolution(e){let t=this.minZoom_||0,i,r;if(this.resolutions_){const s=linearFindNearest(this.resolutions_,e,1);t=s,i=this.resolutions_[s],s==this.resolutions_.length-1?r=2:r=i/this.resolutions_[s+1]}else i=this.maxResolution_,r=this.zoomFactor_;return t+Math.log(i/e)/Math.log(r)}getResolutionForZoom(e){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const t=clamp(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(i,clamp(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,t){let i;if(assert(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){assert(!isEmpty(e),"Cannot fit empty extent provided as `geometry`");const r=fromUserExtent(e,this.getProjection());i=fromExtent(r)}else if(e.getType()==="Circle"){const r=fromUserExtent(e.getExtent(),this.getProjection());i=fromExtent(r),i.rotate(this.getRotation(),getCenter(r))}else i=e;this.fitInternal(i,t)}rotatedExtentForGeometry(e){const t=this.getRotation(),i=Math.cos(t),r=Math.sin(-t),s=e.getFlatCoordinates(),o=e.getStride();let a=1/0,d=1/0,y=-1/0,v=-1/0;for(let _=0,C=s.length;_{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let t;const i=this.getMapInternal();!e&&i&&(e=i.getView()),e instanceof View?t={viewState:e.getState(),extent:e.calculateExtent()}:t=e,!t.layerStatesArray&&i&&(t.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let r;t.layerStatesArray?r=t.layerStatesArray.find(o=>o.layer===this):r=this.getLayerState();const s=this.getExtent();return inView(r,t.viewState)&&(!s||intersects$1(s,t.extent))}getAttributions(e){if(!this.isVisible(e))return[];let t;const i=this.getSource();if(i&&(t=i.getAttributions()),!t)return[];const r=e instanceof View?e.getViewStateAndExtent():e;let s=t(r);return Array.isArray(s)||(s=[s]),s}render(e,t){const i=this.getRenderer();return i.prepareFrame(e)?(this.rendered=!0,i.renderFrame(e,t)):null}unrender(){this.rendered=!1}setMapInternal(e){e||this.unrender(),this.set(LayerProperty.MAP,e)}getMapInternal(){return this.get(LayerProperty.MAP)}setMap(e){this.mapPrecomposeKey_&&(unlistenByKey(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(unlistenByKey(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=listen(e,EventType.PRECOMPOSE,function(t){const r=t.frameState.layerStatesArray,s=this.getLayerState(!1);assert(!r.some(function(o){return o.layer===s.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),r.push(s)},this),this.mapRenderKey_=listen(this,EventType$1.CHANGE,e.render,e),this.changed())}setSource(e){this.set(LayerProperty.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}};function inView(n,e){if(!n.visible)return!1;const t=e.resolution;if(t=n.maxResolution)return!1;const i=e.zoom;return i>n.minZoom&&i<=n.maxZoom}class MapRenderer extends Disposable{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){abstract()}calculateMatrices2D(e){const t=e.viewState,i=e.coordinateToPixelTransform,r=e.pixelToCoordinateTransform;compose(i,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),makeInverse(r,i)}forEachFeatureAtCoordinate(e,t,i,r,s,o,a,d){let y;const v=t.viewState;function _(L,k,N,G){return s.call(o,k,L?N:null,G)}const C=v.projection,E=wrapX$1(e.slice(),C),S=[[0,0]];if(C.canWrapX()&&r){const L=C.getExtent(),k=getWidth(L);S.push([-k,0],[k,0])}const b=t.layerStatesArray,P=b.length,R=[],x=[];for(let L=0;L=0;--k){const N=b[k],G=N.layer;if(G.hasRenderer()&&inView(N,v)&&a.call(d,G)){const F=G.getRenderer(),z=G.getSource();if(F&&z){const B=z.getWrapX()?E:e,D=_.bind(null,N.managed);x[0]=B[0]+S[L][0],x[1]=B[1]+S[L][1],y=F.forEachFeatureAtCoordinate(x,t,i,D,R)}if(y)return y}}if(R.length===0)return;const T=1/R.length;return R.forEach((L,k)=>L.distanceSq+=k*T),R.sort((L,k)=>L.distanceSq-k.distanceSq),R.some(L=>y=L.callback(L.feature,L.layer,L.geometry)),y}hasFeatureAtCoordinate(e,t,i,r,s,o){return this.forEachFeatureAtCoordinate(e,t,i,r,TRUE,this,s,o)!==void 0}getMap(){return this.map_}renderFrame(e){abstract()}flushDeclutterItems(e){}scheduleExpireIconCache(e){shared.canExpireCache()&&e.postRenderFunctions.push(expireIconCache)}}function expireIconCache(n,e){shared.expire()}class RenderEvent extends BaseEvent{constructor(e,t,i,r){super(e),this.inversePixelTransform=t,this.frameState=i,this.context=r}}const CLASS_HIDDEN="ol-hidden",CLASS_SELECTABLE="ol-selectable",CLASS_UNSELECTABLE="ol-unselectable",CLASS_UNSUPPORTED="ol-unsupported",CLASS_CONTROL="ol-control",CLASS_COLLAPSED="ol-collapsed",fontRegEx=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),fontRegExMatchIndex=["style","variant","weight","size","lineHeight","family"],getFontParameters=function(n){const e=n.match(fontRegEx);if(!e)return null;const t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,r=fontRegExMatchIndex.length;iMath.max(r,measureTextWidth(n,s)),0);return t[e]=i,i}function getTextDimensions(n,e){const t=[],i=[],r=[];let s=0,o=0,a=0,d=0;for(let y=0,v=e.length;y<=v;y+=2){const _=e[y];if(_===` +`||y===v){s=Math.max(s,o),r.push(o),o=0,a+=d;continue}const C=e[y+1]||n.font,E=measureTextWidth(C,_);t.push(E),o+=E;const S=measureTextHeight(C);i.push(S),d=Math.max(d,S)}return{width:s,height:a,widths:t,heights:i,lineWidths:r}}function drawImageOrLabel(n,e,t,i,r,s,o,a,d,y,v){n.save(),t!==1&&(n.globalAlpha*=t),e&&n.transform.apply(n,e),i.contextInstructions?(n.translate(d,y),n.scale(v[0],v[1]),executeLabelInstructions(i,n)):v[0]<0||v[1]<0?(n.translate(d,y),n.scale(v[0],v[1]),n.drawImage(i,r,s,o,a,0,0,o,a)):n.drawImage(i,r,s,o,a,d,y,o*v[0],a*v[1]),n.restore()}function executeLabelInstructions(n,e){const t=n.contextInstructions;for(let i=0,r=t.length;i=0;--i)t[i].renderDeclutter(e);t.length=0}}class GroupEvent extends BaseEvent{constructor(e,t){super(e),this.layer=t}}const Property$2={LAYERS:"layers"};class LayerGroup extends BaseLayer{constructor(e){e=e||{};const t=Object.assign({},e);delete t.layers;let i=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Property$2.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new Collection(i.slice(),{unique:!0}):assert(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new Collection(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(unlistenByKey),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(listen(e,CollectionEventType.ADD,this.handleLayersAdd_,this),listen(e,CollectionEventType.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(unlistenByKey);clear$1(this.listenerKeys_);const t=e.getArray();for(let i=0,r=t.length;i{this.clickTimeoutId_=void 0;const i=new MapBrowserEvent(MapBrowserEventType.SINGLECLICK,this.map_,e);this.dispatchEvent(i)},250)}updateActivePointers_(e){const t=e,i=t.pointerId;if(t.type==MapBrowserEventType.POINTERUP||t.type==MapBrowserEventType.POINTERCANCEL){delete this.trackedTouches_[i];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==t.target){delete this.trackedTouches_[r];break}}else(t.type==MapBrowserEventType.POINTERDOWN||t.type==MapBrowserEventType.POINTERMOVE)&&(this.trackedTouches_[i]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const t=new MapBrowserEvent(MapBrowserEventType.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const t=new MapBrowserEvent(MapBrowserEventType.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(listen(i,MapBrowserEventType.POINTERMOVE,this.handlePointerMove_,this),listen(i,MapBrowserEventType.POINTERUP,this.handlePointerUp_,this),listen(this.element_,MapBrowserEventType.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(listen(this.element_.getRootNode(),MapBrowserEventType.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const t=new MapBrowserEvent(MapBrowserEventType.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const t=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE,this.map_,e,t))}handleTouchMove_(e){const t=this.originalPointerMoveEvent_;(!t||t.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(unlistenByKey(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(EventType$1.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(unlistenByKey(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const MapEventType={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},MapProperty={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},DROP=1/0;class PriorityQueue{constructor(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,clear$1(this.queuedElements_)}dequeue(){const e=this.elements_,t=this.priorities_,i=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));const r=this.keyFunction_(i);return delete this.queuedElements_[r],i}enqueue(e){assert(!(this.keyFunction_(e)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const t=this.priorityFunction_(e);return t!=DROP?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const t=this.elements_,i=this.priorities_,r=t.length,s=t[e],o=i[e],a=e;for(;e>1;){const d=this.getLeftChildIndex_(e),y=this.getRightChildIndex_(e),v=ye;){const a=this.getParentIndex_(t);if(r[a]>o)i[t]=i[a],r[t]=r[a],t=a;else break}i[t]=s,r[t]=o}reprioritize(){const e=this.priorityFunction_,t=this.elements_,i=this.priorities_;let r=0;const s=t.length;let o,a,d;for(a=0;a0;)s=this.dequeue()[0],o=s.getKey(),r=s.getState(),r===TileState.IDLE&&!(o in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++i,s.load())}}function getTilePriority(n,e,t,i,r){if(!n||!(t in n.wantedTiles)||!n.wantedTiles[t][e.getKey()])return DROP;const s=n.viewState.center,o=i[0]-s[0],a=i[1]-s[1];return 65536*Math.log(r)+Math.sqrt(o*o+a*a)/r}class Control extends BaseObject{constructor(e){super();const t=e.element;t&&!e.target&&!t.style.pointerEvents&&(t.style.pointerEvents="auto"),this.element=t||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){removeNode(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&removeNode(this.element);for(let t=0,i=this.listenerKeys.length;tr.getAttributions(e)))),i=!this.getMap().getAllLayers().some(r=>r.getSource()&&r.getSource().getAttributionsCollapsible()===!1);return this.overrideCollapsible_||this.setCollapsible(i),t}updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=this.collectSourceAttributions_(e),i=t.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!equals$2(t,this.renderedAttributions_)){removeChildren(this.ulElement_);for(let r=0,s=t.length;r0&&i%(2*Math.PI)!==0?t.animate({rotation:0,duration:this.duration_,easing:easeOut}):t.setRotation(0))}render(e){const t=e.frameState;if(!t)return;const i=t.viewState.rotation;if(i!=this.rotation_){const r="rotate("+i+"rad)";if(this.autoHide_){const s=this.element.classList.contains(CLASS_HIDDEN);!s&&i===0?this.element.classList.add(CLASS_HIDDEN):s&&i!==0&&this.element.classList.remove(CLASS_HIDDEN)}this.label_.style.transform=r}this.rotation_=i}}class Zoom extends Control{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const t=e.className!==void 0?e.className:"ol-zoom",i=e.delta!==void 0?e.delta:1,r=e.zoomInClassName!==void 0?e.zoomInClassName:t+"-in",s=e.zoomOutClassName!==void 0?e.zoomOutClassName:t+"-out",o=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"–",d=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",y=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",v=document.createElement("button");v.className=r,v.setAttribute("type","button"),v.title=d,v.appendChild(typeof o=="string"?document.createTextNode(o):o),v.addEventListener(EventType$1.CLICK,this.handleClick_.bind(this,i),!1);const _=document.createElement("button");_.className=s,_.setAttribute("type","button"),_.title=y,_.appendChild(typeof a=="string"?document.createTextNode(a):a),_.addEventListener(EventType$1.CLICK,this.handleClick_.bind(this,-i),!1);const C=t+" "+CLASS_UNSELECTABLE+" "+CLASS_CONTROL,E=this.element;E.className=C,E.appendChild(v),E.appendChild(_),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,t){t.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const i=this.getMap().getView();if(!i)return;const r=i.getZoom();if(r!==void 0){const s=i.getConstrainedZoom(r+e);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:s,duration:this.duration_,easing:easeOut})):i.setZoom(s)}}}function defaults$2(n){n=n||{};const e=new Collection;return(n.zoom!==void 0?n.zoom:!0)&&e.push(new Zoom(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&e.push(new Rotate(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&e.push(new Attribution(n.attributionOptions)),e}const InteractionProperty={ACTIVE:"active"};class Interaction extends BaseObject{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(InteractionProperty.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(InteractionProperty.ACTIVE,e)}setMap(e){this.map_=e}}function pan(n,e,t){const i=n.getCenterInternal();if(i){const r=[i[0]+e[0],i[1]+e[1]];n.animateInternal({duration:t!==void 0?t:250,easing:linear,center:n.getConstrainedCenter(r)})}}function zoomByDelta(n,e,t,i){const r=n.getZoom();if(r===void 0)return;const s=n.getConstrainedZoom(r+e),o=n.getResolutionForZoom(s);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:o,anchor:t,duration:i!==void 0?i:250,easing:easeOut})}class DoubleClickZoom extends Interaction{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let t=!1;if(e.type==MapBrowserEventType.DBLCLICK){const i=e.originalEvent,r=e.map,s=e.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=r.getView();zoomByDelta(a,o,s,this.duration_),i.preventDefault(),t=!0}return!t}}class PointerInteraction extends Interaction{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==MapBrowserEventType.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==MapBrowserEventType.POINTERUP){const i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==MapBrowserEventType.POINTERDOWN){const i=this.handleDownEvent(e);this.handlingDownUpSequence=i,t=this.stopDown(i)}else e.type==MapBrowserEventType.POINTERMOVE&&this.handleMoveEvent(e);return!t}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function centroid(n){const e=n.length;let t=0,i=0;for(let r=0;r0&&this.condition_(e)){const i=e.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class DragRotate extends PointerInteraction{constructor(e){e=e||{},super({stopDown:FALSE}),this.condition_=e.condition?e.condition:altShiftKeysOnly,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!mouseOnly(e))return;const t=e.map,i=t.getView();if(i.getConstraints().rotation===disable)return;const r=t.getSize(),s=e.pixel,o=Math.atan2(r[1]/2-s[1],s[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(e){return mouseOnly(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return mouseOnly(e)&&mouseActionButton(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class RenderBox extends Disposable{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,t=this.endPixel_,i="px",r=this.element_.style;r.left=Math.min(e[0],t[0])+i,r.top=Math.min(e[1],t[1])+i,r.width=Math.abs(t[0]-e[0])+i,r.height=Math.abs(t[1]-e[1])+i}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const e=this.startPixel_,t=this.endPixel_,r=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Polygon([r])}getGeometry(){return this.geometry_}}const DragBoxEventType={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class DragBoxEvent extends BaseEvent{constructor(e,t,i){super(e),this.coordinate=t,this.mapBrowserEvent=i}}class DragBox extends PointerInteraction{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.box_=new RenderBox(e.className||"ol-dragbox"),this.minArea_=e.minArea!==void 0?e.minArea:64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition?e.condition:mouseActionButton,this.boxEndCondition_=e.boxEndCondition?e.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(e,t,i){const r=i[0]-t[0],s=i[1]-t[1];return r*r+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG,e.coordinate,e))}handleUpEvent(e){this.box_.setMap(null);const t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new DragBoxEvent(t?DragBoxEventType.BOXEND:DragBoxEventType.BOXCANCEL,e.coordinate,e)),!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}}class DragZoom extends DragBox{constructor(e){e=e||{};const t=e.condition?e.condition:shiftKeyOnly;super({condition:t,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const i=this.getMap().getView();let r=this.getGeometry();if(this.out_){const s=i.rotatedExtentForGeometry(r),o=i.getResolutionForExtentInternal(s),a=i.getResolution()/o;r=r.clone(),r.scale(a*a)}i.fitInternal(r,{duration:this.duration_,easing:easeOut})}}const Key={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class KeyboardPan extends Interaction{constructor(e){super(),e=e||{},this.defaultCondition_=function(t){return noModifierKeys(t)&&targetNotEditable(t)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let t=!1;if(e.type==EventType$1.KEYDOWN){const i=e.originalEvent,r=i.key;if(this.condition_(e)&&(r==Key.DOWN||r==Key.LEFT||r==Key.RIGHT||r==Key.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let d=0,y=0;r==Key.DOWN?y=-a:r==Key.LEFT?d=-a:r==Key.RIGHT?d=a:y=a;const v=[d,y];rotate$1(v,o.getRotation()),pan(o,v,this.duration_),i.preventDefault(),t=!0}}return!t}}class KeyboardZoom extends Interaction{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(t){return!platformModifierKey(t)&&targetNotEditable(t)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let t=!1;if(e.type==EventType$1.KEYDOWN||e.type==EventType$1.KEYPRESS){const i=e.originalEvent,r=i.key;if(this.condition_(e)&&(r==="+"||r==="-")){const s=e.map,o=r==="+"?this.delta_:-this.delta_,a=s.getView();zoomByDelta(a,o,void 0,this.duration_),i.preventDefault(),t=!0}}return!t}}class Kinetic{constructor(e,t,i){this.decay_=e,this.minVelocity_=t,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,t){this.points_.push(e,t,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]0&&this.points_[i+2]>e;)i-=3;const r=this.points_[t+2]-this.points_[i+2];if(r<1e3/60)return!1;const s=this.points_[t]-this.points_[i],o=this.points_[t+1]-this.points_[i+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class MouseWheelZoom extends Interaction{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const t=e.condition?e.condition:always$1;this.condition_=e.onFocusOnly?all$1(focusWithTabindex,t):t,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(e){if(!this.condition_(e)||e.type!==EventType$1.WHEEL)return!0;const i=e.map,r=e.originalEvent;r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate);let s;if(e.type==EventType$1.WHEEL&&(s=r.deltaY,FIREFOX&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=DEVICE_PIXEL_RATIO),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),s===0)return!1;this.lastDelta_=s;const o=Date.now();this.startTime_===void 0&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const a=i.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=s;const d=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),d),!1}handleWheelZoom_(e){const t=e.getView();t.getAnimating()&&t.cancelAnimations();let i=-clamp(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),zoomByDelta(t,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}class PinchRotate extends PointerInteraction{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=FALSE),super(t),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let t=0;const i=this.targetPointers[0],r=this.targetPointers[1],s=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(this.lastAngle_!==void 0){const d=s-this.lastAngle_;this.rotationDelta_+=d,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=d}this.lastAngle_=s;const o=e.map,a=o.getView();a.getConstraints().rotation!==disable&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(centroid(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(t,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}class PinchZoom extends PointerInteraction{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=FALSE),super(t),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let t=1;const i=this.targetPointers[0],r=this.targetPointers[1],s=i.clientX-r.clientX,o=i.clientY-r.clientY,a=Math.sqrt(s*s+o*o);this.lastDistance_!==void 0&&(t=this.lastDistance_/a),this.lastDistance_=a;const d=e.map,y=d.getView();t!=1&&(this.lastScaleDelta_=t),this.anchor_=d.getCoordinateFromPixelInternal(d.getEventPixel(centroid(this.targetPointers))),d.render(),y.adjustResolutionInternal(t,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const i=e.map.getView(),r=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,r),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}function defaults$1(n){n=n||{};const e=new Collection,t=new Kinetic(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&e.push(new DragRotate),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&e.push(new DoubleClickZoom({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&e.push(new DragPan({onFocusOnly:n.onFocusOnly,kinetic:t})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&e.push(new PinchRotate),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&e.push(new PinchZoom({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(e.push(new KeyboardPan),e.push(new KeyboardZoom({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&e.push(new MouseWheelZoom({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&e.push(new DragZoom({duration:n.zoomDuration})),e}function hasArea(n){return n[0]>0&&n[1]>0}function scale(n,e,t){return t===void 0&&(t=[0,0]),t[0]=n[0]*e+.5|0,t[1]=n[1]*e+.5|0,t}function toSize(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}function removeLayerMapProperty(n){if(n instanceof Layer$1){n.setMapInternal(null);return}n instanceof LayerGroup&&n.getLayers().forEach(removeLayerMapProperty)}function setLayerMapProperty(n,e){if(n instanceof Layer$1){n.setMapInternal(e);return}if(n instanceof LayerGroup){const t=n.getLayers().getArray();for(let i=0,r=t.length;ithis.updateSize()),this.controls=t.controls||defaults$2(),this.interactions=t.interactions||defaults$1({onFocusOnly:!0}),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new TileQueue(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(MapProperty.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(MapProperty.VIEW,this.handleViewChanged_),this.addChangeListener(MapProperty.SIZE,this.handleSizeChanged_),this.addChangeListener(MapProperty.TARGET,this.handleTargetChanged_),this.setProperties(t.values);const i=this;e.view&&!(e.view instanceof View)&&e.view.then(function(r){i.setView(new View(r))}),this.controls.addEventListener(CollectionEventType.ADD,r=>{r.element.setMap(this)}),this.controls.addEventListener(CollectionEventType.REMOVE,r=>{r.element.setMap(null)}),this.interactions.addEventListener(CollectionEventType.ADD,r=>{r.element.setMap(this)}),this.interactions.addEventListener(CollectionEventType.REMOVE,r=>{r.element.setMap(null)}),this.overlays_.addEventListener(CollectionEventType.ADD,r=>{this.addOverlayInternal_(r.element)}),this.overlays_.addEventListener(CollectionEventType.REMOVE,r=>{const s=r.element.getId();s!==void 0&&delete this.overlayIdIndex_[s.toString()],r.element.setMap(null)}),this.controls.forEach(r=>{r.setMap(this)}),this.interactions.forEach(r=>{r.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){setLayerMapProperty(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const t=e.getId();t!==void 0&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,t,i){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(e);i=i!==void 0?i:{};const s=i.hitTolerance!==void 0?i.hitTolerance:0,o=i.layerFilter!==void 0?i.layerFilter:TRUE,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,s,a,t,null,o,null)}getFeaturesAtPixel(e,t){const i=[];return this.forEachFeatureAtPixel(e,function(r){i.push(r)},t),i}getAllLayers(){const e=[];function t(i){i.forEach(function(r){r instanceof LayerGroup?t(r.getLayers()):e.push(r)})}return t(this.getLayers()),e}hasFeatureAtPixel(e,t){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(e);t=t!==void 0?t:{};const r=t.layerFilter!==void 0?t.layerFilter:TRUE,s=t.hitTolerance!==void 0?t.hitTolerance:0,o=t.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,o,r,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const i=this.viewport_.getBoundingClientRect(),r=this.getSize(),s=i.width/r[0],o=i.height/r[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-i.left)/s,(a.clientY-i.top)/o]}getTarget(){return this.get(MapProperty.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return toUserCoordinate(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const t=this.frameState_;return t?apply(t.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const t=this.overlayIdIndex_[e.toString()];return t!==void 0?t:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(MapProperty.LAYERGROUP)}setLayers(e){const t=this.getLayerGroup();if(e instanceof Collection){t.setLayers(e);return}const i=t.getLayers();i.clear(),i.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,i=e.length;t=0;s--){const o=r[s];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){let r=this.maxTilesLoading_,s=r;if(e){const o=e.viewHints;if(o[ViewHint.ANIMATING]||o[ViewHint.INTERACTING]){const a=Date.now()-e.time>8;r=a?0:8,s=a?0:2}}t.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const t=this.getLayerGroup();t&&this.handleLayerRemove_(new GroupEvent("removelayer",t)),this.set(MapProperty.LAYERGROUP,e)}setSize(e){this.set(MapProperty.SIZE,e)}setTarget(e){this.set(MapProperty.TARGET,e)}setView(e){if(!e||e instanceof View){this.set(MapProperty.VIEW,e);return}this.set(MapProperty.VIEW,new View);const t=this;e.then(function(i){t.setView(new View(i))})}updateSize(){const e=this.getTargetElement();let t;if(e){const r=getComputedStyle(e),s=e.offsetWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-parseFloat(r.borderRightWidth),o=e.offsetHeight-parseFloat(r.borderTopWidth)-parseFloat(r.paddingTop)-parseFloat(r.paddingBottom)-parseFloat(r.borderBottomWidth);!isNaN(s)&&!isNaN(o)&&(t=[s,o],!hasArea(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&warn("No map visible because the map container's width or height are 0."))}const i=this.getSize();t&&(!i||!equals$2(t,i))&&(this.setSize(t),this.updateViewportSize_(t))}updateViewportSize_(e){const t=this.getView();t&&t.setViewportSize(e)}};function createOptionsInternal(n){let e=null;n.keyboardEventTarget!==void 0&&(e=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);const t={},i=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new LayerGroup({layers:n.layers});t[MapProperty.LAYERGROUP]=i,t[MapProperty.TARGET]=n.target,t[MapProperty.VIEW]=n.view instanceof View?n.view:new View;let r;n.controls!==void 0&&(Array.isArray(n.controls)?r=new Collection(n.controls.slice()):(assert(typeof n.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),r=n.controls));let s;n.interactions!==void 0&&(Array.isArray(n.interactions)?s=new Collection(n.interactions.slice()):(assert(typeof n.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),s=n.interactions));let o;return n.overlays!==void 0?Array.isArray(n.overlays)?o=new Collection(n.overlays.slice()):(assert(typeof n.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=n.overlays):o=new Collection,{controls:r,interactions:s,keyboardEventTarget:e,overlays:o,values:t}}const _sfc_main$r={__name:"Map",setup(n){const e=ref(0),t=new Map$1({controls:[]});onMounted(()=>{t.setTarget(e.value);const r=document.getElementById("map").getElementsByTagName("canvas");r.length&&(r[0].tabIndex=0)});const i=()=>{document.activeElement.tagName!=="INPUT"&&e.value.focus()};return provide("map",t),(r,s)=>(openBlock(),createElementBlock("div",{id:"map",ref_key:"mapRef",ref:e,tabindex:"0",onMouseover:i},[renderSlot(r.$slots,"default")],544))}},DEFAULT={LAYERS:"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2$GEOPORTAIL:OGC:WMTS",CONTROLS:"",X:283734.248995,Y:565511710065e-5,LON:2.5479878714752027,LAT:50.800781249995744,ZOOM:12,FIRSTVISIT:!1},NAMESPACE="cartes.gouv.fr",ns=n=>NAMESPACE+"."+n,useMapStore=defineStore("map",()=>{const n=ref({});var e=useStorage(ns("zoom"),DEFAULT.ZOOM),t=useStorage(ns("x"),DEFAULT.X),i=useStorage(ns("y"),DEFAULT.Y),r=useStorage(ns("lon"),DEFAULT.LON),s=useStorage(ns("lat"),DEFAULT.LAT),o=useStorage(ns("firstVisit"),DEFAULT.FIRSTVISIT),a=computed(()=>{}),d=computed(()=>[t.value,i.value]),y=useStorage(ns("layers"),DEFAULT.LAYERS);if(!y.value){var v=DEFAULT.LAYERS.split(",").filter(function(G){return!!G});for(let G=0;G{localStorage.setItem(ns("zoom"),e.value)}),watch(t,()=>{localStorage.setItem(ns("x"),t.value)}),watch(i,()=>{localStorage.setItem(ns("y"),i.value)}),watch(r,()=>{localStorage.setItem(ns("lon"),r.value)}),watch(s,()=>{localStorage.setItem(ns("lat"),s.value)}),watch(y,()=>{localStorage.setItem(ns("layers"),y.value.toString())}),watch(a,()=>{localStorage.setItem(ns("permalink"),a.value.toString())}),watch(d,()=>{localStorage.setItem(ns("center"),d.value.toString())}),watch(o,()=>{localStorage.setItem(ns("firstVisit"),o.value)}),watch(_,()=>{localStorage.setItem(ns("controls"),_.value.toString())});function E(){return n.value}function S(G){n.value=G}function b(){return y.value.split(",").filter(function(G){return!!G})}function P(){y.value=""}function R(G){if(!b().includes(G)){var F=b();F.push(G),y.value=F.toString()}}function x(G){const F=b().indexOf(G);if(F!==-1){var z=b();z.splice(F,1),y.value=z.toString()}}function T(){return _.value.split(",").filter(function(G){return!!G})}function L(){_.value=""}function k(G){if(!T().includes(G)){var F=T();F.push(G),_.value=F.toString()}}function N(G){const F=T().indexOf(G);if(F!==-1){var z=T();z.splice(F,1),_.value=z.toString()}}return{map:n,zoom:e,center:d,x:t,y:i,lon:r,lat:s,getMap:E,setMap:S,getLayers:b,cleanLayers:P,addLayer:R,removeLayer:x,getControls:T,cleanControls:L,addControl:k,removeControl:N}}),_sfc_main$q={__name:"View",props:{zoom:Number,center:Array},setup(n){const e=useMapStore(),t=n,i=inject("map"),r=new View({zoom:t.zoom,center:t.center});return r.on("change:center",s=>{e.x=s.target.getCenter()[0],e.y=s.target.getCenter()[1];var o=toLonLat(s.target.getCenter());e.lon=o[0],e.lat=o[1]}),r.on("change:resolution",s=>{e.zoom=r.getZoom()}),onMounted(()=>{i&&(i.setView(r),e.setMap(i))}),(s,o)=>null}},name$1="geoportal-extensions-openlayers",description$1="French Geoportal Extensions for OpenLayers libraries",version$2="1.0.0-beta.95",date$1="04/07/2024",module$1="src/index.js",directories={},engines={node:">=20"},repository$1={type:"git",url:"https://github.com/IGNF/geoportal-extensions-openlayers.git"},author$1="IGNF",keywords$1=["geoportail","geoplateforme","javascript","OpenLayers 8"],license$1="CECILL-B",bugs={url:"https://github.com/IGNF/geoportal-extensions-openlayers/issues"},homepage$1="https://github.com/IGNF/geoportal-extensions-openlayers#readme",dependencies$1={"@gouvfr/dsfr":"^1.11.0","@mapbox/mapbox-gl-style-spec":"14.4.0",eventbusjs:"0.2.0","geoportal-access-lib":"3.4.2",loglevel:"^1.9.1",ol:"8.2.0","ol-mapbox-style":"12.3.4",proj4:"2.11.0",sortablejs:"1.15.2",typescript:"^5.3.3","whatwg-fetch":"3.6.20","@xmldom/xmldom":"^0.8.10"},Pkg$1={name:name$1,description:description$1,version:version$2,date:date$1,module:module$1,directories,engines,repository:repository$1,author:author$1,keywords:keywords$1,license:license$1,bugs,homepage:homepage$1,dependencies:dependencies$1},Property$1={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Overlay extends BaseObject{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+CLASS_SELECTABLE,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(Property$1.ELEMENT,this.handleElementChanged),this.addChangeListener(Property$1.MAP,this.handleMapChanged),this.addChangeListener(Property$1.OFFSET,this.handleOffsetChanged),this.addChangeListener(Property$1.POSITION,this.handlePositionChanged),this.addChangeListener(Property$1.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(Property$1.ELEMENT)}getId(){return this.id}getMap(){return this.get(Property$1.MAP)||null}getOffset(){return this.get(Property$1.OFFSET)}getPosition(){return this.get(Property$1.POSITION)}getPositioning(){return this.get(Property$1.POSITIONING)}handleElementChanged(){removeChildren(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(removeNode(this.element),unlistenByKey(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=listen(e,MapEventType.POSTRENDER,this.render,this),this.updatePixelPosition();const t=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(Property$1.ELEMENT,e)}setMap(e){this.set(Property$1.MAP,e)}setOffset(e){this.set(Property$1.OFFSET,e)}setPosition(e){this.set(Property$1.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(Property$1.POSITION))return;const i=this.getRect(t.getTargetElement(),t.getSize()),r=this.getElement(),s=this.getRect(r,[outerWidth(r),outerHeight(r)]);e=e||{};const o=e.margin===void 0?20:e.margin;if(!containsExtent(i,s)){const a=s[0]-i[0],d=i[2]-s[2],y=s[1]-i[1],v=i[3]-s[3],_=[0,0];if(a<0?_[0]=a-o:d<0&&(_[0]=Math.abs(d)+o),y<0?_[1]=y-o:v<0&&(_[1]=Math.abs(v)+o),_[0]!==0||_[1]!==0){const C=t.getView().getCenterInternal(),E=t.getPixelFromCoordinateInternal(C);if(!E)return;const S=[E[0]+_[0],E[1]+_[1]],b=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(S),duration:b.duration,easing:b.easing})}}}getRect(e,t){const i=e.getBoundingClientRect(),r=i.left+window.pageXOffset,s=i.top+window.pageYOffset;return[r,s,r+t[0],s+t[1]]}setPositioning(e){this.set(Property$1.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t){this.setVisible(!1);return}const i=e.getPixelFromCoordinate(t),r=e.getSize();this.updateRenderedPosition(i,r)}updateRenderedPosition(e,t){const i=this.element.style,r=this.getOffset(),s=this.getPositioning();this.setVisible(!0);const o=Math.round(e[0]+r[0])+"px",a=Math.round(e[1]+r[1])+"px";let d="0%",y="0%";s=="bottom-right"||s=="center-right"||s=="top-right"?d="-100%":(s=="bottom-center"||s=="center-center"||s=="top-center")&&(d="-50%"),s=="bottom-left"||s=="bottom-center"||s=="bottom-right"?y="-100%":(s=="center-left"||s=="center-center"||s=="center-right")&&(y="-50%");const v=`translate(${d}, ${y}) translate(${o}, ${a})`;this.rendered.transform_!=v&&(this.rendered.transform_=v,i.transform=v)}getOptions(){return this.options}}class Tile extends Target{constructor(e,t,i){super(),i=i||{},this.tileCoord=e,this.state=t,this.interimTile=null,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(EventType$1.CHANGE)}release(){this.state===TileState.ERROR&&this.setState(TileState.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let e=this.interimTile;if(!e)return this;do{if(e.getState()==TileState.LOADED)return this.transition_=0,e;e=e.interimTile}while(e);return this}refreshInterimChain(){let e=this.interimTile;if(!e)return;let t=this;do{if(e.getState()==TileState.LOADED){e.interimTile=null;break}e.getState()==TileState.LOADING?t=e:e.getState()==TileState.IDLE?t.interimTile=e.interimTile:t=e,e=t.interimTile}while(e)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==TileState.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){abstract()}getAlpha(e,t){if(!this.transition_)return 1;let i=this.transitionStarts_[e];if(!i)i=t,this.transitionStarts_[e]=i;else if(i===-1)return 1;const r=t-i+1e3/60;return r>=this.transition_?1:easeIn(r/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}}let VectorTile$1=class extends Tile{constructor(e,t,i,r,s,o){super(e,t,o),this.extent=null,this.format_=r,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=s,this.url_=i,this.key=i}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==TileState.IDLE&&(this.setState(TileState.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(e,t){this.setFeatures(e)}onError(){this.setState(TileState.ERROR)}setFeatures(e){this.features_=e,this.setState(TileState.LOADED)}setLoader(e){this.loader_=e}};class LRUCache{constructor(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let t=this.oldest_;for(;t;)e(t.value_,t.key_,this),t=t.newer}get(e,t){const i=this.entries_[e];return assert(i!==void 0,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(e){const t=this.entries_[e];return assert(t!==void 0,"Tried to get a value for a key that does not exist in the cache"),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.key_;return e}getValues(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){var t;return(t=this.entries_[e])==null?void 0:t.value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,t){this.get(e),this.entries_[e].value_=t}set(e,t){assert(!(e in this.entries_),"Tried to set a value for a key that is used already");const i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_}setSize(e){this.highWaterMark=e}}function createOrUpdate$1(n,e,t,i){return i!==void 0?(i[0]=n,i[1]=e,i[2]=t,i):[n,e,t]}function getKeyZXY(n,e,t){return n+"/"+e+"/"+t}function getKey(n){return getKeyZXY(n[0],n[1],n[2])}function getCacheKeyForTileKey(n){const[e,t,i]=n.substring(n.lastIndexOf("/")+1,n.length).split(",").map(Number);return getKeyZXY(e,t,i)}function fromKey(n){return n.split("/").map(Number)}function hash(n){return(n[1]<t||t>e.getMaxZoom())return!1;const s=e.getFullTileRange(t);return s?s.containsXY(i,r):!0}class TileCache extends LRUCache{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(e){for(;this.canExpireCache()&&!(this.peekLast().getKey()in e);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const e=this.peekFirstKey(),i=fromKey(e)[0];this.forEach(r=>{r.tileCoord[0]!==i&&(this.remove(getKey(r.tileCoord)),r.release())})}}class TileRange{constructor(e,t,i,r){this.minX=e,this.maxX=t,this.minY=i,this.maxY=r}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minXthis.maxX&&(this.maxX=e.maxX),e.minYthis.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function createOrUpdate(n,e,t,i,r){return r!==void 0?(r.minX=n,r.maxX=e,r.minY=t,r.maxY=i,r):new TileRange(n,e,t,i)}const tmpTileCoord=[0,0,0],DECIMALS$1=5;class TileGrid{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,assert(isSorted(this.resolutions_,(r,s)=>s-r),"`resolutions` must be sorted in descending order");let t;if(!e.origins){for(let r=0,s=this.resolutions_.length-1;r{const o=new TileRange(Math.min(0,r[0]),Math.max(r[0]-1,-1),Math.min(0,r[1]),Math.max(r[1]-1,-1));if(i){const a=this.getTileRangeForExtentAndZ(i,s);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o}):i&&this.calculateTileRanges_(i)}forEachTileCoord(e,t,i){const r=this.getTileRangeForExtentAndZ(e,t);for(let s=r.minX,o=r.maxX;s<=o;++s)for(let a=r.minY,d=r.maxY;a<=d;++a)i([t,s,a])}forEachTileCoordParentTileRange(e,t,i,r){let s,o,a,d=null,y=e[0]-1;for(this.zoomFactor_===2?(o=e[1],a=e[2]):d=this.getTileCoordExtent(e,r);y>=this.minZoom;){if(o!==void 0&&a!==void 0?(o=Math.floor(o/2),a=Math.floor(a/2),s=createOrUpdate(o,o,a,a,i)):s=this.getTileRangeForExtentAndZ(d,y,i),t(y,s))return!0;--y}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,t,i){if(e[0]this.maxZoom||t0?i:Math.max(s/t[0],r/t[1]);const o=e+1,a=new Array(o);for(let d=0;di.highWaterMark&&(i.highWaterMark=e)}useTile(e,t,i,r){}}class TileSourceEvent extends BaseEvent{constructor(e,t){super(e),this.tile=t}}function createFromTemplate(n,e){const t=/\{z\}/g,i=/\{x\}/g,r=/\{y\}/g,s=/\{-y\}/g;return function(o,a,d){if(o)return n.replace(t,o[0].toString()).replace(i,o[1].toString()).replace(r,o[2].toString()).replace(s,function(){const y=o[0],v=e.getFullTileRange(y);if(!v)throw new Error("The {-y} placeholder requires a tile grid with extent");return(v.getHeight()-o[2]-1).toString()})}}function createFromTemplates(n,e){const t=n.length,i=new Array(t);for(let r=0;r=200&&a.status<300){const y=e.getType();let v;y=="json"?v=JSON.parse(a.responseText):y=="text"?v=a.responseText:y=="xml"?(v=a.responseXML,v||(v=new DOMParser().parseFromString(a.responseText,"application/xml"))):y=="arraybuffer"&&(v=a.response),v?s(e.readFeatures(v,{extent:t,featureProjection:r}),e.readProjection(v)):o()}else o()},a.onerror=o,a.send()}function xhr(n,e){return function(t,i,r,s,o){const a=this;loadFeaturesXhr(n,e,t,i,r,function(d,y){a.addFeatures(d),s!==void 0&&s(d)},o||VOID)}}class VectorTile extends UrlTile{constructor(e){const t=e.projection||"EPSG:3857",i=e.extent||extentFromProjection(t),r=e.tileGrid||createXYZ({extent:i,maxResolution:e.maxResolution,maxZoom:e.maxZoom!==void 0?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,opaque:!1,projection:t,state:e.state,tileGrid:r,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:defaultLoadFunction,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX===void 0?!0:e.wrapX,transition:e.transition,zDirection:e.zDirection===void 0?1:e.zDirection}),this.format_=e.format?e.format:null,this.sourceTileCache=new TileCache(this.tileCache.highWaterMark),this.overlaps_=e.overlaps==null?!0:e.overlaps,this.tileClass=e.tileClass?e.tileClass:VectorTile$1,this.tileGrids_={}}getFeaturesInExtent(e){const t=[],i=this.tileCache;if(i.getCount()===0)return t;const r=fromKey(i.peekFirstKey())[0],s=this.tileGrid;return i.forEach(function(o){if(o.tileCoord[0]!==r||o.getState()!==TileState.LOADED)return;const a=o.getSourceTiles();for(let d=0,y=a.length;d{const a=getCacheKeyForTileKey(o),d=i.peek(a);if(d){const y=d.sourceTiles;for(let v=0,_=y.length;v<_;++v)s[y[v].getKey()]=!0}return s},{});super.expireCache(e,t),this.sourceTileCache.expireCache(r)}getSourceTiles(e,t,i){if(i.getState()===TileState.IDLE){i.setState(TileState.LOADING);const r=i.wrappedTileCoord,s=this.getTileGridForProjection(t),o=s.getTileCoordExtent(r),a=r[0],d=s.getResolution(a);buffer(o,-d,o);const y=this.tileGrid,v=y.getExtent();v&&getIntersection(o,v,o);const _=y.getZForResolution(d,this.zDirection);y.forEachTileCoord(o,_,C=>{const E=this.tileUrlFunction(C,e,t),S=this.sourceTileCache.containsKey(E)?this.sourceTileCache.get(E):new this.tileClass(C,E?TileState.IDLE:TileState.EMPTY,E,this.format_,this.tileLoadFunction);i.sourceTiles.push(S);const b=S.getState();if(b{this.handleTileChange(R);const x=S.getState();if(x===TileState.LOADED||x===TileState.ERROR){const T=S.getKey();T in i.errorTileKeys?S.getState()===TileState.LOADED&&delete i.errorTileKeys[T]:i.loadingSourceTiles--,x===TileState.ERROR?i.errorTileKeys[T]=!0:S.removeEventListener(EventType$1.CHANGE,P),i.loadingSourceTiles===0&&i.setState(isEmpty$1(i.errorTileKeys)?TileState.LOADED:TileState.ERROR)}};S.addEventListener(EventType$1.CHANGE,P),i.loadingSourceTiles++}b===TileState.IDLE&&(S.extent=y.getTileCoordExtent(C),S.projection=t,S.resolution=y.getResolution(C[0]),this.sourceTileCache.set(E,S),S.load())}),i.loadingSourceTiles||i.setState(i.sourceTiles.some(C=>C.getState()===TileState.ERROR)?TileState.ERROR:TileState.LOADED)}return i.sourceTiles}getTile(e,t,i,r,s){const o=getKeyZXY(e,t,i),a=this.getKey();let d;if(this.tileCache.containsKey(o)&&(d=this.tileCache.get(o),d.key===a))return d;const y=[e,t,i];let v=this.getTileCoordForTileUrlFunction(y,s);const _=this.getTileGrid().getExtent(),C=this.getTileGridForProjection(s);if(v&&_){const b=C.getTileCoordExtent(v);buffer(b,-C.getResolution(e),b),intersects$1(_,b)||(v=null)}let E=!0;if(v!==null){const b=this.tileGrid,P=C.getResolution(e),R=b.getZForResolution(P,1),x=C.getTileCoordExtent(v);buffer(x,-P,x),b.forEachTileCoord(x,R,T=>{E=E&&!this.tileUrlFunction(T,r,s)})}const S=new VectorRenderTile(y,E?TileState.EMPTY:TileState.IDLE,v,this.getSourceTiles.bind(this,r,s));return S.key=a,d?(S.interimTile=d,S.refreshInterimChain(),this.tileCache.replace(o,S)):this.tileCache.set(o,S),S}getTileGridForProjection(e){const t=e.getCode();let i=this.tileGrids_[t];if(!i){const r=this.tileGrid,s=r.getResolutions().slice(),o=s.map(function(y,v){return r.getOrigin(v)}),a=s.map(function(y,v){return r.getTileSize(v)}),d=DEFAULT_MAX_ZOOM+1;for(let y=s.length;yt;){if(i-t>600){var s=i-t+1,o=e-t+1,a=Math.log(s),d=.5*Math.exp(2*a/3),y=.5*Math.sqrt(a*d*(s-d)/s)*(o-s/2<0?-1:1),v=Math.max(t,Math.floor(e-o*d/s+y)),_=Math.min(i,Math.floor(e+(s-o)*d/s+y));quickselectStep(n,e,v,_,r)}var C=n[e],E=t,S=i;for(swap(n,t,e),r(n[i],C)>0&&swap(n,t,i);E0;)S--}r(n[t],C)===0?swap(n,t,S):(S++,swap(n,S,i)),S<=e&&(t=S+1),e<=S&&(i=S-1)}}function swap(n,e,t){var i=n[e];n[e]=n[t],n[t]=i}function defaultCompare(n,e){return ne?1:0}let RBush$1=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const i=[];if(!intersects(e,t))return i;const r=this.toBBox,s=[];for(;t;){for(let o=0;o=0&&s[t].children.length>this._maxEntries;)this._split(s,t),t--;this._adjustParentBBoxes(r,s,t)}_split(e,t){const i=e[t],r=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,r);const o=this._chooseSplitIndex(i,s,r),a=createNode(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,calcBBox(i,this.toBBox),calcBBox(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=createNode([e,t]),this.data.height=e.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)}_chooseSplitIndex(e,t,i){let r,s=1/0,o=1/0;for(let a=t;a<=i-t;a++){const d=distBBox(e,0,a,this.toBBox),y=distBBox(e,a,i,this.toBBox),v=intersectionArea(d,y),_=bboxArea(d)+bboxArea(y);v=t;y--){const v=e.children[y];extend$2(a,e.leaf?s(v):v),d+=bboxMargin(a)}return d}_adjustParentBBoxes(e,t,i){for(let r=i;r>=0;r--)extend$2(t[r],e)}_condense(e){for(let t=e.length-1,i;t>=0;t--)e[t].children.length===0?t>0?(i=e[t-1].children,i.splice(i.indexOf(e[t]),1)):this.clear():calcBBox(e[t],this.toBBox)}};function findItem(n,e,t){if(!t)return e.indexOf(n);for(let i=0;i=n.minX&&e.maxY>=n.minY}function createNode(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(n,e,t,i,r){const s=[e,t];for(;s.length;){if(t=s.pop(),e=s.pop(),t-e<=i)continue;const o=e+Math.ceil((t-e)/i/2)*i;quickselect(n,o,e,t,r),s.push(e,o,o,t)}}class RBush{constructor(e){this.rbush_=new RBush$1(e),this.items_={}}insert(e,t){const i={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(i),this.items_[getUid(t)]=i}load(e,t){const i=new Array(t.length);for(let r=0,s=t.length;r=i[0]||e[1]<=i[1]&&e[3]>=i[1]?!0:forEachCorner(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const t=this.stride,i=this.flatCoordinates[t]-this.flatCoordinates[0],r=e.slice();r[t]=r[0]+i;for(let s=1;s1?o:2,s=s||new Array(o);for(let v=0;v>1;r{if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),t&&this.simplifiedGeometry_.applyTransform(t);const i=this.simplifiedGeometry_.getFlatCoordinates();let r;switch(this.type_){case"LineString":i.length=douglasPeucker(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),r=[i.length];break;case"MultiLineString":r=[],i.length=douglasPeuckerArray(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,r);break;case"Polygon":r=[],i.length=quantizeArray(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),i,0,r);break}return r&&(this.simplifiedGeometry_=new RenderFeature(this.type_,i,r,2,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}RenderFeature.prototype.getFlatCoordinates=RenderFeature.prototype.getOrientedFlatCoordinates;const VectorEventType={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function all(n,e){return[[-1/0,-1/0,1/0,1/0]]}function bbox(n,e){return[n]}class VectorSourceEvent extends BaseEvent{constructor(e,t,i){super(e),this.feature=t,this.features=i}}class VectorSource extends Source{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=VOID,this.format_=e.format,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(assert(this.format_,"`format` must be set when `url` is set"),this.loader_=xhr(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:all;const t=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=t?new RBush:null,this.loadedExtentsRtree_=new RBush,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,r;Array.isArray(e.features)?r=e.features:e.features&&(i=e.features,r=i.getArray()),!t&&i===void 0&&(i=new Collection(r)),r!==void 0&&this.addFeaturesInternal(r),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const t=getUid(e);if(!this.addToIndex_(t,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(t,e);const i=e.getGeometry();if(i){const r=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE,e))}setupChangeEvents_(e,t){t instanceof RenderFeature||(this.featureChangeKeys_[e]=[listen(t,EventType$1.CHANGE,this.handleFeatureChange_,this),listen(t,ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,t){let i=!0;if(t.getId()!==void 0){const r=String(t.getId());if(!(r in this.idIndex_))this.idIndex_[r]=t;else if(t instanceof RenderFeature){const s=this.idIndex_[r];s instanceof RenderFeature?Array.isArray(s)?s.push(t):this.idIndex_[r]=[s,t]:i=!1}else i=!1}return i&&(assert(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=t),i}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const t=[],i=[],r=[];for(let s=0,o=e.length;s{t||(t=!0,this.addFeature(i.element),t=!1)}),e.addEventListener(CollectionEventType.REMOVE,i=>{t||(t=!0,this.removeFeature(i.element),t=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(unlistenByKey);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=r=>{this.removeFeatureInternal(r)};this.featuresRtree_.forEach(i);for(const r in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const t=new VectorSourceEvent(VectorEventType.CLEAR);this.dispatchEvent(t),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,t){const i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(r){const s=r.getGeometry();if(s instanceof RenderFeature||s.intersectsCoordinate(e))return t(r)})}forEachFeatureInExtent(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureIntersectingExtent(e,t){return this.forEachFeatureInExtent(e,function(i){const r=i.getGeometry();if(r instanceof RenderFeature||r.intersectsExtent(e)){const s=t(i);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),isEmpty$1(this.nullGeometryFeatures_)||extend$4(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const t=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){t.push(i)}),t}getFeaturesInExtent(e,t){if(this.featuresRtree_){if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const r=wrapAndSliceX(e,t);return[].concat(...r.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,t){const i=e[0],r=e[1];let s=null;const o=[NaN,NaN];let a=1/0;const d=[-1/0,-1/0,1/0,1/0];return t=t||TRUE,this.featuresRtree_.forEachInExtent(d,function(y){if(t(y)){const v=y.getGeometry(),_=a;if(a=v instanceof RenderFeature?0:v.closestPointXY(i,r,o,a),a<_){s=y;const C=Math.sqrt(a);d[0]=i-C,d[1]=r-C,d[2]=i+C,d[3]=r+C}}}),s}getExtent(e){return this.featuresRtree_.getExtent(e)}getFeatureById(e){const t=this.idIndex_[e.toString()];return t!==void 0?t:null}getFeatureByUid(e){const t=this.uidIndex_[e];return t!==void 0?t:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(e){const t=e.target,i=getUid(t),r=t.getGeometry();if(!r)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[i]=t);else{const o=r.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,t)):this.featuresRtree_&&this.featuresRtree_.update(o,t)}const s=t.getId();if(s!==void 0){const o=s.toString();this.idIndex_[o]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[o]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[i]=t;this.changed(),this.dispatchEvent(new VectorSourceEvent(VectorEventType.CHANGEFEATURE,t))}hasFeature(e){const t=e.getId();return t!==void 0?t in this.idIndex_:getUid(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&isEmpty$1(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(e,t,i){const r=this.loadedExtentsRtree_,s=this.strategy_(e,t,i);for(let o=0,a=s.length;o{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADEND,void 0,v))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADERROR))}),r.insert(d,{extent:d.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const t=this.loadedExtentsRtree_;let i;t.forEachInExtent(e,function(r){if(equals$1(r.extent,e))return i=r,!0}),i&&t.remove(i)}removeFeature(e){if(!e)return;const t=getUid(e);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const t=getUid(e),i=this.featureChangeKeys_[t];if(!i)return;i.forEach(unlistenByKey),delete this.featureChangeKeys_[t];const r=e.getId();return r!==void 0&&delete this.idIndex_[r.toString()],delete this.uidIndex_[t],this.dispatchEvent(new VectorSourceEvent(VectorEventType.REMOVEFEATURE,e)),e}removeFromIdIndex_(e){let t=!1;for(const i in this.idIndex_){const r=this.idIndex_[i];if(e instanceof RenderFeature&&Array.isArray(r)&&r.includes(e))r.splice(r.indexOf(e),1);else if(this.idIndex_[i]===e){delete this.idIndex_[i],t=!0;break}}return t}setLoader(e){this.loader_=e}setUrl(e){assert(this.format_,"`format` must be set when `url` is set"),this.url_=e,this.setLoader(xhr(e,this.format_))}}const ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class ImageWrapper extends Target{constructor(e,t,i,r){super(),this.extent=e,this.pixelRatio_=i,this.resolution=t,this.state=typeof r=="function"?ImageState.IDLE:r,this.image_=null,this.loader=typeof r=="function"?r:null}changed(){this.dispatchEvent(EventType$1.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==ImageState.IDLE&&this.loader){this.state=ImageState.LOADING,this.changed();const e=this.getResolution(),t=Array.isArray(e)?e[0]:e;toPromise(()=>this.loader(this.getExtent(),t,this.getPixelRatio())).then(i=>{"image"in i&&(this.image_=i.image),"extent"in i&&(this.extent=i.extent),"resolution"in i&&(this.resolution=i.resolution),"pixelRatio"in i&&(this.pixelRatio_=i.pixelRatio),(i instanceof HTMLImageElement||i instanceof ImageBitmap||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement)&&(this.image_=i),this.state=ImageState.LOADED}).catch(i=>{this.state=ImageState.ERROR,console.error(i)}).finally(()=>this.changed())}}setImage(e){this.image_=e}setResolution(e){this.resolution=e}}function listenImage(n,e,t){const i=n;let r=!0,s=!1,o=!1;const a=[listenOnce(i,EventType$1.LOAD,function(){o=!0,s||e()})];return i.src&&IMAGE_DECODE?(s=!0,i.decode().then(function(){r&&e()}).catch(function(d){r&&(o?e():t())})):a.push(listenOnce(i,EventType$1.ERROR,t)),function(){r=!1,a.forEach(unlistenByKey)}}function load(n,e){return new Promise((t,i)=>{function r(){o(),t(n)}function s(){o(),i(new Error("Image load error"))}function o(){n.removeEventListener("load",r),n.removeEventListener("error",s)}n.addEventListener("load",r),n.addEventListener("error",s)})}function decodeFallback(n,e){return e&&(n.src=e),n.src&&IMAGE_DECODE?new Promise((t,i)=>n.decode().then(()=>t(n)).catch(r=>n.complete&&n.width?t(n):i(r))):load(n)}function decode$1(n,e){return e&&(n.src=e),n.src&&IMAGE_DECODE&&CREATE_IMAGE_BITMAP?n.decode().then(()=>createImageBitmap(n)).catch(t=>{if(n.complete&&n.width)return n;throw t}):decodeFallback(n)}class ImageTile extends Tile{constructor(e,t,i,r,s,o){super(e,t,o),this.crossOrigin_=r,this.src_=i,this.key=i,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(e){this.image_=e,this.state=TileState.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=TileState.ERROR,this.unlistenImage_(),this.image_=getBlankImage(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=TileState.LOADED:this.state=TileState.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==TileState.ERROR&&(this.state=TileState.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==TileState.IDLE&&(this.state=TileState.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=listenImage(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function getBlankImage(){const n=createCanvasContext2D(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}const ERROR_THRESHOLD=.5,MAX_SUBDIVISION=10,MAX_TRIANGLE_WIDTH=.25;class Triangulation{constructor(e,t,i,r,s,o){this.sourceProj_=e,this.targetProj_=t;let a={};const d=getTransform(this.targetProj_,this.sourceProj_);this.transformInv_=function(x){const T=x[0]+"/"+x[1];return a[T]||(a[T]=d(x)),a[T]},this.maxSourceExtent_=r,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&getWidth(r)>=getWidth(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?getWidth(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?getWidth(this.targetProj_.getExtent()):null;const y=getTopLeft(i),v=getTopRight(i),_=getBottomRight(i),C=getBottomLeft(i),E=this.transformInv_(y),S=this.transformInv_(v),b=this.transformInv_(_),P=this.transformInv_(C),R=MAX_SUBDIVISION+(o?Math.max(0,Math.ceil(Math.log2(getArea$1(i)/(o*o*256*256)))):0);if(this.addQuad_(y,v,_,C,E,S,b,P,R),this.wrapsXInSource_){let x=1/0;this.triangles_.forEach(function(T,L,k){x=Math.min(x,T.source[0][0],T.source[1][0],T.source[2][0])}),this.triangles_.forEach(T=>{if(Math.max(T.source[0][0],T.source[1][0],T.source[2][0])-x>this.sourceWorldWidth_/2){const L=[[T.source[0][0],T.source[0][1]],[T.source[1][0],T.source[1][1]],[T.source[2][0],T.source[2][1]]];L[0][0]-x>this.sourceWorldWidth_/2&&(L[0][0]-=this.sourceWorldWidth_),L[1][0]-x>this.sourceWorldWidth_/2&&(L[1][0]-=this.sourceWorldWidth_),L[2][0]-x>this.sourceWorldWidth_/2&&(L[2][0]-=this.sourceWorldWidth_);const k=Math.min(L[0][0],L[1][0],L[2][0]);Math.max(L[0][0],L[1][0],L[2][0])-k.5&&_<1;let S=!1;if(y>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const P=boundingExtent([e,t,i,r]);S=getWidth(P)/this.targetWorldWidth_>MAX_TRIANGLE_WIDTH||S}!E&&this.sourceProj_.isGlobal()&&_&&(S=_>MAX_TRIANGLE_WIDTH||S)}if(!S&&this.maxSourceExtent_&&isFinite(v[0])&&isFinite(v[1])&&isFinite(v[2])&&isFinite(v[3])&&!intersects$1(v,this.maxSourceExtent_))return;let b=0;if(!S&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(d[0])||!isFinite(d[1]))){if(y>0)S=!0;else if(b=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(d[0])||!isFinite(d[1])?1:0),b!=1&&b!=2&&b!=4&&b!=8)return}if(y>0){if(!S){const P=[(e[0]+i[0])/2,(e[1]+i[1])/2],R=this.transformInv_(P);let x;E?x=(modulo(s[0],C)+modulo(a[0],C))/2-modulo(R[0],C):x=(s[0]+a[0])/2-R[0];const T=(s[1]+a[1])/2-R[1];S=x*x+T*T>this.errorThresholdSquared_}if(S){if(Math.abs(e[0]-i[0])<=Math.abs(e[1]-i[1])){const P=[(t[0]+i[0])/2,(t[1]+i[1])/2],R=this.transformInv_(P),x=[(r[0]+e[0])/2,(r[1]+e[1])/2],T=this.transformInv_(x);this.addQuad_(e,t,P,x,s,o,R,T,y-1),this.addQuad_(x,P,i,r,T,R,a,d,y-1)}else{const P=[(e[0]+t[0])/2,(e[1]+t[1])/2],R=this.transformInv_(P),x=[(i[0]+r[0])/2,(i[1]+r[1])/2],T=this.transformInv_(x);this.addQuad_(e,P,x,r,s,R,T,d,y-1),this.addQuad_(P,t,i,x,R,o,a,T,y-1)}return}}if(E){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}b&11||this.addTriangle_(e,i,r,s,a,d),b&14||this.addTriangle_(e,i,t,s,a,o),b&&(b&13||this.addTriangle_(t,r,e,o,d,s),b&7||this.addTriangle_(t,r,i,o,d,a))}calculateSourceExtent(){const e=createEmpty();return this.triangles_.forEach(function(t,i,r){const s=t.source;extendCoordinate(e,s[0]),extendCoordinate(e,s[1]),extendCoordinate(e,s[2])}),e}getTriangles(){return this.triangles_}}let brokenDiagonalRendering_;const canvasPool$1=[];function drawTestTriangle(n,e,t,i,r){n.beginPath(),n.moveTo(0,0),n.lineTo(e,t),n.lineTo(i,r),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(e,i)+1,Math.max(t,r)),n.restore()}function verifyBrokenDiagonalRendering(n,e){return Math.abs(n[e*4]-210)>2||Math.abs(n[e*4+3]-.75*255)>2}function isBrokenDiagonalRendering(){if(brokenDiagonalRendering_===void 0){const n=createCanvasContext2D(6,6,canvasPool$1);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",drawTestTriangle(n,4,5,4,0),drawTestTriangle(n,4,5,0,5);const e=n.getImageData(0,0,3,3).data;brokenDiagonalRendering_=verifyBrokenDiagonalRendering(e,0)||verifyBrokenDiagonalRendering(e,4)||verifyBrokenDiagonalRendering(e,8),releaseCanvas(n),canvasPool$1.push(n.canvas)}return brokenDiagonalRendering_}function calculateSourceResolution(n,e,t,i){const r=transform$1(t,e,n);let s=getPointResolution(e,i,t);const o=e.getMetersPerUnit();o!==void 0&&(s*=o);const a=n.getMetersPerUnit();a!==void 0&&(s/=a);const d=n.getExtent();if(!d||containsCoordinate(d,r)){const y=getPointResolution(n,s,r)/s;isFinite(y)&&y>0&&(s/=y)}return s}function calculateSourceExtentResolution(n,e,t,i){const r=getCenter(t);let s=calculateSourceResolution(n,e,r,i);return(!isFinite(s)||s<=0)&&forEachCorner(t,function(o){return s=calculateSourceResolution(n,e,o,i),isFinite(s)&&s>0}),s}function render(n,e,t,i,r,s,o,a,d,y,v,_,C){const E=createCanvasContext2D(Math.round(t*n),Math.round(t*e),canvasPool$1);if(_||(E.imageSmoothingEnabled=!1),d.length===0)return E.canvas;E.scale(t,t);function S(x){return Math.round(x*t)/t}E.globalCompositeOperation="lighter";const b=createEmpty();d.forEach(function(x,T,L){extend$3(b,x.extent)});let P;if(!C||d.length!==1||y!==0){const x=getWidth(b),T=getHeight(b);P=createCanvasContext2D(Math.round(t*x/i),Math.round(t*T/i),canvasPool$1),_||(P.imageSmoothingEnabled=!1);const L=t/i;d.forEach(function(k,N,G){const F=k.extent[0]-b[0],z=-(k.extent[3]-b[3]),B=getWidth(k.extent),D=getHeight(k.extent);k.image.width>0&&k.image.height>0&&P.drawImage(k.image,y,y,k.image.width-2*y,k.image.height-2*y,F*L,z*L,B*L,D*L)})}const R=getTopLeft(o);return a.getTriangles().forEach(function(x,T,L){const k=x.source,N=x.target;let G=k[0][0],F=k[0][1],z=k[1][0],B=k[1][1],D=k[2][0],U=k[2][1];const Y=S((N[0][0]-R[0])/s),$=S(-(N[0][1]-R[1])/s),K=S((N[1][0]-R[0])/s),q=S(-(N[1][1]-R[1])/s),te=S((N[2][0]-R[0])/s),Q=S(-(N[2][1]-R[1])/s),je=G,ie=F;G=0,F=0,z-=je,B-=ie,D-=je,U-=ie;const it=[[z,B,0,0,K-Y],[D,U,0,0,te-Y],[0,0,z,B,q-$],[0,0,D,U,Q-$]],le=solveLinearSystem(it);if(!le)return;if(E.save(),E.beginPath(),isBrokenDiagonalRendering()||!_){E.moveTo(K,q);const ct=4,Qe=Y-K,ut=$-q;for(let re=0;re{t&&t.getState()==TileState.LOADED&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}),this.sourceTiles_.length=0,e.length===0)this.state=TileState.ERROR;else{const t=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(t),r=typeof i=="number"?i:i[0],s=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(t),a=this.sourceTileGrid_.getResolution(this.sourceZ_),d=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=render(r,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,d,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=TileState.LOADED}this.changed()}load(){if(this.state==TileState.IDLE){this.state=TileState.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(t=>{const i=t.getState();if(i==TileState.IDLE||i==TileState.LOADING){e++;const r=listen(t,EventType$1.CHANGE,function(s){const o=t.getState();(o==TileState.LOADED||o==TileState.ERROR||o==TileState.EMPTY)&&(unlistenByKey(r),e--,e===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(r)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(t,i,r){t.getState()==TileState.IDLE&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(unlistenByKey),this.sourcesListenerKeys_=null}release(){this.canvas_&&(releaseCanvas(this.canvas_.getContext("2d")),canvasPool$1.push(this.canvas_),this.canvas_=null),super.release()}}class TileImage extends UrlTile{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:defaultTileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:ImageTile,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1}expireCache(e,t){const i=this.getTileCacheForProjection(e);this.tileCache.expireCache(this.tileCache==i?t:{});for(const r in this.tileCacheForProjection){const s=this.tileCacheForProjection[r];s.expireCache(s==i?t:{})}}getGutterForProjection(e){return this.getProjection()&&e&&!equivalent(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getOpaque(e){return this.getProjection()&&e&&!equivalent(this.getProjection(),e)?!1:super.getOpaque(e)}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||equivalent(t,e)))return this.tileGrid;const i=getUid(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=getForProjection(e)),this.tileGridForProjection[i]}getTileCacheForProjection(e){const t=this.getProjection();if(!t||equivalent(t,e))return this.tileCache;const i=getUid(e);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new TileCache(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(e,t,i,r,s,o){const a=[e,t,i],d=this.getTileCoordForTileUrlFunction(a,s),y=d?this.tileUrlFunction(d,r,s):void 0,v=new this.tileClass(a,y!==void 0?TileState.IDLE:TileState.EMPTY,y!==void 0?y:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return v.key=o,v.addEventListener(EventType$1.CHANGE,this.handleTileChange.bind(this)),v}getTile(e,t,i,r,s){const o=this.getProjection();if(!o||!s||equivalent(o,s))return this.getTileInternal(e,t,i,r,o||s);const a=this.getTileCacheForProjection(s),d=[e,t,i];let y;const v=getKey(d);a.containsKey(v)&&(y=a.get(v));const _=this.getKey();if(y&&y.key==_)return y;const C=this.getTileGridForProjection(o),E=this.getTileGridForProjection(s),S=this.getTileCoordForTileUrlFunction(d,s),b=new ReprojTile(o,C,s,E,d,S,this.getTilePixelRatio(r),this.getGutter(),(P,R,x,T)=>this.getTileInternal(P,R,x,T,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return b.key=_,y?(b.interimTile=y,b.refreshInterimChain(),a.replace(v,b)):a.set(v,b),b}getTileInternal(e,t,i,r,s){let o=null;const a=getKeyZXY(e,t,i),d=this.getKey();if(!this.tileCache.containsKey(a))o=this.createTile_(e,t,i,r,s,d),this.tileCache.set(a,o);else if(o=this.tileCache.get(a),o.key!=d){const y=o;o=this.createTile_(e,t,i,r,s,d),y.getState()==TileState.IDLE?o.interimTile=y.interimTile:o.interimTile=y,o.refreshInterimChain(),this.tileCache.replace(a,o)}return o}setRenderReprojectionEdges(e){if(this.renderReprojectionEdges_!=e){this.renderReprojectionEdges_=e;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(e,t){const i=get$3(e);if(i){const r=getUid(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=t)}}clear(){super.clear();for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear()}}function defaultTileLoadFunction(n,e){n.getImage().src=e}const DECIMALS=4;function appendParams(n,e){const t=[];Object.keys(e).forEach(function(r){e[r]!==null&&e[r]!==void 0&&t.push(r+"="+encodeURIComponent(e[r]))});const i=t.join("&");return n=n.replace(/[?&]$/,""),n+=n.includes("?")?"&":"?",n+i}function fromResolutionLike(n){return Array.isArray(n)?Math.min(...n):n}class ReprojImage extends ImageWrapper{constructor(e,t,i,r,s,o,a){let d=e.getExtent();d&&e.canWrapX()&&(d=d.slice(),d[0]=-1/0,d[2]=1/0);let y=t.getExtent();y&&t.canWrapX()&&(y=y.slice(),y[0]=-1/0,y[2]=1/0);const v=y?getIntersection(i,y):i,_=getCenter(v),C=calculateSourceResolution(e,t,_,r),E=ERROR_THRESHOLD,S=new Triangulation(e,t,v,d,C*E,r),b=S.calculateSourceExtent(),P=isEmpty(b)?null:o(b,C,s),R=P?ImageState.IDLE:ImageState.EMPTY,x=P?P.getPixelRatio():1;super(i,r,x,R),this.targetProj_=t,this.maxSourceExtent_=d,this.triangulation_=S,this.targetResolution_=r,this.targetExtent_=i,this.sourceImage_=P,this.sourcePixelRatio_=x,this.interpolate_=a,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==ImageState.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const e=this.sourceImage_.getState();if(e==ImageState.LOADED){const t=getWidth(this.targetExtent_)/this.targetResolution_,i=getHeight(this.targetExtent_)/this.targetResolution_;this.canvas_=render(t,i,this.sourcePixelRatio_,fromResolutionLike(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=e,this.changed()}load(){if(this.state==ImageState.IDLE){this.state=ImageState.LOADING,this.changed();const e=this.sourceImage_.getState();e==ImageState.LOADED||e==ImageState.ERROR?this.reproject_():(this.sourceListenerKey_=listen(this.sourceImage_,EventType$1.CHANGE,function(t){const i=this.sourceImage_.getState();(i==ImageState.LOADED||i==ImageState.ERROR)&&(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}}unlistenSource_(){unlistenByKey(this.sourceListenerKey_),this.sourceListenerKey_=null}}const ImageSourceEventType={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};class ImageSourceEvent extends BaseEvent{constructor(e,t){super(e),this.image=t}}class ImageSource extends Source{constructor(e){super({attributions:e.attributions,projection:e.projection,state:e.state,interpolate:e.interpolate!==void 0?e.interpolate:!0}),this.on,this.once,this.un,this.loader=e.loader||null,this.resolutions_=e.resolutions!==void 0?e.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=e.loader?e.loader.length===0:!1,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(e){this.resolutions_=e}findNearestResolution(e){const t=this.getResolutions();if(t){const i=linearFindNearest(t,e,0);e=t[i]}return e}getImage(e,t,i,r){const s=this.getProjection();if(!s||!r||equivalent(s,r))return s&&(r=s),this.getImageInternal(e,t,i,r);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&equivalent(this.reprojectedImage_.getProjection(),r)&&this.reprojectedImage_.getResolution()==t&&equals$1(this.reprojectedImage_.getExtent(),e))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new ReprojImage(s,r,e,t,i,(o,a,d)=>this.getImageInternal(o,a,d,s),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(e,t,i,r){if(this.loader){const s=getRequestExtent(e,t,i,1),o=this.findNearestResolution(t);if(this.image&&(this.static_||this.wantedProjection_===r&&(this.wantedExtent_&&containsExtent(this.wantedExtent_,s)||containsExtent(this.image.getExtent(),s))&&(this.wantedResolution_&&fromResolutionLike(this.wantedResolution_)===o||fromResolutionLike(this.image.getResolution())===o)))return this.image;this.wantedProjection_=r,this.wantedExtent_=s,this.wantedResolution_=o,this.image=new ImageWrapper(s,o,i,this.loader),this.image.addEventListener(EventType$1.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(e){const t=e.target;let i;switch(t.getState()){case ImageState.LOADING:this.loading=!0,i=ImageSourceEventType.IMAGELOADSTART;break;case ImageState.LOADED:this.loading=!1,i=ImageSourceEventType.IMAGELOADEND;break;case ImageState.ERROR:this.loading=!1,i=ImageSourceEventType.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new ImageSourceEvent(i,t))}}function defaultImageLoadFunction(n,e){n.getImage().src=e}function getRequestExtent(n,e,t,i){const r=e/t,s=getCenter(n),o=ceil(getWidth(n)/r,DECIMALS),a=ceil(getHeight(n)/r,DECIMALS),d=ceil((i-1)*o/2,DECIMALS),y=o+2*d,v=ceil((i-1)*a/2,DECIMALS),_=a+2*v;return getForViewAndSize(s,r,0,[y,_])}const DEFAULT_VERSION="1.3.0",GETFEATUREINFO_IMAGE_SIZE=[101,101];function getRequestUrl(n,e,t,i,r){r.WIDTH=t[0],r.HEIGHT=t[1];const s=i.getAxisOrientation();let o;const a=compareVersions(r.VERSION,"1.3")>=0;return r[a?"CRS":"SRS"]=i.getCode(),a&&s.substr(0,2)=="ne"?o=[e[1],e[0],e[3],e[2]]:o=e,r.BBOX=o.join(","),appendParams(n,r)}function getImageSrc(n,e,t,i,r,s,o){s=Object.assign({REQUEST:"GetMap"},s);const a=e/t,d=[round(getWidth(n)/a,DECIMALS),round(getHeight(n)/a,DECIMALS)];if(t!=1)switch(o){case"geoserver":const v=90*t+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+v:s.FORMAT_OPTIONS="dpi:"+v;break;case"mapserver":s.MAP_RESOLUTION=90*t;break;case"carmentaserver":case"qgis":s.DPI=90*t;break;default:throw new Error("Unknown `serverType` configured")}return getRequestUrl(r,n,d,i,s)}function getRequestParams(n,e){return Object.assign({REQUEST:e,SERVICE:"WMS",VERSION:DEFAULT_VERSION,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},n)}function createLoader(n){const e=n.hidpi===void 0?!0:n.hidpi,t=get$3(n.projection||"EPSG:3857"),i=n.ratio||1.5,r=n.load||decode$1;return(s,o,a)=>{s=getRequestExtent(s,o,a,i),a!=1&&(!e||n.serverType===void 0)&&(a=1);const d=getImageSrc(s,o,a,t,n.url,getRequestParams(n.params,"GetMap"),n.serverType),y=new Image;return n.crossOrigin!==null&&(y.crossOrigin=n.crossOrigin),r(y,d).then(v=>({image:v,extent:s,pixelRatio:a}))}}function getFeatureInfoUrl(n,e,t){if(n.url===void 0)return;const i=get$3(n.projection||"EPSG:3857"),r=getForViewAndSize(e,t,0,GETFEATUREINFO_IMAGE_SIZE),s={QUERY_LAYERS:n.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(s,getRequestParams(n.params,"GetFeatureInfo"),n.params);const o=floor((e[0]-r[0])/t,DECIMALS),a=floor((r[3]-e[1])/t,DECIMALS),d=compareVersions(s.VERSION,"1.3")>=0;return s[d?"I":"X"]=o,s[d?"J":"Y"]=a,getRequestUrl(n.url,r,GETFEATUREINFO_IMAGE_SIZE,i,s)}function getLegendUrl(n,e){if(n.url===void 0)return;const t={SERVICE:"WMS",VERSION:DEFAULT_VERSION,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(n.params===void 0||n.params.LAYER===void 0){const i=n.params.LAYERS;if(!(!Array.isArray(i)||i.length===1))return;t.LAYER=i}if(e!==void 0){const i=get$3(n.projection||"EPSG:3857").getMetersPerUnit()||1,r=28e-5;t.SCALE=e*i/r}return Object.assign(t,n.params),appendParams(n.url,t)}class TileWMS extends TileImage{constructor(e){e=e||{};const t=Object.assign({},e.params),i="TRANSPARENT"in t?t.TRANSPARENT:!0;super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,opaque:!i,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0,this.params_=t,this.v13_=!0,this.serverType_=e.serverType,this.hidpi_=e.hidpi!==void 0?e.hidpi:!0,this.tmpExtent_=createEmpty(),this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(e,t,i,r){const s=get$3(i),o=this.getProjection()||s;let a=this.getTileGrid();a||(a=this.getTileGridForProjection(o));const d=transform$1(e,s,o),y=calculateSourceResolution(o,s,e,t),v=a.getZForResolution(y,this.zDirection),_=a.getResolution(v),C=a.getTileCoordForCoordAndZ(d,v);if(a.getResolutions().length<=C[0])return;let E=a.getTileCoordExtent(C,this.tmpExtent_);const S=this.gutter_;S!==0&&(E=buffer(E,_*S,E));const b={QUERY_LAYERS:this.params_.LAYERS};Object.assign(b,getRequestParams(this.params_,"GetFeatureInfo"),r);const P=Math.floor((d[0]-E[0])/_),R=Math.floor((E[3]-d[1])/_);return b[this.v13_?"I":"X"]=P,b[this.v13_?"J":"Y"]=R,this.getRequestUrl_(C,E,1,o||s,b)}getLegendUrl(e,t){if(this.urls[0]===void 0)return;const i={SERVICE:"WMS",VERSION:DEFAULT_VERSION,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(t===void 0||t.LAYER===void 0){const r=this.params_.LAYERS;if(!(!Array.isArray(r)||r.length===1))return;i.LAYER=r}if(e!==void 0){const r=this.getProjection()?this.getProjection().getMetersPerUnit():1,s=28e-5;i.SCALE=e*r/s}return Object.assign(i,t),appendParams(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(e,t,i,r,s){const o=this.urls;if(!o)return;let a;if(o.length==1)a=o[0];else{const d=modulo(hash(e),o.length);a=o[d]}return getImageSrc(t,(this.tileGrid||this.getTileGridForProjection(r)).getResolution(e[0]),i,r,a,s,this.serverType_)}getTilePixelRatio(e){return!this.hidpi_||this.serverType_===void 0?1:e}getKeyForParams_(){let e=0;const t=[];for(const i in this.params_)t[e++]=i+"-"+this.params_[i];return t.join("/")}updateParams(e){Object.assign(this.params_,e),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const e=this.params_.VERSION||DEFAULT_VERSION;this.v13_=compareVersions(e,"1.3")>=0}tileUrlFunction(e,t,i){let r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),r.getResolutions().length<=e[0])return;t!=1&&(!this.hidpi_||this.serverType_===void 0)&&(t=1);const s=r.getResolution(e[0]);let o=r.getTileCoordExtent(e,this.tmpExtent_);const a=this.gutter_;a!==0&&(o=buffer(o,s*a,o));const d=Object.assign({},getRequestParams(this.params_,"GetMap"));return this.getRequestUrl_(e,o,t,i,d)}}let WMTS$1=class extends TileImage{constructor(e){const t=e.requestEncoding!==void 0?e.requestEncoding:"KVP",i=e.tileGrid;let r=e.urls;r===void 0&&e.url!==void 0&&(r=expandUrl(e.url)),super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,urls:r,wrapX:e.wrapX!==void 0?e.wrapX:!1,transition:e.transition,zDirection:e.zDirection}),this.version_=e.version!==void 0?e.version:"1.0.0",this.format_=e.format!==void 0?e.format:"image/jpeg",this.dimensions_=e.dimensions!==void 0?e.dimensions:{},this.layer_=e.layer,this.matrixSet_=e.matrixSet,this.style_=e.style,this.requestEncoding_=t,this.setKey(this.getKeyForDimensions_()),r&&r.length>0&&(this.tileUrlFunction=createFromTileUrlFunctions(r.map(this.createFromWMTSTemplate.bind(this))))}setUrls(e){this.urls=e;const t=e.join(` +`);this.setTileUrlFunction(createFromTileUrlFunctions(e.map(this.createFromWMTSTemplate.bind(this))),t)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const e=this.urls?this.urls.slice(0):[];for(const t in this.dimensions_)e.push(t+"-"+this.dimensions_[t]);return e.join("/")}updateDimensions(e){Object.assign(this.dimensions_,e),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(e){const t=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};t=="KVP"&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),e=t=="KVP"?appendParams(e,i):e.replace(/\{(\w+?)\}/g,function(o,a){return a.toLowerCase()in i?i[a.toLowerCase()]:o});const r=this.tileGrid,s=this.dimensions_;return function(o,a,d){if(!o)return;const y={TileMatrix:r.getMatrixId(o[0]),TileCol:o[1],TileRow:o[2]};Object.assign(y,s);let v=e;return t=="KVP"?v=appendParams(v,y):v=v.replace(/\{(\w+?)\}/g,function(_,C){return y[C]}),v}}};class ImageWMS extends ImageSource{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:e.interpolate,projection:e.projection,resolutions:e.resolutions}),this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null,this.url_=e.url,this.imageLoadFunction_=e.imageLoadFunction!==void 0?e.imageLoadFunction:defaultImageLoadFunction,this.params_=e.params,this.serverType_=e.serverType,this.hidpi_=e.hidpi!==void 0?e.hidpi:!0,this.renderedRevision_=0,this.ratio_=e.ratio!==void 0?e.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(e,t,i,r){const s=get$3(i),o=this.getProjection();o&&o!==s&&(t=calculateSourceResolution(o,s,e,t),e=transform$1(e,s,o));const a={url:this.url_,params:{...this.params_,...r},projection:o||s};return getFeatureInfoUrl(a,e,t)}getLegendUrl(e,t){return getLegendUrl({url:this.url_,params:{...this.params_,...t}},e)}getParams(){return this.params_}getImageInternal(e,t,i,r){return this.url_===void 0?null:((!this.loader||this.loaderProjection_!==r)&&(this.loaderProjection_=r,this.loader=createLoader({crossOrigin:this.crossOrigin_,params:this.params_,projection:r,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(s,o)=>(this.image.setImage(s),this.imageLoadFunction_(this.image,o),decode$1(s))})),super.getImageInternal(e,t,i,r))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(e){this.imageLoadFunction_=e,this.changed()}setUrl(e){e!=this.url_&&(this.url_=e,this.loader=null,this.changed())}updateParams(e){Object.assign(this.params_,e),this.changed()}changed(){this.image=null,super.changed()}}class ImageStyle{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=toSize(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new ImageStyle({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return abstract()}getImage(e){return abstract()}getHitDetectionImage(){return abstract()}getPixelRatio(e){return 1}getImageState(){return abstract()}getImageSize(){return abstract()}getOrigin(){return abstract()}getSize(){return abstract()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=toSize(e)}listenImageChange(e){abstract()}load(){abstract()}unlistenImageChange(e){abstract()}}function asColorLike(n){return Array.isArray(n)?toString$2(n):n}class RegularShape extends ImageStyle{constructor(e){const t=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:1,rotateWithView:t,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=e.radius!==void 0?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.render()}clone(){const e=this.getScale(),t=new RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_,t=this.getDisplacement(),i=this.getScaleArray();return[e[0]/2-t[0]/i[0],e[1]/2+t[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){let t=this.canvases_[e];if(!t){const i=this.renderOptions_,r=createCanvasContext2D(i.size*e,i.size*e);this.draw_(i,r,e),t=r.canvas,this.canvases_[e]=t}return t}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return ImageState.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,i){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let r=this.radius_,s=this.radius2_===void 0?r:this.radius2_;if(r{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==ImageState.LOADED)return;const t=this.image_,i=document.createElement("canvas");i.width=Math.ceil(t.width*e),i.height=Math.ceil(t.height*e);const r=i.getContext("2d");r.scale(e,e),r.drawImage(t,0,0),r.globalCompositeOperation="multiply",r.fillStyle=asString(this.color_),r.fillRect(0,0,i.width/e,i.height/e),r.globalCompositeOperation="destination-in",r.drawImage(t,0,0),this.canvas_[e]=i}}function get$2(n,e,t,i,r){let s=e===void 0?void 0:shared.get(e,t,r);return s||(s=new IconImage(n,n instanceof HTMLImageElement?n.src||void 0:e,t,i,r),shared.set(e,t,r,s)),s}function calculateScale(n,e,t,i){return t!==void 0&&i!==void 0?[t/n,i/e]:t!==void 0?t/n:i!==void 0?i/e:1}class Icon extends ImageStyle{constructor(e){e=e||{};const t=e.opacity!==void 0?e.opacity:1,i=e.rotation!==void 0?e.rotation:0,r=e.scale!==void 0?e.scale:1,s=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:t,rotation:i,scale:r,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:s,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null;const o=e.img!==void 0?e.img:null;let a=e.src;assert(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||getUid(o)),assert(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),assert(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let d;if(e.src!==void 0?d=ImageState.IDLE:o!==void 0&&(o instanceof HTMLImageElement?o.complete?d=o.src?ImageState.LOADED:ImageState.IDLE:d=ImageState.LOADING:d=ImageState.LOADED),this.color_=e.color!==void 0?asArray(e.color):null,this.iconImage_=get$2(o,a,this.crossOrigin_,d,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,e.width!==void 0||e.height!==void 0){let y,v;if(e.size)[y,v]=e.size;else{const _=this.getImage(1);if(_.width&&_.height)y=_.width,v=_.height;else if(_ instanceof HTMLImageElement){this.initialOptions_=e;const C=()=>{if(this.unlistenImageChange(C),!this.initialOptions_)return;const E=this.iconImage_.getSize();this.setScale(calculateScale(E[0],E[1],e.width,e.height))};this.listenImageChange(C);return}}y!==void 0&&this.setScale(calculateScale(y,v,e.width,e.height))}}clone(){let e,t,i;return this.initialOptions_?(t=this.initialOptions_.width,i=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:t,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=r[0]),this.anchorYUnits_=="fraction"&&(e[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+r[1])}this.normalizedAnchor_=e}const t=this.getDisplacement(),i=this.getScaleArray();return[e[0]-t[0]/i[0],e[1]+t[1]/i[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==ImageState.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==ImageState.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(EventType$1.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(EventType$1.CHANGE,e)}}const DEFAULT_FILL_COLOR="#333";class Text{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=toSize(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new Fill({color:DEFAULT_FILL_COLOR}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding}clone(){const e=this.getScale();return new Text({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=toSize(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}let numTypes=0;const NoneType=0,BooleanType$1=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette"},parsers={[Ops.Get]:createParser(([n,e])=>e!==void 0?getTypeFromHint(e.value):AnyType,withArgsCount(1,2),withGetArgs),[Ops.Var]:createParser(([n])=>n.type,withArgsCount(1,1),withVarArgs),[Ops.Id]:createParser(NumberType$1|StringType$1,withNoArgs,usesFeatureId),[Ops.Concat]:createParser(StringType$1,withArgsCount(2,1/0),parseArgsOfType(AnyType)),[Ops.GeometryType]:createParser(StringType$1,withNoArgs),[Ops.Resolution]:createParser(NumberType$1,withNoArgs),[Ops.Zoom]:createParser(NumberType$1,withNoArgs),[Ops.Time]:createParser(NumberType$1,withNoArgs),[Ops.Any]:createParser(BooleanType$1,withArgsCount(2,1/0),parseArgsOfType(BooleanType$1)),[Ops.All]:createParser(BooleanType$1,withArgsCount(2,1/0),parseArgsOfType(BooleanType$1)),[Ops.Not]:createParser(BooleanType$1,withArgsCount(1,1),parseArgsOfType(BooleanType$1)),[Ops.Equal]:createParser(BooleanType$1,withArgsCount(2,2),parseArgsOfType(AnyType),narrowArgsType),[Ops.NotEqual]:createParser(BooleanType$1,withArgsCount(2,2),parseArgsOfType(AnyType),narrowArgsType),[Ops.GreaterThan]:createParser(BooleanType$1,withArgsCount(2,2),parseArgsOfType(AnyType),narrowArgsType),[Ops.GreaterThanOrEqualTo]:createParser(BooleanType$1,withArgsCount(2,2),parseArgsOfType(AnyType),narrowArgsType),[Ops.LessThan]:createParser(BooleanType$1,withArgsCount(2,2),parseArgsOfType(AnyType),narrowArgsType),[Ops.LessThanOrEqualTo]:createParser(BooleanType$1,withArgsCount(2,2),parseArgsOfType(AnyType),narrowArgsType),[Ops.Multiply]:createParser(n=>{let e=NumberType$1|ColorType$1;for(let t=0;t{let e=AnyType;for(let t=2;t{let e=ColorType$1|NumberType$1;for(let t=3;t{let e=AnyType;for(let t=1;tn.length===3||n.length===4?NumberArrayType|ColorType$1:NumberArrayType,withArgsCount(1,1/0),parseArgsOfType(NumberType$1)),[Ops.Color]:createParser(ColorType$1,withArgsCount(3,4),parseArgsOfType(NumberType$1)),[Ops.Band]:createParser(NumberType$1,withArgsCount(1,3),parseArgsOfType(NumberType$1)),[Ops.Palette]:createParser(ColorType$1,withArgsCount(2,2),parsePaletteArgs)};function withGetArgs(n,e){const t=parse$2(n[1],e);if(!(t instanceof LiteralExpression))throw new Error("Expected a literal argument for get operation");if(typeof t.value!="string")throw new Error("Expected a string argument for get operation");if(e.properties.add(t.value),n.length===3){const i=parse$2(n[2],e);return[t,i]}return[t]}function withVarArgs(n,e,t,i){const r=n[1];if(typeof r!="string")throw new Error("Expected a string argument for var operation");if(e.variables.add(r),!("variables"in e.style)||e.style.variables[r]===void 0)return[new LiteralExpression(AnyType,r)];const s=e.style.variables[r],o=parse$2(s,e);if(o.value=r,i&&!overlapsType(i,o.type))throw new Error(`The variable ${r} has type ${typeName(o.type)} but the following type was expected: ${typeName(i)}`);return[o]}function usesFeatureId(n,e){e.featureId=!0}function withNoArgs(n,e){const t=n[0];if(n.length!==1)throw new Error(`Expected no arguments for ${t} operation`);return[]}function withArgsCount(n,e){return function(t,i){const r=t[0],s=t.length-1;if(n===e){if(s!==n){const o=n===1?"":"s";throw new Error(`Expected ${n} argument${o} for ${r}, got ${s}`)}}else if(se){const o=e===1/0?`${n} or more`:`${n} to ${e}`;throw new Error(`Expected ${o} arguments for ${r}, got ${s}`)}}}function parseArgsOfType(n){return function(e,t){const i=e[0],r=e.length-1,s=new Array(r);for(let o=0;oi.featureId;case Ops.Concat:{const i=n.args.map(r=>compileExpression(r));return r=>"".concat(...i.map(s=>s(r).toString()))}case Ops.Resolution:return i=>i.resolution;case Ops.Any:case Ops.All:case Ops.Not:return compileLogicalExpression(n);case Ops.Equal:case Ops.NotEqual:case Ops.LessThan:case Ops.LessThanOrEqualTo:case Ops.GreaterThan:case Ops.GreaterThanOrEqualTo:return compileComparisonExpression(n);case Ops.Multiply:case Ops.Divide:case Ops.Add:case Ops.Subtract:case Ops.Clamp:case Ops.Mod:case Ops.Pow:case Ops.Abs:case Ops.Floor:case Ops.Ceil:case Ops.Round:case Ops.Sin:case Ops.Cos:case Ops.Atan:case Ops.Sqrt:return compileNumericExpression(n);case Ops.Match:return compileMatchExpression(n);case Ops.Interpolate:return compileInterpolateExpression(n);default:throw new Error(`Unsupported operator ${t}`)}}function compileAssertionExpression(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let s=0;s{for(let o=0;or.properties[i];case Ops.Var:return r=>r.variables[i];default:throw new Error(`Unsupported accessor operator ${n.operator}`)}}function compileComparisonExpression(n,e){const t=n.operator,i=compileExpression(n.args[0]),r=compileExpression(n.args[1]);switch(t){case Ops.Equal:return s=>i(s)===r(s);case Ops.NotEqual:return s=>i(s)!==r(s);case Ops.LessThan:return s=>i(s)i(s)<=r(s);case Ops.GreaterThan:return s=>i(s)>r(s);case Ops.GreaterThanOrEqualTo:return s=>i(s)>=r(s);default:throw new Error(`Unsupported comparison operator ${t}`)}}function compileLogicalExpression(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let s=0;s{for(let o=0;o{for(let o=0;o!r[0](s);default:throw new Error(`Unsupported logical operator ${t}`)}}function compileNumericExpression(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let s=0;s{let o=1;for(let a=0;ar[0](s)/r[1](s);case Ops.Add:return s=>{let o=0;for(let a=0;ar[0](s)-r[1](s);case Ops.Clamp:return s=>{const o=r[0](s),a=r[1](s);if(od?d:o};case Ops.Mod:return s=>r[0](s)%r[1](s);case Ops.Pow:return s=>Math.pow(r[0](s),r[1](s));case Ops.Abs:return s=>Math.abs(r[0](s));case Ops.Floor:return s=>Math.floor(r[0](s));case Ops.Ceil:return s=>Math.ceil(r[0](s));case Ops.Round:return s=>Math.round(r[0](s));case Ops.Sin:return s=>Math.sin(r[0](s));case Ops.Cos:return s=>Math.cos(r[0](s));case Ops.Atan:return i===2?s=>Math.atan2(r[0](s),r[1](s)):s=>Math.atan(r[0](s));case Ops.Sqrt:return s=>Math.sqrt(r[0](s));default:throw new Error(`Unsupported numeric operator ${t}`)}}function compileMatchExpression(n,e){const t=n.args.length,i=new Array(t);for(let r=0;r{const s=i[0](r);for(let o=1;o{const s=i[0](r),o=i[1](r);let a,d;for(let y=2;y=o)return y===2?_:C?interpolateColor(s,o,a,d,v,_):interpolateNumber(s,o,a,d,v,_);a=v,d=_}return d}}function interpolateNumber(n,e,t,i,r,s){const o=r-t;if(o===0)return i;const a=e-t,d=n===1?a/o:(Math.pow(n,a)-1)/(Math.pow(n,o)-1);return i+d*(s-i)}function interpolateColor(n,e,t,i,r,s){if(r-t===0)return i;const a=rgbaToLcha(i),d=rgbaToLcha(s);let y=d[2]-a[2];y>180?y-=360:y<-180&&(y+=360);const v=[interpolateNumber(n,e,t,a[0],r,d[0]),interpolateNumber(n,e,t,a[1],r,d[1]),a[2]+interpolateNumber(n,e,t,0,r,y),interpolateNumber(n,e,t,i[3],r,s[3])];return normalize(lchaToRgba(v))}function always(n){return!0}function rulesToStyleFunction(n){const e=newParsingContext(),t=buildRuleSet(n,e),i=newEvaluationContext();return function(r,s){if(i.properties=r.getPropertiesInternal(),i.resolution=s,e.featureId){const o=r.getId();o!==void 0?i.featureId=o:i.featureId=null}return t(i)}}function flatStylesToStyleFunction(n){const e=newParsingContext(),t=n.length,i=new Array(t);for(let o=0;o4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return t}function requireSizeLike(n,e){if(typeof n=="number")return n;const t=requireNumberArray(n,e);if(t.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return t}const Property={RENDER_ORDER:"renderOrder"};class BaseVectorLayer extends Layer$1{constructor(e){e=e||{};const t=Object.assign({},e);delete t.style,delete t.renderBuffer,delete t.updateWhileAnimating,delete t.updateWhileInteracting,super(t),this.declutter_=e.declutter!==void 0?e.declutter:!1,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Property.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e){e.declutterTree||(e.declutterTree=new RBush$1(9)),this.getRenderer().renderDeclutter(e)}setRenderOrder(e){this.set(Property.RENDER_ORDER,e)}setStyle(e){this.style_=toStyleLike(e),this.styleFunction_=e===null?void 0:toFunction(this.style_),this.changed()}}function toStyleLike(n){if(n===void 0)return createDefaultStyle;if(!n)return null;if(typeof n=="function"||n instanceof Style$1)return n;if(!Array.isArray(n))return flatStylesToStyleFunction([n]);if(n.length===0)return[];const e=n.length,t=n[0];if(t instanceof Style$1){const r=new Array(e);for(let s=0;sa&&(this.instructions.push([Instruction.CUSTOM,a,y,e,i,inflateCoordinates]),this.hitDetectionInstructions.push([Instruction.CUSTOM,a,y,e,r||i,inflateCoordinates]));break;case"Point":d=e.getFlatCoordinates(),this.coordinates.push(d[0],d[1]),y=this.coordinates.length,this.instructions.push([Instruction.CUSTOM,a,y,e,i]),this.hitDetectionInstructions.push([Instruction.CUSTOM,a,y,e,r||i]);break}this.endGeometry(t)}beginGeometry(e,t){this.beginGeometryInstruction1_=[Instruction.BEGIN_GEOMETRY,t,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Instruction.BEGIN_GEOMETRY,t,0,e],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let t;const i=e.length;let r,s,o=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(e){const t=e.fillStyle,i=[Instruction.SET_FILL_STYLE,t];return typeof t!="string"&&i.push(!0),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[Instruction.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,t){const i=e.fillStyle;(typeof i!="string"||e.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(t.call(this,e)),e.currentFillStyle=i)}updateStrokeStyle(e,t){const i=e.strokeStyle,r=e.lineCap,s=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,d=e.lineWidth,y=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=r||s!=e.currentLineDash&&!equals$2(e.currentLineDash,s)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=d||e.currentMiterLimit!=y)&&(i!==void 0&&t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=r,e.currentLineDash=s,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=d,e.currentMiterLimit=y)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const t=[Instruction.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=clone$1(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;buffer(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class CanvasImageBuilder extends CanvasBuilder{constructor(e,t,i,r){super(e,t,i,r),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,t){if(!this.image_)return;this.beginGeometry(e,t);const i=e.getFlatCoordinates(),r=e.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([Instruction.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Instruction.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}drawMultiPoint(e,t){if(!this.image_)return;this.beginGeometry(e,t);const i=e.getFlatCoordinates(),r=e.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([Instruction.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Instruction.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(e,t){const i=e.getAnchor(),r=e.getSize(),s=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=e.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=r[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}class CanvasLineStringBuilder extends CanvasBuilder{constructor(e,t,i,r){super(e,t,i,r)}drawFlatCoordinates_(e,t,i,r){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(e,t,i,r,!1,!1),a=[Instruction.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i}drawLineString(e,t){const i=this.state,r=i.strokeStyle,s=i.lineWidth;if(r===void 0||s===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,defaultLineDash,defaultLineDashOffset],beginPathInstruction);const o=e.getFlatCoordinates(),a=e.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(strokeInstruction),this.endGeometry(t)}drawMultiLineString(e,t){const i=this.state,r=i.strokeStyle,s=i.lineWidth;if(r===void 0||s===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,defaultLineDash,defaultLineDashOffset],beginPathInstruction);const o=e.getEnds(),a=e.getFlatCoordinates(),d=e.getStride();let y=0;for(let v=0,_=o.length;v<_;++v)y=this.drawFlatCoordinates_(a,y,o[v],d);this.hitDetectionInstructions.push(strokeInstruction),this.endGeometry(t)}finish(){const e=this.state;return e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&this.instructions.push(strokeInstruction),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(strokeInstruction),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(beginPathInstruction)}}class CanvasPolygonBuilder extends CanvasBuilder{constructor(e,t,i,r){super(e,t,i,r)}drawFlatCoordinatess_(e,t,i,r){const s=this.state,o=s.fillStyle!==void 0,a=s.strokeStyle!==void 0,d=i.length;this.instructions.push(beginPathInstruction),this.hitDetectionInstructions.push(beginPathInstruction);for(let y=0;y=n){const S=(n-a+E)/E,b=lerp(y,_,S),P=lerp(v,C,S);d.push(b,P),s.push(d),d=[b,P],a==n&&(o+=r),a=0}else if(a0&&s.push(d),s}function matchingChunk(n,e,t,i,r){let s=t,o=t,a=0,d=0,y=t,v,_,C,E,S,b,P,R,x,T;for(_=t;_n&&(d>a&&(a=d,s=y,o=_),d=0,y=_-r)),C=E,P=x,R=T),S=L,b=k}return d+=E,d>a?[y,_]:[s,o]}const TEXT_ALIGN={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class CanvasTextBuilder extends CanvasBuilder{constructor(e,t,i,r){super(e,t,i,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[defaultFillStyle]={fillStyle:defaultFillStyle},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,t){const i=this.textFillState_,r=this.textStrokeState_,s=this.textState_;if(this.text_===""||!s||!i&&!r)return;const o=this.coordinates;let a=o.length;const d=e.getType();let y=null,v=e.getStride();if(s.placement==="line"&&(d=="LineString"||d=="MultiLineString"||d=="Polygon"||d=="MultiPolygon")){if(!intersects$1(this.getBufferedMaxExtent(),e.getExtent()))return;let _;if(y=e.getFlatCoordinates(),d=="LineString")_=[y.length];else if(d=="MultiLineString")_=e.getEnds();else if(d=="Polygon")_=e.getEnds().slice(0,1);else if(d=="MultiPolygon"){const b=e.getEndss();_=[];for(let P=0,R=b.length;P{const L=o[(R+T)*2]===y[T*v]&&o[(R+T)*2+1]===y[T*v+1];return L||--R,L})}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,t);let E=s.padding;if(E!=defaultPadding&&(s.scale[0]<0||s.scale[1]<0)){let R=s.padding[0],x=s.padding[1],T=s.padding[2],L=s.padding[3];s.scale[0]<0&&(x=-x,L=-L),s.scale[1]<0&&(R=-R,T=-T),E=[R,x,T,L]}const S=this.pixelRatio;this.instructions.push([Instruction.DRAW_IMAGE,a,C,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,E==defaultPadding?defaultPadding:E.map(function(R){return R*S}),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,_]);const b=1/S,P=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=defaultFillStyle,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Instruction.DRAW_IMAGE,a,C,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[b,b],NaN,void 0,this.declutterImageWithText_,E,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?defaultFillStyle:this.fillKey_,this.textOffsetX_,this.textOffsetY_,_]),s.backgroundFill&&(this.state.fillStyle=P,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(t)}}saveTextStates_(){const e=this.textStrokeState_,t=this.textState_,i=this.textFillState_,r=this.strokeKey_;e&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:t.font,textAlign:t.textAlign||defaultTextAlign,justify:t.justify,textBaseline:t.textBaseline||defaultTextBaseline,scale:t.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(e,t){const i=this.textStrokeState_,r=this.textState_,s=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const d=this.pixelRatio,y=TEXT_ALIGN[r.textBaseline],v=this.textOffsetY_*d,_=this.text_,C=i?i.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Instruction.DRAW_CHARS,e,t,y,r.overflow,a,r.maxAngle,d,v,s,C*d,_,o,1]),this.hitDetectionInstructions.push([Instruction.DRAW_CHARS,e,t,y,r.overflow,a&&defaultFillStyle,r.maxAngle,d,v,s,C*d,_,o,1/d])}setTextStyle(e,t){let i,r,s;if(!e)this.text_="";else{const o=e.getFill();o?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=asColorLike(o.getColor()||defaultFillStyle)):(r=null,this.textFillState_=r);const a=e.getStroke();if(!a)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const S=a.getLineDash(),b=a.getLineDashOffset(),P=a.getWidth(),R=a.getMiterLimit();s.lineCap=a.getLineCap()||defaultLineCap,s.lineDash=S?S.slice():defaultLineDash,s.lineDashOffset=b===void 0?defaultLineDashOffset:b,s.lineJoin=a.getLineJoin()||defaultLineJoin,s.lineWidth=P===void 0?defaultLineWidth:P,s.miterLimit=R===void 0?defaultMiterLimit:R,s.strokeStyle=asColorLike(a.getColor()||defaultStrokeStyle)}i=this.textState_;const d=e.getFont()||defaultFont;registerFont(d);const y=e.getScaleArray();i.overflow=e.getOverflow(),i.font=d,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.repeat=e.getRepeat(),i.justify=e.getJustify(),i.textBaseline=e.getTextBaseline()||defaultTextBaseline,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||defaultPadding,i.scale=y===void 0?[1,1]:y;const v=e.getOffsetX(),_=e.getOffsetY(),C=e.getRotateWithView(),E=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=v===void 0?0:v,this.textOffsetY_=_===void 0?0:_,this.textRotateWithView_=C===void 0?!1:C,this.textRotation_=E===void 0?0:E,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:getUid(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=r?typeof r.fillStyle=="string"?r.fillStyle:"|"+getUid(r.fillStyle):""}this.declutterImageWithText_=t}}const BATCH_CONSTRUCTORS={Circle:CanvasPolygonBuilder,Default:CanvasBuilder,Image:CanvasImageBuilder,LineString:CanvasLineStringBuilder,Polygon:CanvasPolygonBuilder,Text:CanvasTextBuilder};class BuilderGroup{constructor(e,t,i,r){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=r,this.resolution_=i,this.buildersByZIndex_={}}finish(){const e={};for(const t in this.buildersByZIndex_){e[t]=e[t]||{};const i=this.buildersByZIndex_[t];for(const r in i){const s=i[r].finish();e[t][r]=s}}return e}getBuilder(e,t){const i=e!==void 0?e.toString():"0";let r=this.buildersByZIndex_[i];r===void 0&&(r={},this.buildersByZIndex_[i]=r);let s=r[t];if(s===void 0){const o=BATCH_CONSTRUCTORS[t];s=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[t]=s}return s}}class LayerRenderer extends Observable{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.declutterExecutorGroup=null}getFeatures(e){return abstract()}getData(e){return null}prepareFrame(e){return abstract()}renderFrame(e,t){return abstract()}loadedTileCallback(e,t,i){e[t]||(e[t]={}),e[t][i.tileCoord.toString()]=i}createLoadedTileFinder(e,t,i){return(r,s)=>{const o=this.loadedTileCallback.bind(this,i,r);return e.forEachLoadedTile(t,r,s,o)}}forEachFeatureAtCoordinate(e,t,i,r,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const t=e.target;(t.getState()===ImageState.LOADED||t.getState()===ImageState.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let t=e.getState();return t!=ImageState.LOADED&&t!=ImageState.ERROR&&e.addEventListener(EventType$1.CHANGE,this.boundHandleImageChange_),t==ImageState.IDLE&&(e.load(),t=e.getState()),t==ImageState.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const canvasPool=[];let pixelContext=null;function createPixelContext(){pixelContext=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})}class CanvasLayerRenderer extends LayerRenderer{constructor(e){super(e),this.container=null,this.renderedResolution,this.tempTransform=create(),this.pixelTransform=create(),this.inversePixelTransform=create(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(e,t,i){pixelContext||createPixelContext(),pixelContext.clearRect(0,0,1,1);let r;try{pixelContext.drawImage(e,t,i,1,1,0,0,1,1),r=pixelContext.getImageData(0,0,1,1).data}catch{return pixelContext=null,null}return r}getBackground(e){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(e.viewState.resolution)),i||void 0}useContainer(e,t,i){const r=this.getLayer().getClassName();let s,o;if(e&&e.className===r&&(!i||e&&e.style.backgroundColor&&equals$2(asArray(e.style.backgroundColor),asArray(i)))){const a=e.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===t?(this.container=e,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=r;let a=s.style;a.position="absolute",a.width="100%",a.height="100%",o=createCanvasContext2D();const d=o.canvas;s.appendChild(d),a=d.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=s,this.context=o}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(e,t,i){const r=getTopLeft(i),s=getTopRight(i),o=getBottomRight(i),a=getBottomLeft(i);apply(t.coordinateToPixelTransform,r),apply(t.coordinateToPixelTransform,s),apply(t.coordinateToPixelTransform,o),apply(t.coordinateToPixelTransform,a);const d=this.inversePixelTransform;apply(d,r),apply(d,s),apply(d,o),apply(d,a),e.save(),e.beginPath(),e.moveTo(Math.round(r[0]),Math.round(r[1])),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.clip()}dispatchRenderEvent_(e,t,i){const r=this.getLayer();if(r.hasListener(e)){const s=new RenderEvent(e,this.inversePixelTransform,i,t);r.dispatchEvent(s)}}preRender(e,t){this.frameState=t,this.dispatchRenderEvent_(EventType.PRERENDER,e,t)}postRender(e,t){this.dispatchRenderEvent_(EventType.POSTRENDER,e,t)}getRenderTransform(e,t,i,r,s,o,a){const d=s/2,y=o/2,v=r/t,_=-v,C=-e[0]+a,E=-e[1];return compose(this.tempTransform,d,y,v,_,-i,C,E)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function drawTextOnPath(n,e,t,i,r,s,o,a,d,y,v,_){let C=n[e],E=n[e+1],S=0,b=0,P=0,R=0;function x(){S=C,b=E,e+=i,C=n[e],E=n[e+1],R+=P,P=Math.sqrt((C-S)*(C-S)+(E-b)*(E-b))}do x();while(eq[2]}else D=L>z;const U=Math.PI,Y=[],$=N+i===e;e=N,P=0,R=G,C=n[e],E=n[e+1];let K;if($){x(),K=Math.atan2(E-b,C-S),D&&(K+=K>0?-U:U);const q=(z+L)/2,te=(B+k)/2;return Y[0]=[q,te,(F-s)/2,K,r],Y}r=r.replace(/\n/g," ");for(let q=0,te=r.length;q0?-U:U),K!==void 0){let ct=Q-K;if(ct+=ct>U?-2*U:ct<-U?2*U:0,Math.abs(ct)>o)return null}K=Q;const je=q;let ie=0;for(;q0&&n.push(` +`,""),n.push(e,""),n}class Executor{constructor(e,t,i,r){this.overlaps=i,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=create(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}createLabel(e,t,i,r){const s=e+t+i+r;if(this.labels_[s])return this.labels_[s];const o=r?this.strokeStates[r]:null,a=i?this.fillStates[i]:null,d=this.textStates[t],y=this.pixelRatio,v=[d.scale[0]*y,d.scale[1]*y],_=Array.isArray(e),C=d.justify?TEXT_ALIGN[d.justify]:horizontalTextAlign(Array.isArray(e)?e[0]:e,d.textAlign||defaultTextAlign),E=r&&o.lineWidth?o.lineWidth:0,S=_?e:e.split(` +`).reduce(createTextChunks,[]),{width:b,height:P,widths:R,heights:x,lineWidths:T}=getTextDimensions(d,S),L=b+E,k=[],N=(L+2)*v[0],G=(P+E)*v[1],F={width:N<0?Math.floor(N):Math.ceil(N),height:G<0?Math.floor(G):Math.ceil(G),contextInstructions:k};(v[0]!=1||v[1]!=1)&&k.push("scale",v),r&&(k.push("strokeStyle",o.strokeStyle),k.push("lineWidth",E),k.push("lineCap",o.lineCap),k.push("lineJoin",o.lineJoin),k.push("miterLimit",o.miterLimit),k.push("setLineDash",[o.lineDash]),k.push("lineDashOffset",o.lineDashOffset)),i&&k.push("fillStyle",a.fillStyle),k.push("textBaseline","middle"),k.push("textAlign","center");const z=.5-C;let B=C*L+z*E;const D=[],U=[];let Y=0,$=0,K=0,q=0,te;for(let Q=0,je=S.length;Qe?e-y:s,L=o+v>t?t-v:o,k=S[3]+T*C[0]+S[1],N=S[0]+L*C[1]+S[2],G=R-S[3],F=x-S[0];(b||_!==0)&&(p1[0]=G,p4[0]=G,p1[1]=F,p2[1]=F,p2[0]=G+k,p3[0]=p2[0],p3[1]=F+N,p4[1]=p3[1]);let z;return _!==0?(z=compose(create(),i,r,1,1,_,-i,-r),apply(z,p1),apply(z,p2),apply(z,p3),apply(z,p4),createOrUpdate$2(Math.min(p1[0],p2[0],p3[0],p4[0]),Math.min(p1[1],p2[1],p3[1],p4[1]),Math.max(p1[0],p2[0],p3[0],p4[0]),Math.max(p1[1],p2[1],p3[1],p4[1]),tmpExtent)):createOrUpdate$2(Math.min(G,G+k),Math.min(F,F+N),Math.max(G,G+k),Math.max(F,F+N),tmpExtent),E&&(R=Math.round(R),x=Math.round(x)),{drawImageX:R,drawImageY:x,drawImageW:T,drawImageH:L,originX:y,originY:v,declutterBox:{minX:tmpExtent[0],minY:tmpExtent[1],maxX:tmpExtent[2],maxY:tmpExtent[3],value:P},canvasTransform:z,scale:C}}replayImageOrLabel_(e,t,i,r,s,o,a){const d=!!(o||a),y=r.declutterBox,v=e.canvas,_=a?a[2]*r.scale[0]/2:0;return y.minX-_<=v.width/t&&y.maxX+_>=0&&y.minY-_<=v.height/t&&y.maxY+_>=0&&(d&&this.replayTextBackground_(e,p1,p2,p3,p4,o,a),drawImageOrLabel(e,r.canvasTransform,s,i,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(e){if(this.alignFill_){const t=apply(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;e.save(),e.translate(t[0]%i,t[1]%i),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6])}drawLabelWithPointPlacement_(e,t,i,r){const s=this.textStates[t],o=this.createLabel(e,t,r,i),a=this.strokeStates[i],d=this.pixelRatio,y=horizontalTextAlign(Array.isArray(e)?e[0]:e,s.textAlign||defaultTextAlign),v=TEXT_ALIGN[s.textBaseline||defaultTextBaseline],_=a&&a.lineWidth?a.lineWidth:0,C=o.width/d-2*s.scale[0],E=y*C+2*(.5-y)*_,S=v*o.height/d+2*(.5-v)*_;return{label:o,anchorX:E,anchorY:S}}execute_(e,t,i,r,s,o,a,d){let y;this.pixelCoordinates_&&equals$2(i,this.renderedTransform_)?y=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),y=transform2D(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),setFromArray(this.renderedTransform_,i));let v=0;const _=r.length;let C=0,E,S,b,P,R,x,T,L,k,N,G,F,z=0,B=0,D=null,U=null;const Y=this.coordinateCache_,$=this.viewRotation_,K=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,q={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:$},te=this.instructions!=r||this.overlaps?0:200;let Q,je,ie,it;for(;v<_;){const le=r[v];switch(le[0]){case Instruction.BEGIN_GEOMETRY:Q=le[1],it=le[3],Q.getGeometry()?a!==void 0&&!intersects$1(a,it.getExtent())?v=le[2]+1:++v:v=le[2];break;case Instruction.BEGIN_PATH:z>te&&(this.fill_(e),z=0),B>te&&(e.stroke(),B=0),!z&&!B&&(e.beginPath(),P=NaN,R=NaN),++v;break;case Instruction.CIRCLE:C=le[1];const ct=y[C],Qe=y[C+1],ut=y[C+2],re=y[C+3],Ve=ut-ct,Be=re-Qe,oe=Math.sqrt(Ve*Ve+Be*Be);e.moveTo(ct+oe,Qe),e.arc(ct,Qe,oe,0,2*Math.PI,!0),++v;break;case Instruction.CLOSE_PATH:e.closePath(),++v;break;case Instruction.CUSTOM:C=le[1],E=le[2];const pt=le[3],Et=le[4],H=le.length==6?le[5]:void 0;q.geometry=pt,q.feature=Q,v in Y||(Y[v]=[]);const W=Y[v];H?H(y,C,E,2,W):(W[0]=y[C],W[1]=y[C+1],W.length=2),Et(W,q),++v;break;case Instruction.DRAW_IMAGE:C=le[1],E=le[2],L=le[3],S=le[4],b=le[5];let J=le[6];const se=le[7],de=le[8],pe=le[9],Ge=le[10];let be=le[11];const ye=le[12];let fe=le[13];const X=le[14],ee=le[15];if(!L&&le.length>=20){k=le[19],N=le[20],G=le[21],F=le[22];const Jt=this.drawLabelWithPointPlacement_(k,N,G,F);L=Jt.label,le[3]=L;const un=le[23];S=(Jt.anchorX-un)*this.pixelRatio,le[4]=S;const rn=le[24];b=(Jt.anchorY-rn)*this.pixelRatio,le[5]=b,J=L.height,le[6]=J,fe=L.width,le[13]=fe}let ne;le.length>25&&(ne=le[25]);let ue,Oe,ke;le.length>17?(ue=le[16],Oe=le[17],ke=le[18]):(ue=defaultPadding,Oe=!1,ke=!1),Ge&&K?be+=$:!Ge&&!K&&(be-=$);let Ze=0;for(;C0){if(!o||E!=="Image"&&E!=="Text"||o.includes(k)){const B=(C[F]-3)/4,D=r-B%a,U=r-(B/a|0),Y=s(k,N,D*D+U*U);if(Y)return Y}v.clearRect(0,0,a,a);break}}const b=Object.keys(this.executorsByZIndex_).map(Number);b.sort(ascending);let P,R,x,T,L;for(P=b.length-1;P>=0;--P){const k=b[P].toString();for(x=this.executorsByZIndex_[k],R=ORDER.length-1;R>=0;--R)if(E=ORDER[R],T=x[E],T!==void 0&&(L=T.executeHitDetection(v,d,i,S,_),L))return L}}getClipCoords(e){const t=this.maxExtent_;if(!t)return null;const i=t[0],r=t[1],s=t[2],o=t[3],a=[i,r,i,o,s,o,s,r];return transform2D(a,0,8,2,e,a),a}isEmpty(){return isEmpty$1(this.executorsByZIndex_)}execute(e,t,i,r,s,o,a){const d=Object.keys(this.executorsByZIndex_).map(Number);d.sort(ascending),this.maxExtent_&&(e.save(),this.clip(e,i)),o=o||ORDER;let y,v,_,C,E,S;for(a&&d.reverse(),y=0,v=d.length;yt)break;let d=i[a];d||(d=[],i[a]=d),d.push(((n+s)*e+(n+o))*4+3),s>0&&d.push(((n-s)*e+(n+o))*4+3),o>0&&(d.push(((n+s)*e+(n-o))*4+3),s>0&&d.push(((n-s)*e+(n-o))*4+3))}const r=[];for(let s=0,o=i.length;s_*this.pixelRatio_),lineDashOffset:(o||defaultLineDashOffset)*this.pixelRatio_,lineJoin:a!==void 0?a:defaultLineJoin,lineWidth:(d!==void 0?d:defaultLineWidth)*this.pixelRatio_,miterLimit:y!==void 0?y:defaultMiterLimit,strokeStyle:asColorLike(i||defaultStrokeStyle)}}}setImageStyle(e){let t;if(!e||!(t=e.getSize())){this.image_=null;return}const i=e.getPixelRatio(this.pixelRatio_),r=e.getAnchor(),s=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*i,this.imageAnchorY_=r[1]*i,this.imageHeight_=t[1]*i,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=t[0]*i}setTextStyle(e){if(!e)this.text_="";else{const t=e.getFill();if(!t)this.textFillState_=null;else{const E=t.getColor();this.textFillState_={fillStyle:asColorLike(E||defaultFillStyle)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const E=i.getColor(),S=i.getLineCap(),b=i.getLineDash(),P=i.getLineDashOffset(),R=i.getLineJoin(),x=i.getWidth(),T=i.getMiterLimit();this.textStrokeState_={lineCap:S!==void 0?S:defaultLineCap,lineDash:b||defaultLineDash,lineDashOffset:P||defaultLineDashOffset,lineJoin:R!==void 0?R:defaultLineJoin,lineWidth:x!==void 0?x:defaultLineWidth,miterLimit:T!==void 0?T:defaultMiterLimit,strokeStyle:asColorLike(E||defaultStrokeStyle)}}const r=e.getFont(),s=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),d=e.getRotation(),y=e.getScaleArray(),v=e.getText(),_=e.getTextAlign(),C=e.getTextBaseline();this.textState_={font:r!==void 0?r:defaultFont,textAlign:_!==void 0?_:defaultTextAlign,textBaseline:C!==void 0?C:defaultTextBaseline},this.text_=v!==void 0?Array.isArray(v)?v.reduce((E,S,b)=>E+=b%2?" ":S,""):v:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=d!==void 0?d:0,this.textScale_=[this.pixelRatio_*y[0],this.pixelRatio_*y[1]]}}}const HIT_DETECT_RESOLUTION=.5;function createHitDetectionImageData(n,e,t,i,r,s,o){const a=n[0]*HIT_DETECT_RESOLUTION,d=n[1]*HIT_DETECT_RESOLUTION,y=createCanvasContext2D(a,d);y.imageSmoothingEnabled=!1;const v=y.canvas,_=new CanvasImmediateRenderer(y,HIT_DETECT_RESOLUTION,r,null,o),C=t.length,E=Math.floor((256*256*256-1)/C),S={};for(let P=1;P<=C;++P){const R=t[P-1],x=R.getStyleFunction()||i;if(!x)continue;let T=x(R,s);if(!T)continue;Array.isArray(T)||(T=[T]);const k=(P*E).toString(16).padStart(7,"#00000");for(let N=0,G=T.length;N{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=[this.context.canvas.width,this.context.canvas.height];apply(this.pixelTransform,i);const r=this.renderedCenter_,s=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,d=this.wrappedRenderedExtent_,y=this.getLayer(),v=[],_=i[0]*HIT_DETECT_RESOLUTION,C=i[1]*HIT_DETECT_RESOLUTION;v.push(this.getRenderTransform(r,s,o,HIT_DETECT_RESOLUTION,_,C,0).slice());const E=y.getSource(),S=a.getExtent();if(E.getWrapX()&&a.canWrapX()&&!containsExtent(S,d)){let b=d[0];const P=getWidth(S);let R=0,x;for(;bS[2];)++R,x=P*R,v.push(this.getRenderTransform(r,s,o,HIT_DETECT_RESOLUTION,_,C,x).slice()),b-=P}this.hitDetectionImageData_=createHitDetectionImageData(i,v,this.renderedFeatures_,y.getStyleFunction(),d,s,o)}t(hitDetect(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,t,i,r,s){if(!this.replayGroup_)return;const o=t.viewState.resolution,a=t.viewState.rotation,d=this.getLayer(),y={},v=function(E,S,b){const P=getUid(E),R=y[P];if(R){if(R!==!0&&b_=E.forEachFeatureAtCoordinate(e,o,a,i,v,E===this.declutterExecutorGroup&&t.declutterTree?t.declutterTree.all().map(S=>S.value):null)),_}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const t=this.getLayer(),i=t.getSource();if(!i)return!1;const r=e.viewHints[ViewHint.ANIMATING],s=e.viewHints[ViewHint.INTERACTING],o=t.getUpdateWhileAnimating(),a=t.getUpdateWhileInteracting();if(this.ready&&!o&&r||!a&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const d=e.extent,y=e.viewState,v=y.projection,_=y.resolution,C=e.pixelRatio,E=t.getRevision(),S=t.getRenderBuffer();let b=t.getRenderOrder();b===void 0&&(b=defaultOrder);const P=y.center.slice(),R=buffer(d,S*_),x=R.slice(),T=[R.slice()],L=v.getExtent();if(i.getWrapX()&&v.canWrapX()&&!containsExtent(L,e.extent)){const K=getWidth(L),q=Math.max(getWidth(R)/2,K);R[0]=L[0]-q,R[2]=L[2]+q,wrapX$1(P,v);const te=wrapX$2(T[0],v);te[0]L[0]&&te[2]>L[2]&&T.push([te[0]-K,te[1],te[2]-K,te[3]])}if(this.ready&&this.renderedResolution_==_&&this.renderedRevision_==E&&this.renderedRenderOrder_==b&&containsExtent(this.wrappedRenderedExtent_,R))return equals$2(this.renderedExtent_,x)||(this.hitDetectionImageData_=null,this.renderedExtent_=x),this.renderedCenter_=P,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new BuilderGroup(getTolerance(_,C),R,_,C);let N;this.getLayer().getDeclutter()&&(N=new BuilderGroup(getTolerance(_,C),R,_,C));let G;for(let K=0,q=T.length;K{let q;const te=K.getStyleFunction()||t.getStyleFunction();if(te&&(q=te(K,_)),q){const Q=this.renderFeature(K,F,q,k,G,N);z=z&&!Q}},D=toUserExtent(R),U=i.getFeaturesInExtent(D);b&&U.sort(b);for(let K=0,q=U.length;K=t?n[e-t]:n[e]}function getCumulativeSquaredDistance(n,e,t){let i,r;eo){const d=interpolateCoordinate(n,i),y=interpolateCoordinate(n,r);return getSquaredDistance(d,y)}let a=0;if(iC.startIndex?bC.startIndex&&(b-=E.length)),d=b,a=_)}const y=e.targets[a];let v=y.ring;if(e.targetIndex===a&&v){const _=interpolateCoordinate(y.coordinates,d),C=t.getPixelFromCoordinate(_);distance(C,e.startPx)>i&&(v=!1)}if(v){const _=y.coordinates,C=_.length,E=y.startIndex,S=d;if(E=t?i-=t:i<0&&(i+=t);let s=i+1;s>=t&&(s-=t);const o=n[i],a=o[0],d=o[1],y=n[s],v=y[0]-a,_=y[1]-d;return[a+v*r,d+_*r]}class Draw extends PointerInteraction{constructor(e){const t=e;t.stopDown||(t.stopDown=FALSE),super(t),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=getMode(this.type_),this.stopClick_=!!e.stopClick,this.minPoints_=e.minPoints?e.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:TRUE,this.geometryLayout_=e.geometryLayout?e.geometryLayout:"XY";let i=e.geometryFunction;if(!i){const r=this.mode_;if(r==="Circle")i=function(s,o,a){const d=o||new Circle([NaN,NaN]),y=fromUserCoordinate(s[0]),v=squaredDistance(y,fromUserCoordinate(s[s.length-1]));return d.setCenterAndRadius(y,Math.sqrt(v),this.geometryLayout_),d};else{let s;r==="Point"?s=Point$1:r==="LineString"?s=LineString:r==="Polygon"&&(s=Polygon),i=function(o,a,d){return a?r==="Polygon"?o[0].length?a.setCoordinates([o[0].concat([o[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(o,this.geometryLayout_):a=new s(o,this.geometryLayout_),a}}}this.geometryFunction_=i,this.dragVertexDelay_=e.dragVertexDelay!==void 0?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new VectorLayer({source:new VectorSource({useSpatialIndex:!1,wrapX:e.wrapX?e.wrapX:!1}),style:e.style?e.style:getDefaultStyleFunction$2(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:noModifierKeys,this.freehandCondition_,e.freehand?this.freehandCondition_=always$1:this.freehandCondition_=e.freehandCondition?e.freehandCondition:shiftKeyOnly,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1},this.traceSource_=e.traceSource||e.source||null,this.addChangeListener(InteractionProperty.ACTIVE,this.updateState_)}setTrace(e){let t;e?e===!0?t=always$1:t=e:t=never,this.traceCondition_=t}setMap(e){super.setMap(e),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(e){e.originalEvent.type===EventType$1.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(e);let t=e.type===MapBrowserEventType.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&e.type===MapBrowserEventType.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,t=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===MapBrowserEventType.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===MapBrowserEventType.POINTERDOWN?i=!1:t&&this.getPointerCount()<2?(i=e.type===MapBrowserEventType.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):(e.originalEvent.pointerType==="mouse"||e.type===MapBrowserEventType.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(e)):e.type===MapBrowserEventType.DBLCLICK&&(i=!1),super.handleEvent(e)&&i}handleDownEvent(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))},this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active){this.deactivateTrace_();return}const t=this.getMap(),i=t.getCoordinateFromPixel([e.pixel[0]-this.snapTolerance_,e.pixel[1]+this.snapTolerance_]),r=t.getCoordinateFromPixel([e.pixel[0]+this.snapTolerance_,e.pixel[1]-this.snapTolerance_]),s=boundingExtent([i,r]),o=this.traceSource_.getFeaturesInExtent(s);if(o.length===0)return;const a=getTraceTargets(e.coordinate,o);a.length&&(this.traceState_={active:!0,startPx:e.pixel.slice(),targets:a,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,t){const i=e.startIndex<=e.endIndex,r=e.startIndex<=t;i===r?i&&t>e.endIndex||!i&&te.endIndex)&&this.removeTracedCoordinates_(t,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,t))}removeTracedCoordinates_(e,t){if(e===t)return;let i=0;if(e0&&this.removeLastPoints_(i)}addTracedCoordinates_(e,t,i){if(t===i)return;const r=[];if(t=o;--a)r.push(getCoordinate(e.coordinates,a))}r.length&&this.appendCoordinates(r)}updateTrace_(e){const t=this.traceState_;if(!t.active||t.targetIndex===-1&&distance(t.startPx,e.pixel)this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(e.coordinate.slice());return}this.updateTrace_(e),this.modifyDrawing_(e.coordinate)}atFinish_(e,t){let i=!1;if(this.sketchFeature_){let r=!1,s=[this.finishCoordinate_];const o=this.mode_;if(o==="Point")i=!0;else if(o==="Circle")i=this.sketchCoords_.length===2;else if(o==="LineString")r=!t&&this.sketchCoords_.length>this.minPoints_;else if(o==="Polygon"){const a=this.sketchCoords_;r=a[0].length>this.minPoints_,s=[a[0][0],a[0][a[0].length-2]],t?s=[a[0][0]]:s=[a[0][0],a[0][a[0].length-2]]}if(r){const a=this.getMap();for(let d=0,y=s.length;d=this.maxPoints_&&(this.freehand_?s.pop():r=!0),s.push(e.slice()),this.geometryFunction_(s,t,i)):o==="Polygon"&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():r=!0),s.push(e.slice()),r&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,t,i)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),r&&this.finishDrawing()}removeLastPoints_(e){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),r=this.mode_;for(let s=0;s=2){this.finishCoordinate_=o[o.length-2].slice();const a=this.finishCoordinate_.slice();o[o.length-1]=a,this.createOrUpdateSketchPoint_(a)}this.geometryFunction_(o,t,i),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(r==="Polygon"){o=this.sketchCoords_[0],o.splice(-2,1);const a=this.sketchLine_.getGeometry();if(o.length>=2){const d=o[o.length-2].slice();o[o.length-1]=d,this.createOrUpdateSketchPoint_(d)}a.setCoordinates(o),this.geometryFunction_(this.sketchCoords_,t,i)}if(o.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const e=this.abortDrawing_();if(!e)return;let t=this.sketchCoords_;const i=e.getGeometry(),r=this.getMap().getView().getProjection();this.mode_==="LineString"?(t.pop(),this.geometryFunction_(t,i,r)):this.mode_==="Polygon"&&(t[0].pop(),this.geometryFunction_(t,i,r),t=i.getCoordinates()),this.type_==="MultiPoint"?e.setGeometry(new MultiPoint([t])):this.type_==="MultiLineString"?e.setGeometry(new MultiLineString([t])):this.type_==="MultiPolygon"&&e.setGeometry(new MultiPolygon([t])),this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e)}abortDrawing_(){this.finishCoordinate_=null;const e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),e}abortDrawing(){const e=this.abortDrawing_();e&&this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT,e))}appendCoordinates(e){const t=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(e[0]);let r;if(t==="LineString"||t==="Circle")r=this.sketchCoords_;else if(t==="Polygon")r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&r.shift(),r.pop();for(let o=0;o=0;--r){const s=i[r];for(let o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===s&&this.dragSegments_.splice(o,1);t.remove(s)}}setActive(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(e)}setMap(e){this.overlay_.setMap(e),super.setMap(e)}getOverlay(){return this.overlay_}handleSourceAdd_(e){e.feature&&this.features_.push(e.feature)}handleSourceRemove_(e){e.feature&&this.features_.remove(e.feature)}handleFeatureAdd_(e){this.addFeature_(e.element)}handleFeatureChange_(e){if(!this.changingFeature_){const t=e.target;this.removeFeature_(t),this.addFeature_(t)}}handleFeatureRemove_(e){this.removeFeature_(e.element)}writePointGeometry_(e,t){const i=t.getCoordinates(),r={feature:e,geometry:t,segment:[i,i]};this.rBush_.insert(t.getExtent(),r)}writeMultiPointGeometry_(e,t){const i=t.getCoordinates();for(let r=0,s=i.length;r=0;--y)this.insertVertex_(r[y],s)}return!!this.vertexFeature_}handleUpEvent(e){for(let t=this.dragSegments_.length-1;t>=0;--t){const i=this.dragSegments_[t][0],r=i.geometry;if(r.getType()==="Circle"){const s=r.getCenter(),o=i.featureSegments[0],a=i.featureSegments[1];o.segment[0]=s,o.segment[1]=s,a.segment[0]=s,a.segment[1]=s,this.rBush_.update(createOrUpdateFromCoordinate(s),o);let d=r;this.rBush_.update(d.getExtent(),a)}else this.rBush_.update(boundingExtent(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1}handlePointerMove_(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)}handlePointerAtPixel_(e,t,i){const r=i||t.getCoordinateFromPixel(e);t.getView().getProjection();const s=function(d,y){return projectedDistanceToSegmentDataSquared(r,d)-projectedDistanceToSegmentDataSquared(r,y)};let o,a;if(this.hitDetection_){const d=typeof this.hitDetection_=="object"?y=>y===this.hitDetection_:void 0;t.forEachFeatureAtPixel(e,(y,v,_)=>{_&&_.getType()==="Point"&&(_=new Point$1(toUserCoordinate(_.getCoordinates())));const C=_||y.getGeometry();if(y instanceof Feature&&this.features_.getArray().includes(y)){a=C;const E=y.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:y,geometry:a,segment:[E,E]}]}return!0},{layerFilter:d})}if(!o){const d=fromUserExtent(createOrUpdateFromCoordinate(r,tempExtent)),y=t.getView().getResolution()*this.pixelTolerance_,v=toUserExtent(buffer(d,y,tempExtent));o=this.rBush_.getInExtent(v)}if(o&&o.length>0){const d=o.sort(s)[0],y=d.segment;let v=closestOnSegmentData(r,d);const _=t.getPixelFromCoordinate(v);let C=distance(e,_);if(a||C<=this.pixelTolerance_){const E={};if(E[getUid(y)]=!0,this.snapToPointer_||(this.delta_[0]=v[0]-r[0],this.delta_[1]=v[1]-r[1]),d.geometry.getType()==="Circle"&&d.index===CIRCLE_CIRCUMFERENCE_INDEX)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(v,[d.feature],[d.geometry]);else{const S=t.getPixelFromCoordinate(y[0]),b=t.getPixelFromCoordinate(y[1]),P=squaredDistance(_,S),R=squaredDistance(_,b);C=Math.sqrt(Math.min(P,R)),this.snappedToVertex_=C<=this.pixelTolerance_,this.snappedToVertex_&&(v=P>R?y[1]:y[0]),this.createOrUpdateVertexFeature_(v,[d.feature],[d.geometry]);const x={};x[getUid(d.geometry)]=!0;for(let T=1,L=o.length;T=0;--d)o=e[d],E=o[0],S=getUid(E.feature),E.depth&&(S+="-"+E.depth.join("-")),S in t||(t[S]={}),o[1]===0?(t[S].right=E,t[S].index=E.index):o[1]==1&&(t[S].left=E,t[S].index=E.index+1);for(S in t){switch(C=t[S].right,v=t[S].left,y=t[S].index,_=y-1,v!==void 0?E=v:E=C,_<0&&(_=0),a=E.geometry,s=a.getCoordinates(),r=s,i=!1,a.getType()){case"MultiLineString":s[E.depth[0]].length>2&&(s[E.depth[0]].splice(y,1),i=!0);break;case"LineString":s.length>2&&(s.splice(y,1),i=!0);break;case"MultiPolygon":r=r[E.depth[1]];case"Polygon":r=r[E.depth[0]],r.length>4&&(y==r.length-1&&(y=0),r.splice(y,1),i=!0,y===0&&(r.pop(),r.push(r[0]),_=r.length-1));break}if(i){this.setGeometryCoordinates_(a,s);const b=[];if(v!==void 0&&(this.rBush_.remove(v),b.push(v.segment[0])),C!==void 0&&(this.rBush_.remove(C),b.push(C.segment[1])),v!==void 0&&C!==void 0){const P={depth:E.depth,feature:E.feature,geometry:E.geometry,index:_,segment:b};this.rBush_.insert(boundingExtent(P.segment),P)}this.updateSegmentIndices_(a,y,E.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.length=0}}return i}setGeometryCoordinates_(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1}updateSegmentIndices_(e,t,i,r){this.rBush_.forEachInExtent(e.getExtent(),function(s){s.geometry===e&&(i===void 0||s.depth===void 0||equals$2(s.depth,i))&&s.index>t&&(s.index+=r)})}}function compareIndexes(n,e){return n.index-e.index}function projectedDistanceToSegmentDataSquared(n,e,t){const i=e.geometry;if(i.getType()==="Circle"){let s=i;if(e.index===CIRCLE_CIRCUMFERENCE_INDEX){const o=squaredDistance(s.getCenter(),fromUserCoordinate(n)),a=Math.sqrt(o)-s.getRadius();return a*a}}const r=fromUserCoordinate(n);return tempSegment[0]=fromUserCoordinate(e.segment[0]),tempSegment[1]=fromUserCoordinate(e.segment[1]),squaredDistanceToSegment(r,tempSegment)}function closestOnSegmentData(n,e,t){const i=e.geometry;if(i.getType()==="Circle"&&e.index===CIRCLE_CIRCUMFERENCE_INDEX)return toUserCoordinate(i.getClosestPoint(fromUserCoordinate(n)));const r=fromUserCoordinate(n);return tempSegment[0]=fromUserCoordinate(e.segment[0]),tempSegment[1]=fromUserCoordinate(e.segment[1]),toUserCoordinate(closestOnSegment(r,tempSegment))}function getDefaultStyleFunction$1(){const n=createEditingStyle();return function(e,t){return n.Point}}const SelectEventType={SELECT:"select"};class SelectEvent extends BaseEvent{constructor(e,t,i,r){super(e),this.selected=t,this.deselected=i,this.mapBrowserEvent=r}}const originalFeatureStyles={};class Select extends Interaction{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=e.condition?e.condition:singleClick,this.addCondition_=e.addCondition?e.addCondition:never,this.removeCondition_=e.removeCondition?e.removeCondition:never,this.toggleCondition_=e.toggleCondition?e.toggleCondition:shiftKeyOnly,this.multi_=e.multi?e.multi:!1,this.filter_=e.filter?e.filter:TRUE,this.hitTolerance_=e.hitTolerance?e.hitTolerance:0,this.style_=e.style!==void 0?e.style:getDefaultStyleFunction(),this.features_=e.features||new Collection;let t;if(e.layers)if(typeof e.layers=="function")t=e.layers;else{const i=e.layers;t=function(r){return i.includes(r)}}else t=TRUE;this.layerFilter_=t,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(e,t){this.featureLayerAssociation_[getUid(e)]=t}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(e){return this.featureLayerAssociation_[getUid(e)]}setHitTolerance(e){this.hitTolerance_=e}setMap(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(e),e?(this.features_.addEventListener(CollectionEventType.ADD,this.boundAddFeature_),this.features_.addEventListener(CollectionEventType.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(CollectionEventType.ADD,this.boundAddFeature_),this.features_.removeEventListener(CollectionEventType.REMOVE,this.boundRemoveFeature_))}addFeature_(e){const t=e.element;if(this.style_&&this.applySelectedStyle_(t),!this.getLayer(t)){const i=this.getMap().getAllLayers().find(function(r){if(r instanceof VectorLayer&&r.getSource()&&r.getSource().hasFeature(t))return r});i&&this.addFeatureLayerAssociation_(t,i)}}removeFeature_(e){this.style_&&this.restorePreviousStyle_(e.element)}getStyle(){return this.style_}applySelectedStyle_(e){const t=getUid(e);t in originalFeatureStyles||(originalFeatureStyles[t]=e.getStyle()),e.setStyle(this.style_)}restorePreviousStyle_(e){const t=this.getMap().getInteractions().getArray();for(let r=t.length-1;r>=0;--r){const s=t[r];if(s!==this&&s instanceof Select&&s.getStyle()&&s.getFeatures().getArray().lastIndexOf(e)!==-1){e.setStyle(s.getStyle());return}}const i=getUid(e);e.setStyle(originalFeatureStyles[i]),delete originalFeatureStyles[i]}removeFeatureLayerAssociation_(e){delete this.featureLayerAssociation_[getUid(e)]}handleEvent(e){if(!this.condition_(e))return!0;const t=this.addCondition_(e),i=this.removeCondition_(e),r=this.toggleCondition_(e),s=!t&&!i&&!r,o=e.map,a=this.getFeatures(),d=[],y=[];if(s){clear$1(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,(v,_)=>{if(!(!(v instanceof Feature)||!this.filter_(v,_)))return this.addFeatureLayerAssociation_(v,_),y.push(v),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let v=a.getLength()-1;v>=0;--v){const _=a.item(v),C=y.indexOf(_);C>-1?y.splice(C,1):(a.remove(_),d.push(_))}y.length!==0&&a.extend(y)}else{o.forEachFeatureAtPixel(e.pixel,(v,_)=>{if(!(!(v instanceof Feature)||!this.filter_(v,_)))return(t||r)&&!a.getArray().includes(v)?(this.addFeatureLayerAssociation_(v,_),y.push(v)):(i||r)&&a.getArray().includes(v)&&(d.push(v),this.removeFeatureLayerAssociation_(v)),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let v=d.length-1;v>=0;--v)a.remove(d[v]);a.extend(y)}return(y.length>0||d.length>0)&&this.dispatchEvent(new SelectEvent(SelectEventType.SELECT,y,d,e)),!0}}function getDefaultStyleFunction(){const n=createEditingStyle();return extend$4(n.Polygon,n.LineString),extend$4(n.GeometryCollection,n.LineString),function(e){return e.getGeometry()?n[e.getGeometry().getType()]:null}}var loglevel={exports:{}};(function(n){(function(e,t){n.exports?n.exports=t():e.log=t()})(commonjsGlobal,function(){var e=function(){},t="undefined",i=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],s={},o=null;function a(b,P){var R=b[P];if(typeof R.bind=="function")return R.bind(b);try{return Function.prototype.bind.call(R,b)}catch{return function(){return Function.prototype.apply.apply(R,[b,arguments])}}}function d(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function y(b){return b==="debug"&&(b="log"),typeof console===t?!1:b==="trace"&&i?d:console[b]!==void 0?a(console,b):console.log!==void 0?a(console,"log"):e}function v(){for(var b=this.getLevel(),P=0;P=0&&U<=R.levels.SILENT)return U;throw new TypeError("log.setLevel() called with invalid level: "+D)}R.name=b,R.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},R.methodFactory=P||C,R.getLevel=function(){return L??T??x},R.setLevel=function(D,U){return L=z(D),U!==!1&&N(L),v.call(R)},R.setDefaultLevel=function(D){T=z(D),G()||R.setLevel(D,!1)},R.resetLevel=function(){L=null,F(),v.call(R)},R.enableAll=function(D){R.setLevel(R.levels.TRACE,D)},R.disableAll=function(D){R.setLevel(R.levels.SILENT,D)},R.rebuild=function(){if(o!==R&&(x=z(o.getLevel())),v.call(R),o===R)for(var D in s)s[D].rebuild()},x=z(o?o.getLevel():"WARN");var B=G();B!=null&&(L=z(B)),v.call(R)}o=new E,o.getLogger=function(P){if(typeof P!="symbol"&&typeof P!="string"||P==="")throw new TypeError("You must supply a name when creating a logger.");var R=s[P];return R||(R=s[P]=new E(P,o.methodFactory)),R};var S=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=S),o},o.getLoggers=function(){return s},o.default=o,o})})(loglevel);var loglevelExports=loglevel.exports,LoggerByDefault$1={getLogger:function(n){if(typeof e>"u"){var e={};e.env={VERBOSE:!1}}e.env.VERBOSE?loglevelExports.enableAll():loglevelExports.disableAll();var t=n||"default";return loglevelExports.getLogger(t)}},MessagesResources={PARAM_MISSING:"Parameter(s) '%var%' missing",PARAM_EMPTY:"Parameter(s) '%var%' empty",PARAM_TYPE:"Wrong type(s) for parameter(s) '%var%'",PARAM_FORMAT:"Parameter(s) '%var%' not correctly formatted",PARAM_NOT_SUPPORT:"Value(s) for parameter(s) '%var%' not supported",PARAM_NOT_SUPPORT_NODEJS:"Value(s) for parameter(s) '%var%' not supported to NodeJS",PARAM_UNKNOWN:"Value(s) for parameter(s) '%var%' unknown",SERVICE_REQUEST_BUILD:"An error occurred during the request building of the service",SERVICE_REQUEST_EMPTY:"The request sent to the service is empty",SERVICE_RESPONSE_EXCEPTION:"The service returned an exception : '%var%'",SERVICE_RESPONSE_EXCEPTION_2:"The service returned an exception",SERVICE_RESPONSE_ANALYSE:"An error occurred while parsing the response '%var%' of the service",SERVICE_RESPONSE_ANALYSE_2:"An unknown error occurred while parsing the response",SERVICE_RESPONSE_EMPTY:"The response of the service is empty",SERVICE_RESPONSE_EMPTY_2:"The response from the service could not be analyzed or is empty",SERVICE_RESPONSE_FORMAT:"The format of the service response is not supported (handled format(s) : '%var%')",SERVICE_RESPONSE_FORMAT_2:"The format of the service response is not supported",SERVICE_RESPONSE_FORMAT_3:"No suggestion matching the search",CLASS_CONSTRUCTOR:"'%var%' constructor cannot be called as a function.",getMessage:function(n,e){if(Object.keys(arguments).length===0)return"Message indefined !";var t=Array.prototype.slice.call(arguments),i=t.shift(),r=t,s=this[i];try{Array.isArray(r)&&r.length>0?s=s.replace("%var%",r.join(" - ")):s=s.replace("%var%","%var% (not specified)")}catch{}return s}},Helper$1={normalyzeParameters:function(n){var e=null;if(n){var t=[];for(var i in n)if(n.hasOwnProperty(i)){var r=n[i];r||(r=""),t.push(i+"="+r)}e=t.join("&")}return e},normalyzeUrl:function(n,e,t){var i=n;if(n){if(n.split("?").length-1>=2){var r=n.search(/\?/)+1;i=n.substring(0,r)+n.slice(r).replace(/\?/g,"&")}var s=n.indexOf("?");s===-1&&(i+="?"),s!==-1&&s!==n.length-1&&(i+="&")}return e&&(typeof e=="string"?(e=e.replace("?",""),i+=e):i+=this.normalyzeParameters(e)),t&&(i=encodeURIComponent(i)),i},indent:function(n,e){var t=n||0;return new Array(t+1).join(" ")+e}};function commonjsRequire(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var es6Promise={exports:{}};/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */(function(n,e){(function(t,i){n.exports=i()})(commonjsGlobal,function(){function t(X){var ee=typeof X;return X!==null&&(ee==="object"||ee==="function")}function i(X){return typeof X=="function"}var r=void 0;Array.isArray?r=Array.isArray:r=function(X){return Object.prototype.toString.call(X)==="[object Array]"};var s=r,o=0,a=void 0,d=void 0,y=function(ee,ne){N[o]=ee,N[o+1]=ne,o+=2,o===2&&(d?d(G):z())};function v(X){d=X}function _(X){y=X}var C=typeof window<"u"?window:void 0,E=C||{},S=E.MutationObserver||E.WebKitMutationObserver,b=typeof self>"u"&&typeof process<"u"&&{}.toString.call(process)==="[object process]",P=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function R(){return function(){return process.nextTick(G)}}function x(){return typeof a<"u"?function(){a(G)}:k()}function T(){var X=0,ee=new S(G),ne=document.createTextNode("");return ee.observe(ne,{characterData:!0}),function(){ne.data=X=++X%2}}function L(){var X=new MessageChannel;return X.port1.onmessage=G,function(){return X.port2.postMessage(0)}}function k(){var X=setTimeout;return function(){return X(G,1)}}var N=new Array(1e3);function G(){for(var X=0;X"u"){var a=require("node-fetch"),d={headers:{Referer:"https://localhost"}};return n.data&&typeof n.data=="string"&&s&&(d={method:n.method,body:n.data,headers:{"Content-Type":n.content,Referer:"https://localhost"}}),a(n.url,d).then(function(C){if(C.ok)i(C.text());else{var E="Errors Occured on Http Request (status : '"+C.statusText+"' | url : '"+C.url+"')",S=C.status;r({message:E,status:S})}}).catch(function(C){r({message:C,status:-1})})}else if(window.XMLHttpRequest){e.trace("XMLHttpRequest"),o=new XMLHttpRequest,o.open(n.method,n.url,!0),o.overrideMimeType=n.content;var y=null;n.timeOut>0&&(e.trace("XHR - TimeOut actif !"),y=window.setTimeout(function(){var C="TimeOut Occured on Http Request with XMLHttpRequest !";r({message:C,status:-1})},n.timeOut)),s&&(e.trace("data = ",n.data),o.setRequestHeader("Content-type",n.content)),o.onerror=function(C){console.log(C),r(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},o.ontimeout=function(C){console.log(C),r(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},o.onreadystatechange=function(C){if(o.readyState===4)if(o.status===200)window.clearTimeout(y),i(o.response);else{var E="Errors Occured on Http Request (status : '"+C.target.statusText+"' | url : '"+C.target.responseURL+"' | response : '"+C.target.response+"')",S=C.target.status;r({message:E,status:S})}};var v=n.data&&s?n.data:null;o.send(v)}else if(window.XDomainRequest){e.trace("XDomainRequest"),o=new XDomainRequest,o.open(n.method,n.url),o.overrideMimeType=n.content,n.timeOut>0&&(o.timeout=n.timeout,e.trace("XHR - TimeOut actif !")),s&&o.setRequestHeader("Content-type",n.content),o.onerror=function(){r(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},o.ontimeout=function(){r(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},o.onload=function(C){if(o.status===200)i(o.responseText);else{var E="Errors Occured on Http Request (status : '"+C.target.statusText+"' | url : '"+C.target.responseURL+"')",S=C.target.status;r({message:E,status:S})}};var _=n.data&&s?n.data:null;o.send(_)}else throw new Error("CORS not supported")});return t},__callJSON:function(n){return this.__call(n).then(JSON.parse).catch(function(e){console.log("_callJSON failed on : ",n.url,e)})},__callXML:function(n){return this.__call(n).then(function(e){var t;if(typeof window>"u"){var i=require("@xmldom/xmldom").DOMParser;t=new i().parseFromString(e,"text/xml")}else if(window.DOMParser){var r=new window.DOMParser;t=r.parseFromString(e,"text/xml")}else t=new window.ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.loadXML(e);return t}).catch(function(e){console.log("__callXML failed on : ",n.url,e)})}},JSONP={uuid:function(){var n=Math.floor(Date.now());return function(){return n++}}(),call:function(n){var e=LoggerByDefault$1.getLogger("JSONP");if(e.trace("[JSONP::call ()]"),!n)throw e.error("missing parameter : options !"),new Error("missing parameter : options !");if(!n.url)throw e.error("missing parameter : options.url !"),new Error("missing parameter : options.url !");if(n.timeOut||(e.info("setting 'options.timeOut' default value"),n.timeOut=0),!n.onResponse)throw e.error("missing parameter : options.onResponse !"),new Error("missing parameter : options.onResponse !");var t=typeof n.callbackSuffix=="string"?n.callbackSuffix:this.uuid(),i=!1,r=!1,s=n.url.indexOf("callback=");if(s!==-1){i=!0;var o=n.url.indexOf("&",s);o===-1&&(o=n.url.length);var a=n.url.substring(s+9,o);a&&(r=!0,n.callbackName=a,e.info("setting 'options.callbackName' value ("+n.callbackName+") from 'options.url' parameter"))}if(!i){var d=n.url.indexOf("?");d===-1?n.url=n.url+"?callback=":d===n.url.length?n.url=n.url+"callback=":n.url=n.url+"&callback=",e.info("setting callback default key in 'options.url' : "+n.url)}var y=n.callbackName?!0:r;if(r||(n.callbackName||(e.info("setting 'options.callbackName' default value"),n.callbackName="callback",(t||t==="")&&(n.callbackName+=t)),n.url=n.url.replace("callback=","callback="+n.callbackName),e.info("setting callback function name in 'options.url' : "+n.url)),n.onTimeOut||(e.info("setting 'options.onTimeOut' default value"),n.onTimeOut=function(){console.log("TimeOut while invoking url : "+n.url)}),!y){var v=this,_=null;n.timeOut>0&&(_=window.setTimeout(function(){window[n.callbackName]=function(){},n.onTimeOut(),v._deleteScript(t)},n.timeOut)),window[n.callbackName]=function(C){window.clearTimeout(_),n.onResponse(C),v._deleteScript(t)}}this._createScript(t,n.url)},_createScript:function(n,e){var t,i=document.getElementById("results"+n);t=document.createElement("script"),t.setAttribute("type","text/javascript"),t.setAttribute("src",e),t.setAttribute("charset","UTF-8"),t.setAttribute("id","results"+n),t.setAttribute("async","true");var r=document.documentElement||document.getElementsByTagName("head")[0];i===null?r.appendChild(t):r.replaceChild(t,i)},_deleteScript:function(n){var e=document.getElementById("results"+n);if(e){var t=e.parentNode||document.documentElement;if(!t)return;t.removeChild(e)}}},Protocol={send:function(n){var e=n||{method:"GET",protocol:"XHR",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if(typeof window>"u"&&n.protocol==="JSONP"){console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS");return}if(n.protocol==="XHR"||n.format==="json"?e.wrap=!1:n.protocol==="JSONP"&&n.format==="xml"&&(e.wrap=!0),e.callback=null,e.output=e.wrap?"json":null,e.wrap){var t={};t.output=e.output,t.callback=e.callback,delete t.callback,e.url=Helper$1.normalyzeUrl(n.url,t)}switch(e.protocol){case"XHR":n.method==="GET"&&n.nocache&&(e.url=Helper$1.normalyzeUrl(e.url,{t:new Date().getTime()})),XHR.call(e);break;case"JSONP":e.data&&(e.url=Helper$1.normalyzeUrl(e.url,e.data)),JSONP.call(e);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}};function ErrorService(n){if(!(this instanceof ErrorService))throw new TypeError("ErrorService constructor cannot be called as a function.");var e=n;typeof n=="string"||n instanceof String?(this.message=n,this.status=-1,this.type=ErrorService.TYPE_UNKERR):(this.message=e.message||"undefined!?",this.type=e.type,this.status=e.status||-1),this.name="ErrorService",this.stack=new Error().stack}ErrorService.TYPE_SRVERR="SERVICE_ERROR";ErrorService.TYPE_USEERR="USAGE_ERROR";ErrorService.TYPE_UNKERR="UNKNOWN_ERROR";ErrorService.prototype=Object.create(Error.prototype,{constructor:{value:ErrorService,writable:!0,configurable:!0}});const name="geoportal-access-lib",version$1="3.4.2",date="14/05/2024",description="French Geoportal resources access library",module="src/Gp.js",main="dist/GpServices-src.js",homepage="https://github.com/IGNF/geoportal-access-lib#readme",scripts={clean:'echo "Warning: no yet implemented!" && exit 0',setup:"npm install",cover:"nyc --reporter=lcov --reporter=text npm run test",eslint:"eslint src/",build:"webpack --mode=none","build:prod":"webpack --mode=production","build:dev":"webpack --mode=development",test:'mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob "test_*.js" test/spec/',"test:serve":"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js","test:serve:docker":"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js","test:end-to-end:serve":"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js","test:end-to-end:serve:docker":"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js",sample:"npm run sample:serve","sample:serve":"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open","sample:serve:prod":"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open","sample:serve:dev":"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open",doc:"npm run doc:serve","doc:serve":"webpack-dev-server --content-base jsdoc --port 9001 --open"},nyc={include:["src/**/*.js"],instrument:!1,sourceMap:!1},repository={type:"git",url:"https://github.com/IGNF/geoportal-access-lib.git"},keywords=["geoplateforme","geoportail","webservice","javascript","es6"],author="IGNF",license="CECILL-B",dependencies={"es6-promise":"^4.2.4","node-fetch":"^2.6.1","@xmldom/xmldom":"^0.8.10"},devDependencies={"@babel/core":"^7.12.10","@babel/plugin-transform-template-literals":"^7.12.1","@babel/preset-env":"^7.12.11","babel-loader":"^8.2.2",chai:"^4.1.2","clean-webpack-plugin":"^3.0.0","copy-webpack-plugin":"^5.1.2",eslint:"^7.18.0","eslint-config-standard":"^16.0.2","eslint-loader":"^4.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^5.0.0",glob:"^7.1.2","handlebars-layouts":"^3.1.4","handlebars-webpack-plugin":"^1.4.1","html-webpack-plugin":"^4.5.1","istanbul-instrumenter-loader":"^3.0.1","jsdoc-webpack-plugin":"^0.3.0",loglevel:"^1.6.1",mocha:"^7.2.0","mocha-loader":"^5.1.5","mocha-webpack":"^2.0.0-beta.0",mochawesome:"^6.2.1",nyc:"^15.1.0",path:"^0.12.7","replace-bundle-webpack-plugin":"^1.0.0",sinon:"^9.2.4","sinon-es6":"0.0.3","speed-measure-webpack-plugin":"^1.4.2","string-template":"^1.0.0","terser-webpack-plugin":"^2.3.8",webpack:"^4.46.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.2","webpack-node-externals":"^2.5.2","webpack-shell-plugin":"^0.5.0"},bundledDependencies=[],peerDependencies={},optionalDependencies={},Pkg={name,version:version$1,date,description,module,main,homepage,scripts,nyc,repository,keywords,author,license,dependencies,devDependencies,bundledDependencies,peerDependencies,optionalDependencies};function CommonService(n){if(!(this instanceof CommonService))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR"));this.logger=LoggerByDefault$1.getLogger("CommonService"),this.logger.trace("[Constructeur CommonService (options)]"),this.options={protocol:"XHR",ssl:!0,proxyURL:"",callbackSuffix:null,httpMethod:"GET",timeOut:0,rawResponse:!1,scope:this,onSuccess:function(i){console.log("onSuccess - la reponse est la suivante : ",i)},onFailure:function(i){i.status===200||!i.status?console.log("onFailure : ",i.message):console.log("onFailure - Erreur (",i.status,") : ",i.message)}};for(var e in n)n.hasOwnProperty(e)&&(this.options[e]=n[e]);this.options.rawResponse&&!this.options.onSuccess&&(this.options.onSuccess=function(i){console.log("onSuccess - la réponse brute du service est la suivante : ",i)});var t=this.options.onSuccess!==null&&typeof this.options.onSuccess=="function";if(!t)throw new Error(MessagesResources.getMessage("PARAM_MISSING","onSuccess()"));switch(this.options.httpMethod=typeof n.httpMethod=="string"?n.httpMethod.toUpperCase():"GET",this.options.httpMethod){case"POST":case"GET":break;case"PUT":case"DELETE":case"HEAD":case"OPTIONS":throw new Error(MessagesResources.getMessage("PARAM_NOT_SUPPORT","httpMethod"));default:throw new Error(MessagesResources.getMessage("PARAM_UNKNOWN","httpMethod"))}switch(this.options.protocol=typeof n.protocol=="string"?n.protocol.toUpperCase():"XHR",this.options.protocol){case"JSONP":case"XHR":break;default:throw new Error(MessagesResources.getMessage("PARAM_UNKNOWN","protocol"))}if(typeof window>"u"&&this.options.protocol==="JSONP")throw new Error(MessagesResources.getMessage("PARAM_NOT_SUPPORT_NODEJS","protocol=JSONP (instead use XHR)"));this.options.protocol==="JSONP"&&(this.options.httpMethod="GET"),this.options.nocache=n.nocache||!1,this.options.outputFormat=null,this.request=null,this.response=null}CommonService.prototype={constructor:CommonService,call:function(){this.logger.trace("CommonService::call ()");var n=this;function e(){this.logger.trace("CommonService::run ()"),this.buildRequest.call(n,s,t)}e.call(n);function t(o){this.logger.trace("CommonService::onBuildRequest : ",o),this.callService.call(n,s,i)}function i(o){this.logger.trace("CommonService::onCallService : ",o),this.analyzeResponse.call(n,s,r)}function r(o){if(this.logger.trace("CommonService::onAnalyzeResponse : ",o),o)this.options.onSuccess.call(this,o);else return s.call(this,new ErrorService("Analyse de la reponse en échec !?"))}function s(o){this.logger.trace("CommonService::onError()");var a=o;a instanceof ErrorService||(a=new ErrorService(o.message)),this.options.onFailure.call(this,a)}},buildRequest:function(n,e){this.logger.error("overwritten method !"),n&&n.call(this,"This method must be overwritten !"),e.call(this,"This method must be overwritten !")},callService:function(n,e){var t=null,i=this.request,r=!!(this.options.proxyURL&&this.options.protocol==="XHR"),s={"gp-access-lib":Pkg.version};this.options.apiKey&&(s.apiKey=this.options.apiKey),this.options.serverUrl=Helper$1.normalyzeUrl(this.options.serverUrl,s,!1),r&&(this.options.httpMethod==="GET"&&(t=this.options.proxyURL+Helper$1.normalyzeUrl(this.options.serverUrl,this.request,!0),i=null),this.options.httpMethod==="POST"&&(t=this.options.proxyURL+Helper$1.normalyzeUrl(this.options.serverUrl,null,!0),i=this.request));var o=this,a={url:t||this.options.serverUrl,method:this.options.httpMethod,protocol:this.options.protocol,timeOut:this.options.timeOut||0,format:this.options.outputFormat,nocache:this.options.nocache||!1,wrap:this.options.protocol!=="XHR",callbackSuffix:this.options.callbackSuffix,data:i,headers:null,content:this.options.contentType||"application/xml",scope:this.options.scope||this,onResponse:function(d){o.logger.trace("callService::onResponse()");var y=null;if(o.options.protocol==="XHR"&&(o.logger.trace("Response XHR",d),y=d),o.options.protocol==="JSONP")if(o.logger.trace("Response JSON",d),d)if(d.http)if(d.http.status!==200){n.call(o,new ErrorService({status:d.http.status,message:d.http.error,type:ErrorService.TYPE_SRVERR}));return}else y=d.xml,o.options.rawResponse&&(y=d);else y=d;else{n.call(o,new ErrorService("Le contenu de la reponse est vide !?"));return}if(typeof o.options.onBeforeParse=="function"){var v=o.options.onBeforeParse(y);typeof v=="string"&&(y=v)}o.response=y,e.call(o,y)},onFailure:function(d){o.logger.trace("callService::onFailure()"),d.type=ErrorService.TYPE_SRVERR,n.call(o,new ErrorService(d))},onTimeOut:function(){o.logger.trace("callService::onTimeOut()"),n.call(o,new ErrorService("TimeOut!"))}};Protocol.send(a)},analyzeResponse:function(n,e){this.logger.error("overwritten method !"),n&&n.call(this,"This method must be overwritten !"),e.call(this,"This method must be overwritten !")}};var DefaultUrlService={ssl:!0,newUrl:function(n){var e="data.geopf.fr",t;return DefaultUrlService.ssl===!1?t="http://":t="https://",t+e+n},Alti:{new_key:{"elevation-json":"/altimetrie/1.0/calcul/alti/rest/elevation.json","elevation-xml":"/altimetrie/1.0/calcul/alti/rest/elevation.xml","profil-json":"/altimetrie/1.0/calcul/alti/rest/elevationLine.json","profil-xml":"/altimetrie/1.0/calcul/alti/rest/elevationLine.xml"},newUrl:function(){return{"elevation-json":DefaultUrlService.newUrl(this.new_key["elevation-json"]),"elevation-xml":DefaultUrlService.newUrl(this.new_key["elevation-xml"]),"profil-json":DefaultUrlService.newUrl(this.new_key["profil-json"]),"profil-xml":DefaultUrlService.newUrl(this.new_key["profil-xml"])}}},ProcessIsoCurve:{new_key:"/navigation/isochrone",newUrl:function(){return DefaultUrlService.newUrl(this.new_key)}},Config:{_key:"https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/",url:function(n){Array.isArray(n)||(n=n.split(","));for(var e=[],t=0;t"u"){var i=require("node-fetch");t=i}else t=window.fetch;var r=o=>t(o,{credentials:"same-origin"}).then(a=>{if(a.ok)return a.json().then(d=>d).catch(d=>{throw new Error("Exception Json : "+d)});throw new Error("Exception HTTP : "+a.status+" (status code) !")}).catch(a=>new Promise((d,y)=>{y(a)})),s=[];for(let o=0;o{if(!o)throw new Error("results config empty !?");o.forEach(a=>{this.listConfigResults.push(a)})}).then(()=>{e.call(this,this.listConfigResults)}).catch(o=>{n.call(this,o)})},__callServiceSync=function(n,e){this.listConfigResults=[];for(var t=0;te||n",input:"__KEY__=__DATA__"},post:{value:'__IDENTIFIER____RAWDATAOUTPUT__',input:"__KEY____DATA__"}},namespaceByDefault:function(){var n=['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns="http://www.opengis.net/wps/1.0.0"','xmlns:wfs="http://www.opengis.net/wfs"','xmlns:wps="http://www.opengis.net/wps/1.0.0"','xmlns:ows="http://www.opengis.net/ows/1.1"','xmlns:gml="http://www.opengis.net/gml"','xmlns:ogc="http://www.opengis.net/ogc"','xmlns:wcs="http://www.opengis.net/wcs/1.1.1"','xmlns:xlink="http://www.w3.org/1999/xlink"'];return n.join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"'},processRequestString:function(){this.logger.trace("WPS::processRequestString ()");var n="";if(this.method==="POST")n=this.template.post.value;else if(this.method==="GET")n=this.template.get.value;else return this.logger.error("No other method supported by the service !"),!1;return n=n.replace(/__SERVICE__/g,this.paramservice),n=n.replace(/__VERSION__/g,this.paramversion),n=n.replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput),n=n.replace(/__IDENTIFIER__/g,this.paramidentifier),n=n.replace(/__REQUEST__/g,this.paramrequest),this.method==="POST"&&(n=n.replace(/__NAMESPACE__/g,this.namespaceByDefault),n=n.replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),n=n.replace(//g,this.__addDataInputs()),n?(this.requestString=n,this.logger.trace("traduction tmpl",n),!0):(this.logger.warn("traduction tmpl : empty request !?"),!1)},__addDataInputs:function(){this.logger.trace("WPS::__addDataInputs ()");for(var n=this.method==="GET"?this.template.get.input:this.template.post.input,e=this.method==="GET"?";":"",t="",i=this,r=this.DataObject.getData(),s=0;s"u"){var e=require("@xmldom/xmldom").DOMParser;return new e().parseFromString(n,"text/xml")}else{var t,i,r="Erreur lors du parsing de la réponse du service : XML non conforme";if(window.ActiveXObject){i=new window.ActiveXObject("Microsoft.XMLDOM"),i.async=!1,i.loadXML(n);var s=i.parseError;if(s.errorCode)throw s.line&&s.linepos&&(r+="( ligne "+s.line+", colonne "+s.linepos),s.reason&&(r+=": "+s.reason+")"),new Error(r);return i}else if(window.DOMParser){t=new window.DOMParser;try{i=t.parseFromString(n,"text/xml")}catch(y){throw y.message==="SyntaxError"?new Error(r):new Error("Erreur lors du parsing de la réponse du service : "+y.message)}if(i.getElementsByTagName("parsererror").length>0)for(var o=i.getElementsByTagName("parsererror"),a=0;a0){var t=__getAttributes(n);e.attributes=t}if(n.hasChildNodes()){for(var i={},r,s=n.childNodes,o=0;o0){for(var e={},t=n.attributes,i=0;i"u"||typeof e.filters[r]=="object"&&Object.keys(e.filters[r]).length===0||typeof e.filters[r]=="string"&&e.filters[r].length===0||Array.isArray(e.filters[r])&&e.filters[r].length===0)&&delete this.options.filters[r]}this.options.index=e.index||"StreetAddress",this.options.maximumResponses=e.maximumResponses||20}Geocode.prototype=Object.create(CommonService.prototype,{});Geocode.prototype.constructor=Geocode;Geocode.prototype.patchOptionConvertor=function(n){const e=n;return e.hasOwnProperty("location")&&(this.logger.warn("The parameter 'location' is deprecated"),e.query||(e.query=e.location),delete e.location),e.filterOptions&&(this.logger.warn("The parameter 'filterOptions' is deprecated"),e.filters||(e.filters=e.filterOptions,e.filters.type&&(this.logger.warn("The parameter 'filterOptions.type' is deprecated"),e.index||(Array.isArray(e.filters.type)&&e.filters.type.length>0?e.index=e.filters.type[0]:e.index=e.filters.type),delete e.filters.type),e.filters.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),delete e.filters.bbox)),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.returnFreeForm&&(this.logger.warn("The parameter 'returnFreeForm' is deprecated"),delete e.returnFreeForm),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e};Geocode.prototype.buildRequest=function(n,e){var t={httpMethod:this.options.httpMethod,geocodeMethod:"search",query:this.options.query,index:this.options.index,returnTrueGeometry:this.options.returnTrueGeometry,position:this.options.position,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=GeocodeRequestFactory.build(t),this.request?e.call(this,this.request):n.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_REQUEST_BUILD")))};Geocode.prototype.analyzeResponse=function(n,e){if(this.response){var t={response:this.response,rawResponse:this.options.rawResponse,onError:n,onSuccess:e,scope:this};GeocodeReponseFactory.build(t)}else n.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")))};function ReverseGeocode$1(n){if(!(this instanceof ReverseGeocode$1))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));this.CLASSNAME="ReverseGeocode",this.logger=LoggerByDefault$1.getLogger("Gp.Services.ReverseGeocode"),this.logger.trace("[Constructeur ReverseGeocode (options)]");var e=this.patchOptionConvertor(n);if(e.serverUrl||(e.serverUrl=DefaultUrlService.ReverseGeocode.newUrl()),CommonService.apply(this,[e]),e.searchGeometry)this.options.searchGeometry=e.searchGeometry;else if(!e.position)throw new Error(MessagesResources.getMessage("PARAM_MISSING","searchGeometry"));if(e.index||(this.options.index=e.index="StreetAddress"),e.filters)for(var t=Object.keys(e.filters),i=0;i"u"||typeof e.filters[r]=="object"&&Object.keys(e.filters[r]).length===0||typeof e.filters[r]=="string"&&e.filters[r].length===0||Array.isArray(e.filters[r])&&e.filters[r].length===0)&&delete this.options.filters[r]}this.options.position=e.position,this.options.index=e.index||"StreetAddress",this.options.maximumResponses=e.maximumResponses||20}ReverseGeocode$1.prototype=Object.create(CommonService.prototype,{});ReverseGeocode$1.prototype.constructor=ReverseGeocode$1;ReverseGeocode$1.prototype.patchOptionConvertor=function(n){var e=n;return e.filterOptions&&(this.logger.warn("The parameter 'filterOptions' is deprecated"),e.filterOptions.type&&(this.logger.warn("The parameter 'filterOptions.type' is deprecated"),e.index||(Array.isArray(e.filterOptions.type)&&e.filterOptions.type.length>0?e.index=e.filterOptions.type[0]:e.index=e.filterOptions.type),delete e.filterOptions.type),e.filterOptions.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),e.searchGeometry||(e.searchGeometry=this.bbox2Json(e.filterOptions.bbox)),delete e.filterOptions.bbox),e.filterOptions.circle&&(this.logger.warn("The parameter 'filterOptions.circle' is deprecated"),e.searchGeometry||(e.searchGeometry=this.circle2Json(e.filterOptions.circle)),delete e.filterOptions.circle),e.filterOptions.polygon&&(this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"),e.searchGeometry||(e.searchGeometry=this.polygon2Json(e.filterOptions.polygon)),delete e.filterOptions.polygon),!e.filters&&Object.keys(e.filterOptions).length>0&&(e.filters=e.filterOptions),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e};ReverseGeocode$1.prototype.buildRequest=function(n,e){var t={httpMethod:this.options.httpMethod,geocodeMethod:"reverse",searchGeometry:this.options.searchGeometry,index:this.options.index,position:this.options.position,returnTrueGeometry:this.options.returnTrueGeometry,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=GeocodeRequestFactory.build(t),this.request?e.call(this,this.request):n.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_REQUEST_BUILD")))};ReverseGeocode$1.prototype.analyzeResponse=function(n,e){if(this.response){var t={response:this.response,rawResponse:this.options.rawResponse,onError:n,onSuccess:e,scope:this};GeocodeReponseFactory.build(t)}else n.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")))};ReverseGeocode$1.prototype.bbox2Json=function(n){return{type:"Polygon",coordinates:[[[n.left,n.top],[n.right,n.top],[n.right,n.bottom],[n.left,n.bottom],[n.left,n.top]]]}};ReverseGeocode$1.prototype.circle2Json=function(n){return{type:"Circle",radius:n.radius,coordinates:[n.x,n.y]}};ReverseGeocode$1.prototype.polygon2Json=function(n){for(var e={type:"Polygon",coordinates:[[]]},t=0;t=5e4&&(this.distanceUnit="km",this.costValue/=1e3)):(this.costType="time",this.costValue=this.options.time)}ProcessIsoCurveParam.CLASSNAME="ProcessIsoCurveParam";ProcessIsoCurveParam.prototype={constructor:ProcessIsoCurveParam,getLocation:function(){return this.point.x+","+this.point.y},getDistanceUnit:function(){return this.distanceUnit==="m"?"meter":this.distanceUnit==="km"?"kilometer":""},getConstraints:function(){var n=[];if(this.constraints.length!==0)for(var e=0;e"u"){var e={};e.env={VERBOSE:!1}}e.env.VERBOSE?loglevelExports.enableAll():loglevelExports.disableAll();var t=n||"default";return loglevelExports.getLogger(t)},disableAll:function(){var n=loglevelExports.getLoggers();for(const e in n)Object.hasOwnProperty.call(n,e)&&n[e].disableAll()},enableAll:function(){var n=loglevelExports.getLoggers();for(const e in n)Object.hasOwnProperty.call(n,e)&&n[e].enableAll()}},ProxyUtils={proxifyUrl:function(n,e){var t=LoggerByDefault.getLogger("proxifyUrl");if(!e||!e.hasOwnProperty("proxyUrl")||e.proxyUrl===null||e.proxyUrl.trim().length===0)return n;if(e.noProxyDomains&&Array.isArray(e.noProxyDomains)&&e.noProxyDomains.length>0){for(var i in e.noProxyDomains)if(t.trace("[ProxyUtils] proxifyUrl : analyzing "+e.noProxyDomains[i]),n.indexOf(e.noProxyDomains[i])!==-1)return t.info("[ProxyUtils] proxifyUrl : "+n+" found in noProxyDomains list ("+e.noProxyDomains[i]+")."),n}return e.proxyUrl+encodeURIComponent(n)}},logger$B=LoggerByDefault.getLogger("GfiUtils"),Gfi={getLayerFormat:function(n){var e=typeof n.getType=="function"?n.getType():null,t=n.getSource();if(e){if(e==="VECTOR"||e==="VECTOR_TILE")return"vector";if(e==="TILE")return t.tileGrid?"wmts":"wms";if(e==="IMAGE")return"wms"}else{if(t instanceof TileWMS||t instanceof ImageWMS)return"wms";if(t instanceof WMTS$1)return"wmts";if(t instanceof VectorSource||t instanceof VectorTile)return"vector"}return"unknown"},displayInfo:function(n,e,t,i,r){if(logger$B.trace("[Gfi] : displayInfo..."),i||(i="text/html"),t!==null){var s=null,o=null,a=t;a=a.replace(/\n/g,""),a=a.replace(/(>)\s*(<)/g,"$1$2");var d=typeof window<"u"?window:null;if(typeof exports=="object"&&window===null){var y=require("@xmldom/xmldom").DOMParser;o=new y,s=o.parseFromString(a,i)}else if(d.DOMParser)o=new d.DOMParser,s=o.parseFromString(a,i);else if(d.ActiveXObject)s=new d.ActiveXObject("Microsoft.XMLDOM"),s.async=!1,s.loadXML(a);else return logger$B.log("Incompatible environment for DOM Parser !"),!1;var v=s.getElementsByTagName("body");if(v&&v.length===1&&!v[0].hasChildNodes())return!1;var _=document.createElement("div");_.className="gp-feature-info-div";var C=document.createElement("input");C.type="button",C.className="gp-styling-button closer",C.onclick=function(){return n.featuresOverlay&&(n.removeOverlay(n.featuresOverlay),n.featuresOverlay=null),!1};var E=document.createElement("div");return E.className="gp-features-content-div",E.innerHTML=t,_.appendChild(E),_.appendChild(C),n.featuresOverlay&&(n.removeOverlay(n.featuresOverlay),n.featuresOverlay=null),n.featuresOverlay=new Overlay({element:_,autoPan:r.autoPan,autoPanAnimation:r.autoPanAnimation,autoPanMargin:r.autoPanMargin,positioning:"bottom-center",insertFirst:!1,stopEvent:!0}),n.addOverlay(n.featuresOverlay),n.featuresOverlay.setPosition(e),n.featuresOverlay.render(),!0}},features2html:function(n,e){var t=document.createElement("div");return e.forEach(function(i){var r=i.getProperties();if(r.hasOwnProperty("render"))t.insertAdjacentHTML("beforeend",r.render);else{if(r.hasOwnProperty("name")){var s=document.createElement("div");s.className="gp-att-name-div",s.insertAdjacentHTML("afterbegin",r.name),t.appendChild(s)}if(r.hasOwnProperty("description")){var o=document.createElement("div");o.className="gp-att-description-div",o.insertAdjacentHTML("afterbegin",r.description),t.appendChild(o)}var a=null,d=!1,y=null,v=null,_=null,C=["fill","fill-opacity","stroke","stroke-opacity","stroke-width","marker-symbol","marker-color","marker-size","geometry","value","name","description","styleUrl","extensionsNode_","icon"];for(a in r)if(r[a]!==void 0&&C.indexOf(a)===-1){d||(y=document.createElement("div"),y.className="gp-att-others-div",v=document.createElement("ul"),d=!0),_=document.createElement("li");var E=document.createElement("span");E.className="gp-attname-others-span",E.appendChild(document.createTextNode(a+" : ")),_.appendChild(E),_.appendChild(document.createTextNode(r[a])),v.appendChild(_)}v&&(y.appendChild(v),t.appendChild(y))}},n),t.hasChildNodes()||(t=null),t},layerGetFeatureAtCoordinates:function(n,e,t){var i=n.getPixelFromCoordinate(t);return n.hasFeatureAtPixel(i,function(r){return r===e})},displayVectorFeatureInfo:function(n,e,t,i){var r=n.getPixelFromCoordinate(e),s=[];if(n.forEachFeatureAtPixel(r,function(a,d){(!t||t.indexOf(d)>-1)&&s.push(a)}),s.length===0)return!1;var o=this.features2html(n,s);return o===null?!1:(this.displayInfo(n,e,o.innerHTML,"text/html",i),!0)},displayFeatureInfo:function(n,e,t,i,r){for(var s={},o=0;on.getResolution()&&(P=!1),P&&S.maxResolution&&S.maxResolution"u"||typeof e>"u")){typeof t>"u"&&(t=!0);for(var i in e)e.hasOwnProperty(i)&&(typeof e[i]=="object"?n.hasOwnProperty(i)?this.mergeParams(n[i],e[i],t):n[i]=e[i]:n.hasOwnProperty(i)?t&&(n[i]=e[i]):n[i]=e[i])}}},logger$A=LoggerByDefault.getLogger("interactions"),Interactions={_extensions:["Measures","ElevationPath","Drawing"],_options:{current:null,clean:null},unset:function(n,e){logger$A.trace("unset()");var t={};Helper.mergeParams(t,this._options),Helper.mergeParams(t,e);for(var i=n.getInteractions().getArray(),r=0;r-1){if(t.current&&t.current===o)continue;i[r].setActive(!1);var a=s.source;if(typeof a<"u"&&a instanceof Control){for(var d in t)if(t.hasOwnProperty(d)){if(d==="current")continue;if(typeof a[d]=="function"){var y=Array.isArray(t[d])?t[d]:[t[d]];a[d].apply(a,y)}}}}else i[r].setActive(!1)}}},Marker={lightOrange:"data:image/png;base64,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IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICB4bWxuczpHSU1QPSJodHRwOi8vd3d3LmdpbXAub3JnL3htcC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgeG1wTU06RG9jdW1lbnRJRD0iZ2ltcDpkb2NpZDpnaW1wOjkyYWVkNjM2LWY3MDMtNDAzOC1hNzM4LWZiYzYxYzZlMTljNCIKICAgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo5NWMzZWI3NC0zYWRmLTRkYzUtOWZjZS1iODQ4NTc3Nzg4ODQiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0NjI3ZDg3NC1lZDIyLTRiZTUtYTlkNS00NDlmMzVhZDIxYzgiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE5Mjc4OTUzMDYiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDphM2U3ZWQ1MS0xNTI4LTRhYjAtODVjOS0zNzNkNzgxZGM2ZmMiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI1OjI3KzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PofUkY4AAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGRuA4VZTAAAFcElEQVRYw82YW2xbVRaGv7XP8bHjXByHQkNhWigdVX1AikRBMBoQ8wASl4fRqPDAAxIPKAVxeRqQRohHBEVCaoGKUBCl4qHcNKCZVKMRRQxtgTaACLRKqlwB14NzM2ni2D2XvXjgBFXQOnFiA1uy/HB89u9/7bX+vf4l1HnpK57hTNCE0AzqAS5gAAuEID5KiWSiLPf4tp7YUjcSu4yLZzdi2IJyNXANcBlwAdAKzAHTwDhwDKEPywC+GZWHbPi7IKOvZIWguAnlr8BtwJ+AxDJeDYCPgF6Ed0hkh+Weov5mZLTHJMDeBjwYk0itYJtKTOpZML3SbYNfnYz2SBr0buARYENcFytdFvga2AGyT7p14Vcjoz3ShOgdKDuAi+pUewpMIDyCypvSreWGk9HdroOEV2F4A1hfTxGJCX2D5U7U/UzuD6NaXq49NRJhBsOjwMVLEtE4gaL4W5cV3IsxPEoizDT0ZLTHcSH6M/BWLLlVwpQKuPzhb+i8sRkv04Y/e5rvPigxtnM9trKU2k0D28A5LN3RsmXbrbFOU8DtQLpqfJqu97nh6TydmzvwWpOI8VDbxqbrkmz62yk+/Ps6yoe8KkeV/hHHfgrMNyrNEkBX1SAktgRs3T7ApV1rSWayiEkDLmLSJDNZLu1ay9btAyS2BEsEuWuZ99WKyRhgHeCcn8wGw/qbOnAS3jmfOwmP9Td1kNhQDduJcUwjyciS0RJXMMkWkPPUo/z4XFxZRhZII8mEwFCsT+f5xXTE7FAOteduItVaZodyhNPVZDeKccJGkxmsChIMOvTt6aRSzIP+7A9rRKWYp29PJ8GgsyqcVauZSADaj+IDTecWvBlD4e01HKjM07XtOOuuy+A2X0BYmib/8SxfvLWRYm8LdqZaCvkI/SDBci6nld0ze7KCLa4F3gSurR4MB5x1FnMhiCeor9hJiPKmWpbGp3EU2IbJFuTe5XfStbczLxgP7K0IPcCFDWhnJoFuMAek2/oNbWdku/WxHATejT1JPZcPvINysFYiK+gAFkXTK6H+MyhXADeseJ9fmrVDM6X080/+p1M2/yFsD1zjEIauEeMAqNpQE16oaKiqwfjYeLk+fuYl10HDq7DsBTavxs8o6FzFKez/dM3rLx9LjUyVxcb7yVkfzmpXFbACJURHIxgyxkyu1ml6qL0Z4YX4xl7Jfrrgm9Ov9bX/e++x1tHCgkQ11lgELGA4sBp3iHRbH5GDwJPAFLXo6KJnDmTh/aG2w2/3t47VSGQxs1zAE9U2s9pEjx3hXuBloCa7G1rxv8o3f/7SkUz/UFFWMqGRWMpHAqsDbl00KGotIXM7MawF7gKSS5oJJRospI7v+rD96Ikp8aV2EgrkVPW4OnIy6SVL9ZubvZgyaOVyYDfwl2oNqVWiXNEb231oTe+/BrzvK9Gy01MFyoiOKzIEmqsEfjGf/39U1yHgosJFUXhlFMl+z9E/nkvhVNHZsjux+9Caf77RnyzMBaJLmW4RrWAlB3Y4Uh13HLOA4wQjo6O2IRPNxVV4JuG5Et2SSelzjtFLzsZQ0NIZ8/2rx7K9+/paxqbKvyh4Bc4AFQxzau23Dow7FS+nHmfEUz05OqINH8+evXJPJVOuE93XkY4eSziaXcQpB2b+vZNt7+/8IPPl2OxPRMJ4dDsLzIho3hpzamJ6aqJ0ei6qtZAasmZ2OS1RyOMd6egBIzSFVoKj4y1Hnvhv+8cD02ZOkEmgIKITVnXKWDs1ksvNrgbTbRSZ46cypY50aWcllIsyKXvr8GTyi9f6WvePFGVQhO8EPW2NzI+OfV2pF2bDTgbg8D/aJeVUspd1BK3/G24u7/skO3+iYP3h3LdhI/B+AGodUpo8WKwoAAAAAElFTkSuQmCC",darkOrange:"data:image/png;base64,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czpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICB4bWxuczpHSU1QPSJodHRwOi8vd3d3LmdpbXAub3JnL3htcC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgeG1wTU06RG9jdW1lbnRJRD0iZ2ltcDpkb2NpZDpnaW1wOjIxNDZjMzUzLWIxZjItNGVjOC04NzQ3LTIwMGEyYWExM2ViMyIKICAgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2NGViNmI2Ni03Y2I2LTRkZGUtYTI3OS01MGY0ZWFiZGFhODAiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ODRhM2VjZC1kNGFmLTQ3NjItYjA1ZS04ODk2MGQ4ZTk0Y2MiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE5MDM3ODI2MTQiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoxYzNjOGRkZi1kMjVkLTQ4YzQtYTAwYS0yMmU3ZDYwMzg1YjYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI1OjAzKzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PuhCAHgAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGQOTjc4FAAAFdklEQVRYw82YW2gcZRTHf+eb2dlkc9lsrFYr2notfSgWxKKiog8VvIFI9UFQEaWtYPFJfREfRRSEeqlttViLD/WGisYXrShWpfWC1WpSN5eN3cZumkuTzWY3c/mOD9lI0WSTTXbVA8M8zMz3n//5zvl/5xyhxqb3ewYvaERpAvUAFzCABUIQH6GAHyvKa76tJbbUjMRW4+LbC7GsQbgCWA+sAs4AWoA8MAxkgEMo32LoxDO98oIN/xdk9IGUYEYvRrgduAW4Gogt4NMA+BroQHkfm+qW3aP6n5HRTSYG9hZga5lEwyKWKZVJvQCmQ3bZ4F8no5skAXov8BiwspwXizUL9APPgOyVXTr5r5HRzdKI1TsRngHOqlHuKTCI8hhG3padWqw7GX3IddDwcixvAefXUkTKhH7HcBfifi8vh1E1H1cfGkGYxPI4cM68RGw5zf3y3S7IuedgeZwgTNZ1Z3Sz46LRNcA7Zcmd25yGgPWP/M7q65toTLZSHBvn6OcFDm07n6g0n9oNAxsR54DsjBYs2251QWAbgFuBREX/tF3rc9+zA6xa3U5jSxwxHmpbueyqOOvvOM7rj67g1JfedFTNagngVtR+B0zUK8xiwLqKTmhcE3Dblk4uXbecRDKFmATgIiZBIpni0nXLuW1LJ41rgnmcvG6B59WiyRhgBeDM+UZipWHthnbcmDf7b8Y81m5oJ7GyErZTxjH1JCPzesu4ghtvBpkjH2X6uXFlAVEg9SMjhEAamFsyp4Yjcuks1s6uXdZacuksU8OVZDcC0mW8OpFRQqBruvqdwwpdDh+9cjaF0QHQv/2wRhRGB6afdzkVkKZxtDoyVaqZBKCHEXygcXafjhi63l3G9tIEGzYe4ZKrksSbzmCqMEz6mzE+eedC+juaiUYqhZCPchgkqKB4SzxntqQEO7oceBu4srIzHIitsMTOBOMJ1leCkxAMmEpRWt6Vg8BGTConOxZeSVdfzmwxHmpvRtkJnFmHcuYksBkxH8tO69e1nJEd1sdhP/BBuUippfnA+3jsr5ZI9TnzV33mFcB/DuEi4LpFr/PPZu3LkanES08fOltWnxe2Ba5xCEPXiHEAVG2oMS9UNFTVINOXKdamn3nQdSC8HMMeYPVS+hkFzQdObl9m2Zu7+xt6hkKx5fXktGumdNXyZQUKiPZGkDbGnFxqp+kh9kaUHeUTezHr6WRkxt/oa/toT39Lby6QqMoci4BJDB8vpTtEdlkflf3A08AQ1ejoTM8cyeRnudYD72Zb+qokMhNZLuCJaqtZaqDLLi0i7EHYDVTV7oZW/J9PNf3wanfycLoki5nQSFnKewKrnW5NNMhtKRDlt6EsB+4G4vM2/UrUNd5w5Pl028FfiuJL9SQUyKrqEXXkaNyLF2o3N9vUYKB0AbAduKFSQWqVKFv0+rYfXdbx4aB3qqQLDk8VKCKaUSQNmi0F/ujAwB9RTYeAMwoXabg2QvZ5jl4ym8Ip6FjgDm7/bdl7bw3Ec/lItEJyWyAS0RJWsmC7I9WM45hJHCfo6e21dZlozlju3pjnSnRT0tMXHdFzT8dQ0EJoTr2eSXXs7W/uG/pnwiswBZQw5NXaYw5knJKXVY8p8VSP9vZo3cezp1v2nniDK9FD7V70RMxoaganGJmJT0+0frbtt+RPfVN/EQnLo9sxYEREB6wxxweHhwYL4/mo2kSqi43c5zRH8GS7Fz1shMZQJTg41PzVU7+2fdNZNHlBTgI5ER20qkPG2qGebHZsSTpULzJH8slCe6ywrWTlrGTM3tw9Ef/xjUzLvp6idIlwQtBxa2Sit6+/VCvMuu0MwIE726RBSqlViaDli6Gm4t6e1MQveet3Z4+F9cD7Ewo4WRJBbaaSAAAAAElFTkSuQmCC",red:"data:image/png;base64,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293bv2fa/f0ASM5yljz/NiUAAA0aaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA0LjQuMC1FeGl2MiI+CiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICB4bWxuczpHSU1QPSJodHRwOi8vd3d3LmdpbXAub3JnL3htcC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgeG1wTU06RG9jdW1lbnRJRD0iZ2ltcDpkb2NpZDpnaW1wOmI5YjA2YTAwLWZkOTQtNDc5MC1hNzIzLTlkMGUwNGRiNTRlNyIKICAgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1MTQ3ZGU5Yi1kOTA0LTRlNWYtYjIyYy0wZmMzOGRmMWI3ZGEiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4YzBjNTI2YS1lYTkyLTQxYWItODM5Yy05OWFhYTM0YjdlYzciCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE2NDAxNTU0MjYiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowMjQ4MDc5ZS1kMTYyLTQxZmItOGViYS1lMzY2NTRiNGRjMjYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjIwOjQwKzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PkaovgIAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPFCiKn0kIAAAFfUlEQVRYw82YTWxc1RXHf+e+N2/GH+Px2IEEV02AgqIsIkwgoYS2ahepVGCBUOiCRRdsAAnECthErBBCICGFj4gqRQqBRSABUrVm1URtCSATJ5ASZCPHH0kGgx1/xJl5nvH7uIcFY4iIM/GzZyhHenqL994993/u+f/fOUeos+nNnkHCJoQWRD0UFzCARYhQCVB8NFWWTwNbT99SNxC3GZfIXg9sADYDWxCuRekEskARYQplFPgEOAr045ph6bXRzwKM3pEX5mduQLkHuAvYCqSW8GkIfAT0IBwknT8lH87o/w2M3mpSqL0LeLQKIrOMZSpVUC8hpkf6bPiTg9FbpBn0L8ATwLoqL5ZrFjgNPAeyV47p3E8GRjdLE6r3oTwHXF0n7ikwgfAEIvvlqJYbDkY3uw4a3YLyNrC2niJSBXQG4c+Ie0yORnGSj5OnRhzlUJ4ErrkikBAoAjPVe7ik4F6D8iRxlGvoyegmx4X4NwgHgM6a8fUyIfc8doZbf99Ca66N0uwF+v7tc3DnWoJK6gqep1C2g3NEjsdLlm03GXSbAe4GmmvGZ91vA3Y8P8aN6ztoyaYxxsPaNrbcnmbbvV/x9ONdnPnA+w71otaMcDfYPqDUmDQTUgjdNYPQsSHkgYf62di9mmwujzHNgIsxzWRzeTZ2r+aBh/rp2BDWDLLQjSzpf7VMMIpB6QKcy77Tuc6wdVsHbspbfJspj63bOuhcV8u3g9KFJtufWQbHakfLdQUv3YrI4qwQ+e65616Jr6mknE4KJgIGgctLZnEq5vRgAWsXLyKttZweLFCcqiW7cdVP1DgwQoQwUNPJxIDDG7vXMDszBvqjDWvM7MwYb+xew8SAUzNowgCSDEwyNVMJQU8AAdC06DvBtOG/76xirlLi3u0nufn2HJmWTir+FJ9+PMu7B66nr6eVYLpWCgUoJ0DCGoq3wv/MbXkhmlkN7Ad+XTMY4kBTl6XlKnA8IQ4U/xyUx8wlB3ZpKvcC23Hz49K79Ep6GeWM8VB7J8pfgasaUM6cAx5EzPvSZ4OGljNy1AYIh4C/L6lASWYBcBCHQ0mBJOfM94rk+WjwAsKvgN8te51LK7kPpm3zK89OrZH1v4zaQ9c4RJFrxDgAqjbSlBcpGqlqODoyWq5TP1OtnoU9wPqV9DMKWlRnfJ+/6q3XKpmhSRVbXU8uuhb6Hq1eVsBHdDiGQWPMuZV1mpuMB/aPCK8CXcsMjs6pufCm3/7PPZXs8LhKnJBjMTCH4f2VdIfIcRsgcgh4FpgkiY4u9Mwqc4fn2468M58dSQhkIbNcwBPVNrPSRJdjWgb2AK8BidrdSCX4PGw5/re53IlBK8uZ0EhVyodCq/1uXTTIzfrExZ0oq4H7gfQSmv54IMqcfNFv7/0ilkCSg1CgoKon1ZEv017ar9/cbEvGEFeuQ9mF8IdaBamFuBB7I7tKq3r+EXjnK0tPTxUoIzqqyCBooRIGM2NjX8d1HQIuKFys0cYY2eeJ3riYwinorHUndvmr3nt7Pj1eVNEa5LZALKIVrBTAnopVRx3HzOE44dDwsG3IRHPBxrtTnkv8p5yjLzvoLy72oaC+mvOvz+V79pZbRyYvJbwC80AFQ1GtPevAqFPxCuoxL57ql8ND2vDx7MVW2JTOuMQPdxDvSInmF/yU1ZT+Nd92eGcp97+RH4BE1XHHLDAtomPWmK8mpiYn/AvFOCmRGmLTm53WOOKpDhM/YqApQsLe+dYPnym1f9xvTVGQc8C4iE5Y1Ulj7eRQoTC7Ih1qFJiTQc7vwN9ZUbk6Z+ydp6L0Z2+Ws/uGrAyI8I2gF6yR0vDI6Uq9fDbsZACO3NQuGa3kr3XC7H+ClvJeP1/6IrbBqbNno0b4+xbMlmARngcRbAAAAABJRU5ErkJggg==",turquoiseBlue:"data:image/png;base64,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/MUi8H5G35QHBm+BvjV3bu1znD4AWZpV+gY4OARGS5S97vHu3u65/XunPb8fN2tyj8UDOK0AAA0aaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA0LjQuMC1FeGl2MiI+CiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICB4bWxuczpHSU1QPSJodHRwOi8vd3d3LmdpbXAub3JnL3htcC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgeG1wTU06RG9jdW1lbnRJRD0iZ2ltcDpkb2NpZDpnaW1wOjEwNGNlNWFhLTE1YzctNGI4Yi1iOGU1LTFmYWQyNWFiYzBhZCIKICAgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpkNDMyZTY1Zi0xOThhLTQxM2EtYWYyMy1jNzhlNzczNGRlN2QiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyNzExODVkMi03MWZiLTRhZDMtYTJmMi1iNjM3OWU3MDc1OTEiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE4NjYyMzgzMjQiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDo1NGFiYzNkYS1lZWJiLTRlZjctYjdjNS04ZDRjODY5OGVjODMiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI0OjI2KzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pj0tlUwAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGBru/VeEAAAABmJLR0QA/wD/AP+gvaeTAAAFO0lEQVRYw9WYe2xTVRzHTx97dYS5B1UHa+/tY12dDoOKWyIGlfgHkCkSNTHGwHxA3NiAP/A5x4CMKEzdYL29YyAyBxKQZbI+NvYIaowaH9Ogi2GRbGjcFrbBNrq2a2/9nq5LCFnbbfSOeZJPTs/t6Tm/7/39zu+cU0IiXc7WSImNX0BsZiVYAhigmah5tHklsZrjSYtJSuZtaeSiiJU3gHUwfC9oARfBIHBP1DzaPH1eRuzmp0E6aTgSNX9EWMwSvOkMGPgG+CpguG8a0H7nA78zkMYqye0V0lYXDSHrYUw7cE5TxM04/b+38+vJ+RPRt0eIjVeAAhhyCQizFDKJEBjndaCY49Di4+CRlzFxfwSE3Ciol9i4DSBujoRUy7HIszFxdwSF3CioBy8qm1g5ufhirHwyJqwHrrDGWTlg8hFL1URN2+EF0XFPkyYuSWwhUVgnT2CygXBG3dFcM7bz1/au1u7OK9/93eWidUlHe1dCc810EsUAsXOPQZCI3rGZ6Wb4EXAEM0SCUFnZduz6T/09l4bHXYOCz+f0+XxeWg+7XYM/4vnKtlqHJHSIOrAHlYMFYmawRNCKycaDGZLVfMRdf/nPDpfXM+abotDnpy93dtzXfNgdZg+im2uimJ6h66UTeIMZsrat1jvkdPRRb/imLt4hl6N3DfqFEIPvOMzDJYspJsWfbUKEyFNttcKoyzkKo4UgYoRRt3OE9guT1br984nsmQ7gCWbIipaj4xeu9v/hFQTPlG7B89+u9v9O+4UQQ8f/BSlaVM8kgBOhji4p9mpvwQ+Wfwddjp6bQw2u8g44HT3535/tTUa/0Eccvg4sFDE1m2PBZkx2LVRqVcLQvG/PDDX1/tVxze38x+UZH6O1He28b764qgwtxOcf327eBGLFE9NikiD3qzDZhVBJgCJH3KubDnkfbD4s5Jw74qM1bcvDnxq8/vHt1SrS9InIJ2m7OQ4UYsKhCB9lJqHj0gPsHJzPvsS9w8rRRPDptI40M8PlH9fOJ5M5K008rsZmIwi5gc4QN9Zja8zn+5epch9PTFepU1iGuVunVqeyS9g0iv8zy96l0WiSjIsXx28iJEJhaONkMGB5YP14bkmI1SzIz1T0pRa9VKnNzCjUMcwWUAS2BtgWYLJN+xTo1OyrOhW7xsAwqnSGkd3i+uGjkT5Xw6DLt3AdEKQNB4YXbdtwQpuVuRtG7pwhxWA7vJgRib0nDuSDvtkIkjYcHE3aVWjRLL9/zyyETPK2Vq3OidAaOhiPDLcbxo3MRIik0eReWPnO15pHHiqbpYhS6hkNw7wAz0To6GM5hAzH3wkDa6b7x4bEwnkUfMnP6idX7Nex7GxElIDNerV6hU6jSdbp9RHck2w0w/FaGGoJm7KtnCfmWNlF1fOrK3Q6bekMRFABO7QM8yxewFLUi+5JSxPpAmcxy0gjt1Rytir4NcHKCfJTH/al5j1j1hr0pWEML55YD+x2GP6cVqNZZjQYEvUsG4vP4v8jKju5L1p6qnytxGKa6qogyOorBpVbXvxMe69xdxABb9I0DAGvIIRWp7NsBsJIoWVZKfaXuf+jMKp2b6z8+Adb4aErNwpCCh5J2pnfoH0ga08g7invBfaQjXjjuQifhyEgLdNolJP5UqR17y+QnSwvk1i565OZK6F8RzubvWwvDH8LvKZnmHXY8HKws+sNLJtI5muJ/7hYElOzJ1V+fN9R7CVDClPJOVXuqo06vS4HQjTwgDKDZRXk/1JiD7wrieFLk6T1lczCXUVK7aPZinS9XrTw+Q+Tql7SUmvGuQAAAABJRU5ErkJggg==",defaultOffset:[-25.5,-32]};class FeatureFormat{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=Feature,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let i=t.dataProjection?get$3(t.dataProjection):this.readProjection(e);t.extent&&i&&i.getUnits()==="tile-pixels"&&(i=get$3(i),i.setWorldExtent(t.extent)),t={dataProjection:i,featureProjection:t.featureProjection}}return this.adaptOptions(t)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return abstract()}readFeature(e,t){return abstract()}readFeatures(e,t){return abstract()}readGeometry(e,t){return abstract()}readProjection(e){return abstract()}writeFeature(e,t){return abstract()}writeFeatures(e,t){return abstract()}writeGeometry(e,t){return abstract()}}function transformGeometryWithOptions(n,e,t){const i=t?get$3(t.featureProjection):null,r=t?get$3(t.dataProjection):null;let s=n;if(i&&r&&!equivalent(i,r)){e&&(s=n.clone());const o=e?i:r,a=e?r:i;o.getUnits()==="tile-pixels"?s.transform(o,a):s.applyTransform(getTransform(o,a))}if(e&&t&&t.decimals!==void 0){const o=Math.pow(10,t.decimals),a=function(d){for(let y=0,v=d.length;ycreateRenderFeature({...n,geometry:o})).flat();const i=t.type==="MultiPolygon"?"Polygon":t.type;if(i==="GeometryCollection"||i==="Circle")throw new Error("Unsupported geometry type: "+i);const r=t.layout.length;return transformGeometryWithOptions(new RenderFeature(i,i==="Polygon"?orientFlatCoordinates(t.flatCoordinates,t.ends,r):t.flatCoordinates,(s=t.ends)==null?void 0:s.flat(),r,n.properties||{},n.id).enableSimplifyTransformed(),!1,e)}function createGeometry(n,e){if(!n)return null;if(Array.isArray(n)){const i=n.map(r=>createGeometry(r,e));return new GeometryCollection(i)}const t=GeometryConstructor[n.type];return transformGeometryWithOptions(new t(n.flatCoordinates,n.layout,n.ends),!1,e)}const XML_SCHEMA_INSTANCE_URI="http://www.w3.org/2001/XMLSchema-instance";function createElementNS(n,e){return getDocument().createElementNS(n,e)}function getAllTextContent(n,e){return getAllTextContent_(n,e,[]).join("")}function getAllTextContent_(n,e,t){if(n.nodeType==Node.CDATA_SECTION_NODE||n.nodeType==Node.TEXT_NODE)t.push(n.nodeValue);else{let i;for(i=n.firstChild;i;i=i.nextSibling)getAllTextContent_(i,e,t)}return t}function isDocument(n){return"documentElement"in n}function parse$1(n){return new DOMParser().parseFromString(n,"application/xml")}function makeArrayExtender(n,e){return function(t,i){const r=n.call(e!==void 0?e:this,t,i);if(r!==void 0){const s=i[i.length-1];extend$4(s,r)}}}function makeArrayPusher(n,e){return function(t,i){const r=n.call(e!==void 0?e:this,t,i);r!==void 0&&i[i.length-1].push(r)}}function makeReplacer(n,e){return function(t,i){const r=n.call(this,t,i);r!==void 0&&(i[i.length-1]=r)}}function makeObjectPropertyPusher(n,e,t){return function(i,r){const s=n.call(this,i,r);if(s!==void 0){const o=r[r.length-1],a=i.localName;let d;a in o?d=o[a]:(d=[],o[a]=d),d.push(s)}}}function makeObjectPropertySetter(n,e,t){return function(i,r){const s=n.call(this,i,r);if(s!==void 0){const o=r[r.length-1],a=e!==void 0?e:i.localName;o[a]=s}}}function makeChildAppender(n,e){return function(t,i,r){n.call(this,t,i,r),r[r.length-1].node.appendChild(t)}}function makeArraySerializer(n,e){let t,i;return function(r,s,o){if(t===void 0){t={};const a={};a[r.localName]=n,t[r.namespaceURI]=a,i=makeSimpleNodeFactory(r.localName)}serialize(t,i,s,o)}}function makeSimpleNodeFactory(n,e){return function(t,i,r){const o=i[i.length-1].node;let a=n;a===void 0&&(a=r);const d=o.namespaceURI;return createElementNS(d,a)}}const OBJECT_PROPERTY_NODE_FACTORY=makeSimpleNodeFactory();function makeSequence(n,e){const t=e.length,i=new Array(t);for(let r=0;r0?i[0]:null}readFeatureFromNode(e,t){return null}readFeatures(e,t){if(!e)return[];if(typeof e=="string"){const i=parse$1(e);return this.readFeaturesFromDocument(i,t)}return isDocument(e)?this.readFeaturesFromDocument(e,t):this.readFeaturesFromNode(e,t)}readFeaturesFromDocument(e,t){const i=[];for(let r=e.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&extend$4(i,this.readFeaturesFromNode(r,t));return i}readFeaturesFromNode(e,t){return abstract()}readGeometry(e,t){if(!e)return null;if(typeof e=="string"){const i=parse$1(e);return this.readGeometryFromDocument(i,t)}return isDocument(e)?this.readGeometryFromDocument(e,t):this.readGeometryFromNode(e,t)}readGeometryFromDocument(e,t){return null}readGeometryFromNode(e,t){return null}readProjection(e){if(!e)return null;if(typeof e=="string"){const t=parse$1(e);return this.readProjectionFromDocument(t)}return isDocument(e)?this.readProjectionFromDocument(e):this.readProjectionFromNode(e)}readProjectionFromDocument(e){return this.dataProjection}readProjectionFromNode(e){return this.dataProjection}writeFeature(e,t){const i=this.writeFeatureNode(e,t);return this.xmlSerializer_.serializeToString(i)}writeFeatureNode(e,t){return null}writeFeatures(e,t){const i=this.writeFeaturesNode(e,t);return this.xmlSerializer_.serializeToString(i)}writeFeaturesNode(e,t){return null}writeGeometry(e,t){const i=this.writeGeometryNode(e,t);return this.xmlSerializer_.serializeToString(i)}writeGeometryNode(e,t){return null}}function readBoolean(n){const e=getAllTextContent(n,!1);return readBooleanString(e)}function readBooleanString(n){const e=/^\s*(true|1)|(false|0)\s*$/.exec(n);if(e)return e[1]!==void 0||!1}function readDateTime(n){const e=getAllTextContent(n,!1),t=Date.parse(e);return isNaN(t)?void 0:t/1e3}function readDecimal(n){const e=getAllTextContent(n,!1);return readDecimalString(e)}function readDecimalString(n){const e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n);if(e)return parseFloat(e[1])}function readPositiveInteger(n){const e=getAllTextContent(n,!1);return readNonNegativeIntegerString(e)}function readNonNegativeIntegerString(n){const e=/^\s*(\d+)\s*$/.exec(n);if(e)return parseInt(e[1],10)}function readString(n){return getAllTextContent(n,!1).trim()}function writeBooleanTextNode(n,e){writeStringTextNode(n,e?"1":"0")}function writeCDATASection(n,e){n.appendChild(getDocument().createCDATASection(e))}function writeDateTimeTextNode(n,e){const t=new Date(e*1e3),i=t.getUTCFullYear()+"-"+padNumber(t.getUTCMonth()+1,2)+"-"+padNumber(t.getUTCDate(),2)+"T"+padNumber(t.getUTCHours(),2)+":"+padNumber(t.getUTCMinutes(),2)+":"+padNumber(t.getUTCSeconds(),2)+"Z";n.appendChild(getDocument().createTextNode(i))}function writeDecimalTextNode(n,e){const t=e.toPrecision();n.appendChild(getDocument().createTextNode(t))}function writeNonNegativeIntegerTextNode(n,e){const t=e.toString();n.appendChild(getDocument().createTextNode(t))}function writeStringTextNode(n,e){n.appendChild(getDocument().createTextNode(e))}const GX_NAMESPACE_URIS=["http://www.google.com/kml/ext/2.2"],NAMESPACE_URIS$4=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],SCHEMA_LOCATION$1="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",ICON_ANCHOR_UNITS_MAP={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"},PLACEMARK_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{ExtendedData:extendedDataParser,Region:regionParser,MultiGeometry:makeObjectPropertySetter(readMultiGeometry,"geometry"),LineString:makeObjectPropertySetter(readLineString,"geometry"),LinearRing:makeObjectPropertySetter(readLinearRing,"geometry"),Point:makeObjectPropertySetter(readPoint,"geometry"),Polygon:makeObjectPropertySetter(readPolygon,"geometry"),Style:makeObjectPropertySetter(readStyle$2),StyleMap:placemarkStyleMapParser,address:makeObjectPropertySetter(readString),description:makeObjectPropertySetter(readString),name:makeObjectPropertySetter(readString),open:makeObjectPropertySetter(readBoolean),phoneNumber:makeObjectPropertySetter(readString),styleUrl:makeObjectPropertySetter(readStyleURL),visibility:makeObjectPropertySetter(readBoolean)},makeStructureNS(GX_NAMESPACE_URIS,{MultiTrack:makeObjectPropertySetter(readGxMultiTrack,"geometry"),Track:makeObjectPropertySetter(readGxTrack,"geometry")})),NETWORK_LINK_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{ExtendedData:extendedDataParser,Region:regionParser,Link:linkParser,address:makeObjectPropertySetter(readString),description:makeObjectPropertySetter(readString),name:makeObjectPropertySetter(readString),open:makeObjectPropertySetter(readBoolean),phoneNumber:makeObjectPropertySetter(readString),visibility:makeObjectPropertySetter(readBoolean)}),LINK_PARSERS$1=makeStructureNS(NAMESPACE_URIS$4,{href:makeObjectPropertySetter(readURI)}),CAMERA_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{Altitude:makeObjectPropertySetter(readDecimal),Longitude:makeObjectPropertySetter(readDecimal),Latitude:makeObjectPropertySetter(readDecimal),Tilt:makeObjectPropertySetter(readDecimal),AltitudeMode:makeObjectPropertySetter(readString),Heading:makeObjectPropertySetter(readDecimal),Roll:makeObjectPropertySetter(readDecimal)}),REGION_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{LatLonAltBox:latLonAltBoxParser,Lod:lodParser}),KML_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["Document","Placemark"]),KML_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{Document:makeChildAppender(writeDocument),Placemark:makeChildAppender(writePlacemark)});let DEFAULT_COLOR,DEFAULT_FILL_STYLE=null,DEFAULT_IMAGE_STYLE_ANCHOR,DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS,DEFAULT_IMAGE_STYLE_SIZE,DEFAULT_IMAGE_STYLE_SRC,DEFAULT_IMAGE_STYLE=null,DEFAULT_NO_IMAGE_STYLE,DEFAULT_STROKE_STYLE=null,DEFAULT_TEXT_STROKE_STYLE,DEFAULT_TEXT_STYLE=null,DEFAULT_STYLE=null,DEFAULT_STYLE_ARRAY=null;function scaleForSize(n){return 32/Math.min(n[0],n[1])}function createStyleDefaults(){DEFAULT_COLOR=[255,255,255,1],DEFAULT_FILL_STYLE=new Fill({color:DEFAULT_COLOR}),DEFAULT_IMAGE_STYLE_ANCHOR=[20,2],DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS="pixels",DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS="pixels",DEFAULT_IMAGE_STYLE_SIZE=[64,64],DEFAULT_IMAGE_STYLE_SRC="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",DEFAULT_IMAGE_STYLE=new Icon({anchor:DEFAULT_IMAGE_STYLE_ANCHOR,anchorOrigin:"bottom-left",anchorXUnits:DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,anchorYUnits:DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS,crossOrigin:"anonymous",rotation:0,scale:scaleForSize(DEFAULT_IMAGE_STYLE_SIZE),size:DEFAULT_IMAGE_STYLE_SIZE,src:DEFAULT_IMAGE_STYLE_SRC}),DEFAULT_NO_IMAGE_STYLE="NO_IMAGE",DEFAULT_STROKE_STYLE=new Stroke({color:DEFAULT_COLOR,width:1}),DEFAULT_TEXT_STROKE_STYLE=new Stroke({color:[51,51,51,1],width:2}),DEFAULT_TEXT_STYLE=new Text({font:"bold 16px Helvetica",fill:DEFAULT_FILL_STYLE,stroke:DEFAULT_TEXT_STROKE_STYLE,scale:.8}),DEFAULT_STYLE=new Style$1({fill:DEFAULT_FILL_STYLE,image:DEFAULT_IMAGE_STYLE,text:DEFAULT_TEXT_STYLE,stroke:DEFAULT_STROKE_STYLE,zIndex:0}),DEFAULT_STYLE_ARRAY=[DEFAULT_STYLE]}let TEXTAREA;function defaultIconUrlFunction(n){return n}let KML$1=class extends XMLFeature{constructor(e){super(),e=e||{},DEFAULT_STYLE_ARRAY||createStyleDefaults(),this.dataProjection=get$3("EPSG:4326"),this.defaultStyle_=e.defaultStyle?e.defaultStyle:DEFAULT_STYLE_ARRAY,this.extractStyles_=e.extractStyles!==void 0?e.extractStyles:!0,this.writeStyles_=e.writeStyles!==void 0?e.writeStyles:!0,this.sharedStyles_={},this.showPointNames_=e.showPointNames!==void 0?e.showPointNames:!0,this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:"anonymous",this.iconUrlFunction_=e.iconUrlFunction?e.iconUrlFunction:defaultIconUrlFunction,this.supportedMediaTypes=["application/vnd.google-earth.kml+xml"]}readDocumentOrFolder_(e,t){const i=makeStructureNS(NAMESPACE_URIS$4,{Document:makeArrayExtender(this.readDocumentOrFolder_,this),Folder:makeArrayExtender(this.readDocumentOrFolder_,this),Placemark:makeArrayPusher(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),r=pushParseAndPop([],i,e,t,this);if(r)return r}readPlacemark_(e,t){const i=pushParseAndPop({geometry:null},PLACEMARK_PARSERS,e,t,this);if(!i)return;const r=new Feature,s=e.getAttribute("id");s!==null&&r.setId(s);const o=t[0],a=i.geometry;if(a&&transformGeometryWithOptions(a,!1,o),r.setGeometry(a),delete i.geometry,this.extractStyles_){const d=i.Style,y=i.styleUrl,v=createFeatureStyleFunction(d,y,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);r.setStyle(v)}return delete i.Style,r.setProperties(i,!0),r}readSharedStyle_(e,t){const i=e.getAttribute("id");if(i!==null){const r=readStyle$2.call(this,e,t);if(r){let s,o=e.baseURI;(!o||o=="about:blank")&&(o=window.location.href),o?s=new URL("#"+i,o).href:s="#"+i,this.sharedStyles_[s]=r}}}readSharedStyleMap_(e,t){const i=e.getAttribute("id");if(i===null)return;const r=readStyleMapValue.call(this,e,t);if(!r)return;let s,o=e.baseURI;(!o||o=="about:blank")&&(o=window.location.href),o?s=new URL("#"+i,o).href:s="#"+i,this.sharedStyles_[s]=r}readFeatureFromNode(e,t){if(!NAMESPACE_URIS$4.includes(e.namespaceURI))return null;const i=this.readPlacemark_(e,[this.getReadOptions(e,t)]);return i||null}readFeaturesFromNode(e,t){if(!NAMESPACE_URIS$4.includes(e.namespaceURI))return[];let i;const r=e.localName;if(r=="Document"||r=="Folder")return i=this.readDocumentOrFolder_(e,[this.getReadOptions(e,t)]),i||[];if(r=="Placemark"){const s=this.readPlacemark_(e,[this.getReadOptions(e,t)]);return s?[s]:[]}if(r=="kml"){i=[];for(let s=e.firstElementChild;s;s=s.nextElementSibling){const o=this.readFeaturesFromNode(s,t);o&&extend$4(i,o)}return i}return[]}readName(e){if(e){if(typeof e=="string"){const t=parse$1(e);return this.readNameFromDocument(t)}return isDocument(e)?this.readNameFromDocument(e):this.readNameFromNode(e)}}readNameFromDocument(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE){const i=this.readNameFromNode(t);if(i)return i}}readNameFromNode(e){for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(NAMESPACE_URIS$4.includes(t.namespaceURI)&&t.localName=="name")return readString(t);for(let t=e.firstElementChild;t;t=t.nextElementSibling){const i=t.localName;if(NAMESPACE_URIS$4.includes(t.namespaceURI)&&(i=="Document"||i=="Folder"||i=="Placemark"||i=="kml")){const r=this.readNameFromNode(t);if(r)return r}}}readNetworkLinks(e){const t=[];if(typeof e=="string"){const i=parse$1(e);extend$4(t,this.readNetworkLinksFromDocument(i))}else isDocument(e)?extend$4(t,this.readNetworkLinksFromDocument(e)):extend$4(t,this.readNetworkLinksFromNode(e));return t}readNetworkLinksFromDocument(e){const t=[];for(let i=e.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&extend$4(t,this.readNetworkLinksFromNode(i));return t}readNetworkLinksFromNode(e){const t=[];for(let i=e.firstElementChild;i;i=i.nextElementSibling)if(NAMESPACE_URIS$4.includes(i.namespaceURI)&&i.localName=="NetworkLink"){const r=pushParseAndPop({},NETWORK_LINK_PARSERS,i,[]);t.push(r)}for(let i=e.firstElementChild;i;i=i.nextElementSibling){const r=i.localName;NAMESPACE_URIS$4.includes(i.namespaceURI)&&(r=="Document"||r=="Folder"||r=="kml")&&extend$4(t,this.readNetworkLinksFromNode(i))}return t}readRegion(e){const t=[];if(typeof e=="string"){const i=parse$1(e);extend$4(t,this.readRegionFromDocument(i))}else isDocument(e)?extend$4(t,this.readRegionFromDocument(e)):extend$4(t,this.readRegionFromNode(e));return t}readRegionFromDocument(e){const t=[];for(let i=e.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&extend$4(t,this.readRegionFromNode(i));return t}readRegionFromNode(e){const t=[];for(let i=e.firstElementChild;i;i=i.nextElementSibling)if(NAMESPACE_URIS$4.includes(i.namespaceURI)&&i.localName=="Region"){const r=pushParseAndPop({},REGION_PARSERS,i,[]);t.push(r)}for(let i=e.firstElementChild;i;i=i.nextElementSibling){const r=i.localName;NAMESPACE_URIS$4.includes(i.namespaceURI)&&(r=="Document"||r=="Folder"||r=="kml")&&extend$4(t,this.readRegionFromNode(i))}return t}readCamera(e){const t=[];if(typeof e=="string"){const i=parse$1(e);extend$4(t,this.readCameraFromDocument(i))}else isDocument(e)?extend$4(t,this.readCameraFromDocument(e)):extend$4(t,this.readCameraFromNode(e));return t}readCameraFromDocument(e){const t=[];for(let i=e.firstChild;i;i=i.nextSibling)i.nodeType===Node.ELEMENT_NODE&&extend$4(t,this.readCameraFromNode(i));return t}readCameraFromNode(e){const t=[];for(let i=e.firstElementChild;i;i=i.nextElementSibling)if(NAMESPACE_URIS$4.includes(i.namespaceURI)&&i.localName==="Camera"){const r=pushParseAndPop({},CAMERA_PARSERS,i,[]);t.push(r)}for(let i=e.firstElementChild;i;i=i.nextElementSibling){const r=i.localName;NAMESPACE_URIS$4.includes(i.namespaceURI)&&(r==="Document"||r==="Folder"||r==="Placemark"||r==="kml")&&extend$4(t,this.readCameraFromNode(i))}return t}writeFeaturesNode(e,t){t=this.adaptOptions(t);const i=createElementNS(NAMESPACE_URIS$4[4],"kml"),r="http://www.w3.org/2000/xmlns/";i.setAttributeNS(r,"xmlns:gx",GX_NAMESPACE_URIS[0]),i.setAttributeNS(r,"xmlns:xsi",XML_SCHEMA_INSTANCE_URI),i.setAttributeNS(XML_SCHEMA_INSTANCE_URI,"xsi:schemaLocation",SCHEMA_LOCATION$1);const s={node:i},o={};e.length>1?o.Document=e:e.length==1&&(o.Placemark=e[0]);const a=KML_SEQUENCE[i.namespaceURI],d=makeSequence(o,a);return pushSerializeAndPop(s,KML_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,d,[t],a,this),i}};function createNameStyleFunction(n,e){const t=[0,0];let i="start";const r=n.getImage();if(r){const a=r.getSize();if(a&&a.length==2){const d=r.getScaleArray(),y=r.getAnchor();t[0]=d[0]*(a[0]-y[0]),t[1]=d[1]*(a[1]/2-y[1]),i="left"}}let s=n.getText();return s?(s=s.clone(),s.setFont(s.getFont()||DEFAULT_TEXT_STYLE.getFont()),s.setScale(s.getScale()||DEFAULT_TEXT_STYLE.getScale()),s.setFill(s.getFill()||DEFAULT_TEXT_STYLE.getFill()),s.setStroke(s.getStroke()||DEFAULT_TEXT_STROKE_STYLE)):s=DEFAULT_TEXT_STYLE.clone(),s.setText(e),s.setOffsetX(t[0]),s.setOffsetY(t[1]),s.setTextAlign(i),new Style$1({image:r,text:s})}function createFeatureStyleFunction(n,e,t,i,r){return function(s,o){let a=r,d="",y=[];if(a){const _=s.getGeometry();if(_)if(_ instanceof GeometryCollection)y=_.getGeometriesArrayRecursive().filter(function(C){const E=C.getType();return E==="Point"||E==="MultiPoint"}),a=y.length>0;else{const C=_.getType();a=C==="Point"||C==="MultiPoint"}}a&&(d=s.get("name"),a=a&&!!d,a&&/&[^&]+;/.test(d)&&(TEXTAREA||(TEXTAREA=document.createElement("textarea")),TEXTAREA.innerHTML=d,d=TEXTAREA.value));let v=t;if(n?v=n:e&&(v=findStyle(e,t,i)),a){const _=createNameStyleFunction(v[0],d);if(y.length>0){_.setGeometry(new GeometryCollection(y));const C=new Style$1({geometry:v[0].getGeometry(),image:null,fill:v[0].getFill(),stroke:v[0].getStroke(),text:null});return[_,C].concat(v.slice(1))}return _}return v}}function findStyle(n,e,t){return Array.isArray(n)?n:typeof n=="string"?findStyle(t[n],e,t):e}function readColor(n){const e=getAllTextContent(n,!1),t=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(t){const i=t[1];return[parseInt(i.substr(6,2),16),parseInt(i.substr(4,2),16),parseInt(i.substr(2,2),16),parseInt(i.substr(0,2),16)/255]}}function readFlatCoordinates(n){let e=getAllTextContent(n,!1);const t=[];e=e.replace(/\s*,\s*/g,",");const i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;let r;for(;r=i.exec(e);){const s=parseFloat(r[1]),o=parseFloat(r[2]),a=r[3]?parseFloat(r[3]):0;t.push(s,o,a),e=e.substr(r[0].length)}if(e==="")return t}function readURI(n){const e=getAllTextContent(n,!1).trim();let t=n.baseURI;return(!t||t=="about:blank")&&(t=window.location.href),t?new URL(e,t).href:e}function readStyleURL(n){const e=getAllTextContent(n,!1).trim().replace(/^(?!.*#)/,"#");let t=n.baseURI;return(!t||t=="about:blank")&&(t=window.location.href),t?new URL(e,t).href:e}function readVec2(n){const e=n.getAttribute("xunits"),t=n.getAttribute("yunits");let i;return e!=="insetPixels"?t!=="insetPixels"?i="bottom-left":i="top-left":t!=="insetPixels"?i="bottom-right":i="top-right",{x:parseFloat(n.getAttribute("x")),xunits:ICON_ANCHOR_UNITS_MAP[e],y:parseFloat(n.getAttribute("y")),yunits:ICON_ANCHOR_UNITS_MAP[t],origin:i}}function readScale(n){return readDecimal(n)}const STYLE_MAP_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{Pair:pairDataParser});function readStyleMapValue(n,e){return pushParseAndPop(void 0,STYLE_MAP_PARSERS,n,e,this)}const ICON_STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{Icon:makeObjectPropertySetter(readIcon),color:makeObjectPropertySetter(readColor),heading:makeObjectPropertySetter(readDecimal),hotSpot:makeObjectPropertySetter(readVec2),scale:makeObjectPropertySetter(readScale)});function iconStyleParser(n,e){const t=pushParseAndPop({},ICON_STYLE_PARSERS,n,e);if(!t)return;const i=e[e.length-1],r="Icon"in t?t.Icon:{},s=!("Icon"in t)||Object.keys(r).length>0;let o;const a=r.href;a?o=a:s&&(o=DEFAULT_IMAGE_STYLE_SRC);let d,y,v,_="bottom-left";const C=t.hotSpot;C?(d=[C.x,C.y],y=C.xunits,v=C.yunits,_=C.origin):/^https?:\/\/maps\.(?:google|gstatic)\.com\//.test(o)&&(o.includes("pushpin")?(d=DEFAULT_IMAGE_STYLE_ANCHOR,y=DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,v=DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS):o.includes("arrow-reverse")?(d=[54,42],y=DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,v=DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS):o.includes("paddle")&&(d=[32,1],y=DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,v=DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS));let E;const S=r.x,b=r.y;S!==void 0&&b!==void 0&&(E=[S,b]);let P;const R=r.w,x=r.h;R!==void 0&&x!==void 0&&(P=[R,x]);let T;const L=t.heading;L!==void 0&&(T=toRadians(L));const k=t.scale,N=t.color;if(s){o==DEFAULT_IMAGE_STYLE_SRC&&(P=DEFAULT_IMAGE_STYLE_SIZE);const G=new Icon({anchor:d,anchorOrigin:_,anchorXUnits:y,anchorYUnits:v,crossOrigin:this.crossOrigin_,offset:E,offsetOrigin:"bottom-left",rotation:T,scale:k,size:P,src:this.iconUrlFunction_(o),color:N}),F=G.getScaleArray()[0],z=G.getSize();if(z===null){const B=G.getImageState();if(B===ImageState.IDLE||B===ImageState.LOADING){const D=function(){const U=G.getImageState();if(!(U===ImageState.IDLE||U===ImageState.LOADING)){const Y=G.getSize();if(Y&&Y.length==2){const $=scaleForSize(Y);G.setScale(F*$)}G.unlistenImageChange(D)}};G.listenImageChange(D),B===ImageState.IDLE&&G.load()}}else if(z.length==2){const B=scaleForSize(z);G.setScale(F*B)}i.imageStyle=G}else i.imageStyle=DEFAULT_NO_IMAGE_STYLE}const LABEL_STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeObjectPropertySetter(readColor),scale:makeObjectPropertySetter(readScale)});function labelStyleParser(n,e){const t=pushParseAndPop({},LABEL_STYLE_PARSERS,n,e);if(!t)return;const i=e[e.length-1],r=new Text({fill:new Fill({color:"color"in t?t.color:DEFAULT_COLOR}),scale:t.scale});i.textStyle=r}const LINE_STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeObjectPropertySetter(readColor),width:makeObjectPropertySetter(readDecimal)});function lineStyleParser(n,e){const t=pushParseAndPop({},LINE_STYLE_PARSERS,n,e);if(!t)return;const i=e[e.length-1],r=new Stroke({color:"color"in t?t.color:DEFAULT_COLOR,width:"width"in t?t.width:1});i.strokeStyle=r}const POLY_STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeObjectPropertySetter(readColor),fill:makeObjectPropertySetter(readBoolean),outline:makeObjectPropertySetter(readBoolean)});function polyStyleParser(n,e){const t=pushParseAndPop({},POLY_STYLE_PARSERS,n,e);if(!t)return;const i=e[e.length-1],r=new Fill({color:"color"in t?t.color:DEFAULT_COLOR});i.fillStyle=r;const s=t.fill;s!==void 0&&(i.fill=s);const o=t.outline;o!==void 0&&(i.outline=o)}const FLAT_LINEAR_RING_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{coordinates:makeReplacer(readFlatCoordinates)});function readFlatLinearRing(n,e){return pushParseAndPop(null,FLAT_LINEAR_RING_PARSERS,n,e)}function gxCoordParser(n,e){const i=e[e.length-1].coordinates,r=getAllTextContent(n,!1),o=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(r);if(o){const a=parseFloat(o[1]),d=parseFloat(o[2]),y=parseFloat(o[3]);i.push([a,d,y])}else i.push([])}const GX_MULTITRACK_GEOMETRY_PARSERS=makeStructureNS(GX_NAMESPACE_URIS,{Track:makeArrayPusher(readGxTrack)});function readGxMultiTrack(n,e){const t=pushParseAndPop([],GX_MULTITRACK_GEOMETRY_PARSERS,n,e);if(t)return new MultiLineString(t)}const GX_TRACK_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{when:whenParser},makeStructureNS(GX_NAMESPACE_URIS,{coord:gxCoordParser}));function readGxTrack(n,e){const t=pushParseAndPop({coordinates:[],whens:[]},GX_TRACK_PARSERS,n,e);if(!t)return;const i=[],r=t.coordinates,s=t.whens;for(let o=0,a=Math.min(r.length,s.length);o0&&e[e.length-1].push(...t)}const OUTER_BOUNDARY_IS_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{LinearRing:makeReplacer(readFlatLinearRing)});function outerBoundaryIsParser(n,e){const t=pushParseAndPop(void 0,OUTER_BOUNDARY_IS_PARSERS,n,e);if(t){const i=e[e.length-1];i[0]=t}}function linkParser(n,e){parseNode(LINK_PARSERS$1,n,e)}function whenParser(n,e){const i=e[e.length-1].whens,r=getAllTextContent(n,!1),s=Date.parse(r);i.push(isNaN(s)?0:s)}function writeColorTextNode(n,e){const t=asArray(e),r=[(t.length==4?t[3]:1)*255,t[2],t[1],t[0]];for(let s=0;s<4;++s){const o=Math.floor(r[s]).toString(16);r[s]=o.length==1?"0"+o:o}writeStringTextNode(n,r.join(""))}function writeCoordinatesTextNode(n,e,t){const i=t[t.length-1],r=i.layout,s=i.stride;let o;if(r=="XY"||r=="XYM")o=2;else if(r=="XYZ"||r=="XYZM")o=3;else throw new Error("Invalid geometry layout");const a=e.length;let d="";if(a>0){d+=e[0];for(let y=1;y0){const E=makeSequence(r,o);pushSerializeAndPop(i,PLACEMARK_SERIALIZERS,EXTENDEDDATA_NODE_FACTORY,[{names:o,values:E}],t)}const _=t[0];let C=e.getGeometry();C&&(C=transformGeometryWithOptions(C,!0,_)),pushSerializeAndPop(i,PLACEMARK_SERIALIZERS,GEOMETRY_NODE_FACTORY,[C],t)}const PRIMITIVE_GEOMETRY_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["extrude","tessellate","altitudeMode","coordinates"]),PRIMITIVE_GEOMETRY_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{extrude:makeChildAppender(writeBooleanTextNode),tessellate:makeChildAppender(writeBooleanTextNode),altitudeMode:makeChildAppender(writeStringTextNode),coordinates:makeChildAppender(writeCoordinatesTextNode)});function writePrimitiveGeometry(n,e,t){const i=e.getFlatCoordinates(),r={node:n};r.layout=e.getLayout(),r.stride=e.getStride();const s=e.getProperties();s.coordinates=i;const o=t[t.length-1].node,a=PRIMITIVE_GEOMETRY_SEQUENCE[o.namespaceURI],d=makeSequence(s,a);pushSerializeAndPop(r,PRIMITIVE_GEOMETRY_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,d,t,a)}const POLY_STYLE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["color","fill","outline"]),POLYGON_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{outerBoundaryIs:makeChildAppender(writeBoundaryIs),innerBoundaryIs:makeChildAppender(writeBoundaryIs)}),INNER_BOUNDARY_NODE_FACTORY=makeSimpleNodeFactory("innerBoundaryIs"),OUTER_BOUNDARY_NODE_FACTORY=makeSimpleNodeFactory("outerBoundaryIs");function writePolygon(n,e,t){const i=e.getLinearRings(),r=i.shift(),s={node:n};pushSerializeAndPop(s,POLYGON_SERIALIZERS,INNER_BOUNDARY_NODE_FACTORY,i,t),pushSerializeAndPop(s,POLYGON_SERIALIZERS,OUTER_BOUNDARY_NODE_FACTORY,[r],t)}const POLY_STYLE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeChildAppender(writeColorTextNode),fill:makeChildAppender(writeBooleanTextNode),outline:makeChildAppender(writeBooleanTextNode)});function writePolyStyle(n,e,t){const i={node:n},r=e.getFill(),s=e.getStroke(),o={color:r?r.getColor():void 0,fill:r?void 0:!1,outline:s?void 0:!1},a=t[t.length-1].node,d=POLY_STYLE_SEQUENCE[a.namespaceURI],y=makeSequence(o,d);pushSerializeAndPop(i,POLY_STYLE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,y,t,d)}function writeScaleTextNode(n,e){writeDecimalTextNode(n,Math.round(e*1e6)/1e6)}const STYLE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),STYLE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{IconStyle:makeChildAppender(writeIconStyle),LabelStyle:makeChildAppender(writeLabelStyle),LineStyle:makeChildAppender(writeLineStyle),PolyStyle:makeChildAppender(writePolyStyle)});function writeStyle(n,e,t){const i={node:n},r={};if(e.pointStyles.length){const d=e.pointStyles[0].getText();d&&(r.LabelStyle=d);const y=e.pointStyles[0].getImage();y&&typeof y.getSrc=="function"&&(r.IconStyle=y)}if(e.lineStyles.length){const d=e.lineStyles[0].getStroke();d&&(r.LineStyle=d)}if(e.polyStyles.length){const d=e.polyStyles[0].getStroke();d&&!r.LineStyle&&(r.LineStyle=d),r.PolyStyle=e.polyStyles[0]}const s=t[t.length-1].node,o=STYLE_SEQUENCE[s.namespaceURI],a=makeSequence(r,o);pushSerializeAndPop(i,STYLE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,a,t,o)}function writeVec2(n,e){n.setAttribute("x",String(e.x)),n.setAttribute("y",String(e.y)),n.setAttribute("xunits",e.xunits),n.setAttribute("yunits",e.yunits)}var ColorUtils={hex:function(n){if(n>255)throw new Error("'"+n+"'' is greater than 255(0xff);");var e=Number(n).toString(16);return("0"+e).slice(-2)},num:function(n){return parseInt(n,16)},arrayToRgba:function(n){if(!Array.isArray(n))throw new Error("Not an array !");var e=n[0],t=n[1],i=n[2],r=n[3]||1,s="rgba("+e+", "+t+", "+i+", "+parseFloat(r)+")";return s},arrayToHex:function(n){if(!Array.isArray(n))throw new Error("Not an array !");var e=n[0],t=n[1],i=n[2],r=n[3],s=[this.hex(e),this.hex(t),this.hex(i)],o={};return o.hex="#"+s.join(""),r&&(o.opacity=parseFloat(r)),o},rgbaToHex:function(n){var e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/,t=e.exec(n);if(!t)throw new Error("Invalid format: "+n);var i=t[1],r=t[2],s=t[3],o=t[4],a=[this.hex(i),this.hex(r),this.hex(s)],d={};return d.hex="#"+a.join(""),o&&(d.opacity=parseFloat(o)),d},hexToRgba:function(n,e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;if(!n)throw new Error("Invalid format");n=n.replace(t,function(s,o,a,d){return o+o+a+a+d+d});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);i=i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null;var r=i?"rgba("+i.r+", "+i.g+", "+i.b+", "+e+")":null;return r},isHex:function(n){if(!n||n.charAt(0)!=="#")return!1;var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,t=e.exec(n);return!!t},isRGB:function(n){if(!n)return!1;var e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/,t=e.exec(n);return!!t}},logger$z=LoggerByDefault.getLogger("styling");Feature.prototype.setPropertyFill=function(){var n=this.getStyle();if(n&&!(Array.isArray(n)&&n.length===0)){var e=n.getFill();if(e){var t=e.getColor();if(Array.isArray(t)){var i="rgba(";i+=t[0]+",",i+=t[1]+",",i+=t[2]+",",i+=t[3]+")",t=i}if(ColorUtils.isRGB(t)){var r=ColorUtils.rgbaToHex(t);this.set("fill",r.hex),this.set("fill-opacity",r.opacity)}else this.set("fill",t),this.set("fill-opacity",1)}}};Feature.prototype.setPropertyStroke=function(){var n=this.getStyle();if(n&&!(Array.isArray(n)&&n.length===0)){var e=n.getStroke();if(e){var t=e.getColor();if(Array.isArray(t)){var i="rgba(";i+=t[0]+",",i+=t[1]+",",i+=t[2]+",",i+=t[3]+")",t=i}if(ColorUtils.isRGB(t)){var r=ColorUtils.rgbaToHex(t);this.set("stroke",r.hex),this.set("stroke-opacity",r.opacity)}else this.set("stroke",t),this.set("stroke-opacity",1);this.set("stroke-width",e.getWidth())}}};Feature.prototype.setPropertyLabel=function(){var n=this.getStyle();if(n&&!(Array.isArray(n)&&n.length===0)){var e=this.get("name")!==void 0,t=n.getText();if(t&&e){var i=n.getText().getFill();if(i){var r=i.getColor();if(Array.isArray(r)){var s="rgba(";s+=r[0]+",",s+=r[1]+",",s+=r[2]+",",s+=r[3]+")",r=s}if(ColorUtils.isRGB(r)){var o=ColorUtils.rgbaToHex(r);this.set("label-fill",o.hex),this.set("label-fill-opacity",o.opacity)}else this.set("label-fill",r),this.set("label-fill-opacity",1)}var a=n.getText().getStroke();if(a){var d=a.getColor();if(Array.isArray(d)){var y="rgba(";y+=d[0]+",",y+=d[1]+",",y+=d[2]+",",y+=d[3]+")",d=y}if(ColorUtils.isRGB(d)){var v=ColorUtils.rgbaToHex(d);this.set("label-stroke",v.hex),this.set("label-stroke-opacity",v.opacity)}else this.set("label-stroke",d),this.set("label-stroke-opacity",1);this.set("label-stroke-width",a.getWidth())}this.set("label-font",n.getText().getFont()||Styling.DEFAULT_TEXT.font),this.set("label-textAlign",n.getText().getTextAlign()||Styling.DEFAULT_TEXT.textAlign)}}};Feature.prototype.setPropertyMarker=function(){var n=this.getStyle();if(n&&!(Array.isArray(n)&&n.length===0)){var e=n.getImage();if(e)if(e instanceof Icon){var t=e.getColor();if(Array.isArray(t)){var i="rgba(";i+=t[0]+",",i+=t[1]+",",i+=t[2]+",",i+=t[3]+")",t=i}if(t){var r=ColorUtils.rgbaToHex(t);this.set("marker-color",r.hex)}var s=e.getScale();switch(Math.round(s*2)/2){case 0:case .5:this.set("marker-size","small");break;case 1:this.set("marker-size","medium");break;case 1.5:case 2:this.set("marker-size","large");break}var o=e.getSrc();o&&this.set("marker-symbol",o),this.unset("circle-fill"),this.unset("circle-fill-opacity"),this.unset("circle-stroke"),this.unset("circle-stroke-width"),this.unset("circle-stroke-opacity"),this.unset("circle-radius")}else{var a=e.getFill();if(a){var d=a.getColor();if(Array.isArray(d)){var y="rgba(";y+=d[0]+",",y+=d[1]+",",y+=d[2]+",",y+=d[3]+")",d=y}if(ColorUtils.isRGB(d)){var v=ColorUtils.rgbaToHex(d);this.set("circle-fill",v.hex),this.set("circle-fill-opacity",v.opacity)}else this.set("circle-fill",d),this.set("circle-fill-opacity",1)}var _=e.getStroke();if(_){var C=_.getColor();if(Array.isArray(C)){var E="rgba(";E+=C[0]+",",E+=C[1]+",",E+=C[2]+",",E+=C[3]+")",C=E}if(ColorUtils.isRGB(C)){var S=ColorUtils.rgbaToHex(C);this.set("circle-stroke",S.hex),this.set("circle-stroke-opacity",S.opacity)}else this.set("circle-stroke",C),this.set("circle-stroke-opacity",1);this.set("circle-stroke-width",_.getWidth())}var b=e.getRadius();this.set("circle-radius",b)}}};var Styling={APPLY_CONVERT_GEOM_GPX:!0,DEFAULT_ICON:{src:Marker.lightOrange,anchor:[.5,1],scale:1},DEFAULT_CIRCLE:{radius:10,fill:{opacity:1,color:[0,0,0,1]},stroke:{width:1,opacity:1,color:[0,0,0,1]}},DEFAULT_STROKE:{width:5,opacity:1,color:[250,250,250,1]},DEFAULT_FILL:{opacity:1,color:[0,0,0,1]},DEFAULT_TEXT:{font:"16px sans",textAlign:"left",stroke:{color:[250,250,250,1],width:5,opactity:1},fill:{opacity:1,color:[0,0,0,1]}},getListTags:function(){return["type","fill","fill-opacity","stroke","stroke-opacity","stroke-width","circle-fill","circle-fill-opacity","circle-stroke","circle-stroke-opacity","circle-stroke-width","circle-radius","marker-symbol","marker-color","marker-size","label-fill","label-fill-opacity","label-stroke","label-stroke-width","label-stroke-opacity","label-font","label-textAlign"]},defineStyleFromProperties:function(n){var e=null,t={},i=null;if(n.get("marker-color")||n.get("marker-size")||n.get("marker-symbol")){i={},i.src=this.DEFAULT_ICON.src,i.anchor=this.DEFAULT_ICON.anchor;var r=n.get("marker-symbol");r&&r.search("data:image/png;base64")!==-1&&(i.src=r);var s=n.get("marker-color");ColorUtils.isHex(s)&&(i.color=ColorUtils.hexToRgba(s,1));var o=n.get("marker-size");if(o)switch(o){case"small":i.scale=.5;break;case"medium":i.scale=1;break;case"large":i.scale=1.5;break;default:i.scale=this.DEFAULT_ICON.scale;break}}var a=null;(n.get("stroke")||n.get("stroke-opacity")||n.get("stroke-width"))&&(a={},a.color=ColorUtils.hexToRgba(n.get("stroke"),+n.get("stroke-opacity")||this.DEFAULT_STROKE.opacity),a.width=+n.get("stroke-width")||this.DEFAULT_STROKE.width);var d=null;(n.get("fill")||n.get("fill-opacity"))&&(d={},d.color=ColorUtils.hexToRgba(n.get("fill"),+n.get("fill-opacity")||this.DEFAULT_FILL.opacity));var y=null,v=null,_=n.get("name")!=="";_&&((n.get("label-fill")||n.get("label-fill-opacity"))&&(v={},v.color=ColorUtils.hexToRgba(n.get("label-fill"),+n.get("label-fill-opacity")||this.DEFAULT_TEXT.fill.opacity)),(n.get("label-stroke")||n.get("label-stroke-opacity")||n.get("label-stroke-width"))&&(y={},y.color=ColorUtils.hexToRgba(n.get("label-stroke"),+n.get("label-stroke-opacity")||this.DEFAULT_TEXT.stroke.opacity),y.width=+n.get("label-stroke-width")||this.DEFAULT_TEXT.stroke.width));var C=n.get("circle-radius")||this.DEFAULT_CIRCLE.radius,E=null;(n.get("circle-stroke")||n.get("circle-stroke-opacity")||n.get("circle-stroke-width"))&&(E={},E.color=ColorUtils.hexToRgba(n.get("circle-stroke"),+n.get("circle-stroke-opacity")||this.DEFAULT_CIRCLE.stroke.opacity),E.width=+n.get("circle-stroke-width")||this.DEFAULT_CIRCLE.stroke.width);var S=null;(n.get("circle-fill")||n.get("circle-fill-opacity"))&&(S={},S.color=ColorUtils.hexToRgba(n.get("circle-fill"),+n.get("circle-fill-opacity")||this.DEFAULT_CIRCLE.fill.opacity));var b=n.getGeometry().getType();switch(b){case"Circle":case"Point":case"MultiPoint":var P=!1,R={};if(E&&(R.stroke=new Stroke(E)),S&&(R.fill=new Fill(S)),Object.keys(R).length!==0&&(P=!0,R.radius=+C,t.image=new CircleStyle(R)),i&&(t.image=new Icon(i)),_){var x={};if(y&&(x.stroke=new Stroke(y)),v&&(x.fill=new Fill(v)),Object.keys(x).length!==0)x.text=n.get("name"),x.textAlign=n.get("label-textAlign")||this.DEFAULT_TEXT.textAlign,x.font=n.get("label-font")||this.DEFAULT_TEXT.font,t.text=new Text(Object.assign({},this.DEFAULT_TEXT,x));else if(i||P){var T=new Text(Object.assign({},this.DEFAULT_TEXT,{fill:new Fill(this.DEFAULT_TEXT.fill),stroke:new Stroke(this.DEFAULT_TEXT.stroke)}));if(T){var L=T.clone();L.setText(n.get("name")),t.text=L}}}break;case"Polygon":case"MultiPolygon":a&&(t.stroke=new Stroke(a)),d&&(t.fill=new Fill(d));break;case"LineString":case"MultiLineString":if(a&&(t.stroke=new Stroke(a)),this.APPLY_CONVERT_GEOM_GPX&&d){var k=n.get("type");if(k&&(k==="Polygon"||k==="MultiPolygon")){t.fill=new Fill(d);var N=n.clone(),G=b==="LineString"?Polygon:MultiPolygon;n.setGeometry(new G([N.getGeometry().getCoordinates()]))}}break}return Object.keys(t).length!==0&&(e=new Style$1(t)),e},defineStyleFunctionByDefault:function(n){if(!n)return[];if(Object.keys(n).length===0)return[];var e=(t,i)=>{var r=null,s=t.getGeometry().getType();switch(s){case"Point":case"MultiPoint":var o={};if(n.getImage()&&(o.image=n.getImage()),n.getText()&&t.get("name")){var a=n.getText().clone();a.setText(t.get("name")),o.text=a}r=new Style$1(o);break;case"Circle":var d={},y={};if(n.getFill()&&(y.fill=n.getFill()),n.getStroke()&&(y.stroke=n.getStroke()),n.getText()&&t.get("name")){var v=n.getText().clone();v.setText(t.get("name")),d.text=v}Object.keys(y).length!==0&&(y.radius=3,d.image=new CircleStyle(y)),r=new Style$1(d);break;case"Polygon":case"MultiPolygon":var _={};n.getFill()&&(_.fill=n.getFill()),n.getStroke()&&(_.stroke=n.getStroke()),r=new Style$1(_);break;case"LineString":case"LinearRing":case"MultiLineString":var C={};n.getStroke()&&(C.stroke=n.getStroke()),r=new Style$1(C);break}return[r]};return e},definePropertiesFromStyleByType:function(n){var e=n.getGeometry().getType();switch(e){case"Point":case"MultiPoint":n.setPropertyMarker(),n.setPropertyLabel();break;case"LineString":case"MultiLineString":n.setPropertyStroke();break;case"Polygon":case"MultiPolygon":n.setPropertyStroke(),n.setPropertyFill();break}},definePropertiesFromStyle:function(n){var e=n.getStyle()||n.getStyleFunction();if(e){if(typeof e=="function"){var t=e.call(this,n,0);if(t&&t.length!==0)e=Array.isArray(t)?t[0]:t,n.setStyle(e);else return}this.definePropertiesFromStyleByType(n)}},defineTagFromStyle:function(n,e){return logger$z.trace("todo..."),null}},logger$y=LoggerByDefault.getLogger("parser"),Parser$1={parse:function(n){var e=null,t=null,i=typeof window<"u"?window:null;if(typeof exports=="object"&&window===null){var r=require("@xmldom/xmldom").DOMParser;t=new r,e=t.parseFromString(n,"text/xml")}else i.DOMParser?(t=new i.DOMParser,e=t.parseFromString(n,"text/xml")):i.ActiveXObject?(e=new i.ActiveXObject("Microsoft.XMLDOM"),e.async=!1,e.loadXML(n)):logger$y.log("Incompatible environment for DOM Parser !");var s=e.querySelector("parsererror");return s?(console.error(s),null):(logger$y.trace(e),e)},toString:function(n){var e=new XMLSerializer,t=e.serializeToString(n);return logger$y.trace(t),t},format:function(n){var e=/(>)\s*(<)(\/*)/g,t=/ *(.*) +\n/g,i=/(<.+>)(.+\n)/g;n=n.replace(e,`$1 +$2$3`).replace(t,`$1 +`).replace(i,`$1 +$2`);for(var r="",s=n.split(` +`),o=0,a="other",d={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},y=0;y/),C=!!v.match(/<\/.+>/),E=!!v.match(/<[^!].*>/),S=_?"single":C?"closing":E?"opening":"other",b=a+"->"+S;a=S;var P="";o+=d[b];for(var R=0;Rclosing"?r=r.substr(0,r.length-1)+v+` +`:r+=P+v+` +`}return logger$y.trace(r),r}},logger$x=LoggerByDefault.getLogger("extended KML format"),KML=class xn extends KML$1{constructor(e){if(super(e),!(this instanceof xn))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return e=e||{},this.source=null,this.extensions=e.extensions||null,e.defaultStyle&&!Array.isArray(e.defaultStyle)&&(e.defaultStyle=[e.defaultStyle]),(e.defaultStyle===null||typeof e.defaultStyle>"u")&&(e.defaultStyle=[]),this}_processKml(e,t,i){for(var r=e.nodeName==="#document"?e.childNodes[0].childNodes:e.childNodes,s=r,o=0;o{x.remove()})}};this._processKml(e,t,{labelStyle:s,iconStyle:o,iconLabelStyle:y,circleStyle:a,pointStyle:d,nameData:v,extendedData:_});var C=Parser$1.toString(e);return C||null}_writeRootExtensions(e,t){var i=document.createElementNS(e.namespaceURI,"ExtendedData");for(const a in t)if(Object.hasOwnProperty.call(t,a)){const d=t[a];var r=document.createElementNS(e.namespaceURI,"Data");r.setAttribute("name",a);var s=document.createTextNode(JSON.stringify(d));r.appendChild(s),i.appendChild(r)}var o=e.firstChild;e.insertBefore(i,o)}readFeatures(e,t){logger$x.log("overload : ol.format.KML.readFeatures"),typeof e=="string"?this.source=Parser$1.parse(e):e!==null&&(this.source=e);var i=this._readExtendStylesFeatures(e,t);return logger$x.trace("Styles étendus",i),i.forEach(r=>{Styling.definePropertiesFromStyle(r)}),i}_readExtendStylesFeatures(e,t){var i=super.readFeatures(e,t),r=null,s="";if(typeof e=="string"?s=e:s=e.documentElement.outerHTML,s=s.replace(/\n/g,""),s=s.replace(/(>)\s*(<)/g,"$1$2"),r=Parser$1.parse(s),r===null)return i;function o(C){var E="";E=E+C.substr(6,2),E=E+C.substr(4,2),E=E+C.substr(2,2);for(var S=parseInt(E,16).toString(16),b="",P=S.length||0,R=0;R<6-P;R++)b+="0";return S="#"+b+S,S}var a=function(C,E){if(logger$x.trace("label with style :",E),!!C){for(var S=C.getProperties().name,b=o("ff000000"),P="#FFFFFF",R=0,x="Sans",T="16px",L=null,k=5,N="#000000",G="#ffffff",F=1,z=!1,B=!1,D=E.childNodes,U=0;U"u")&&(this.options.defaultStyle={}),this.source=null,this}readFeatures(e,t){var i=super.readFeatures(e,t);typeof e=="string"?this.source=Parser$1.parse(e):e!==null&&(this.source=e);var r=this;return i.forEach(function(s,o,a){s.setId(o+1);var d=s.getProperties().desc;d&&s.setProperties({description:d});var y=s.getStyleFunction();if(!y){var v=Styling.defineStyleFunctionByDefault(r.options.defaultStyle);v&&s.setStyle(v)}}),i}writeFeatures(e,t){if(e.forEach(function(d,y,v){var _=d.getProperties().description;_&&d.setProperties({desc:_}),Styling.definePropertiesFromStyle(d);var C=d.getGeometry().getType();if(C==="Polygon"){var E=d.clone();E.set("type",C),E.setGeometry(new LineString(d.getGeometry().getCoordinates())),e.push(E),v.splice(y,1)}else if(C==="MultiPolygon"){var S=d.clone();S.set("type",C),S.setGeometry(new MultiLineString(d.getGeometry().getCoordinates())),e.push(S),v.splice(y,1)}}),this.options.orderBy!==void 0){var i=this.options.orderBy;if(i){var r=function(d,y){var v=d.get(i)||0,_=y.get(i)||0;return v.toString().localeCompare(_.toString(),void 0,{numeric:!0})};e.sort(r)}}var s=super.writeFeaturesNode(e,t);if(s===null)return null;this.options.hasOwnProperty("extensions")&&this.writeRootExtensions_(s,this.options.extensions),this.processExtensions_(s,e,{extensions:this.writeExtensions_});var o=Parser$1.toString(s);if(!o)return null;var a=Parser$1.format(o);return a===""?null:a}readExtensions(e,t){var i=t;if(!t){var r=e.getProperties();for(const d in r)if(Object.hasOwnProperty.call(r,d)){const y=r[d];if(y instanceof Node){i=y;break}}}if(!i){console.warn("node not found !");return}for(var s=0;s{if(e.get(r)){var s=document.createElementNS(t.parentNode.namespaceURI,r);s.innerHTML=e.get(r),i.appendChild(s)}}),t.appendChild(i)}processExtensions_(e,t,i){for(var r=-1,s=e.childNodes,o=0;o"u")&&(this.options.defaultStyle={}),this.source=null,this}readFeatures(e,t){var i=super.readFeatures(e,t);return typeof e=="string"?this.source=JSON.parse(e):e!==null&&(this.source=e),i.forEach(r=>{var s=r.getStyleFunction();if(s){var o=s.call(this,r,0);o&&o.length!==0&&r.setStyle(o[0])}else{var a=Styling.defineStyleFromProperties(r);if(a)r.setStyle(a);else{var d=Styling.defineStyleFunctionByDefault(this.options.defaultStyle);d&&(r.setStyle(d),Styling.definePropertiesFromStyle(r))}}}),i}writeFeatures(e,t){e.forEach(function(r){Styling.definePropertiesFromStyle(r)});var i=this.writeFeaturesObject(e,t);return this.options.hasOwnProperty("extensions")&&Object.assign(i,this.options.extensions),JSON.stringify(i)}readRootExtensions(e){return this.source[e]}};window.ol&&window.ol.format&&(window.ol.format.GeoJSONExtended=GeoJSON);var WMTS=class extends WMTS$1{constructor(e){super(e)}getFeatureInfoUrl(e,t,i,r){var s=this.options&&this.options.tilePixelRatio?this.options.tilePixelRatio:1,o=this.tileGrid,a=this.tileGrid.getTileCoordForCoordAndResolution(e,t),d=function(T,L,k){var N=[0,0,0],G=createEmpty(),F=T[1],z=T[2],B=L.getTileCoordExtent(T),D=k.getExtent();if(D!=null&&k.isGlobal()){var U=Math.ceil(getWidth(D)/getWidth(B));F=F%U,N[0]=T[0],N[1]=F,N[2]=T[2],B=L.getTileCoordExtent(N,G)}return intersects$1(B,D)?[T[0],F,z]:null},y=o.getTileCoordExtent(a),v=d(a,o,i);if(!(o.getResolutions().length<=a[0])){var _=o.getResolution(a[0]),C=o.getMatrixIds()[a[0]],E={SERVICE:"WMTS",VERSION:"1.0.0",REQUEST:"GetFeatureInfo",LAYER:this.getLayer(),TILECOL:v[1],TILEROW:v[2],TILEMATRIX:C,TILEMATRIXSET:this.getMatrixSet(),FORMAT:this.getFormat()||"image/png",STYLE:this.getStyle()||"normal"};Helper.assign(E,r);var S=Math.floor((e[0]-y[0])/(_/s)),b=Math.floor((y[3]-e[1])/(_/s)),P=o.getTileSize(a[0]);S=Math.min(S,(P[0]|P)-1),b=Math.max(b,0),E.I=S,E.J=b;var R=this.urls[0],x=Gp.Helper.normalyzeUrl(R,E);return x}}};window.ol&&window.ol.source&&(window.ol.source.WMTSExtended=WMTS);var LayerUtils={getZoomLevelFromScaleDenominator:function(n,e){var t={};switch(e){case"EPSG:2154":t={0:104579.224549894,1:52277.5323537905,2:26135.4870785954,3:13066.8913818,4:6533.2286041135,5:3266.5595244627,6:1633.2660045974,7:816.629554986,8:408.3139146768,9:204.1567415109,10:102.0783167832,11:51.0391448966,12:25.5195690743,13:12.7597836936,14:6.379891636,15:3.1899457653,16:1.5949728695,17:.7974864315,18:.3987432149,19:.1993716073,20:.0996858037,21:.0498429018};break;default:t={0:156543.033928041,1:78271.51696402048,2:39135.758482010235,3:19567.87924100512,4:9783.93962050256,5:4891.96981025128,6:2445.98490512564,7:1222.99245256282,8:611.49622628141,9:305.7481131407048,10:152.8740565703525,11:76.43702828517624,12:38.21851414258813,13:19.10925707129406,14:9.554628535647032,15:4.777314267823516,16:2.388657133911758,17:1.194328566955879,18:.5971642834779395,19:.2985821417389697,20:.1492910708694849,21:.0746455354347424};break}var i=n*28e-5;for(var r in t)if(t.hasOwnProperty(r)&&t[r]<=i)return r=parseInt(r,10),r;return 0},getAttributions:function(n){var e=n.zoom,t=[];if(n.originators!=null&&n.visibility)for(var i,r=0,s=n.originators.length;re&&(i=!1),i&&C&&C"u"&&(e.ssl=!0);var t=e.configuration,i=t?t.params:null,r=e.apiKey;if(!t){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var s=Config.configuration.getLayerId(e.layer,"WMTS");if(!s)throw new Error(`ERROR : WMTS Layer ID ${e.layer} cannot be found in Geoportal Configuration. Make sure that this resource is included in your contract key.`);if(t=Config.configuration.getLayerConf(s),!t)throw new Error("ERROR : WMTS Layer configuration cannot be found in Geoportal.");r=Config.configuration.getLayerKey(s)[0],i=Config.configuration.getLayerParams(e.layer,"WMTS")}var o=e.ssl===!1?"http://":"https://",a={"gp-ol-ext":Pkg$1.olExtVersion||Pkg$1.version};if(i.url.includes("/private/")){var d=e.apiKey||r;if(!d)throw new Error("ERROR : WMS Layer apiKey cannot be found in Geoportal Configuration.");a.apikey=d}var y={url:Gp.Helper.normalyzeUrl(i.url.replace(/(http|https):\/\//,o),a,!1),version:i.version,style:i.styles,format:i.format,projection:i.projection,maxZoom:LayerUtils.getZoomLevelFromScaleDenominator(i.minScale),layer:e.layer,matrixSet:i.TMSLink,tileGrid:new WMTSTileGrid({resolutions:i.nativeResolutions,matrixIds:i.matrixIds,origin:[Object.values(i.tileMatrices)[0].topLeftCorner.x,Object.values(i.tileMatrices)[0].topLeftCorner.y]})};return Helper.mergeParams(y,e.olParams),e.olParams&&!i.originators&&(i.originators=e.olParams.attributions),super(y),this._originators=i.originators,this._legends=e.legends||i.legends,this._metadata=e.metadata||i.metadata,this._description=e.description||i.description,this._title=e.title||i.title,this._quicklookUrl=e.quicklookUrl||i.quicklookUrl,this.name=e.layer,this.service="WMTS",this}};window.ol&&window.ol.source&&(window.ol.source.GeoportalWMTS=SourceWMTS);LoggerByDefault.getLogger("sourcewms");var SourceWMS=class extends TileWMS{constructor(e){if(!e.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof e.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof e.ssl>"u"&&(e.ssl=!0);var t=e.configuration,i=t?t.params:null,r=e.apiKey;if(!t){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var s=Config.configuration.getLayerId(e.layer,"WMS");if(!s)throw new Error(`ERROR : WMS Layer ID ${e.layer} cannot be found in Geoportal Configuration. Make sure that this resource is included in your contract key.`);if(t=Config.configuration.getLayerConf(s),!t)throw new Error("ERROR : WMS Layer configuration cannot be found in Geoportal.");r=Config.configuration.getLayerKey(s)[0],i=Config.configuration.getLayerParams(e.layer,"WMS")}var o=e.ssl===!1?"http://":"https://",a={"gp-ol-ext":Pkg$1.olExtVersion||Pkg$1.version};if(i.url.includes("/private/")){var d=e.apiKey||r;if(!d)throw new Error("ERROR : WMS Layer apiKey cannot be found in Geoportal Configuration.");a.apikey=d}var y={url:Gp.Helper.normalyzeUrl(i.url.replace(/(http|https):\/\//,o),a,!1),params:{SERVICE:"WMS",LAYERS:e.layer,VERSION:i.version,STYLES:i.styles,FORMAT:i.format}};return Helper.mergeParams(y,e.olParams),e.olParams&&!i.originators&&(i.originators=e.olParams.attributions),super(y),this._originators=i.originators,this._legends=e.legends||i.legends,this._metadata=e.metadata||i.metadata,this._title=e.title||i.title,this._description=e.description||i.description,this._quicklookUrl=e.quicklookUrl||i.quicklookUrl,this.name=e.layer,this.service="WMS",this}};window.ol&&window.ol.source&&(window.ol.source.GeoportalWMS=SourceWMS);const TileProperty={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class BaseTileLayer extends Layer$1{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getPreload(){return this.get(TileProperty.PRELOAD)}setPreload(e){this.set(TileProperty.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}class CanvasTileLayerRenderer extends CanvasLayerRenderer{constructor(e){super(e),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=createEmpty(),this.tmpTileRange_=new TileRange(0,0,0,0)}isDrawableTile(e){const t=this.getLayer(),i=e.getState(),r=t.getUseInterimTilesOnError();return i==TileState.LOADED||i==TileState.EMPTY||i==TileState.ERROR&&!r}getTile(e,t,i,r){const s=r.pixelRatio,o=r.viewState.projection,a=this.getLayer();let y=a.getSource().getTile(e,t,i,s,o);return y.getState()==TileState.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(y)||(y=y.getInterimTile()),y}getData(e){const t=this.frameState;if(!t)return null;const i=this.getLayer(),r=apply(t.pixelToCoordinateTransform,e.slice()),s=i.getExtent();if(s&&!containsCoordinate(s,r))return null;const o=t.pixelRatio,a=t.viewState.projection,d=t.viewState,y=i.getRenderSource(),v=y.getTileGridForProjection(d.projection),_=y.getTilePixelRatio(t.pixelRatio);for(let C=v.getZForResolution(d.resolution);C>=v.getMinZoom();--C){const E=v.getTileCoordForCoordAndZ(r,C),S=y.getTile(C,E[1],E[2],o,a);if(!(S instanceof ImageTile||S instanceof ReprojTile)||S instanceof ReprojTile&&S.getState()===TileState.EMPTY)return null;if(S.getState()!==TileState.LOADED)continue;const b=v.getOrigin(C),P=toSize(v.getTileSize(C)),R=v.getResolution(C),x=Math.floor(_*((r[0]-b[0])/R-E[1]*P[0])),T=Math.floor(_*((b[1]-r[1])/R-E[2]*P[1])),L=Math.round(_*y.getGutterForProjection(d.projection));return this.getImageData(S.getImage(),x+L,T+L)}return null}loadedTileCallback(e,t,i){return this.isDrawableTile(i)?super.loadedTileCallback(e,t,i):!1}prepareFrame(e){return!!this.getLayer().getSource()}renderFrame(e,t){const i=e.layerStatesArray[e.layerIndex],r=e.viewState,s=r.projection,o=r.resolution,a=r.center,d=r.rotation,y=e.pixelRatio,v=this.getLayer(),_=v.getSource(),C=_.getRevision(),E=_.getTileGridForProjection(s),S=E.getZForResolution(o,_.zDirection),b=E.getResolution(S);let P=e.extent;const R=e.viewState.resolution,x=_.getTilePixelRatio(y),T=Math.round(getWidth(P)/R*y),L=Math.round(getHeight(P)/R*y),k=i.extent&&fromUserExtent(i.extent);k&&(P=getIntersection(P,fromUserExtent(i.extent)));const N=b*T/2/x,G=b*L/2/x,F=[a[0]-N,a[1]-G,a[0]+N,a[1]+G],z=E.getTileRangeForExtentAndZ(P,S),B={};B[S]={};const D=this.createLoadedTileFinder(_,s,B),U=this.tmpExtent,Y=this.tmpTileRange_;this.newTiles_=!1;const $=d?getRotatedViewport(r.center,R,d,e.size):void 0;for(let ft=z.minX;ft<=z.maxX;++ft)for(let ct=z.minY;ct<=z.maxY;++ct){if(d&&!E.tileCoordIntersectsViewport([S,ft,ct],$))continue;const Qe=this.getTile(S,ft,ct,e);if(this.isDrawableTile(Qe)){const Ve=getUid(this);if(Qe.getState()==TileState.LOADED){B[S][Qe.tileCoord.toString()]=Qe;let Be=Qe.inTransition(Ve);Be&&i.opacity!==1&&(Qe.endTransition(Ve),Be=!1),!this.newTiles_&&(Be||!this.renderedTiles.includes(Qe))&&(this.newTiles_=!0)}if(Qe.getAlpha(Ve,e.time)===1)continue}const ut=E.getTileCoordChildTileRange(Qe.tileCoord,Y,U);let re=!1;ut&&(re=D(S+1,ut)),re||E.forEachTileCoordParentTileRange(Qe.tileCoord,D,Y,U)}const K=b/o*y/x;compose(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/y,1/y,d,-T/2,-L/2);const q=toString$3(this.pixelTransform);this.useContainer(t,q,this.getBackground(e));const te=this.context,Q=te.canvas;makeInverse(this.inversePixelTransform,this.pixelTransform),compose(this.tempTransform,T/2,L/2,K,K,0,-T/2,-L/2),Q.width!=T||Q.height!=L?(Q.width=T,Q.height=L):this.containerReused||te.clearRect(0,0,T,L),k&&this.clipUnrotated(te,e,k),_.getInterpolate()||(te.imageSmoothingEnabled=!1),this.preRender(te,e),this.renderedTiles.length=0;let je=Object.keys(B).map(Number);je.sort(ascending);let ie,it,le;i.opacity===1&&(!this.containerReused||_.getOpaque(e.viewState.projection))?je=je.reverse():(ie=[],it=[]);for(let ft=je.length-1;ft>=0;--ft){const ct=je[ft],Qe=_.getTilePixelSize(ct,y,s),re=E.getResolution(ct)/b,Ve=Qe[0]*re*K,Be=Qe[1]*re*K,oe=E.getTileCoordForCoordAndZ(getTopLeft(F),ct),pt=E.getTileCoordExtent(oe),Et=apply(this.tempTransform,[x*(pt[0]-F[0])/b,x*(F[3]-pt[3])/b]),H=x*_.getGutterForProjection(s),W=B[ct];for(const J in W){const se=W[J],de=se.tileCoord,pe=oe[1]-de[1],Ge=Math.round(Et[0]-(pe-1)*Ve),be=oe[2]-de[2],ye=Math.round(Et[1]-(be-1)*Be),fe=Math.round(Et[0]-pe*Ve),X=Math.round(Et[1]-be*Be),ee=Ge-fe,ne=ye-X,ue=S===ct,Oe=ue&&se.getAlpha(getUid(this),e.time)!==1;let ke=!1;if(!Oe)if(ie){le=[fe,X,fe+ee,X,fe+ee,X+ne,fe,X+ne];for(let Ze=0,mt=ie.length;Ze"u"&&(e.ssl=!0);var t=e.configuration;if(!t){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var i=Config.configuration.getLayerId(e.layer,"WMTS");if(t=Config.configuration.getLayerConf(i),!t)throw new Error("ERROR : Layer ID not found into the catalogue !?")}var r;e.olParams&&e.olParams.sourceParams&&(r=e.olParams.sourceParams);var s=new SourceWMTS({layer:e.layer,configuration:e.configuration,ssl:e.ssl,apiKey:e.apiKey,olParams:r}),o={source:s};if(s.getLayer()!==void 0&&t.globalConstraints&&t.globalConstraints.projection){var a;typeof t.globalConstraints.projection=="string"&&(a=get$3(t.globalConstraints.projection)),a&&a.getUnits()&&(a.getUnits()==="m"?(o.minResolution=(t.globalConstraints.minScale-1)*28e-5,o.maxResolution=(t.globalConstraints.maxScale+1)*28e-5):a.getUnits()==="degrees"&&(o.minResolution=(t.globalConstraints.minScale-1)*28e-5*180/(Math.PI*6378137),o.maxResolution=(t.globalConstraints.maxScale+1)*28e-5*180/(Math.PI*6378137)))}return Helper.mergeParams(o,e.olParams),super(o),this.name=e.layer,this.service="WMTS",this}};window.ol&&window.ol.layer&&(window.ol.layer.GeoportalWMTS=LayerWMTS);var LayerWMS=class extends TileLayer{constructor(e){if(!e.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof e.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof e.ssl>"u"&&(e.ssl=!0);var t=e.configuration;if(!t){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var i=Config.configuration.getLayerId(e.layer,"WMS");if(t=Config.configuration.getLayerConf(i),!t)throw new Error("ERROR : Layer ID not found into the catalogue !?")}var r;e.olParams&&e.olParams.sourceParams&&(r=e.olParams.sourceParams);var s=new SourceWMS({layer:e.layer,configuration:e.configuration,ssl:e.ssl,apiKey:e.apiKey,olParams:r}),o={source:s};if(s.getParams().LAYERS!==void 0&&r&&r.projection){var a=[t.globalConstraints.extent.left,t.globalConstraints.extent.bottom,t.globalConstraints.extent.right,t.globalConstraints.extent.top];o.extent=transformExtent(a,"EPSG:4326",r.projection);var d;typeof r.projection=="string"?d=get$3(r.projection):typeof r.projection=="object"&&r.projection.getCode()&&(d=get$3(r.projection.getCode())),d&&d.getUnits()&&(d.getUnits()==="m"?(o.minResolution=(t.globalConstraints.minScale-1)*28e-5,o.maxResolution=(t.globalConstraints.maxScale+1)*28e-5):d.getUnits()==="degrees"&&(o.minResolution=(t.globalConstraints.minScale-1)*28e-5*180/(Math.PI*6378137),o.maxResolution=(t.globalConstraints.maxScale+1)*28e-5*180/(Math.PI*6378137)))}return Helper.mergeParams(o,e.olParams),super(o),this.name=e.layer,this.service="WMS",this}};window.ol&&window.ol.layer&&(window.ol.layer.GeoportalWMS=LayerWMS);const IMAGE_REPLAYS={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},VECTOR_REPLAYS={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=create()}prepareTile(e,t,i){let r;const s=e.getState();return(s===TileState.LOADED||s===TileState.ERROR)&&(this.updateExecutorGroup_(e,t,i),this.tileImageNeedsRender_(e)&&(r=!0)),r}getTile(e,t,i,r){const s=r.pixelRatio,o=r.viewState,a=o.resolution,d=o.projection,y=this.getLayer(),v=y.getSource().getTile(e,t,i,s,d),_=r.viewHints,C=!(_[ViewHint.ANIMATING]||_[ViewHint.INTERACTING]);return(C||!v.wantedResolution)&&(v.wantedResolution=a),this.prepareTile(v,s,d)&&(C||Date.now()-r.time<8)&&y.getRenderMode()!=="vector"&&this.renderTileImage_(v,r),super.getTile(e,t,i,r)}isDrawableTile(e){const t=this.getLayer();return super.isDrawableTile(e)&&(t.getRenderMode()==="vector"?getUid(t)in e.executorGroups:e.hasContext(t))}getTileImage(e){return e.getImage(this.getLayer())}prepareFrame(e){const t=this.getLayer().getRevision();return this.renderedLayerRevision_!==t&&(this.renderedLayerRevision_=t,this.renderedTiles.length=0),super.prepareFrame(e)}updateExecutorGroup_(e,t,i){const r=this.getLayer(),s=r.getRevision(),o=r.getRenderOrder()||null,a=e.wantedResolution,d=e.getReplayState(r);if(!d.dirty&&d.renderedResolution===a&&d.renderedRevision==s&&d.renderedRenderOrder==o)return;const y=r.getSource(),v=r.getDeclutter(),_=y.getTileGrid(),E=y.getTileGridForProjection(i).getTileCoordExtent(e.wrappedTileCoord),S=y.getSourceTiles(t,i,e),b=getUid(r);delete e.hitDetectionImageData[b],e.executorGroups[b]=[],v&&(e.declutterExecutorGroups[b]=[]),d.dirty=!1;for(let P=0,R=S.length;P{const F=G===N?t.declutterTree.all().map(z=>z.value):null;for(let z=0,B=G.length;z{const r=this.getLayer(),s=getUid(r),o=r.getSource(),a=this.renderedProjection,d=a.getExtent(),y=this.renderedResolution,v=o.getTileGridForProjection(a),_=apply(this.renderedPixelToCoordinateTransform_,e.slice()),C=v.getTileCoordForCoordAndResolution(_,y);let E;for(let T=0,L=this.renderedTiles.length;T0){t([]);return}const S=v.getTileCoordExtent(E.wrappedTileCoord),b=getTopLeft(S),P=[(_[0]-b[0])/y,(b[1]-_[1])/y],R=E.getSourceTiles().reduce(function(T,L){return T.concat(L.getFeatures())},[]);let x=E.hitDetectionImageData[s];if(!x){const T=toSize(v.getTileSize(v.getZForResolution(y,o.zDirection))),L=this.renderedRotation_,k=[this.getRenderTransform(v.getTileCoordCenter(E.wrappedTileCoord),y,0,HIT_DETECT_RESOLUTION,T[0]*HIT_DETECT_RESOLUTION,T[1]*HIT_DETECT_RESOLUTION,0)];x=createHitDetectionImageData(T,k,R,r.getStyleFunction(),v.getTileCoordExtent(E.wrappedTileCoord),E.getReplayState(r).renderedResolution,L),E.hitDetectionImageData[s]=x}t(hitDetect(P,R,x))})}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.renderedLayerRevision_!==void 0&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}renderDeclutter(e){const t=this.context,i=t.globalAlpha;t.globalAlpha=this.getLayer().getOpacity();const r=e.viewHints,s=!(r[ViewHint.ANIMATING]||r[ViewHint.INTERACTING]),o=this.renderedTiles;for(let a=0,d=o.length;a=0;--_)v[_].execute(this.context,1,this.getTileRenderTransform(y,e),e.viewState.rotation,s,void 0,e.declutterTree)}t.globalAlpha=i}getTileRenderTransform(e,t){const i=t.pixelRatio,r=t.viewState,s=r.center,o=r.resolution,a=r.rotation,d=t.size,y=Math.round(d[0]*i),v=Math.round(d[1]*i),C=this.getLayer().getSource().getTileGridForProjection(t.viewState.projection),E=e.tileCoord,S=C.getTileCoordExtent(e.wrappedTileCoord),b=C.getTileCoordExtent(E,this.tmpExtent)[0]-S[0];return multiply(scale$3(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(s,o,a,i,y,v,b))}postRender(e,t){const i=t.viewHints,r=!(i[ViewHint.ANIMATING]||i[ViewHint.INTERACTING]);this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation;const s=this.getLayer(),o=s.getRenderMode(),a=e.globalAlpha;e.globalAlpha=s.getOpacity();const d=VECTOR_REPLAYS[o],y=t.viewState,v=y.rotation,_=s.getSource(),E=_.getTileGridForProjection(y.projection).getZForResolution(y.resolution,_.zDirection),S=this.renderedTiles,b=[],P=[];let R=!0;for(let x=S.length-1;x>=0;--x){const T=S[x];R=R&&!T.getReplayState(s).dirty;const L=T.executorGroups[getUid(s)].filter(z=>z.hasExecutors(d));if(L.length===0)continue;const k=this.getTileRenderTransform(T,t),N=T.tileCoord[0];let G=!1;const F=L[0].getClipCoords(k);if(F){for(let z=0,B=b.length;z=200&&t.status<300){let i;try{i=JSON.parse(t.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(i)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const t=get$3("EPSG:4326"),i=this.getProjection();let r;if(e.bounds!==void 0){const y=getTransformFromProjections(t,i);r=applyTransform(e.bounds,y)}const s=extentFromProjection(i),o=e.minzoom||0,a=e.maxzoom||22,d=createXYZ({extent:s,maxZoom:a,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=d,this.tileUrlFunction=createFromTemplates(e.tiles,d),e.attribution&&!this.getAttributions()){const y=r!==void 0?r:s;this.setAttributions(function(v){return intersects$1(y,v.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}}var ieee754$1={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754$1.read=function(n,e,t,i,r){var s,o,a=r*8-i-1,d=(1<>1,v=-7,_=t?r-1:0,C=t?-1:1,E=n[e+_];for(_+=C,s=E&(1<<-v)-1,E>>=-v,v+=a;v>0;s=s*256+n[e+_],_+=C,v-=8);for(o=s&(1<<-v)-1,s>>=-v,v+=i;v>0;o=o*256+n[e+_],_+=C,v-=8);if(s===0)s=1-y;else{if(s===d)return o?NaN:(E?-1:1)*(1/0);o=o+Math.pow(2,i),s=s-y}return(E?-1:1)*o*Math.pow(2,s-i)};ieee754$1.write=function(n,e,t,i,r,s){var o,a,d,y=s*8-r-1,v=(1<>1,C=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=i?0:s-1,S=i?1:-1,b=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=v):(o=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-o))<1&&(o--,d*=2),o+_>=1?e+=C/d:e+=C*Math.pow(2,1-_),e*d>=2&&(o++,d/=2),o+_>=v?(a=0,o=v):o+_>=1?(a=(e*d-1)*Math.pow(2,r),o=o+_):(a=e*Math.pow(2,_-1)*Math.pow(2,r),o=0));r>=8;n[t+E]=a&255,E+=S,a/=256,r-=8);for(o=o<0;n[t+E]=o&255,E+=S,o/=256,y-=8);n[t+E-S]|=b*128};var pbf=Pbf,ieee754=ieee754$1;function Pbf(n){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(n)?n:new Uint8Array(n||0),this.pos=0,this.type=0,this.length=this.buf.length}Pbf.Varint=0;Pbf.Fixed64=1;Pbf.Bytes=2;Pbf.Fixed32=5;var SHIFT_LEFT_32=65536*65536,SHIFT_RIGHT_32=1/SHIFT_LEFT_32,TEXT_DECODER_MIN_LENGTH=12,utf8TextDecoder=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Pbf.prototype={destroy:function(){this.buf=null},readFields:function(n,e,t){for(t=t||this.length;this.pos>3,s=this.pos;this.type=i&7,n(r,e,this),this.pos===s&&this.skip(i)}return e},readMessage:function(n,e){return this.readFields(n,e,this.readVarint()+this.pos)},readFixed32:function(){var n=readUInt32(this.buf,this.pos);return this.pos+=4,n},readSFixed32:function(){var n=readInt32(this.buf,this.pos);return this.pos+=4,n},readFixed64:function(){var n=readUInt32(this.buf,this.pos)+readUInt32(this.buf,this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,n},readSFixed64:function(){var n=readUInt32(this.buf,this.pos)+readInt32(this.buf,this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,n},readFloat:function(){var n=ieee754.read(this.buf,this.pos,!0,23,4);return this.pos+=4,n},readDouble:function(){var n=ieee754.read(this.buf,this.pos,!0,52,8);return this.pos+=8,n},readVarint:function(n){var e=this.buf,t,i;return i=e[this.pos++],t=i&127,i<128||(i=e[this.pos++],t|=(i&127)<<7,i<128)||(i=e[this.pos++],t|=(i&127)<<14,i<128)||(i=e[this.pos++],t|=(i&127)<<21,i<128)?t:(i=e[this.pos],t|=(i&15)<<28,readVarintRemainder(t,n,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var n=this.readVarint();return n%2===1?(n+1)/-2:n/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var n=this.readVarint()+this.pos,e=this.pos;return this.pos=n,n-e>=TEXT_DECODER_MIN_LENGTH&&utf8TextDecoder?readUtf8TextDecoder(this.buf,e,n):readUtf8(this.buf,e,n)},readBytes:function(){var n=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,n);return this.pos=n,e},readPackedVarint:function(n,e){if(this.type!==Pbf.Bytes)return n.push(this.readVarint(e));var t=readPackedEnd(this);for(n=n||[];this.pos127;);else if(e===Pbf.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Pbf.Fixed32)this.pos+=4;else if(e===Pbf.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(n,e){this.writeVarint(n<<3|e)},realloc:function(n){for(var e=this.length||16;e268435455||n<0){writeBigVarint(n,this);return}this.realloc(4),this.buf[this.pos++]=n&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=n>>>7&127)))},writeSVarint:function(n){this.writeVarint(n<0?-n*2-1:n*2)},writeBoolean:function(n){this.writeVarint(!!n)},writeString:function(n){n=String(n),this.realloc(n.length*4),this.pos++;var e=this.pos;this.pos=writeUtf8(this.buf,n,this.pos);var t=this.pos-e;t>=128&&makeRoomForExtraLength(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(n){this.realloc(4),ieee754.write(this.buf,n,this.pos,!0,23,4),this.pos+=4},writeDouble:function(n){this.realloc(8),ieee754.write(this.buf,n,this.pos,!0,52,8),this.pos+=8},writeBytes:function(n){var e=n.length;this.writeVarint(e),this.realloc(e);for(var t=0;t=128&&makeRoomForExtraLength(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeMessage:function(n,e,t){this.writeTag(n,Pbf.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(n,e){e.length&&this.writeMessage(n,writePackedVarint,e)},writePackedSVarint:function(n,e){e.length&&this.writeMessage(n,writePackedSVarint,e)},writePackedBoolean:function(n,e){e.length&&this.writeMessage(n,writePackedBoolean,e)},writePackedFloat:function(n,e){e.length&&this.writeMessage(n,writePackedFloat,e)},writePackedDouble:function(n,e){e.length&&this.writeMessage(n,writePackedDouble,e)},writePackedFixed32:function(n,e){e.length&&this.writeMessage(n,writePackedFixed32,e)},writePackedSFixed32:function(n,e){e.length&&this.writeMessage(n,writePackedSFixed32,e)},writePackedFixed64:function(n,e){e.length&&this.writeMessage(n,writePackedFixed64,e)},writePackedSFixed64:function(n,e){e.length&&this.writeMessage(n,writePackedSFixed64,e)},writeBytesField:function(n,e){this.writeTag(n,Pbf.Bytes),this.writeBytes(e)},writeFixed32Field:function(n,e){this.writeTag(n,Pbf.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(n,e){this.writeTag(n,Pbf.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(n,e){this.writeTag(n,Pbf.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(n,e){this.writeTag(n,Pbf.Fixed64),this.writeSFixed64(e)},writeVarintField:function(n,e){this.writeTag(n,Pbf.Varint),this.writeVarint(e)},writeSVarintField:function(n,e){this.writeTag(n,Pbf.Varint),this.writeSVarint(e)},writeStringField:function(n,e){this.writeTag(n,Pbf.Bytes),this.writeString(e)},writeFloatField:function(n,e){this.writeTag(n,Pbf.Fixed32),this.writeFloat(e)},writeDoubleField:function(n,e){this.writeTag(n,Pbf.Fixed64),this.writeDouble(e)},writeBooleanField:function(n,e){this.writeVarintField(n,!!e)}};function readVarintRemainder(n,e,t){var i=t.buf,r,s;if(s=i[t.pos++],r=(s&112)>>4,s<128||(s=i[t.pos++],r|=(s&127)<<3,s<128)||(s=i[t.pos++],r|=(s&127)<<10,s<128)||(s=i[t.pos++],r|=(s&127)<<17,s<128)||(s=i[t.pos++],r|=(s&127)<<24,s<128)||(s=i[t.pos++],r|=(s&1)<<31,s<128))return toNum(n,r,e);throw new Error("Expected varint not more than 10 bytes")}function readPackedEnd(n){return n.type===Pbf.Bytes?n.readVarint()+n.pos:n.pos+1}function toNum(n,e,t){return t?e*4294967296+(n>>>0):(e>>>0)*4294967296+(n>>>0)}function writeBigVarint(n,e){var t,i;if(n>=0?(t=n%4294967296|0,i=n/4294967296|0):(t=~(-n%4294967296),i=~(-n/4294967296),t^4294967295?t=t+1|0:(t=0,i=i+1|0)),n>=18446744073709552e3||n<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),writeBigVarintLow(t,i,e),writeBigVarintHigh(i,e)}function writeBigVarintLow(n,e,t){t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos]=n&127}function writeBigVarintHigh(n,e){var t=(n&7)<<4;e.buf[e.pos++]|=t|((n>>>=3)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127)))))}function makeRoomForExtraLength(n,e,t){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(i);for(var r=t.pos-1;r>=n;r--)t.buf[r+i]=t.buf[r]}function writePackedVarint(n,e){for(var t=0;t>>8,n[t+2]=e>>>16,n[t+3]=e>>>24}function readInt32(n,e){return(n[e]|n[e+1]<<8|n[e+2]<<16)+(n[e+3]<<24)}function readUtf8(n,e,t){for(var i="",r=e;r239?4:s>223?3:s>191?2:1;if(r+a>t)break;var d,y,v;a===1?s<128&&(o=s):a===2?(d=n[r+1],(d&192)===128&&(o=(s&31)<<6|d&63,o<=127&&(o=null))):a===3?(d=n[r+1],y=n[r+2],(d&192)===128&&(y&192)===128&&(o=(s&15)<<12|(d&63)<<6|y&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):a===4&&(d=n[r+1],y=n[r+2],v=n[r+3],(d&192)===128&&(y&192)===128&&(v&192)===128&&(o=(s&15)<<18|(d&63)<<12|(y&63)<<6|v&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,a=1):o>65535&&(o-=65536,i+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),i+=String.fromCharCode(o),r+=a}return i}function readUtf8TextDecoder(n,e,t){return utf8TextDecoder.decode(n.subarray(e,t))}function writeUtf8(n,e,t){for(var i=0,r,s;i55295&&r<57344)if(s)if(r<56320){n[t++]=239,n[t++]=191,n[t++]=189,s=r;continue}else r=s-55296<<10|r-56320|65536,s=null;else{r>56319||i+1===e.length?(n[t++]=239,n[t++]=191,n[t++]=189):s=r;continue}else s&&(n[t++]=239,n[t++]=191,n[t++]=189,s=null);r<128?n[t++]=r:(r<2048?n[t++]=r>>6|192:(r<65536?n[t++]=r>>12|224:(n[t++]=r>>18|240,n[t++]=r>>12&63|128),n[t++]=r>>6&63|128),n[t++]=r&63|128)}return t}const PBF=getDefaultExportFromCjs$1(pbf);class MVT extends FeatureFormat{constructor(e){super(),e=e||{},this.dataProjection=new Projection$1({code:"",units:"tile-pixels"}),this.featureClass_=e.featureClass?e.featureClass:RenderFeature,this.geometryName_=e.geometryName,this.layerName_=e.layerName?e.layerName:"layer",this.layers_=e.layers?e.layers:null,this.idProperty_=e.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(e,t,i,r){e.pos=t.geometry;const s=e.readVarint()+e.pos;let o=1,a=0,d=0,y=0,v=0,_=0;for(;e.pos>3}if(a--,o===1||o===2)d+=e.readSVarint(),y+=e.readSVarint(),o===1&&v>_&&(r.push(v),_=v),i.push(d,y),v+=2;else if(o===7)v>_&&(i.push(i[_],i[_+1]),v+=2);else throw new Error("Invalid command found in the PBF")}v>_&&(r.push(v),_=v)}createFeature_(e,t,i){const r=t.type;if(r===0)return null;let s;const o=t.properties;let a;this.idProperty_?(a=o[this.idProperty_],delete o[this.idProperty_]):a=t.id,o[this.layerName_]=t.layer.name;const d=[],y=[];this.readRawGeometry_(e,t,d,y);const v=getGeometryType(r,y.length);if(this.featureClass_===RenderFeature)s=new this.featureClass_(v,d,y,2,o,a),s.transform(i.dataProjection);else{let _;if(v=="Polygon"){const S=inflateEnds(d,y);_=S.length>1?new MultiPolygon(d,"XY",S):new Polygon(d,"XY",y)}else _=v==="Point"?new Point$1(d,"XY"):v==="LineString"?new LineString(d,"XY"):v==="MultiPoint"?new MultiPoint(d,"XY"):v==="MultiLineString"?new MultiLineString(d,"XY",y):null;const C=this.featureClass_;s=new C,this.geometryName_&&s.setGeometryName(this.geometryName_);const E=transformGeometryWithOptions(_,!1,i);s.setGeometry(E),a!==void 0&&s.setId(a),s.setProperties(o,!0)}return s}getType(){return"arraybuffer"}readFeatures(e,t){const i=this.layers_;t=this.adaptOptions(t);const r=get$3(t.dataProjection);r.setWorldExtent(t.extent),t.dataProjection=r;const s=new PBF(e),o=s.readFields(layersPBFReader,{}),a=[];for(const d in o){if(i&&!i.includes(d))continue;const y=o[d],v=y?[0,0,y.extent,y.extent]:null;r.setExtent(v);for(let _=0,C=y.length;_>3,i=n===1?t.readString():n===2?t.readFloat():n===3?t.readDouble():n===4?t.readVarint64():n===5?t.readVarint():n===6?t.readSVarint():n===7?t.readBoolean():null;e.values.push(i)}}function featurePBFReader(n,e,t){if(n==1)e.id=t.readVarint();else if(n==2){const i=t.readVarint()+t.pos;for(;t.pos255?255:n}function clamp_css_float(n){return n<0?0:n>1?1:n}function parse_css_int(n){return n[n.length-1]==="%"?clamp_css_byte(parseFloat(n)/100*255):clamp_css_byte(parseInt(n))}function parse_css_float(n){return n[n.length-1]==="%"?clamp_css_float(parseFloat(n)/100):clamp_css_float(parseFloat(n))}function css_hue_to_rgb(n,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?n+(e-n)*t*6:t*2<1?e:t*3<2?n+(e-n)*(2/3-t)*6:n}function parseCSSColor(n){var e=n.replace(/ /g,"").toLowerCase();if(e in kCSSColorTable)return kCSSColorTable[e].slice();if(e[0]==="#"){if(e.length===4){var t=parseInt(e.substr(1),16);return t>=0&&t<=4095?[(t&3840)>>4|(t&3840)>>8,t&240|(t&240)>>4,t&15|(t&15)<<4,1]:null}else if(e.length===7){var t=parseInt(e.substr(1),16);return t>=0&&t<=16777215?[(t&16711680)>>16,(t&65280)>>8,t&255,1]:null}return null}var i=e.indexOf("("),r=e.indexOf(")");if(i!==-1&&r+1===e.length){var s=e.substr(0,i),o=e.substr(i+1,r-(i+1)).split(","),a=1;switch(s){case"rgba":if(o.length!==4)return null;a=parse_css_float(o.pop());case"rgb":return o.length!==3?null:[parse_css_int(o[0]),parse_css_int(o[1]),parse_css_int(o[2]),a];case"hsla":if(o.length!==4)return null;a=parse_css_float(o.pop());case"hsl":if(o.length!==3)return null;var d=(parseFloat(o[0])%360+360)%360/360,y=parse_css_float(o[1]),v=parse_css_float(o[2]),_=v<=.5?v*(y+1):v+y-v*y,C=v*2-_;return[clamp_css_byte(css_hue_to_rgb(C,_,d+1/3)*255),clamp_css_byte(css_hue_to_rgb(C,_,d)*255),clamp_css_byte(css_hue_to_rgb(C,_,d-1/3)*255),a];default:return null}}return null}try{parseCSSColor_1=csscolorparser.parseCSSColor=parseCSSColor}catch{}class Color{constructor(e,t,i,r=1){this.r=e,this.g=t,this.b=i,this.a=r}static parse(e){if(!e)return;if(e instanceof Color)return e;if(typeof e!="string")return;const t=parseCSSColor_1(e);if(t)return new Color(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}toString(){const[e,t,i,r]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(i)},${r})`}toArray(){const{r:e,g:t,b:i,a:r}=this;return r===0?[0,0,0,0]:[e*255/r,t*255/r,i*255/r,r]}toArray01(){const{r:e,g:t,b:i,a:r}=this;return r===0?[0,0,0,0]:[e/r,t/r,i/r,r]}toArray01PremultipliedAlpha(){const{r:e,g:t,b:i,a:r}=this;return[e,t,i,r]}}Color.black=new Color(0,0,0,1);Color.white=new Color(1,1,1,1);Color.transparent=new Color(0,0,0,0);Color.red=new Color(1,0,0,1);Color.blue=new Color(0,0,1,1);var Color$1=Color;function convertLiteral(n){return typeof n=="object"?["literal",n]:n}function convertFunction(n,e){let t=n.stops;if(!t)return convertIdentityFunction(n,e);const i=t&&typeof t[0][0]=="object",r=i||n.property!==void 0,s=i||!r;return t=t.map(o=>!r&&e.tokens&&typeof o[1]=="string"?[o[0],convertTokenString(o[1])]:[o[0],convertLiteral(o[1])]),i?convertZoomAndPropertyFunction(n,e,t):s?convertZoomFunction(n,e,t):convertPropertyFunction(n,e,t)}function convertIdentityFunction(n,e){const t=["get",n.property];if(n.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,n.default];{const i=[e.type==="color"?"to-color":e.type,t,convertLiteral(n.default)];return e.type==="array"&&i.splice(1,0,e.value,e.length||null),i}}function getInterpolateOperator(n){switch(n.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function convertZoomAndPropertyFunction(n,e,t){const i={},r={},s=[];for(let a=0;a3&&e===n[n.length-2]||(i&&n.length===2||n.push(e),n.push(t))}function getFunctionType(n,e){return n.type?n.type:e.expression.interpolated?"exponential":"interval"}function convertTokenString(n){const e=["concat"],t=/{([^{}]+)}/g;let i=0;for(let r=t.exec(n);r!==null;r=t.exec(n)){const s=n.slice(i,t.lastIndex-r[0].length);i=t.lastIndex,s.length>0&&e.push(s),e.push(["get",r[1]])}if(e.length===1)return n;if(i`:n.itemType.kind==="value"?"array":`array<${e}>`}else return n.kind}const valueMemberTypes=[NullType,NumberType,StringType,BooleanType,ColorType,FormattedType,ObjectType,array$1(ValueType),ResolvedImageType];function checkSubtype(n,e){if(e.kind==="error")return null;if(n.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!checkSubtype(n.itemType,e.itemType))&&(typeof n.N!="number"||n.N===e.N))return null}else{if(n.kind===e.kind)return null;if(n.kind==="value"){for(const t of valueMemberTypes)if(!checkSubtype(t,e))return null}}return`Expected ${toString$1(n)} but found ${toString$1(e)} instead.`}function isValidType(n,e){return e.some(t=>t.kind===n.kind)}function isValidNativeType(n,e){return e.some(t=>t==="null"?n===null:t==="array"?Array.isArray(n):t==="object"?n&&!Array.isArray(n)&&typeof n=="object":t===typeof n)}class Collator{constructor(e,t,i){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class FormattedSection{constructor(e,t,i,r,s){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=i,this.fontStack=r,this.textColor=s}}class Formatted{constructor(e){this.sections=e}static fromString(e){return new Formatted([new FormattedSection(e,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof Formatted?e:Formatted.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const i={};t.fontStack&&(i["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(i["font-scale"]=t.scale),t.textColor&&(i["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(i)}return e}}class ResolvedImage{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new ResolvedImage({name:e,available:!1}):null}serialize(){return["image",this.name]}}function validateRGBA(n,e,t,i){return typeof n=="number"&&n>=0&&n<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255?typeof i>"u"||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[n,e,t,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[n,e,t,i]:[n,e,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function isValue(n){if(n===null)return!0;if(typeof n=="string")return!0;if(typeof n=="boolean")return!0;if(typeof n=="number")return!0;if(n instanceof Color$1)return!0;if(n instanceof Collator)return!0;if(n instanceof Formatted)return!0;if(n instanceof ResolvedImage)return!0;if(Array.isArray(n)){for(const e of n)if(!isValue(e))return!1;return!0}else if(typeof n=="object"){for(const e in n)if(!isValue(n[e]))return!1;return!0}else return!1}function typeOf(n){if(n===null)return NullType;if(typeof n=="string")return StringType;if(typeof n=="boolean")return BooleanType;if(typeof n=="number")return NumberType;if(n instanceof Color$1)return ColorType;if(n instanceof Collator)return CollatorType;if(n instanceof Formatted)return FormattedType;if(n instanceof ResolvedImage)return ResolvedImageType;if(Array.isArray(n)){const e=n.length;let t;for(const i of n){const r=typeOf(i);if(!t)t=r;else{if(t===r)continue;t=ValueType;break}}return array$1(t||ValueType,e)}else return ObjectType}function toString(n){const e=typeof n;return n===null?"":e==="string"||e==="number"||e==="boolean"?String(n):n instanceof Color$1||n instanceof Formatted||n instanceof ResolvedImage?n.toString():JSON.stringify(n)}class Literal{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(e.length!==2)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!isValue(e[1]))return t.error("invalid value");const i=e[1];let r=typeOf(i);const s=t.expectedType;return r.kind==="array"&&r.N===0&&s&&s.kind==="array"&&(typeof s.N!="number"||s.N===0)&&(r=s),new Literal(r,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Color$1?["rgba"].concat(this.value.toArray()):this.value instanceof Formatted?this.value.serialize():this.value}}var Literal$1=Literal;class RuntimeError{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}var RuntimeError$1=RuntimeError;const types$2={string:StringType,number:NumberType,boolean:BooleanType,object:ObjectType};class Assertion{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let i=1,r;const s=e[0];if(s==="array"){let a;if(e.length>2){const y=e[1];if(typeof y!="string"||!(y in types$2)||y==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=types$2[y],i++}else a=ValueType;let d;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);d=e[2],i++}r=array$1(a,d)}else r=types$2[s];const o=[];for(;ie.outputDefined())}serialize(){const e=this.type,t=[e.kind];if(e.kind==="array"){const i=e.itemType;if(i.kind==="string"||i.kind==="number"||i.kind==="boolean"){t.push(i.kind);const r=e.N;(typeof r=="number"||this.args.length>1)&&t.push(r)}}return t.concat(this.args.map(i=>i.serialize()))}}var Assertion$1=Assertion;class FormatExpression{constructor(e){this.type=FormattedType,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const i=e[1];if(!Array.isArray(i)&&typeof i=="object")return t.error("First argument must be an image or text section.");const r=[];let s=!1;for(let o=1;o<=e.length-1;++o){const a=e[o];if(s&&typeof a=="object"&&!Array.isArray(a)){s=!1;let d=null;if(a["font-scale"]&&(d=t.parse(a["font-scale"],1,NumberType),!d))return null;let y=null;if(a["text-font"]&&(y=t.parse(a["text-font"],1,array$1(StringType)),!y))return null;let v=null;if(a["text-color"]&&(v=t.parse(a["text-color"],1,ColorType),!v))return null;const _=r[r.length-1];_.scale=d,_.font=y,_.textColor=v}else{const d=t.parse(e[o],1,ValueType);if(!d)return null;const y=d.type.kind;if(y!=="string"&&y!=="value"&&y!=="null"&&y!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");s=!0,r.push({content:d,scale:null,font:null,textColor:null})}}return new FormatExpression(r)}evaluate(e){const t=i=>{const r=i.content.evaluate(e);return typeOf(r)===ResolvedImageType?new FormattedSection("",r,null,null,null):new FormattedSection(toString(r),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)};return new Formatted(this.sections.map(t))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const i={};t.scale&&(i["font-scale"]=t.scale.serialize()),t.font&&(i["text-font"]=t.font.serialize()),t.textColor&&(i["text-color"]=t.textColor.serialize()),e.push(i)}return e}}class ImageExpression{constructor(e){this.type=ResolvedImageType,this.input=e}static parse(e,t){if(e.length!==2)return t.error("Expected two arguments.");const i=t.parse(e[1],1,StringType);return i?new ImageExpression(i):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),i=ResolvedImage.fromString(t);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(t)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const types$1={"to-boolean":BooleanType,"to-color":ColorType,"to-number":NumberType,"to-string":StringType};class Coercion{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const i=e[0];if((i==="to-boolean"||i==="to-string")&&e.length!==2)return t.error("Expected one argument.");const r=types$1[i],s=[];for(let o=1;o4?i=`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:i=validateRGBA(t[0],t[1],t[2],t[3]),!i))return new Color$1(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError$1(i||`Could not parse color from value '${typeof t=="string"?t:String(JSON.stringify(t))}'`)}else if(this.type.kind==="number"){let t=null;for(const i of this.args){if(t=i.evaluate(e),t===null)return 0;const r=Number(t);if(!isNaN(r))return r}throw new RuntimeError$1(`Could not convert ${JSON.stringify(t)} to number.`)}else return this.type.kind==="formatted"?Formatted.fromString(toString(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?ResolvedImage.fromString(toString(this.args[0].evaluate(e))):toString(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new ImageExpression(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(t=>{e.push(t.serialize())}),e}}var Coercion$1=Coercion;const geometryTypes=["Unknown","Point","LineString","Polygon"];class EvaluationContext{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?geometryTypes[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||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,t=this.featureDistanceData.scale,{x:i,y:r}=this.featureTileCoord,s=i*t-e[0],o=r*t-e[1],a=this.featureDistanceData.bearing[0],d=this.featureDistanceData.bearing[1];return a*s+d*o}return 0}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Color$1.parse(e)),t}}var EvaluationContext$1=EvaluationContext;class CompoundExpression{constructor(e,t,i,r){this.name=e,this.type=t,this._evaluate=i,this.args=r}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,t){const i=e[0],r=CompoundExpression.definitions[i];if(!r)return t.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const s=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter(([y])=>!Array.isArray(y)||y.length===e.length-1);let d=null;for(const[y,v]of a){d=new ParsingContext$1(t.registry,t.path,null,t.scope);const _=[];let C=!1;for(let E=1;EstringifySignature(C)).join(" | "),_=[];for(let C=1;C=e[2]||n[1]<=e[1]||n[3]>=e[3])}function getTileCoordinates(n,e){const t=mercatorXfromLng(n[0]),i=mercatorYfromLat(n[1]),r=Math.pow(2,e.z);return[Math.round(t*r*EXTENT),Math.round(i*r*EXTENT)]}function onBoundary(n,e,t){const i=n[0]-e[0],r=n[1]-e[1],s=n[0]-t[0],o=n[1]-t[1];return i*o-s*r===0&&i*s<=0&&r*o<=0}function rayIntersect(n,e,t){return e[1]>n[1]!=t[1]>n[1]&&n[0]<(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1])+e[0]}function pointWithinPolygon(n,e){let t=!1;for(let i=0,r=e.length;i0&&_<0||v<0&&_>0}function lineIntersectLine(n,e,t,i){const r=[e[0]-n[0],e[1]-n[1]],s=[i[0]-t[0],i[1]-t[1]];return perp(s,r)===0?!1:!!(twoSided(n,e,t,i)&&twoSided(t,i,n,e))}function lineIntersectPolygon(n,e,t){for(const i of t)for(let r=0;rt[2]){const r=i*.5;let s=n[0]-t[0]>r?-i:t[0]-n[0]>r?i:0;s===0&&(s=n[0]-t[2]>r?-i:t[2]-n[0]>r?i:0),n[0]+=s}updateBBox(e,n)}function resetBBox(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function getTilePoints(n,e,t,i){const r=Math.pow(2,i.z)*EXTENT,s=[i.x*EXTENT,i.y*EXTENT],o=[];if(!n)return o;for(const a of n)for(const d of a){const y=[d.x+s[0],d.y+s[1]];updatePoint(y,e,t,r),o.push(y)}return o}function getTileLines(n,e,t,i){const r=Math.pow(2,i.z)*EXTENT,s=[i.x*EXTENT,i.y*EXTENT],o=[];if(!n)return o;for(const a of n){const d=[];for(const y of a){const v=[y.x+s[0],y.y+s[1]];updateBBox(e,v),d.push(v)}o.push(d)}if(e[2]-e[0]<=r/2){resetBBox(e);for(const a of o)for(const d of a)updatePoint(d,e,t,r)}return o}function pointsWithinPolygons(n,e){const t=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],r=n.canonicalID();if(!r)return!1;if(e.type==="Polygon"){const s=getTilePolygon(e.coordinates,i,r),o=getTilePoints(n.geometry(),t,i,r);if(!boxWithinBox(t,i))return!1;for(const a of o)if(!pointWithinPolygon(a,s))return!1}if(e.type==="MultiPolygon"){const s=getTilePolygons(e.coordinates,i,r),o=getTilePoints(n.geometry(),t,i,r);if(!boxWithinBox(t,i))return!1;for(const a of o)if(!pointWithinPolygons(a,s))return!1}return!0}function linesWithinPolygons(n,e){const t=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],r=n.canonicalID();if(!r)return!1;if(e.type==="Polygon"){const s=getTilePolygon(e.coordinates,i,r),o=getTileLines(n.geometry(),t,i,r);if(!boxWithinBox(t,i))return!1;for(const a of o)if(!lineStringWithinPolygon(a,s))return!1}if(e.type==="MultiPolygon"){const s=getTilePolygons(e.coordinates,i,r),o=getTileLines(n.geometry(),t,i,r);if(!boxWithinBox(t,i))return!1;for(const a of o)if(!lineStringWithinPolygons(a,s))return!1}return!0}class Within{constructor(e,t){this.type=BooleanType,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(isValue(e[1])){const i=e[1];if(i.type==="FeatureCollection")for(let r=0;r{e&&!isFeatureConstant(t)&&(e=!1)}),e}function isStateConstant(n){if(n instanceof CompoundExpression$1&&n.name==="feature-state")return!1;let e=!0;return n.eachChild(t=>{e&&!isStateConstant(t)&&(e=!1)}),e}function isGlobalPropertyConstant(n,e){if(n instanceof CompoundExpression$1&&e.indexOf(n.name)>=0)return!1;let t=!0;return n.eachChild(i=>{t&&!isGlobalPropertyConstant(i,e)&&(t=!1)}),t}class Var{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");const i=e[1];return t.scope.has(i)?new Var(i,t.scope.get(i)):t.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var Var$1=Var;class ParsingContext{constructor(e,t=[],i,r=new Scope$1,s=[]){this.registry=e,this.path=t,this.key=t.map(o=>`[${o}]`).join(""),this.scope=r,this.errors=s,this.expectedType=i}parse(e,t,i,r,s={}){return t?this.concat(t,i,r)._parse(e,s):this._parse(e,s)}_parse(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function i(r,s,o){return o==="assert"?new Assertion$1(s,[r]):o==="coerce"?new Coercion$1(s,[r]):r}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=e[0];if(typeof r!="string")return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const s=this.registry[r];if(s){let o=s.parse(e,this);if(!o)return null;if(this.expectedType){const a=this.expectedType,d=o.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&d.kind==="value")o=i(o,a,t.typeAnnotation||"assert");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(d.kind==="value"||d.kind==="string"))o=i(o,a,t.typeAnnotation||"coerce");else if(this.checkSubtype(a,d))return null}if(!(o instanceof Literal$1)&&o.type.kind!=="resolvedImage"&&isConstant(o)){const a=new EvaluationContext$1;try{o=new Literal$1(o.type,o.evaluate(a))}catch(d){return this.error(d.message),null}}return o}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,i){const r=typeof e=="number"?this.path.concat(e):this.path,s=i?this.scope.concat(i):this.scope;return new ParsingContext(this.registry,r,t||null,s,this.errors)}error(e,...t){const i=`${this.key}${t.map(r=>`[${r}]`).join("")}`;this.errors.push(new ParsingError$1(i,e))}checkSubtype(e,t){const i=checkSubtype(e,t);return i&&this.error(i),i}}var ParsingContext$1=ParsingContext;function isConstant(n){if(n instanceof Var$1)return isConstant(n.boundExpression);if(n instanceof CompoundExpression$1&&n.name==="error")return!1;if(n instanceof CollatorExpression)return!1;if(n instanceof Within$1)return!1;const e=n instanceof Coercion$1||n instanceof Assertion$1;let t=!0;return n.eachChild(i=>{e?t=t&&isConstant(i):t=t&&i instanceof Literal$1}),t?isFeatureConstant(n)&&isGlobalPropertyConstant(n,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function findStopLessThanOrEqualTo(n,e){const t=n.length-1;let i=0,r=t,s=0,o,a;for(;i<=r;)if(s=Math.floor((i+r)/2),o=n[s],a=n[s+1],o<=e){if(s===t||ee)r=s-1;else throw new RuntimeError$1("Input is not a number.");return 0}class Step{constructor(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[r,s]of i)this.labels.push(r),this.outputs.push(s)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");const i=t.parse(e[1],1,NumberType);if(!i)return null;const r=[];let s=null;t.expectedType&&t.expectedType.kind!=="value"&&(s=t.expectedType);for(let o=1;o=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',y);const _=t.parse(d,v,s);if(!_)return null;s=s||_.type,r.push([a,_])}return new Step(s,i,r)}evaluate(e){const t=this.labels,i=this.outputs;if(t.length===1)return i[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);const s=t.length;if(r>=t[s-1])return i[s-1].evaluate(e);const o=findStopLessThanOrEqualTo(t,r);return i[o].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let t=0;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}var Step$1=Step,unitbezier=UnitBezier;function UnitBezier(n,e,t,i){this.cx=3*n,this.bx=3*(t-n)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=n,this.p1y=i,this.p2x=t,this.p2y=i}UnitBezier.prototype.sampleCurveX=function(n){return((this.ax*n+this.bx)*n+this.cx)*n};UnitBezier.prototype.sampleCurveY=function(n){return((this.ay*n+this.by)*n+this.cy)*n};UnitBezier.prototype.sampleCurveDerivativeX=function(n){return(3*this.ax*n+2*this.bx)*n+this.cx};UnitBezier.prototype.solveCurveX=function(n,e){typeof e>"u"&&(e=1e-6);var t,i,r,s,o;for(r=n,o=0;o<8;o++){if(s=this.sampleCurveX(r)-n,Math.abs(s)i)return i;for(;ts?t=r:i=r,r=(i-t)*.5+t}return r};UnitBezier.prototype.solve=function(n,e){return this.sampleCurveY(this.solveCurveX(n,e))};var UnitBezier$1=getDefaultExportFromCjs(unitbezier);function number(n,e,t){return n*(1-t)+e*t}function color(n,e,t){return new Color$1(number(n.r,e.r,t),number(n.g,e.g,t),number(n.b,e.b,t),number(n.a,e.a,t))}function array(n,e,t){return n.map((i,r)=>number(i,e[r],t))}var interpolate=Object.freeze({__proto__:null,number,color,array});const Xn=.95047,Yn=1,Zn=1.08883,t0=4/29,t1=6/29,t2=3*t1*t1,t3=t1*t1*t1,deg2rad$1=Math.PI/180,rad2deg=180/Math.PI;function xyz2lab(n){return n>t3?Math.pow(n,1/3):n/t2+t0}function lab2xyz(n){return n>t1?n*n*n:t2*(n-t0)}function xyz2rgb(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function rgb2xyz(n){return n/=255,n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function rgbToLab(n){const e=rgb2xyz(n.r),t=rgb2xyz(n.g),i=rgb2xyz(n.b),r=xyz2lab((.4124564*e+.3575761*t+.1804375*i)/Xn),s=xyz2lab((.2126729*e+.7151522*t+.072175*i)/Yn),o=xyz2lab((.0193339*e+.119192*t+.9503041*i)/Zn);return{l:116*s-16,a:500*(r-s),b:200*(s-o),alpha:n.a}}function labToRgb(n){let e=(n.l+16)/116,t=isNaN(n.a)?e:e+n.a/500,i=isNaN(n.b)?e:e-n.b/200;return e=Yn*lab2xyz(e),t=Xn*lab2xyz(t),i=Zn*lab2xyz(i),new Color$1(xyz2rgb(3.2404542*t-1.5371385*e-.4985314*i),xyz2rgb(-.969266*t+1.8760108*e+.041556*i),xyz2rgb(.0556434*t-.2040259*e+1.0572252*i),n.alpha)}function interpolateLab(n,e,t){return{l:number(n.l,e.l,t),a:number(n.a,e.a,t),b:number(n.b,e.b,t),alpha:number(n.alpha,e.alpha,t)}}function rgbToHcl(n){const{l:e,a:t,b:i}=rgbToLab(n),r=Math.atan2(i,t)*rad2deg;return{h:r<0?r+360:r,c:Math.sqrt(t*t+i*i),l:e,alpha:n.a}}function hclToRgb(n){const e=n.h*deg2rad$1,t=n.c,i=n.l;return labToRgb({l:i,a:Math.cos(e)*t,b:Math.sin(e)*t,alpha:n.alpha})}function interpolateHue(n,e,t){const i=e-n;return n+t*(i>180||i<-180?i-360*Math.round(i/360):i)}function interpolateHcl(n,e,t){return{h:interpolateHue(n.h,e.h,t),c:number(n.c,e.c,t),l:number(n.l,e.l,t),alpha:number(n.alpha,e.alpha,t)}}const lab={forward:rgbToLab,reverse:labToRgb,interpolate:interpolateLab},hcl={forward:rgbToHcl,reverse:hclToRgb,interpolate:interpolateHcl};class Interpolate{constructor(e,t,i,r,s){this.type=e,this.operator=t,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(const[o,a]of s)this.labels.push(o),this.outputs.push(a)}static interpolationFactor(e,t,i,r){let s=0;if(e.name==="exponential")s=exponentialInterpolation(t,e.base,i,r);else if(e.name==="linear")s=exponentialInterpolation(t,1,i,r);else if(e.name==="cubic-bezier"){const o=e.controlPoints;s=new UnitBezier$1(o[0],o[1],o[2],o[3]).solve(exponentialInterpolation(t,1,i,r))}return s}static parse(e,t){let[i,r,s,...o]=e;if(!Array.isArray(r)||r.length===0)return t.error("Expected an interpolation type expression.",1);if(r[0]==="linear")r={name:"linear"};else if(r[0]==="exponential"){const y=r[1];if(typeof y!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:y}}else if(r[0]==="cubic-bezier"){const y=r.slice(1);if(y.length!==4||y.some(v=>typeof v!="number"||v<0||v>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:y}}else return t.error(`Unknown interpolation type ${String(r[0])}`,1,0);if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(s=t.parse(s,2,NumberType),!s)return null;const a=[];let d=null;i==="interpolate-hcl"||i==="interpolate-lab"?d=ColorType:t.expectedType&&t.expectedType.kind!=="value"&&(d=t.expectedType);for(let y=0;y=v)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',C);const S=t.parse(_,E,d);if(!S)return null;d=d||S.type,a.push([v,S])}return d.kind!=="number"&&d.kind!=="color"&&!(d.kind==="array"&&d.itemType.kind==="number"&&typeof d.N=="number")?t.error(`Type ${toString$1(d)} is not interpolatable.`):new Interpolate(d,i,r,s,a)}evaluate(e){const t=this.labels,i=this.outputs;if(t.length===1)return i[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);const s=t.length;if(r>=t[s-1])return i[s-1].evaluate(e);const o=findStopLessThanOrEqualTo(t,r),a=t[o],d=t[o+1],y=Interpolate.interpolationFactor(this.interpolation,r,a,d),v=i[o].evaluate(e),_=i[o+1].evaluate(e);return this.operator==="interpolate"?interpolate[this.type.kind.toLowerCase()](v,_,y):this.operator==="interpolate-hcl"?hcl.reverse(hcl.interpolate(hcl.forward(v),hcl.forward(_),y)):lab.reverse(lab.interpolate(lab.forward(v),lab.forward(_),y))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;this.interpolation.name==="linear"?e=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?e=["linear"]:e=["exponential",this.interpolation.base]:e=["cubic-bezier"].concat(this.interpolation.controlPoints);const t=[this.operator,e,this.input.serialize()];for(let i=0;icheckSubtype(r,a.type))?new Coalesce(ValueType,s):new Coalesce(i,s)}evaluate(e){let t=null,i=0,r;for(const s of this.args){if(i++,t=s.evaluate(e),t&&t instanceof ResolvedImage&&!t.available&&(r||(r=t),t=null,i===this.args.length))return r;if(t!==null)break}return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var Coalesce$1=Coalesce;class Let{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const i=[];for(let s=1;s=i.length)throw new RuntimeError$1(`Array index out of bounds: ${t} > ${i.length-1}.`);if(t!==Math.floor(t))throw new RuntimeError$1(`Array index must be an integer, but found ${t} instead.`);return i[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var At$1=At;class In{constructor(e,t){this.type=BooleanType,this.needle=e,this.haystack=t}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,ValueType),r=t.parse(e[2],2,ValueType);return!i||!r?null:isValidType(i.type,[BooleanType,StringType,NumberType,NullType,ValueType])?new In(i,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString$1(i.type)} instead`)}evaluate(e){const t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(i==null)return!1;if(!isValidNativeType(t,["boolean","string","number","null"]))throw new RuntimeError$1(`Expected first argument to be of type boolean, string, number or null, but found ${toString$1(typeOf(t))} instead.`);if(!isValidNativeType(i,["string","array"]))throw new RuntimeError$1(`Expected second argument to be of type array or string, but found ${toString$1(typeOf(i))} instead.`);return i.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var In$1=In;class IndexOf{constructor(e,t,i){this.type=NumberType,this.needle=e,this.haystack=t,this.fromIndex=i}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,ValueType),r=t.parse(e[2],2,ValueType);if(!i||!r)return null;if(!isValidType(i.type,[BooleanType,StringType,NumberType,NullType,ValueType]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString$1(i.type)} instead`);if(e.length===4){const s=t.parse(e[3],3,NumberType);return s?new IndexOf(i,r,s):null}else return new IndexOf(i,r)}evaluate(e){const t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!isValidNativeType(t,["boolean","string","number","null"]))throw new RuntimeError$1(`Expected first argument to be of type boolean, string, number or null, but found ${toString$1(typeOf(t))} instead.`);if(!isValidNativeType(i,["string","array"]))throw new RuntimeError$1(`Expected second argument to be of type array or string, but found ${toString$1(typeOf(i))} instead.`);if(this.fromIndex){const r=this.fromIndex.evaluate(e);return i.indexOf(t,r)}return i.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var IndexOf$1=IndexOf;class Match{constructor(e,t,i,r,s,o){this.inputType=e,this.type=t,this.input=i,this.cases=r,this.outputs=s,this.otherwise=o}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return t.error("Expected an even number of arguments.");let i,r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);const s={},o=[];for(let y=2;yNumber.MAX_SAFE_INTEGER)return C.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof S=="number"&&Math.floor(S)!==S)return C.error("Numeric branch labels must be integer values.");if(!i)i=typeOf(S);else if(C.checkSubtype(i,typeOf(S)))return null;if(typeof s[String(S)]<"u")return C.error("Branch labels must be unique.");s[String(S)]=o.length}const E=t.parse(_,y,r);if(!E)return null;r=r||E.type,o.push(E)}const a=t.parse(e[1],1,ValueType);if(!a)return null;const d=t.parse(e[e.length-1],e.length-1,r);return!d||a.type.kind!=="value"&&t.concat(1).checkSubtype(i,a.type)?null:new Match(i,r,a,s,o,d)}evaluate(e){const t=this.input.evaluate(e);return(typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),i=[],r={};for(const o of t){const a=r[this.cases[o]];a===void 0?(r[this.cases[o]]=i.length,i.push([this.cases[o],[o]])):i[a][1].push(o)}const s=o=>this.inputType.kind==="number"?Number(o):o;for(const[o,a]of i)a.length===1?e.push(s(a[0])):e.push(a.map(s)),e.push(this.outputs[o].serialize());return e.push(this.otherwise.serialize()),e}}var Match$1=Match;class Case{constructor(e,t,i){this.type=e,this.branches=t,this.otherwise=i}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return t.error("Expected an odd number of arguments.");let i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);const r=[];for(let o=1;ot.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var Case$1=Case;class Slice{constructor(e,t,i,r){this.type=e,this.input=t,this.beginIndex=i,this.endIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,ValueType),r=t.parse(e[2],2,NumberType);if(!i||!r)return null;if(!isValidType(i.type,[array$1(ValueType),StringType,ValueType]))return t.error(`Expected first argument to be of type array or string, but found ${toString$1(i.type)} instead`);if(e.length===4){const s=t.parse(e[3],3,NumberType);return s?new Slice(i.type,i,r,s):null}else return new Slice(i.type,i,r)}evaluate(e){const t=this.input.evaluate(e),i=this.beginIndex.evaluate(e);if(!isValidNativeType(t,["string","array"]))throw new RuntimeError$1(`Expected first argument to be of type array or string, but found ${toString$1(typeOf(t))} instead.`);if(this.endIndex){const r=this.endIndex.evaluate(e);return t.slice(i,r)}return t.slice(i)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Slice$1=Slice;function isComparableType(n,e){return n==="=="||n==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function eq(n,e,t){return e===t}function neq(n,e,t){return e!==t}function lt(n,e,t){return et}function lteq(n,e,t){return e<=t}function gteq(n,e,t){return e>=t}function eqCollate(n,e,t,i){return i.compare(e,t)===0}function neqCollate(n,e,t,i){return!eqCollate(n,e,t,i)}function ltCollate(n,e,t,i){return i.compare(e,t)<0}function gtCollate(n,e,t,i){return i.compare(e,t)>0}function lteqCollate(n,e,t,i){return i.compare(e,t)<=0}function gteqCollate(n,e,t,i){return i.compare(e,t)>=0}function makeComparison(n,e,t){const i=n!=="=="&&n!=="!=";return class Mn{constructor(s,o,a){this.type=BooleanType,this.lhs=s,this.rhs=o,this.collator=a,this.hasUntypedArgument=s.type.kind==="value"||o.type.kind==="value"}static parse(s,o){if(s.length!==3&&s.length!==4)return o.error("Expected two or three arguments.");const a=s[0];let d=o.parse(s[1],1,ValueType);if(!d)return null;if(!isComparableType(a,d.type))return o.concat(1).error(`"${a}" comparisons are not supported for type '${toString$1(d.type)}'.`);let y=o.parse(s[2],2,ValueType);if(!y)return null;if(!isComparableType(a,y.type))return o.concat(2).error(`"${a}" comparisons are not supported for type '${toString$1(y.type)}'.`);if(d.type.kind!==y.type.kind&&d.type.kind!=="value"&&y.type.kind!=="value")return o.error(`Cannot compare types '${toString$1(d.type)}' and '${toString$1(y.type)}'.`);i&&(d.type.kind==="value"&&y.type.kind!=="value"?d=new Assertion$1(y.type,[d]):d.type.kind!=="value"&&y.type.kind==="value"&&(y=new Assertion$1(d.type,[y])));let v=null;if(s.length===4){if(d.type.kind!=="string"&&y.type.kind!=="string"&&d.type.kind!=="value"&&y.type.kind!=="value")return o.error("Cannot use collator to compare non-string types.");if(v=o.parse(s[3],3,CollatorType),!v)return null}return new Mn(d,y,v)}evaluate(s){const o=this.lhs.evaluate(s),a=this.rhs.evaluate(s);if(i&&this.hasUntypedArgument){const d=typeOf(o),y=typeOf(a);if(d.kind!==y.kind||!(d.kind==="string"||d.kind==="number"))throw new RuntimeError$1(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${d.kind}, ${y.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){const d=typeOf(o),y=typeOf(a);if(d.kind!=="string"||y.kind!=="string")return e(s,o,a)}return this.collator?t(s,o,a,this.collator.evaluate(s)):e(s,o,a)}eachChild(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)}outputDefined(){return!0}serialize(){const s=[n];return this.eachChild(o=>{s.push(o.serialize())}),s}}}const Equals=makeComparison("==",eq,eqCollate),NotEquals=makeComparison("!=",neq,neqCollate),LessThan=makeComparison("<",lt,ltCollate),GreaterThan=makeComparison(">",gt,gtCollate),LessThanOrEqual=makeComparison("<=",lteq,lteqCollate),GreaterThanOrEqual=makeComparison(">=",gteq,gteqCollate);class NumberFormat{constructor(e,t,i,r,s,o){this.type=StringType,this.number=e,this.locale=t,this.currency=i,this.unit=r,this.minFractionDigits=s,this.maxFractionDigits=o}static parse(e,t){if(e.length!==3)return t.error("Expected two arguments.");const i=t.parse(e[1],1,NumberType);if(!i)return null;const r=e[2];if(typeof r!="object"||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");let s=null;if(r.locale&&(s=t.parse(r.locale,1,StringType),!s))return null;let o=null;if(r.currency&&(o=t.parse(r.currency,1,StringType),!o))return null;let a=null;if(r.unit&&(a=t.parse(r.unit,1,StringType),!a))return null;let d=null;if(r["min-fraction-digits"]&&(d=t.parse(r["min-fraction-digits"],1,NumberType),!d))return null;let y=null;return r["max-fraction-digits"]&&(y=t.parse(r["max-fraction-digits"],1,NumberType),!y)?null:new NumberFormat(i,s,o,a,d,y)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency&&"currency"||this.unit&&"unit"||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class Length{constructor(e){this.type=NumberType,this.input=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const i=t.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${toString$1(i.type)} instead.`):new Length(i):null}evaluate(e){const t=this.input.evaluate(e);if(typeof t=="string")return t.length;if(Array.isArray(t))return t.length;throw new RuntimeError$1(`Expected value to be of type string or array, but found ${toString$1(typeOf(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var Length$1=Length;const expressions={"==":Equals,"!=":NotEquals,">":GreaterThan,"<":LessThan,">=":GreaterThanOrEqual,"<=":LessThanOrEqual,array:Assertion$1,at:At$1,boolean:Assertion$1,case:Case$1,coalesce:Coalesce$1,collator:CollatorExpression,format:FormatExpression,image:ImageExpression,in:In$1,"index-of":IndexOf$1,interpolate:Interpolate$1,"interpolate-hcl":Interpolate$1,"interpolate-lab":Interpolate$1,length:Length$1,let:Let$1,literal:Literal$1,match:Match$1,number:Assertion$1,"number-format":NumberFormat,object:Assertion$1,slice:Slice$1,step:Step$1,string:Assertion$1,"to-boolean":Coercion$1,"to-color":Coercion$1,"to-number":Coercion$1,"to-string":Coercion$1,var:Var$1,within:Within$1};function rgba(n,[e,t,i,r]){e=e.evaluate(n),t=t.evaluate(n),i=i.evaluate(n);const s=r?r.evaluate(n):1,o=validateRGBA(e,t,i,s);if(o)throw new RuntimeError$1(o);return new Color$1(e/255*s,t/255*s,i/255*s,s)}function has(n,e){return n in e}function get$1(n,e){const t=e[n];return typeof t>"u"?null:t}function binarySearch(n,e,t,i){for(;t<=i;){const r=t+i>>1;if(e[r]===n)return!0;e[r]>n?i=r-1:t=r+1}return!1}function varargs(n){return{type:n}}CompoundExpression$1.register(expressions,{error:[ErrorType,[StringType],(n,[e])=>{throw new RuntimeError$1(e.evaluate(n))}],typeof:[StringType,[ValueType],(n,[e])=>toString$1(typeOf(e.evaluate(n)))],"to-rgba":[array$1(NumberType,4),[ColorType],(n,[e])=>e.evaluate(n).toArray()],rgb:[ColorType,[NumberType,NumberType,NumberType],rgba],rgba:[ColorType,[NumberType,NumberType,NumberType,NumberType],rgba],has:{type:BooleanType,overloads:[[[StringType],(n,[e])=>has(e.evaluate(n),n.properties())],[[StringType,ObjectType],(n,[e,t])=>has(e.evaluate(n),t.evaluate(n))]]},get:{type:ValueType,overloads:[[[StringType],(n,[e])=>get$1(e.evaluate(n),n.properties())],[[StringType,ObjectType],(n,[e,t])=>get$1(e.evaluate(n),t.evaluate(n))]]},"feature-state":[ValueType,[StringType],(n,[e])=>get$1(e.evaluate(n),n.featureState||{})],properties:[ObjectType,[],n=>n.properties()],"geometry-type":[StringType,[],n=>n.geometryType()],id:[ValueType,[],n=>n.id()],zoom:[NumberType,[],n=>n.globals.zoom],pitch:[NumberType,[],n=>n.globals.pitch||0],"distance-from-center":[NumberType,[],n=>n.distanceFromCenter()],"heatmap-density":[NumberType,[],n=>n.globals.heatmapDensity||0],"line-progress":[NumberType,[],n=>n.globals.lineProgress||0],"sky-radial-progress":[NumberType,[],n=>n.globals.skyRadialProgress||0],accumulated:[ValueType,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[NumberType,varargs(NumberType),(n,e)=>{let t=0;for(const i of e)t+=i.evaluate(n);return t}],"*":[NumberType,varargs(NumberType),(n,e)=>{let t=1;for(const i of e)t*=i.evaluate(n);return t}],"-":{type:NumberType,overloads:[[[NumberType,NumberType],(n,[e,t])=>e.evaluate(n)-t.evaluate(n)],[[NumberType],(n,[e])=>-e.evaluate(n)]]},"/":[NumberType,[NumberType,NumberType],(n,[e,t])=>e.evaluate(n)/t.evaluate(n)],"%":[NumberType,[NumberType,NumberType],(n,[e,t])=>e.evaluate(n)%t.evaluate(n)],ln2:[NumberType,[],()=>Math.LN2],pi:[NumberType,[],()=>Math.PI],e:[NumberType,[],()=>Math.E],"^":[NumberType,[NumberType,NumberType],(n,[e,t])=>Math.pow(e.evaluate(n),t.evaluate(n))],sqrt:[NumberType,[NumberType],(n,[e])=>Math.sqrt(e.evaluate(n))],log10:[NumberType,[NumberType],(n,[e])=>Math.log(e.evaluate(n))/Math.LN10],ln:[NumberType,[NumberType],(n,[e])=>Math.log(e.evaluate(n))],log2:[NumberType,[NumberType],(n,[e])=>Math.log(e.evaluate(n))/Math.LN2],sin:[NumberType,[NumberType],(n,[e])=>Math.sin(e.evaluate(n))],cos:[NumberType,[NumberType],(n,[e])=>Math.cos(e.evaluate(n))],tan:[NumberType,[NumberType],(n,[e])=>Math.tan(e.evaluate(n))],asin:[NumberType,[NumberType],(n,[e])=>Math.asin(e.evaluate(n))],acos:[NumberType,[NumberType],(n,[e])=>Math.acos(e.evaluate(n))],atan:[NumberType,[NumberType],(n,[e])=>Math.atan(e.evaluate(n))],min:[NumberType,varargs(NumberType),(n,e)=>Math.min(...e.map(t=>t.evaluate(n)))],max:[NumberType,varargs(NumberType),(n,e)=>Math.max(...e.map(t=>t.evaluate(n)))],abs:[NumberType,[NumberType],(n,[e])=>Math.abs(e.evaluate(n))],round:[NumberType,[NumberType],(n,[e])=>{const t=e.evaluate(n);return t<0?-Math.round(-t):Math.round(t)}],floor:[NumberType,[NumberType],(n,[e])=>Math.floor(e.evaluate(n))],ceil:[NumberType,[NumberType],(n,[e])=>Math.ceil(e.evaluate(n))],"filter-==":[BooleanType,[StringType,ValueType],(n,[e,t])=>n.properties()[e.value]===t.value],"filter-id-==":[BooleanType,[ValueType],(n,[e])=>n.id()===e.value],"filter-type-==":[BooleanType,[StringType],(n,[e])=>n.geometryType()===e.value],"filter-<":[BooleanType,[StringType,ValueType],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i{const t=n.id(),i=e.value;return typeof t==typeof i&&t":[BooleanType,[StringType,ValueType],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i>r}],"filter-id->":[BooleanType,[ValueType],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t>i}],"filter-<=":[BooleanType,[StringType,ValueType],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i<=r}],"filter-id-<=":[BooleanType,[ValueType],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t<=i}],"filter->=":[BooleanType,[StringType,ValueType],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i>=r}],"filter-id->=":[BooleanType,[ValueType],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t>=i}],"filter-has":[BooleanType,[ValueType],(n,[e])=>e.value in n.properties()],"filter-has-id":[BooleanType,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[BooleanType,[array$1(StringType)],(n,[e])=>e.value.indexOf(n.geometryType())>=0],"filter-id-in":[BooleanType,[array$1(ValueType)],(n,[e])=>e.value.indexOf(n.id())>=0],"filter-in-small":[BooleanType,[StringType,array$1(ValueType)],(n,[e,t])=>t.value.indexOf(n.properties()[e.value])>=0],"filter-in-large":[BooleanType,[StringType,array$1(ValueType)],(n,[e,t])=>binarySearch(n.properties()[e.value],t.value,0,t.value.length-1)],all:{type:BooleanType,overloads:[[[BooleanType,BooleanType],(n,[e,t])=>e.evaluate(n)&&t.evaluate(n)],[varargs(BooleanType),(n,e)=>{for(const t of e)if(!t.evaluate(n))return!1;return!0}]]},any:{type:BooleanType,overloads:[[[BooleanType,BooleanType],(n,[e,t])=>e.evaluate(n)||t.evaluate(n)],[varargs(BooleanType),(n,e)=>{for(const t of e)if(t.evaluate(n))return!0;return!1}]]},"!":[BooleanType,[BooleanType],(n,[e])=>!e.evaluate(n)],"is-supported-script":[BooleanType,[StringType],(n,[e])=>{const t=n.globals&&n.globals.isSupportedScript;return t?t(e.evaluate(n)):!0}],upcase:[StringType,[StringType],(n,[e])=>e.evaluate(n).toUpperCase()],downcase:[StringType,[StringType],(n,[e])=>e.evaluate(n).toLowerCase()],concat:[StringType,varargs(ValueType),(n,e)=>e.map(t=>toString(t.evaluate(n))).join("")],"resolved-locale":[StringType,[CollatorType],(n,[e])=>e.evaluate(n).resolvedLocale()]});var definitions=expressions;function success(n){return{result:"success",value:n}}function error(n){return{result:"error",value:n}}function supportsPropertyExpression(n){return n["property-type"]==="data-driven"}function supportsZoomExpression(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function supportsInterpolation(n){return!!n.expression&&n.expression.interpolated}function isFunction(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}class StyleExpression{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new EvaluationContext$1,this._defaultValue=t?getDefaultValue(t):null,this._enumValues=t&&t.type==="enum"?t.values:null}evaluateWithoutErrorHandling(e,t,i,r,s,o,a,d){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.canonical=r||null,this._evaluator.availableImages=s||null,this._evaluator.formattedSection=o,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=d||null,this.expression.evaluate(this._evaluator)}evaluate(e,t,i,r,s,o,a,d){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=s||null,this._evaluator.formattedSection=o||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=d||null;try{const y=this.expression.evaluate(this._evaluator);if(y==null||typeof y=="number"&&y!==y)return this._defaultValue;if(this._enumValues&&!(y in this._enumValues))throw new RuntimeError$1(`Expected value to be one of ${Object.keys(this._enumValues).map(v=>JSON.stringify(v)).join(", ")}, but found ${JSON.stringify(y)} instead.`);return y}catch(y){return this._warningHistory[y.message]||(this._warningHistory[y.message]=!0,typeof console<"u"&&console.warn(y.message)),this._defaultValue}}}function isExpression(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in definitions}function createExpression(n,e){const t=new ParsingContext$1(definitions,[],e?getExpectedType(e):void 0),i=t.parse(n,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return i?success(new StyleExpression(i,e)):error(t.errors)}class ZoomConstantExpression{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!isStateConstant(t.expression)}evaluateWithoutErrorHandling(e,t,i,r,s,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,r,s,o)}evaluate(e,t,i,r,s,o){return this._styleExpression.evaluate(e,t,i,r,s,o)}}class ZoomDependentExpression{constructor(e,t,i,r){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!isStateConstant(t.expression),this.interpolationType=r}evaluateWithoutErrorHandling(e,t,i,r,s,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,r,s,o)}evaluate(e,t,i,r,s,o){return this._styleExpression.evaluate(e,t,i,r,s,o)}interpolationFactor(e,t,i){return this.interpolationType?Interpolate$1.interpolationFactor(this.interpolationType,e,t,i):0}}function createPropertyExpression(n,e){if(n=createExpression(n,e),n.result==="error")return n;const t=n.value.expression,i=isFeatureConstant(t);if(!i&&!supportsPropertyExpression(e))return error([new ParsingError$1("","data expressions not supported")]);const r=isGlobalPropertyConstant(t,["zoom","pitch","distance-from-center"]);if(!r&&!supportsZoomExpression(e))return error([new ParsingError$1("","zoom expressions not supported")]);const s=findZoomCurve(t);if(!s&&!r)return error([new ParsingError$1("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof ParsingError$1)return error([s]);if(s instanceof Interpolate$1&&!supportsInterpolation(e))return error([new ParsingError$1("",'"interpolate" expressions cannot be used with this property')]);if(!s)return success(i?new ZoomConstantExpression("constant",n.value):new ZoomConstantExpression("source",n.value));const o=s instanceof Interpolate$1?s.interpolation:void 0;return success(i?new ZoomDependentExpression("camera",n.value,s.labels,o):new ZoomDependentExpression("composite",n.value,s.labels,o))}function findZoomCurve(n){let e=null;if(n instanceof Let$1)e=findZoomCurve(n.result);else if(n instanceof Coalesce$1){for(const t of n.args)if(e=findZoomCurve(t),e)break}else(n instanceof Step$1||n instanceof Interpolate$1)&&n.input instanceof CompoundExpression$1&&n.input.name==="zoom"&&(e=n);return e instanceof ParsingError$1||n.eachChild(t=>{const i=findZoomCurve(t);i instanceof ParsingError$1?e=i:!e&&i?e=new ParsingError$1("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new ParsingError$1("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function getExpectedType(n){const e={color:ColorType,string:StringType,number:NumberType,enum:StringType,boolean:BooleanType,formatted:FormattedType,resolvedImage:ResolvedImageType};return n.type==="array"?array$1(e[n.value]||ValueType,n.length):e[n.type]}function getDefaultValue(n){return n.type==="color"&&(isFunction(n.default)||Array.isArray(n.default))?new Color$1(0,0,0,0):n.type==="color"?Color$1.parse(n.default)||null:n.default===void 0?null:n.default}function unbundle(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function deepUnbundle(n){if(Array.isArray(n))return n.map(deepUnbundle);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const e={};for(const t in n)e[t]=deepUnbundle(n[t]);return e}return unbundle(n)}var spec={$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"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},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:{},sky:{}},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_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{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"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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"],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:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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:{},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",{"symbol-placement":["point"]}],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","feature"]},"property-type":"data-driven"},"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"],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"],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_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},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},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,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},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},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}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],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:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"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:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"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"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},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:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},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:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-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"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function isExpressionFilter(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const e of n.slice(1))if(!isExpressionFilter(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function createFilter(n,e="fill"){if(n==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};isExpressionFilter(n)||(n=convertFilter(n));const t=n;let i=!0;try{i=extractStaticFilter(t)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate. +This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md +and paste the contents of this message in the report. +Thank you! +Filter Expression: +${JSON.stringify(t,null,2)} + `)}const r=spec[`filter_${e}`],s=createExpression(i,r);let o=null;if(s.result==="error")throw new Error(s.value.map(v=>`${v.key}: ${v.message}`).join(", "));o=(v,_,C)=>s.value.evaluate(v,_,{},C);let a=null,d=null;if(i!==t){const v=createExpression(t,r);if(v.result==="error")throw new Error(v.value.map(_=>`${_.key}: ${_.message}`).join(", "));a=(_,C,E,S,b)=>v.value.evaluate(_,C,{},E,void 0,void 0,S,b),d=!isFeatureConstant(v.value.expression)}o=o;const y=geometryNeeded(i);return{filter:o,dynamicFilter:a||void 0,needGeometry:y,needFeature:!!d}}function extractStaticFilter(n){if(!isDynamicFilter(n))return n;let e=deepUnbundle(n);return unionDynamicBranches(e),e=collapseDynamicBooleanExpressions(e),e}function collapseDynamicBooleanExpressions(n){if(!Array.isArray(n))return n;const e=collapsedExpression(n);return e===!0?e:e.map(t=>collapseDynamicBooleanExpressions(t))}function unionDynamicBranches(n){let e=!1;const t=[];if(n[0]==="case"){for(let i=1;i",">=","<","<=","to-boolean"]);function collapsedExpression(n){if(dynamicConditionExpressions.has(n[0]))for(let e=1;ee?1:0}function geometryNeeded(n){if(!Array.isArray(n))return!1;if(n[0]==="within")return!0;for(let e=1;e"||e==="<="||e===">="?convertComparisonOp(n[1],n[2],e):e==="any"?convertDisjunctionOp(n.slice(1)):e==="all"?["all"].concat(n.slice(1).map(convertFilter)):e==="none"?["all"].concat(n.slice(1).map(convertFilter).map(convertNegation)):e==="in"?convertInOp(n[1],n.slice(2)):e==="!in"?convertNegation(convertInOp(n[1],n.slice(2))):e==="has"?convertHasOp(n[1]):e==="!has"?convertNegation(convertHasOp(n[1])):e==="within"?n:!0}function convertComparisonOp(n,e,t){switch(n){case"$type":return[`filter-type-${t}`,e];case"$id":return[`filter-id-${t}`,e];default:return[`filter-${t}`,n,e]}}function convertDisjunctionOp(n){return["any"].concat(n.map(convertFilter))}function convertInOp(n,e){if(e.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(t=>typeof t!=typeof e[0])?["filter-in-large",n,["literal",e.sort(compare)]]:["filter-in-small",n,["literal",e]]}}function convertHasOp(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function convertNegation(n){return["!",n]}var refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function deref(n,e){const t={};for(const i in n)i!=="ref"&&(t[i]=n[i]);return refProperties.forEach(i=>{i in e&&(t[i]=e[i])}),t}function derefLayers(n){n=n.slice();const e=Object.create(null);for(let t=0;t1?C[C.length-2].toLowerCase():"";if(E==S||E==S.replace("-","")||b+"-"+E==S){r=a?r:fontWeights[S],C.pop(),b&&S.startsWith(b)&&C.pop();break}}!a&&typeof E=="number"&&(r=E,a=!0);var P=C.join(sp).replace("Klokantech Noto Sans","Noto Sans");P.indexOf(sp)!==-1&&(P='"'+P+'"'),o.push(P)}i=fontCache[n]=[s,r,o]}return i[0]+sp+i[1]+sp+e+"px"+(t?"/"+t:"")+sp+i[2]},mb2css=getDefaultExportFromCjs(mapboxToCssFont);const mapboxBaseUrl="https://api.mapbox.com";function getMapboxPath(n){const e="mapbox://";return n.indexOf(e)!==0?"":n.slice(e.length)}function normalizeSpriteUrl(n,e,t){const i=getMapboxPath(n);if(!i)return decodeURI(new URL(n,t).href);const r="sprites/";if(i.indexOf(r)!==0)throw new Error(`unexpected sprites url: ${n}`);const s=i.slice(r.length);return`${mapboxBaseUrl}/styles/v1/${s}/sprite?access_token=${e}`}function normalizeStyleUrl(n,e){const t=getMapboxPath(n);if(!t)return decodeURI(new URL(n,location.href).href);const i="styles/";if(t.indexOf(i)!==0)throw new Error(`unexpected style url: ${n}`);const r=t.slice(i.length);return`${mapboxBaseUrl}/styles/v1/${r}?&access_token=${e}`}function normalizeSourceUrl(n,e,t,i){const r=new URL(n,i),s=getMapboxPath(n);if(!s)return e&&(r.searchParams.has(t)||r.searchParams.set(t,e)),decodeURI(r.href);if(s==="mapbox.satellite"){const o=window.devicePixelRatio>=1.5?"@2x":"";return`https://api.mapbox.com/v4/${s}/{z}/{x}/{y}${o}.webp?access_token=${e}`}return`https://{a-d}.tiles.mapbox.com/v4/${s}/{z}/{x}/{y}.vector.pbf?access_token=${e}`}const functionCacheByStyleId={},filterCacheByStyleId={};let styleId=0;function getStyleId(n){return n.id||(n.id=styleId++),n.id}function getStyleFunctionKey(n,e){return getStyleId(n)+"."+getUid(e)}function getFunctionCache(n){let e=functionCacheByStyleId[n.id];return e||(e={},functionCacheByStyleId[getStyleId(n)]=e),e}function getFilterCache(n){let e=filterCacheByStyleId[n.id];return e||(e={},filterCacheByStyleId[getStyleId(n)]=e),e}function deg2rad(n){return n*Math.PI/180}const defaultResolutions=function(){const n=[];for(let e=78271.51696402048;n.length<=24;e/=2)n.push(e);return n}();function createCanvas(n,e){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(n,e);const t=document.createElement("canvas");return t.width=n,t.height=e,t}function getZoomForResolution(n,e){let t=0;const i=e.length;for(;tr).then(o=>(o instanceof Request||(o=new Request(o)),o.headers.get("Accept")||o.headers.set("Accept","application/json"),i&&(i.request=o),fetch(o).then(function(a){return delete pendingRequests[e],a.ok?a.json():Promise.reject(new Error("Error fetching source "+e))}).catch(function(a){return delete pendingRequests[e],Promise.reject(new Error("Error fetching source "+e))})));return pendingRequests[e]=[r,s],s}function getGlStyle(n,e){if(typeof n=="string")if(n.trim().startsWith("{"))try{const t=JSON.parse(n);return Promise.resolve(t)}catch(t){return Promise.reject(t)}else return n=normalizeStyleUrl(n,e.accessToken),fetchResource("Style",n,e);else return Promise.resolve(n)}const tilejsonCache={};function getTileJson(n,e,t={}){const i=[e,JSON.stringify(n)].toString();let r=tilejsonCache[i];if(!r||t.transformRequest){let s;t.transformRequest&&(s=(a,d)=>{const y=t.transformRequest&&t.transformRequest(d,"Tiles")||d;if(a instanceof VectorTile$1)a.setLoader((v,_,C)=>{toPromise(()=>y).then(E=>{fetch(E).then(S=>S.arrayBuffer()).then(S=>{const P=a.getFormat().readFeatures(S,{extent:v,featureProjection:C});a.setFeatures(P)}).catch(S=>a.setState(TileState.ERROR))})});else{const v=a.getImage();toPromise(()=>y).then(_=>{_ instanceof Request?fetch(_).then(C=>C.blob()).then(C=>{const E=URL.createObjectURL(C);v.addEventListener("load",()=>URL.revokeObjectURL(E)),v.addEventListener("error",()=>URL.revokeObjectURL(E)),v.src=E}).catch(C=>a.setState(TileState.ERROR)):v.src=_})}});const o=n.url;if(o&&!n.tiles){const a=normalizeSourceUrl(o,t.accessToken,t.accessTokenParam||"access_token",e||location.href);if(o.startsWith("mapbox://"))r=Promise.resolve({tileJson:Object.assign({},n,{url:void 0,tiles:expandUrl(a)}),tileLoadFunction:s});else{const d={};r=fetchResource("Source",a,t,d).then(function(y){return y.tiles=y.tiles.map(function(v){return y.scheme==="tms"&&(v=v.replace("{y}","{-y}")),normalizeSourceUrl(v,t.accessToken,t.accessTokenParam||"access_token",d.request.url)}),Promise.resolve({tileJson:y,tileLoadFunction:s})})}}else n=Object.assign({},n,{tiles:n.tiles.map(function(a){return n.scheme==="tms"&&(a=a.replace("{y}","{-y}")),normalizeSourceUrl(a,t.accessToken,t.accessTokenParam||"access_token",e||location.href)})}),r=Promise.resolve({tileJson:Object.assign({},n),tileLoadFunction:s});tilejsonCache[i]=r}return r}function drawIconHalo(n,e,t,i){const r=[2*t*e.pixelRatio+e.width,2*t*e.pixelRatio+e.height],s=createCanvas(r[0],r[1]),o=s.getContext("2d");o.drawImage(n,e.x,e.y,e.width,e.height,t*e.pixelRatio,t*e.pixelRatio,e.width,e.height);const a=o.getImageData(0,0,r[0],r[1]);o.globalCompositeOperation="destination-over",o.fillStyle=`rgba(${i.r*255},${i.g*255},${i.b*255},${i.a})`;const d=a.data;for(let y=0,v=a.width;y0&&o.arc(y,_,t*e.pixelRatio,0,2*Math.PI)}return o.fill(),s}function smoothstep(n,e,t){const i=Math.max(0,Math.min(1,(t-n)/(e-n)));return i*i*(3-2*i)}function drawSDF(n,e,t){const i=createCanvas(e.width,e.height),r=i.getContext("2d");r.drawImage(n,e.x,e.y,e.width,e.height,0,0,e.width,e.height);const s=r.getImageData(0,0,e.width,e.height),o=s.data;for(let a=0,d=s.width;a0?(o[_+0]=Math.round(255*t.r*b),o[_+1]=Math.round(255*t.g*b),o[_+2]=Math.round(255*t.b*b),o[_+3]=Math.round(255*b)):o[_+3]=0}return r.putImageData(s,0,0),i}const hairSpacePool=Array(256).join(" ");function applyLetterSpacing(n,e){if(e>=.05){let t="";const i=n.split(` +`),r=hairSpacePool.slice(0,Math.round(e/.1));for(let s=0,o=i.length;s0&&(t+=` +`),t+=i[s].split("").join(r);return t}return n}let measureContext;function getMeasureContext(){return measureContext||(measureContext=createCanvas(1,1).getContext("2d")),measureContext}function measureText(n,e){return getMeasureContext().measureText(n).width+(n.length-1)*e}const measureCache={};function wrapText(n,e,t,i){if(n.indexOf(` +`)!==-1){const o=n.split(` +`),a=[];for(let d=0,y=o.length;d1){const a=getMeasureContext();a.font=e;const y=a.measureText("M").width*t;let v="";const _=[];for(let C=0,E=o.length;C1;++C){const S=_[C];if(measureText(S,i)0?measureText(_[C-1],i):1/0,P=Cy*.7&&measureText(b,i)`${i.key}: ${i.message}`).join(", "));return t.value},emptyObj$1={},zoomObj={zoom:0};let renderFeatureCoordinates,renderFeature;function getValue(n,e,t,i,r,s,o){const a=n.id;s||(s={},console.warn("No functionCache provided to getValue()")),s[a]||(s[a]={});const d=s[a];if(!d[t]){let y=(n[e]||emptyObj$1)[t];const v=spec[`${e}_${n.type}`][t];y===void 0&&(y=v.default);let _=isExpression(y);if(!_&&isFunction(y)&&(y=convertFunction(y,v),_=!0),_){const C=expressionData(y,v);d[t]=C.evaluate.bind(C)}else v.type=="color"&&(y=Color$1.parse(y)),d[t]=function(){return y}}return zoomObj.zoom=i,d[t](zoomObj,r,o)}function getDeclutterMode(n,e,t,i,r){return getValue(n,"layout",`${i}-allow-overlap`,e,t,r)?getValue(n,"layout",`${i}-ignore-placement`,e,t,r)?"none":"obstacle":"declutter"}function evaluateFilter(n,e,t,i,r){return r||console.warn("No filterCache provided to evaluateFilter()"),n in r||(r[n]=createFilter(e).filter),zoomObj.zoom=i,r[n](zoomObj,t)}function colorWithOpacity(n,e){if(n){if(n.a===0||e===0)return;const t=n.a;return e=e===void 0?1:e,t===0?"transparent":"rgba("+Math.round(n.r*255/t)+","+Math.round(n.g*255/t)+","+Math.round(n.b*255/t)+","+t*e+")"}return n}const templateRegEx=/\{[^{}}]*\}/g;function fromTemplate(n,e){return n.replace(templateRegEx,function(t){return e[t.slice(1,-1)]||""})}const styleFunctionArgs={};function stylefunction(n,e,t,i=defaultResolutions,r=void 0,s=void 0,o=void 0,a=void 0){if(typeof e=="string"&&(e=JSON.parse(e)),e.version!=8)throw new Error("glStyle version 8 required.");styleFunctionArgs[getStyleFunctionKey(e,n)]=Array.from(arguments);let d,y,v;if(s){if(typeof Image<"u"){const G=new Image;let F;toPromise(()=>s).then(z=>{z instanceof Request?fetch(z).then(B=>B.blob()).then(B=>{F=URL.createObjectURL(B),G.src=F}).catch(()=>{}):(G.crossOrigin="anonymous",G.src=z,F&&URL.revokeObjectURL(F))}),G.onload=function(){d=G,y=[G.width,G.height],n.changed(),G.onload=null}}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){const G=self;G.postMessage({action:"loadImage",src:s}),G.addEventListener("message",function(z){z.data.action==="imageLoaded"&&z.data.src===s&&(d=z.data.image,y=[d.width,d.height])})}}const _=derefLayers(e.layers),C={},E=[],S={},b={},P=getFunctionCache(e),R=getFilterCache(e);let x;for(let G=0,F=_.length;G=ie.maxzoom)continue;const ct=ie.filter;if(!ct||evaluateFilter(it,ct,$,U,R)){let Qe,ut,re,Ve,Be,oe;const pt=je.index;if(Y==3&&(ie.type=="fill"||ie.type=="fill-extrusion"))if(ut=getValue(ie,"paint",ie.type+"-opacity",U,$,P,K),ie.type+"-pattern"in ft){const ee=getValue(ie,"paint",ie.type+"-pattern",U,$,P,K);if(ee){const ne=typeof ee=="string"?fromTemplate(ee,B):ee.toString();if(d&&r&&r[ne]){++q,oe=k[q],(!oe||!oe.getFill()||oe.getStroke()||oe.getText())&&(oe=new Style$1({fill:new Fill}),k[q]=oe),re=oe.getFill(),oe.setZIndex(pt);const ue=ne+"."+ut;let Oe=b[ue];if(!Oe){const ke=r[ne],Ze=createCanvas(ke.width,ke.height),mt=Ze.getContext("2d");mt.globalAlpha=ut,mt.drawImage(d,ke.x,ke.y,ke.width,ke.height,0,0,ke.width,ke.height),Oe=mt.createPattern(Ze,"repeat"),b[ue]=Oe}re.setColor(Oe)}}}else Qe=colorWithOpacity(getValue(ie,"paint",ie.type+"-color",U,$,P,K),ut),ie.type+"-outline-color"in ft&&(Be=colorWithOpacity(getValue(ie,"paint",ie.type+"-outline-color",U,$,P,K),ut)),Be||(Be=Qe),(Qe||Be)&&(++q,oe=k[q],(!oe||Qe&&!oe.getFill()||!Qe&&oe.getFill()||Be&&!oe.getStroke()||!Be&&oe.getStroke()||oe.getText())&&(oe=new Style$1({fill:Qe?new Fill:void 0,stroke:Be?new Stroke:void 0}),k[q]=oe),Qe&&(re=oe.getFill(),re.setColor(Qe)),Be&&(Ve=oe.getStroke(),Ve.setColor(Be),Ve.setWidth(.5)),oe.setZIndex(pt));if(Y!=1&&ie.type=="line"){"line-pattern"in ft?Qe=void 0:Qe=colorWithOpacity(getValue(ie,"paint","line-color",U,$,P,K),getValue(ie,"paint","line-opacity",U,$,P,K));const ee=getValue(ie,"paint","line-width",U,$,P,K);Qe&&ee>0&&(++q,oe=k[q],(!oe||!oe.getStroke()||oe.getFill()||oe.getText())&&(oe=new Style$1({stroke:new Stroke}),k[q]=oe),Ve=oe.getStroke(),Ve.setLineCap(getValue(ie,"layout","line-cap",U,$,P,K)),Ve.setLineJoin(getValue(ie,"layout","line-join",U,$,P,K)),Ve.setMiterLimit(getValue(ie,"layout","line-miter-limit",U,$,P,K)),Ve.setColor(Qe),Ve.setWidth(ee),Ve.setLineDash(ft["line-dasharray"]?getValue(ie,"paint","line-dasharray",U,$,P,K).map(function(ne){return ne*ee}):null),oe.setZIndex(pt))}let Et=!1,H=null,W=0,J,se,de;if((Y==1||Y==2)&&"icon-image"in le){const ee=getValue(ie,"layout","icon-image",U,$,P,K);if(ee){J=typeof ee=="string"?fromTemplate(ee,B):ee.toString();let ne;const ue=a?a(n,J):void 0;if(d&&r&&r[J]||ue){const Oe=getValue(ie,"layout","icon-rotation-alignment",U,$,P,K);if(Y==2){const ke=G.getGeometry();if(ke.getFlatMidpoint||ke.getFlatMidpoints){const Ze=ke.getExtent();if(Math.sqrt(Math.max(Math.pow((Ze[2]-Ze[0])/F,2),Math.pow((Ze[3]-Ze[1])/F,2)))>150){const dt=ke.getType()==="MultiLineString"?ke.getFlatMidpoints():ke.getFlatMidpoint();if(renderFeature||(renderFeatureCoordinates=[NaN,NaN],renderFeature=new RenderFeature("Point",renderFeatureCoordinates,[],2,{},void 0)),ne=renderFeature,renderFeatureCoordinates[0]=dt[0],renderFeatureCoordinates[1]=dt[1],getValue(ie,"layout","symbol-placement",U,$,P,K)==="line"&&Oe==="map"){const Gt=ke.getStride(),Ut=ke.getFlatCoordinates();for(let Ot=0,vt=Ut.length-Gt;Ot=qt&&dt[0]<=sn&&dt[1]>=Kt&&dt[1]<=nn){W=Math.atan2(Nt-Ft,jt-Pt);break}}}}}}if(Y!==2||ne){const ke=getValue(ie,"layout","icon-size",U,$,P,K),Ze=ft["icon-color"]!==void 0?getValue(ie,"paint","icon-color",U,$,P,K):null;if(!Ze||Ze.a!==0){const mt=getValue(ie,"paint","icon-halo-color",U,$,P,K),dt=getValue(ie,"paint","icon-halo-width",U,$,P,K);let Rt=`${J}.${ke}.${dt}.${mt}`;if(Ze!==null&&(Rt+=`.${Ze}`),se=S[Rt],!se){const Gt=getDeclutterMode(ie,U,$,"icon",P);let Ut;"icon-offset"in le&&(Ut=getValue(ie,"layout","icon-offset",U,$,P,K).slice(0),Ut[0]*=ke,Ut[1]*=-ke);let Ot=Ze?[Ze.r*255,Ze.g*255,Ze.b*255,Ze.a]:void 0;if(ue){const vt={color:Ot,rotateWithView:Oe==="map",displacement:Ut,declutterMode:Gt,scale:ke};typeof ue=="string"?vt.src=ue:(vt.img=ue,vt.imgSize=[ue.width,ue.height]),se=new Icon(vt)}else{const vt=r[J];let Pt,Nt,jt;dt?vt.sdf?(Pt=drawIconHalo(drawSDF(d,vt,Ze||[0,0,0,1]),{x:0,y:0,width:vt.width,height:vt.height,pixelRatio:vt.pixelRatio},dt,mt),Ot=void 0):Pt=drawIconHalo(d,vt,dt,mt):(vt.sdf?(v||(v=drawSDF(d,{x:0,y:0,width:y[0],height:y[1]},{r:1,g:1,b:1,a:1})),Pt=v):Pt=d,Nt=[vt.width,vt.height],jt=[vt.x,vt.y]),se=new Icon({color:Ot,img:Pt,imgSize:y,size:Nt,offset:jt,rotateWithView:Oe==="map",scale:ke/vt.pixelRatio,displacement:Ut,declutterMode:Gt})}S[Rt]=se}}se&&(++q,oe=k[q],(!oe||!oe.getImage()||oe.getFill()||oe.getStroke())&&(oe=new Style$1,k[q]=oe),oe.setGeometry(ne),se.setRotation(W+deg2rad(getValue(ie,"layout","icon-rotate",U,$,P,K))),se.setOpacity(getValue(ie,"paint","icon-opacity",U,$,P,K)),se.setAnchor(anchor[getValue(ie,"layout","icon-anchor",U,$,P,K)]),oe.setImage(se),H=oe.getText(),oe.setText(void 0),oe.setZIndex(pt),Et=!0,de=!1)}else de=!0}}}if(Y==1&&ie.type==="circle"){++q,oe=k[q],(!oe||!oe.getImage()||oe.getFill()||oe.getStroke())&&(oe=new Style$1,k[q]=oe);const ee="circle-radius"in ft?getValue(ie,"paint","circle-radius",U,$,P,K):5,ne=colorWithOpacity(getValue(ie,"paint","circle-stroke-color",U,$,P,K),getValue(ie,"paint","circle-stroke-opacity",U,$,P,K)),ue=getValue(ie,"paint","circle-translate",U,$,P,K),Oe=colorWithOpacity(getValue(ie,"paint","circle-color",U,$,P,K),getValue(ie,"paint","circle-opacity",U,$,P,K)),ke=getValue(ie,"paint","circle-stroke-width",U,$,P,K),Ze=ee+"."+ne+"."+Oe+"."+ke+"."+ue[0]+"."+ue[1];se=S[Ze],se||(se=new CircleStyle({radius:ee,displacement:[ue[0],-ue[1]],stroke:ne&&ke>0?new Stroke({width:ke,color:ne}):void 0,fill:Oe?new Fill({color:Oe}):void 0,declutterMode:"none"}),S[Ze]=se),oe.setImage(se),H=oe.getText(),oe.setText(void 0),oe.setGeometry(void 0),oe.setZIndex(pt),Et=!0}let pe,Ge,be,ye,fe,X;if("text-field"in le){ye=Math.round(getValue(ie,"layout","text-size",U,$,P,K));const ee=getValue(ie,"layout","text-font",U,$,P,K);be=getValue(ie,"layout","text-line-height",U,$,P,K),Ge=mb2css(o?o(ee,e.metadata?e.metadata["ol:webfonts"]:void 0):ee,ye,be),Ge.includes("sans-serif")||(Ge+=",sans-serif"),fe=getValue(ie,"layout","text-letter-spacing",U,$,P,K),X=getValue(ie,"layout","text-max-width",U,$,P,K);const ne=getValue(ie,"layout","text-field",U,$,P,K);typeof ne=="object"&&ne.sections?ne.sections.length===1?pe=ne.toString():pe=ne.sections.reduce((ue,Oe,ke)=>{const Ze=Oe.fontStack?Oe.fontStack.split(","):ee,mt=mb2css(o?o(Ze):Ze,ye*(Oe.scale||1),be);let dt=Oe.text;if(dt===` +`)return ue.push(` +`,""),ue;if(Y==2){ue.push(applyLetterSpacing(dt,fe),mt);return}dt=wrapText(dt,mt,X,fe).split(` +`);for(let Rt=0,Gt=dt.length;Rt0&&ue.push(` +`,""),ue.push(dt[Rt],mt);return ue},[]):pe=fromTemplate(ne,B).trim(),ut=getValue(ie,"paint","text-opacity",U,$,P,K)}if(pe&&ut&&!de){Et||(++q,oe=k[q],(!oe||!oe.getText()||oe.getFill()||oe.getStroke())&&(oe=new Style$1,k[q]=oe),oe.setImage(void 0),oe.setGeometry(void 0));const ee=getDeclutterMode(ie,U,$,"text",P);oe.getText()||oe.setText(H),H=oe.getText(),(!H||"getDeclutterMode"in H&&H.getDeclutterMode()!==ee)&&(H=new Text({padding:[2,2,2,2],declutterMode:ee}),oe.setText(H));const ne=getValue(ie,"layout","text-transform",U,$,P,K);ne=="uppercase"?pe=Array.isArray(pe)?pe.map((Ft,qt)=>qt%2?Ft:Ft.toUpperCase()):pe.toUpperCase():ne=="lowercase"&&(pe=Array.isArray(pe)?pe.map((Ft,qt)=>qt%2?Ft:Ft.toLowerCase()):pe.toLowerCase());const ue=Array.isArray(pe)?pe:Y==2?applyLetterSpacing(pe,fe):wrapText(pe,Ge,X,fe);H.setText(ue),H.setFont(Ge),H.setRotation(deg2rad(getValue(ie,"layout","text-rotate",U,$,P,K)));const Oe=getValue(ie,"layout","text-anchor",U,$,P,K),ke=Et||Y==1?"point":getValue(ie,"layout","symbol-placement",U,$,P,K);let Ze;if(ke==="line-center"?(H.setPlacement("line"),Ze="center"):H.setPlacement(ke),ke==="line"&&typeof H.setRepeat=="function"){const Ft=getValue(ie,"layout","symbol-spacing",U,$,P,K);H.setRepeat(Ft*2)}H.setOverflow(ke==="point");let mt=getValue(ie,"paint","text-halo-width",U,$,P,K);const dt=getValue(ie,"layout","text-offset",U,$,P,K),Rt=getValue(ie,"paint","text-translate",U,$,P,K);let Gt=0,Ut=0;if(ke=="point"){Ze="center",Oe.indexOf("left")!==-1?(Ze="left",Ut=mt):Oe.indexOf("right")!==-1&&(Ze="right",Ut=-mt);const Ft=getValue(ie,"layout","text-rotation-alignment",U,$,P,K);H.setRotateWithView(Ft=="map")}else H.setMaxAngle(deg2rad(getValue(ie,"layout","text-max-angle",U,$,P,K))*pe.length/ue.length),H.setRotateWithView(!1);H.setTextAlign(Ze);let Ot="middle";Oe.indexOf("bottom")==0?(Ot="bottom",Gt=-mt-.5*(be-1)*ye):Oe.indexOf("top")==0&&(Ot="top",Gt=mt+.5*(be-1)*ye),H.setTextBaseline(Ot);const vt=getValue(ie,"layout","text-justify",U,$,P,K);H.setJustify(vt==="auto"?void 0:vt),H.setOffsetX(dt[0]*ye+Ut+Rt[0]),H.setOffsetY(dt[1]*ye+Gt+Rt[1]),L.setColor(colorWithOpacity(getValue(ie,"paint","text-color",U,$,P,K),ut)),H.setFill(L);const Pt=colorWithOpacity(getValue(ie,"paint","text-halo-color",U,$,P,K),ut);if(Pt&&mt>0){T.setColor(Pt),mt*=2;const Ft=.5*ye;T.setWidth(mt<=Ft?mt:Ft),H.setStroke(T)}else H.setStroke(void 0);const Nt=getValue(ie,"layout","text-padding",U,$,P,K),jt=H.getPadding();Nt!==jt[0]&&(jt[0]=Nt,jt[1]=Nt,jt[2]=Nt,jt[3]=Nt),oe.setZIndex(pt)}}}if(q>-1)return k.length=q+1,k};return n.setStyle(N),n.set("mapbox-source",x),n.set("mapbox-layers",E),n.set("mapbox-featurestate",n.get("mapbox-featurestate")||{}),N}function getTileResolutions(n,e=512){return n.getExtent()?createXYZ({extent:n.getExtent(),tileSize:e,maxZoom:22}).getResolutions():defaultResolutions}function completeOptions(n,e){return e.accessToken||(e=Object.assign({},e),new URL(n).searchParams.forEach((i,r)=>{e.accessToken=i,e.accessTokenParam=r})),e}function applyStyle(n,e,t="",i={},r=void 0){let s,o,a,d,y=!0;return typeof t!="string"&&!Array.isArray(t)?(a=t,d=a.source||a.layers,i=a):d=t,typeof i=="string"?(s=i,a={}):(s=i.styleUrl,a=i),a.updateSource===!1&&(y=!1),r||(r=a.resolutions),!s&&typeof e=="string"&&!e.trim().startsWith("{")&&(s=e),s&&(s=s.startsWith("data:")?location.href:normalizeStyleUrl(s,a.accessToken),a=completeOptions(s,a)),new Promise(function(v,_){getGlStyle(e,a).then(function(C){if(C.version!=8)return _(new Error("glStyle version 8 required."));if(!(n instanceof VectorLayer||n instanceof VectorTileLayer))return _(new Error("Can only apply to VectorLayer or VectorTileLayer"));const E=n instanceof VectorTileLayer?"vector":"geojson";if(d?Array.isArray(d)?o=C.layers.find(function(L){return L.id===d[0]}).source:o=d:(o=Object.keys(C.sources).find(function(L){return C.sources[L].type===E}),d=o),!o)return _(new Error(`No ${E} source found in the glStyle.`));function S(){if(!y)return Promise.resolve();if(n instanceof VectorTileLayer)return setupVectorSource(C.sources[o],s,a).then(function(G){const F=n.getSource();F?G!==F&&(F.setTileUrlFunction(G.getTileUrlFunction()),typeof F.setUrls=="function"&&typeof G.getUrls=="function"&&F.setUrls(G.getUrls()),F.format_||(F.format_=G.format_),F.getAttributions()||F.setAttributions(G.getAttributions()),F.getTileLoadFunction()===defaultLoadFunction&&F.setTileLoadFunction(G.getTileLoadFunction()),equivalent(F.getProjection(),G.getProjection())&&(F.tileGrid=G.getTileGrid())):n.setSource(G);const z=n.getSource().getTileGrid();!isFinite(n.getMaxResolution())&&!isFinite(n.getMinZoom())&&z.getMinZoom()>0&&n.setMaxResolution(getResolutionForZoom(Math.max(0,z.getMinZoom()-1e-12),z.getResolutions()))});const L=C.sources[o];let k=n.getSource();(!k||k.get("mapbox-source")!==L)&&(k=setupGeoJSONSource(L,s,a));const N=n.getSource();return N?k!==N&&(N.getAttributions()||N.setAttributions(k.getAttributions()),N.format_||(N.format_=k.getFormat()),N.url_=k.getUrl()):n.setSource(k),Promise.resolve()}let b,P,R,x;function T(){if(!x&&(!C.sprite||P)){if(a.projection&&!r){const k=get$3(a.projection).getUnits();k!=="m"&&(r=defaultResolutions.map(N=>N/METERS_PER_UNIT$1[k]))}x=stylefunction(n,C,d,r,P,R,(L,k=a.webfonts)=>getFonts(L,k),a.getImage),n.getStyle()?S().then(v).catch(_):_(new Error(`Nothing to show for source [${o}]`))}else x?(n.setStyle(x),S().then(v).catch(_)):_(new Error("Something went wrong trying to apply style."))}if(C.sprite){const L=new URL(normalizeSpriteUrl(C.sprite,a.accessToken,s||location.href));b=window.devicePixelRatio>=1.5?.5:1;const k=b==.5?"@2x":"";let N=L.origin+L.pathname+k+".json"+L.search;new Promise(function(G,F){fetchResource("Sprite",N,a).then(G).catch(function(z){N=L.origin+L.pathname+".json"+L.search,fetchResource("Sprite",N,a).then(G).catch(F)})}).then(function(G){if(G===void 0&&_(new Error("No sprites found.")),P=G,R=L.origin+L.pathname+k+".png"+L.search,a.transformRequest){const F=a.transformRequest(R,"SpriteImage")||R;(F instanceof Request||F instanceof Promise)&&(R=F)}T()}).catch(function(G){_(new Error(`Sprites cannot be loaded: ${N}: ${G.message}`))})}else T()}).catch(_)})}function extentFromTileJSON(n,e){const t=n.bounds;if(t){const i=fromLonLat([t[0],t[1]],e),r=fromLonLat([t[2],t[3]],e);return[i[0],i[1],r[0],r[1]]}return get$3(e).getExtent()}function sourceOptionsFromTileJSON(n,e,t){const i=new TileJSON({tileJSON:e,tileSize:n.tileSize||e.tileSize||512}),r=i.getTileJSON(),s=i.getTileGrid(),o=get$3(t.projection||"EPSG:3857"),a=extentFromTileJSON(r,o),d=o.getExtent(),y=r.minzoom||0,v=r.maxzoom||22,_={attributions:i.getAttributions(),projection:o,tileGrid:new TileGrid({origin:d?getTopLeft(d):s.getOrigin(0),extent:a||s.getExtent(),minZoom:y,resolutions:getTileResolutions(o,e.tileSize).slice(0,v+1),tileSize:s.getTileSize(0)})};return Array.isArray(r.tiles)?_.urls=r.tiles:_.url=r.tiles,_}function setupVectorSource(n,e,t){return new Promise(function(i,r){getTileJson(n,e,t).then(function({tileJson:s,tileLoadFunction:o}){const a=sourceOptionsFromTileJSON(n,s,t);a.tileLoadFunction=o,a.format=new MVT,i(new VectorTile(a))}).catch(r)})}function getBboxTemplate(n){return`{bbox-${(n?n.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function setupGeoJSONSource(n,e,t){const i=t.projection?new GeoJSON$1({dataProjection:t.projection}):new GeoJSON$1,r=n.data,s={};if(typeof r=="string"){const a=normalizeSourceUrl(r,t.accessToken,t.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(a)){const y=(_,C,E)=>{const S=getBboxTemplate(E);return a.replace(S,`${_.join(",")}`)},v=new VectorSource({attributions:n.attribution,format:i,loader:(_,C,E,S,b)=>{const P=typeof y=="function"?y(_,C,E):y;fetchResource("GeoJSON",P,t).then(R=>{const x=v.getFormat().readFeatures(R,{featureProjection:E});v.addFeatures(x),S(x)}).catch(R=>{v.removeLoadedExtent(_),b()})},strategy:bbox});return v.set("mapbox-source",n),v}const d=new VectorSource({attributions:n.attribution,format:i,url:a,loader:(y,v,_,C,E)=>{fetchResource("GeoJSON",a,t).then(S=>{const b=d.getFormat().readFeatures(S,{featureProjection:_});d.addFeatures(b),C(b)}).catch(S=>{d.removeLoadedExtent(y),E()})}});return d}s.features=i.readFeatures(r,{featureProjection:"EPSG:3857"});const o=new VectorSource(Object.assign({attributions:n.attribution,format:i},s));return o.set("mapbox-source",n),o}var LayerMapBox=class extends VectorTileLayer{constructor(e,t){if(!e.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof e.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof e.ssl>"u"&&(e.ssl=!0);var i=e.ssl===!1?"http://":"https://",r=e.configuration;if(!r){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var s=e.layer+"$GEOPORTAIL:GPP:TMS";if(r=Config.configuration.getLayerConf(s),!r)throw new Error("ERROR : Layer ID not found into the catalogue !?")}for(var o=null,a="",d=e.style,y=0;y{i.setState("ready"),this.set("mapbox-styles",e)}).catch(d=>{this.onStyleMapBoxError(d)})}onStyleMapBoxError(e){var t=this.getSource();t.setState("error"),console.error(e.message)}};window.ol&&window.ol.layer&&(window.ol.layer.GeoportalMapBox=LayerMapBox);var ControlExtended=class extends Control{constructor(e){super(e)}setPosition(e){if(this.getMap()){var t=new PositionFactory(this);t.set(e)}}};const ANCHORS=["top-left","top-right","bottom-left","bottom-right"];var cn,Ln,vn,On;class PositionFactory{constructor(e){bn(this,cn);return this.caller=e,this.container=null,this.container=null,fn(this,cn,vn).call(this,"top-left"),fn(this,cn,vn).call(this,"top-right"),fn(this,cn,vn).call(this,"bottom-left"),fn(this,cn,vn).call(this,"bottom-right"),this}set(e){ANCHORS.includes(e.toLowerCase())&&(fn(this,cn,On).call(this,e),e.includes("bottom")?this.container.children["position-container-"+e].prepend(this.caller.element):this.container.children["position-container-"+e].appendChild(this.caller.element))}}cn=new WeakSet,Ln=function(e){var t=this.container.children["position-container-"+e];return!!t},vn=function(e){if(this.container=this.caller.getMap().getOverlayContainerStopEvent(),!fn(this,cn,Ln).call(this,e)){var t=document.createElement("div");t.id="position-container-"+e,t.className="position position-container-"+e,this.container.appendChild(t)}},On=function(e){var t=this;const i=d=>{var y=t.container.children["position-container-"+d];return y.children.length},r=d=>{var y=t.container.children["position-container-"+d],v=y.offsetWidth;return v},s=d=>{var y=t.container.children["position-container-"+d],v=y.offsetHeight;return v},o=d=>{d.style.top="unset",d.style.bottom="unset",d.style.left="unset",d.style.right="unset"};o(this.caller.element),this.caller.element.style.position="unset";var a=Array.from(this.caller.element.getElementsByClassName("GPpanel"));a.length!==0&&a.forEach(d=>{if(d.nodeName.toLowerCase()==="dialog")switch(o(d),e.toLowerCase()){case"top-left":d.style.top=i(e)?s(e)+"px":"0px",d.style.left=r(e)+"px";break;case"bottom-left":d.style.bottom=i(e)?s(e)+"px":"0px",d.style.left=r(e)+"px";break;case"top-right":d.style.top=i(e)?s(e)+"px":"0px",d.style.right=r(e)+"px";break;case"bottom-right":d.style.bottom=i(e)?s(e)+"px":"0px",d.style.right=r(e)+"px";break}})};var SelectorID={generate:function(){var n=Math.floor(Date.now());return function(){return n++}}(),name:function(n){var e=null,t=n.lastIndexOf("-");return t===-1?e=n:e=n.substring(0,t),e},index:function(n){var e=null,t=this.name(n),i=t.lastIndexOf("_");return i!==-1&&(e=t.substring(i+1)),e},uuid:function(n){var e=null,t=n.lastIndexOf("-");return t!==-1&&(e=parseInt(n.substring(t+1),10)),e}};/**! + * Sortable 1.15.2 + * @author RubaXa + * @author owenm + * @license MIT + */function ownKeys(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function _objectSpread2(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}function _objectWithoutProperties(n,e){if(n==null)return{};var t=_objectWithoutPropertiesLoose(n,e),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(t[i]=n[i])}return t}var version="1.15.2";function userAgent(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(n,e,t){n.addEventListener(e,t,!IE11OrLess&&captureMode)}function off(n,e,t){n.removeEventListener(e,t,!IE11OrLess&&captureMode)}function matches(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function getParentOrHost(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function closest(n,e,t,i){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&matches(n,e):matches(n,e))||i&&n===t)return n;if(n===t)break}while(n=getParentOrHost(n))}return null}var R_SPACE=/\s+/g;function toggleClass(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var i=(" "+n.className+" ").replace(R_SPACE," ").replace(" "+e+" "," ");n.className=(i+(t?" "+e:"")).replace(R_SPACE," ")}}function css(n,e,t){var i=n&&n.style;if(i){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in i)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),i[e]=t+(typeof t=="string"?"":"px")}}function matrix(n,e){var t="";if(typeof n=="string")t=n;else do{var i=css(n,"transform");i&&i!=="none"&&(t=i+" "+t)}while(!e&&(n=n.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function find(n,e,t){if(n){var i=n.getElementsByTagName(e),r=0,s=i.length;if(t)for(;r=s,!o)return i;if(i===getWindowScrollingElement())break;i=getParentAutoScrollElement(i,!1)}return!1}function getChild(n,e,t,i){for(var r=0,s=0,o=n.children;s2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,s=_objectWithoutProperties(i,_excluded);PluginManager.pluginEvent.bind(Sortable)(e,t,_objectSpread2({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:r,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(a){_dispatchEvent({sortable:t,name:a,originalEvent:r})}},s))};function _dispatchEvent(n){dispatchEvent(_objectSpread2({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},n))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),_detectDirection=function(e,t){var i=css(e),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=getChild(e,0,t),o=getChild(e,1,t),a=s&&css(s),d=o&&css(o),y=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect(s).width,v=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+getRect(o).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var _=a.float==="left"?"left":"right";return o&&(d.clear==="both"||d.clear===_)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||y>=r&&i[CSSFloatProperty]==="none"||o&&i[CSSFloatProperty]==="none"&&y+v>r)?"vertical":"horizontal"},_dragElInRowColumn=function(e,t,i){var r=i?e.left:e.top,s=i?e.right:e.bottom,o=i?e.width:e.height,a=i?t.left:t.top,d=i?t.right:t.bottom,y=i?t.width:t.height;return r===a||s===d||r+o/2===a+y/2},_detectNearestEmptySortable=function(e,t){var i;return sortables.some(function(r){var s=r[expando].options.emptyInsertThreshold;if(!(!s||lastChild(r))){var o=getRect(r),a=e>=o.left-s&&e<=o.right+s,d=t>=o.top-s&&t<=o.bottom+s;if(a&&d)return i=r}}),i},_prepareGroup=function(e){function t(s,o){return function(a,d,y,v){var _=a.options.group.name&&d.options.group.name&&a.options.group.name===d.options.group.name;if(s==null&&(o||_))return!0;if(s==null||s===!1)return!1;if(o&&s==="clone")return s;if(typeof s=="function")return t(s(a,d,y,v),o)(a,d,y,v);var C=(o?a:d).options.group.name;return s===!0||typeof s=="string"&&s===C||s.join&&s.indexOf(C)>-1}}var i={},r=e.group;(!r||_typeof(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=t(r.pull,!0),i.checkPut=t(r.put),i.revertClone=r.revertClone,e.group=i},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&!ChromeForAndroid&&document.addEventListener("click",function(n){if(ignoreNextClick)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function(e){if(dragEl){e=e.touches?e.touches[0]:e;var t=_detectNearestEmptySortable(e.clientX,e.clientY);if(t){var i={};for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r]);i.target=i.rootEl=t,i.preventDefault=void 0,i.stopPropagation=void 0,t[expando]._onDragOver(i)}}},_checkOutsideTargetEl=function(e){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(e.target)};function Sortable(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=_extends({},e),n[expando]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,a){o.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==!1&&"PointerEvent"in window&&!Safari,emptyInsertThreshold:5};PluginManager.initializePlugins(this,n,t);for(var i in t)!(i in e)&&(e[i]=t[i]);_prepareGroup(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?on(n,"pointerdown",this._onTapStart):(on(n,"mousedown",this._onTapStart),on(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(n,"dragover",this),on(n,"dragenter",this)),sortables.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(lastTarget=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,dragEl):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,i=this.el,r=this.options,s=r.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,d=(a||e).target,y=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||d,v=r.filter;if(_saveInputCheckedState(i),!dragEl&&!(/mousedown|pointerdown/.test(o)&&e.button!==0||r.disabled)&&!y.isContentEditable&&!(!this.nativeDraggable&&Safari&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=closest(d,r.draggable,i,!1),!(d&&d.animated)&&lastDownEl!==d)){if(oldIndex=index(d),oldDraggableIndex=index(d,r.draggable),typeof v=="function"){if(v.call(this,e,d,this)){_dispatchEvent({sortable:t,rootEl:y,name:"filter",targetEl:d,toEl:i,fromEl:i}),pluginEvent("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(v&&(v=v.split(",").some(function(_){if(_=closest(y,_.trim(),i,!1),_)return _dispatchEvent({sortable:t,rootEl:_,name:"filter",targetEl:d,fromEl:i,toEl:i}),pluginEvent("filter",t,{evt:e}),!0}),v)){s&&e.cancelable&&e.preventDefault();return}r.handle&&!closest(y,r.handle,i,!1)||this._prepareDragStart(e,a,d)}}},_prepareDragStart:function(e,t,i){var r=this,s=r.el,o=r.options,a=s.ownerDocument,d;if(i&&!dragEl&&i.parentNode===s){var y=getRect(i);if(rootEl=s,dragEl=i,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=i,activeGroup=o.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(t||e).clientX,clientY:(t||e).clientY},tapDistanceLeft=tapEvt.clientX-y.left,tapDistanceTop=tapEvt.clientY-y.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,dragEl.style["will-change"]="all",d=function(){if(pluginEvent("delayEnded",r,{evt:e}),Sortable.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!FireFox&&r.nativeDraggable&&(dragEl.draggable=!0),r._triggerDragStart(e,t),_dispatchEvent({sortable:r,name:"choose",originalEvent:e}),toggleClass(dragEl,o.chosenClass,!0)},o.ignore.split(",").forEach(function(v){find(dragEl,v.trim(),_disableDraggable)}),on(a,"dragover",nearestEmptyInsertDetectEvent),on(a,"mousemove",nearestEmptyInsertDetectEvent),on(a,"touchmove",nearestEmptyInsertDetectEvent),on(a,"mouseup",r._onDrop),on(a,"touchend",r._onDrop),on(a,"touchcancel",r._onDrop),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:e}),o.delay&&(!o.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}on(a,"mouseup",r._disableDelayedDrag),on(a,"touchend",r._disableDelayedDrag),on(a,"touchcancel",r._disableDelayedDrag),on(a,"mousemove",r._delayedDragTouchMoveHandler),on(a,"touchmove",r._delayedDragTouchMoveHandler),o.supportPointer&&on(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(d,o.delay)}else d()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag),off(e,"touchend",this._disableDelayedDrag),off(e,"touchcancel",this._disableDelayedDrag),off(e,"mousemove",this._delayedDragTouchMoveHandler),off(e,"touchmove",this._delayedDragTouchMoveHandler),off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):t?on(document,"touchmove",this._onTouchMove):on(document,"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:t}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var i=this.options;!e&&toggleClass(dragEl,i.dragClass,!1),toggleClass(dragEl,i.ghostClass,!0),Sortable.active=this,e&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),e!==t);)t=e;if(dragEl.parentNode[expando]._isOutsideThisEl(e),t)do{if(t[expando]){var i=void 0;if(i=t[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:t}),i&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);_unhideGhostForTarget()}},_onTouchMove:function(e){if(tapEvt){var t=this.options,i=t.fallbackTolerance,r=t.fallbackOffset,s=e.touches?e.touches[0]:e,o=ghostEl&&matrix(ghostEl,!0),a=ghostEl&&o&&o.a,d=ghostEl&&o&&o.d,y=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),v=(s.clientX-tapEvt.clientX+r.x)/(a||1)+(y?y[0]-ghostRelativeParentInitialScroll[0]:0)/(a||1),_=(s.clientY-tapEvt.clientY+r.y)/(d||1)+(y?y[1]-ghostRelativeParentInitialScroll[1]:0)/(d||1);if(!Sortable.active&&!awaitingDragStarted){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(e){e.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(e),_globalDragOver(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,i=this.el.children,r=0,s=i.length,o=this.options;rr.right+s||n.clientY>i.bottom&&n.clientX>i.left:n.clientY>r.bottom+s||n.clientX>i.right&&n.clientY>i.top}function _getSwapDirection(n,e,t,i,r,s,o,a){var d=i?n.clientY:n.clientX,y=i?t.height:t.width,v=i?t.top:t.left,_=i?t.bottom:t.right,C=!1;if(!o){if(a&&targetMoveDistancev+y*s/2:d<_-y*s/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)C=!0;else if(lastDirection===1?d_-targetMoveDistance)return-lastDirection}else if(d>v+y*(1-r)/2&&d<_-y*(1-r)/2)return _getInsertDirection(e)}return C=C||o,C&&(d_-y*s/2)?d>v+y/2?1:-1:0}function _getInsertDirection(n){return index(dragEl)this._onMapMoveEnd(e)),this._listeners.onAddListener=e.getLayers().on("add",i=>{var r=i.element,s;r.hasOwnProperty("gpLayerId")?s=r.gpLayerId:(s=this._layerId,r.gpLayerId=s,this._layerId++),this._layers[s]||this.addLayer(r)}),this._listeners.onRemoveListener=e.getLayers().on("remove",i=>{var r=i.element,s=r.gpLayerId;this._layers[s]&&this.removeLayer(r)});else{unByKey(this._listeners.onMoveListener),unByKey(this._listeners.onAddListener),unByKey(this._listeners.onRemoveListener);for(var t=this._layersOrder.length-1;t>=0;t--)this._layersOrder[t].layer.setZIndex(0)}super.setMap(e),this.options.position&&this.setPosition(this.options.position)}addLayer(e,t){var i=this.getMap();if(t=t||{},!e){logger$w.log("[ERROR] LayerSwitcher:addLayer - missing layer parameter");return}var r=e.gpLayerId;if(typeof r>"u"){logger$w.trace("[WARN] LayerSwitcher:addLayer - configuration cannot be set for this layer (layer id not found)",e);return}var s=!1;if(i.getLayers().forEach(P=>{P.gpLayerId===r&&(s=!0)}),!s){logger$w.log("[ERROR] LayerSwitcher:addLayer - configuration cannot be set for ",e," layer (layer is not in map.getLayers() )");return}if(this._layers[r]){for(var C in t)t.hasOwnProperty(C)&&(this._layers[r][C]=t[C]);if(t.title){var E=document.getElementById(this._addUID("GPname_ID_"+r));E&&(E.innerHTML=t.title,E.title=t.description||t.title)}var S=document.getElementById(this._addUID("GPinfo_ID_"+r));if(!document.getElementById(this._addUID("GPinfo_ID_"+r))&&t.description){var b=document.getElementById(this._addUID("GPadvancedTools_ID_"+r));b&&b.appendChild(this._createAdvancedToolInformationElement({id:r}))}S&&S.className==="GPlayerInfoOpened"&&document.getElementById(this._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden")}else{var o=this.getLayerInfo(e)||{},a=e.getOpacity(),d=e.getVisible(),y=this.isInRange(e,i),v={layer:e,id:r,name:e.name,service:e.service,opacity:a??1,visibility:d??!0,inRange:y??!0,title:t.title!=null?t.title:o._title||r,description:t.description||o._description||null,legends:t.legends||o._legends||[],metadata:t.metadata||o._metadata||[],quicklookUrl:t.quicklookUrl||o._quicklookUrl||null};this._layers[r]=v;var _=this._createLayerDiv(v);this._layers[r].div=_,e.getZIndex&&e.getZIndex()!==0&&typeof e.getZIndex()<"u"||e._forceNullzIndex?this._updateLayersOrder():(this._layersOrder.unshift(v),this._lastZIndex++,e.setZIndex(this._lastZIndex),this._layerListContainer.insertBefore(_,this._layerListContainer.firstChild)),this._listeners.updateLayerOpacity=e.on("change:opacity",P=>this._updateLayerOpacity(P)),this._listeners.updateLayerVisibility=e.on("change:visible",P=>this._updateLayerVisibility(P)),this._layers[r].onZIndexChangeEvent==null&&(this._layers[r].onZIndexChangeEvent=e.on("change:zIndex",()=>this._updateLayersOrder()))}this._updateLayerCounter(),this.dispatchEvent({type:"layerswitcher:add",layer:this._layers[r]})}removeLayer(e){if(e){unByKey(this._listeners.updateLayerOpacity),unByKey(this._listeners.updateLayerVisibility),logger$w.trace(e);var t=e.gpLayerId,i=document.getElementById(this._addUID("GPinfo_ID_"+t));i&&i.className==="GPlayerInfoOpened"&&document.getElementById(this._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden");var r=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+t));r&&this._layerListContainer.removeChild(r);var s=Math.abs(e.getZIndex()-this._lastZIndex);this._layersOrder.splice(s,1),this._lastZIndex--;for(var o=this._layersOrder,a=0;a{var y=null;d.hasOwnProperty("gpLayerId")?y=d.gpLayerId:(y=this._layerId,d.gpLayerId=y,this._layerId++);var v=this.getLayerInfo(d)||{};if(this._layers[y])this._layers[y].opacity=d.getOpacity(),this._layers[y].visibility=d.getVisible(),this._layers[y].inRange=this.isInRange(d,e);else{var _=d.getOpacity(),C=d.getVisible(),E=this.isInRange(d,e),S={layer:d,id:y,name:d.name,service:d.service,opacity:_??1,visibility:C??!0,inRange:E??!0,title:v._title||y,description:v._description||null,legends:v._legends||[],metadata:v._metadata||[],quicklookUrl:v._quicklookUrl||null};this._layers[y]=S}if(this._updateLayerCounter(),this._listeners.updateLayerOpacity=d.on("change:opacity",P=>this._updateLayerOpacity(P)),this._listeners._updateLayerVisibility=d.on("change:visible",P=>this._updateLayerVisibility(P)),d.getZIndex!==void 0){var b=d.getZIndex()||0;(!this._layersIndex[b]||!Array.isArray(this._layersIndex[b]))&&(this._layersIndex[b]=[]),this._layersIndex[b].push(this._layers[y])}});for(var t in this._layersIndex)if(this._layersIndex.hasOwnProperty(t))for(var i=this._layersIndex[t],r=0;rthis._updateLayersOrder()));for(var s=0;s1&&(t=1),t<0&&(t=0);var i=e.target.gpLayerId,r=document.getElementById(this._addUID("GPopacityValueDiv_ID_"+i));r&&(r.value=Math.round(t*100));var s=document.getElementById(this._addUID("GPopacityValue_ID_"+i));s&&(s.innerHTML=Math.round(t*100)+"%"),this.dispatchEvent({type:"layerswitcher:change:opacity",opacity:t,layer:this._layers[i]})}_onVisibilityLayerClick(e){var t=e.target.id,i=SelectorID.index(t),r=this._layers[i].layer;r.setVisible(e.target.ariaPressed==="true")}_updateLayerVisibility(e){var t=e.target.getVisible(),i=e.target.gpLayerId,r=document.getElementById(this._addUID("GPvisibilityPicto_ID_"+i));r&&(r.ariaPressed=t),this.dispatchEvent({type:"layerswitcher:change:visibility",visibility:t,layer:this._layers[i]})}_updateLayersOrder(){var e=this.getMap();if(e){this._layersIndex={};var t,i;e.getLayers().forEach(y=>{i=y.gpLayerId,unByKey(this._layers[i].onZIndexChangeEvent),this._layers[i].onZIndexChangeEvent=null,t=null,y.getZIndex!==void 0&&(t=y.getZIndex(),(!this._layersIndex[t]||!Array.isArray(this._layersIndex[t]))&&(this._layersIndex[t]=[]),this._layersIndex[t].push(this._layers[i]))}),this._lastZIndex=0,this._layersOrder=[];for(var r in this._layersIndex)if(this._layersIndex.hasOwnProperty(r))for(var s=this._layersIndex[r],o=0;othis._updateLayersOrder()));if(this._layerListContainer){for(let y=0;ythis._updateLayersOrder()))}e.updateSize()}_onStartDragAndDropLayerClick(e){logger$w.debug(e)}_onZoomToExtentClick(e){logger$w.debug(e);var t=e.target.id,i=SelectorID.index(t),r=this._layers[i],s=null,o=null;try{if(!Config.isConfigLoaded())throw"ERROR : contract key configuration has to be loaded to load Geoportal layers.";if(!r.layer.hasOwnProperty("gpLayerId"))throw"WARN : User data not yet implemented !";var a=r.layer.name||r.layer.getSource().name,d=r.layer.service||r.layer.getSource().service,y=Config.configuration.getLayerId(a,d);if(!y)throw"ERROR : Layer ID not found into the catalogue !?";var v=Config.configuration.getGlobalConstraints(y);if(v){var _=this.getMap();if(!_||!_.getView())return;var C=_.getView(),E=C.getProjection(),S=[v.extent.left,v.extent.bottom,v.extent.right,v.extent.top],b=v.crs;b||(b="EPSG:4326"),s=transformExtent(S,b,E),s&&C.fit(s)}}catch(P){o=P}this.dispatchEvent({type:"layerswitcher:extent",extent:s,layer:r,error:o})}_onMapMoveEnd(e){e.getLayers().forEach(t=>{var i=t.gpLayerId;if(this._layers[i]){var r=this._layers[i],s;this.isInRange(t,e)&&!r.inRange?(r.inRange=!0,s=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+i)),s.classList.remove("outOfRange")):!this.isInRange(t,e)&&r.inRange&&(r.inRange=!1,s=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+i)),s.classList.add("outOfRange"))}})}getLayerDOMId(e){var t=null;return this.getMap().getLayers().forEach(i=>{i===e&&(t=i.hasOwnProperty("gpLayerId")?i.gpLayerId:null)}),t!==null?this._addUID("GPlayerSwitcher_ID_"+t):null}isInRange(e,t){if(t){var i=t.getView().getResolution();if(i>e.getMaxResolution()||i"u"?!0:e.active,e.defaultEvent&&typeof e.defaultEvent!="string"){logger$v.log("[ERROR] GetFeatureInfo:_initialize - defaultEvent parameter should be a string");return}if(this._defaultEvent=e.defaultEvent||"singleclick",!this._isValidEvent(this._defaultEvent)){logger$v.log("[ERROR] GetFeatureInfo:_initialize - _defaultEvent '"+this._defaultEvent+"' is not a valid event");return}if(e.defaultInfoFormat&&typeof e.defaultInfoFormat!="string"){logger$v.log("[ERROR] GetFeatureInfo:_initialize - defaultInfoFormat parameter should be a string");return}if(this._defaultInfoFormat=e.defaultInfoFormat||"text/html",e.cursorStyle&&typeof e.cursorStyle!="string"){logger$v.log("[ERROR] GetFeatureInfo:_initialize - cursorStyle parameter should be a string");return}if(this._cursorStyle=e.cursorStyle||"pointer",e.proxyUrl){if(typeof e.proxyUrl!="string"){logger$v.log("[ERROR] GetFeatureInfo:_initialize - proxyUrl parameter should be a string");return}this._proxyUrl=e.proxyUrl}if(e.noProxyDomains){if(!Array.isArray(e.noProxyDomains)){logger$v.log("[ERROR] GetFeatureInfo:_initialize - noProxyDomains parameter should be a array");return}this._noProxyDomains=e.noProxyDomains}if(typeof e.autoPan<"u"&&typeof e.autoPan!="boolean"){logger$v.log("[ERROR] GetFeatureInfo:_initialize - autoPan parameter should be a boolean");return}if(this._autoPan=typeof e.autoPan>"u"?!0:e.autoPan,e.autoPanAnimation){if(e.autoPanAnimation.duration&&typeof e.autoPanAnimation.duration!="number"){logger$v.log("[ERROR] GetFeatureInfo:_initialize - autoPanAnimation parameter is invalid : duration should be a number.");return}if(e.autoPanAnimation.easing&&typeof e.autoPanAnimation.easing!="function"){logger$v.log("[ERROR] GetFeatureInfo:_initialize - autoPanAnimation parameter is invalid : easing should be a ol.easing function or a custom function.");return}this._autoPanAnimation=e.autoPanAnimation}if(e.autoPanMargin){if(typeof e.autoPanMargin!="number"){logger$v.log("[ERROR] GetFeatureInfo:_initialize - autoPanMargin parameter should be a number");return}this._autoPanMargin=e.autoPanMargin}if(!Array.isArray(t)){logger$v.log("[ERROR] GetFeatureInfo:_initialize - layers parameter should be an array");return}this._setLayers(t),this._activateGetFeatureInfoButton=null}setMap(e){if(e){if(this._updateEvents(e),this._cursorStyle&&this._active&&this._activateCursor(!0,e),e.getLayers().on("remove",i=>{for(var r=0;r{var r=Gfi.getLayerFormat(i);!this._hasLayer(i)&&r==="vector"&&(this._layers.push({obj:i}),t=!0)}),t&&this._updateEvents(e),e.getLayers().on("add",i=>{var r=Gfi.getLayerFormat(i.element);r==="vector"&&this._layers.push({obj:i.element}),this._updateEvents(e)})}}else this._clearEvents(),this._activateCursor(!1);super.setMap(e),this.options.position&&this.setPosition(this.options.position)}getLayers(){return this._layers}setDefaultEvent(e){if(typeof e!="string"){logger$v.log("[ERROR] GetFeatureInfo:setDefaultEvent - eventName parameter should be a string");return}if(!e||!this._isValidEvent(e)){logger$v.log("[ERROR] GetFeatureInfo:setDefaultEvent - event '"+e+"' is not allowed.");return}this._defaultEvent=e,this._updateEvents()}setCursorStyle(e){if(typeof e!="string"){logger$v.log("[ERROR] GetFeatureInfo:setCursorStyle - cursorStyle parameter should be a string");return}this._active&&(!this._cursorStyle&&e?this._activateCursor(!0):this._cursorStyle&&!e&&this._activateCursor(!1)),this._cursorStyle=e}setActive(e){this._setActive(e),this._activateGetFeatureInfoButton.setAttribute("aria-pressed",e)}_setActive(e){if(typeof e!="boolean"){logger$v.log("[ERROR] GetFeatureInfo:_setActive - active parameter should be a boolean");return}this._active!==e&&(this._active=e,this._cursorStyle&&this._activateCursor(e))}isActive(){return this._active}setHidden(e){this.element.style.visibility=e?"hidden":""}isHidden(){return this.element.style.visibility==="hidden"}setLayers(e){this._setLayers(e),this._updateEvents()}_isValidEvent(e){return Object.keys(this._events).indexOf(e)>-1}_activateEvent(e,t){var i=this,r=function(s){Gfi.onDisplayFeatureInfo(s,i)};e==="contextmenu"?t.getViewport().addEventListener(e,r):t.on(e,r),this._eventsHandler[e]=r,this._events[e]=!0}_deactivateEvent(e,t){e==="contextmenu"?t.getViewport().removeEventListener(e,this._eventsHandler[e]):t.un(e,this._eventsHandler[e]),delete this._eventsHandler[e],this._events[e]=!1}_updateEvents(e){e||(e=this.getMap());for(var t=[],i=0;i=0?this._activateEvent(s,e):this._events[s]&&t.indexOf(s)<0&&this._deactivateEvent(s,e)}_clearEvents(){var e=this.getMap();for(var t in this._events)this._events[t]&&this._deactivateEvent(t,e)}_hasLayer(e){for(var t=0;t{for(var y=i.getLayers(),v=0;v