vcm-compiled_api_es6.js 1.07 MB
Newer Older
Patrick's avatar
Patrick committed
1
/************************************************************************************
Patrick's avatar
Patrick committed
2
3
* Produkt: virtualcityMAP
* Copyright © 2011-2020 virtualcitySYSTEMS GmbH, Berlin, Germany. All rights reserved.
Patrick's avatar
Patrick committed
4
5
6
*************************************************************************************/


Patrick's avatar
Patrick committed
7
(function(e){var t={};function i(s){if(t[s])return t[s].exports;var r=t[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,s){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(s,r,function(t){return e[t]}.bind(null,r));return s},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=836)})([,function(e,t,i){(function(e){(function(t,i){e.exports=i()})(0,(function(){"use strict";var t,s;function r(){return t.apply(null,arguments)}function n(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var i,s=[];for(i=0;i<e.length;++i)s.push(t(e[i],i));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function g(e,t){for(var i in t)m(t,i)&&(e[i]=t[i]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,i,s){return qi(e,t,i,s,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function y(e){return null==e._pf&&(e._pf=f()),e._pf}function _(e){if(null==e._isValid){var t=y(e),i=s.call(t.parsedDateParts,(function(e){return null!=e})),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function v(e){var t=p(NaN);return null!=e?g(y(t),e):y(t).userInvalidated=!0,t}s=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),i=t.length>>>0,s=0;s<i;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var L=r.momentProperties=[];function M(e,t){var i,s,r;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=y(t)),c(t._locale)||(e._locale=t._locale),L.length>0)for(i=0;i<L.length;i++)s=L[i],r=t[s],c(r)||(e[s]=r);return e}var b=!1;function w(e){M(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,r.updateOffset(this),b=!1)}function T(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function S(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function C(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=S(t)),i}function E(e,t,i){var s,r=Math.min(e.length,t.length),n=Math.abs(e.length-t.length),a=0;for(s=0;s<r;s++)(i&&e[s]!==t[s]||!i&&C(e[s])!==C(t[s]))&&a++;return a+n}function I(e){!1===r.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var i=!0;return g((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),i){for(var s,n=[],a=0;a<arguments.length;a++){if(s="","object"===typeof arguments[a]){for(var o in s+="\n["+a+"] ",arguments[0])s+=o+": "+arguments[0][o]+", ";s=s.slice(0,-2)}else s=arguments[a];n.push(s)}I(e+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)}),t)}var D,O={};function P(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),O[e]||(I(t),O[e]=!0)}function A(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e){var t,i;for(i in e)t=e[i],A(t)?this[i]=t:this["_"+i]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Y(e,t){var i,s=g({},e);for(i in t)m(t,i)&&(o(e[i])&&o(t[i])?(s[i]={},g(s[i],e[i]),g(s[i],t[i])):null!=t[i]?s[i]=t[i]:delete s[i]);for(i in e)m(e,i)&&!m(t,i)&&o(e[i])&&(s[i]=g({},s[i]));return s}function j(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)m(e,t)&&i.push(t);return i};var N={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function F(e,t,i){var s=this._calendar[e]||this._calendar["sameElse"];return A(s)?s.call(t,i):s}var R={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function H(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])}var G="Invalid date";function z(){return this._invalidDate}var B="%d",V=/\d{1,2}/;function U(e){return this._ordinal.replace("%d",e)}var W={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function q(e,t,i,s){var r=this._relativeTime[i];return A(r)?r(e,t,i,s):r.replace(/%d/i,e)}function J(e,t){var i=this._relativeTime[e>0?"future":"past"];return A(i)?i(t):i.replace(/%s/i,t)}var K={};function Z(e,t){var i=e.toLowerCase();K[i]=K[i+"s"]=K[t]=e}function Q(e){return"string"===typeof e?K[e]||K[e.toLowerCase()]:void 0}function X(e){var t,i,s={};for(i in e)m(e,i)&&(t=Q(i),t&&(s[t]=e[i]));return s}var $={};function ee(e,t){$[e]=t}function te(e){var t=[];for(var i in e)t.push({unit:i,priority:$[i]});return t.sort((function(e,t){return e.priority-t.priority})),t}function ie(e,t,i){var s=""+Math.abs(e),r=t-s.length,n=e>=0;return(n?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+s}var se=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,re=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ne={},ae={};function oe(e,t,i,s){var r=s;"string"===typeof s&&(r=function(){return this[s]()}),e&&(ae[e]=r),t&&(ae[t[0]]=function(){return ie(r.apply(this,arguments),t[1],t[2])}),i&&(ae[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function le(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ce(e){var t,i,s=e.match(se);for(t=0,i=s.length;t<i;t++)ae[s[t]]?s[t]=ae[s[t]]:s[t]=le(s[t]);return function(t){var r,n="";for(r=0;r<i;r++)n+=A(s[r])?s[r].call(t,e):s[r];return n}}function ue(e,t){return e.isValid()?(t=he(t,e.localeData()),ne[t]=ne[t]||ce(t),ne[t](e)):e.localeData().invalidDate()}function he(e,t){var i=5;function s(e){return t.longDateFormat(e)||e}re.lastIndex=0;while(i>=0&&re.test(e))e=e.replace(re,s),re.lastIndex=0,i-=1;return e}var de=/\d/,me=/\d\d/,ge=/\d{3}/,pe=/\d{4}/,fe=/[+-]?\d{6}/,ye=/\d\d?/,_e=/\d\d\d\d?/,ve=/\d\d\d\d\d\d?/,Le=/\d{1,3}/,Me=/\d{1,4}/,be=/[+-]?\d{1,6}/,we=/\d+/,Te=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ce=/Z|[+-]\d\d(?::?\d\d)?/gi,Ee=/[+-]?\d+(\.\d{1,3})?/,Ie=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ke={};function De(e,t,i){ke[e]=A(t)?t:function(e,s){return e&&i?i:t}}function Oe(e,t){return m(ke,e)?ke[e](t._strict,t._locale):new RegExp(Pe(e))}function Pe(e){return Ae(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,i,s,r){return t||i||s||r})))}function Ae(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var xe={};function Ye(e,t){var i,s=t;for("string"===typeof e&&(e=[e]),u(t)&&(s=function(e,i){i[t]=C(e)}),i=0;i<e.length;i++)xe[e[i]]=s}function je(e,t){Ye(e,(function(e,i,s,r){s._w=s._w||{},t(e,s._w,s,r)}))}function Ne(e,t,i){null!=t&&m(xe,e)&&xe[e](t,i._a,i,e)}var Fe=0,Re=1,He=2,Ge=3,ze=4,Be=5,Ve=6,Ue=7,We=8;function qe(e){return Je(e)?366:365}function Je(e){return e%4===0&&e%100!==0||e%400===0}oe("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),oe(0,["YY",2],0,(function(){return this.year()%100})),oe(0,["YYYY",4],0,"year"),oe(0,["YYYYY",5],0,"year"),oe(0,["YYYYYY",6,!0],0,"year"),Z("year","y"),ee("year",1),De("Y",Te),De("YY",ye,me),De("YYYY",Me,pe),De("YYYYY",be,fe),De("YYYYYY",be,fe),Ye(["YYYYY","YYYYYY"],Fe),Ye("YYYY",(function(e,t){t[Fe]=2===e.length?r.parseTwoDigitYear(e):C(e)})),Ye("YY",(function(e,t){t[Fe]=r.parseTwoDigitYear(e)})),Ye("Y",(function(e,t){t[Fe]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return C(e)+(C(e)>68?1900:2e3)};var Ke,Ze=Xe("FullYear",!0);function Qe(){return Je(this.year())}function Xe(e,t){return function(i){return null!=i?(et(this,e,i),r.updateOffset(this,t),this):$e(this,e)}}function $e(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function et(e,t,i){e.isValid()&&!isNaN(i)&&("FullYear"===t&&Je(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](i,e.month(),rt(i,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](i))}function tt(e){return e=Q(e),A(this[e])?this[e]():this}function it(e,t){if("object"===typeof e){e=X(e);for(var i=te(e),s=0;s<i.length;s++)this[i[s].unit](e[i[s].unit])}else if(e=Q(e),A(this[e]))return this[e](t);return this}function st(e,t){return(e%t+t)%t}function rt(e,t){if(isNaN(e)||isNaN(t))return NaN;var i=st(t,12);return e+=(t-i)/12,1===i?Je(e)?29:28:31-i%7%2}Ke=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},oe("M",["MM",2],"Mo",(function(){return this.month()+1})),oe("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),oe("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Z("month","M"),ee("month",8),De("M",ye),De("MM",ye,me),De("MMM",(function(e,t){return t.monthsShortRegex(e)})),De("MMMM",(function(e,t){return t.monthsRegex(e)})),Ye(["M","MM"],(function(e,t){t[Re]=C(e)-1})),Ye(["MMM","MMMM"],(function(e,t,i,s){var r=i._locale.monthsParse(e,s,i._strict);null!=r?t[Re]=r:y(i).invalidMonth=e}));var nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at="January_February_March_April_May_June_July_August_September_October_November_December".split("_");function ot(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months["standalone"]}var lt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function ct(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}function ut(e,t,i){var s,r,n,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)n=p([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(n,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(n,"").toLocaleLowerCase();return i?"MMM"===t?(r=Ke.call(this._shortMonthsParse,a),-1!==r?r:null):(r=Ke.call(this._longMonthsParse,a),-1!==r?r:null):"MMM"===t?(r=Ke.call(this._shortMonthsParse,a),-1!==r?r:(r=Ke.call(this._longMonthsParse,a),-1!==r?r:null)):(r=Ke.call(this._longMonthsParse,a),-1!==r?r:(r=Ke.call(this._shortMonthsParse,a),-1!==r?r:null))}function ht(e,t,i){var s,r,n;if(this._monthsParseExact)return ut.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(r=p([2e3,s]),i&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[s]||(n="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[s]=new RegExp(n.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(i&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!i&&this._monthsParse[s].test(e))return s}}function dt(e,t){var i;if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=C(t);else if(t=e.localeData().monthsParse(t),!u(t))return e;return i=Math.min(e.date(),rt(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function mt(e){return null!=e?(dt(this,e),r.updateOffset(this,!0),this):$e(this,"Month")}function gt(){return rt(this.year(),this.month())}var pt=Ie;function ft(e){return this._monthsParseExact?(m(this,"_monthsRegex")||vt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=pt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}var yt=Ie;function _t(e){return this._monthsParseExact?(m(this,"_monthsRegex")||vt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=yt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function vt(){function e(e,t){return t.length-e.length}var t,i,s=[],r=[],n=[];for(t=0;t<12;t++)i=p([2e3,t]),s.push(this.monthsShort(i,"")),r.push(this.months(i,"")),n.push(this.months(i,"")),n.push(this.monthsShort(i,""));for(s.sort(e),r.sort(e),n.sort(e),t=0;t<12;t++)s[t]=Ae(s[t]),r[t]=Ae(r[t]);for(t=0;t<24;t++)n[t]=Ae(n[t]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Lt(e,t,i,s,r,n,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,i,s,r,n,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,i,s,r,n,a),o}function Mt(e){var t;if(e<100&&e>=0){var i=Array.prototype.slice.call(arguments);i[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function bt(e,t,i){var s=7+t-i,r=(7+Mt(e,0,s).getUTCDay()-t)%7;return-r+s-1}function wt(e,t,i,s,r){var n,a,o=(7+i-s)%7,l=bt(e,s,r),c=1+7*(t-1)+o+l;return c<=0?(n=e-1,a=qe(n)+c):c>qe(e)?(n=e+1,a=c-qe(e)):(n=e,a=c),{year:n,dayOfYear:a}}function Tt(e,t,i){var s,r,n=bt(e.year(),t,i),a=Math.floor((e.dayOfYear()-n-1)/7)+1;return a<1?(r=e.year()-1,s=a+St(r,t,i)):a>St(e.year(),t,i)?(s=a-St(e.year(),t,i),r=e.year()+1):(r=e.year(),s=a),{week:s,year:r}}function St(e,t,i){var s=bt(e,t,i),r=bt(e+1,t,i);return(qe(e)-s+r)/7}function Ct(e){return Tt(e,this._week.dow,this._week.doy).week}oe("w",["ww",2],"wo","week"),oe("W",["WW",2],"Wo","isoWeek"),Z("week","w"),Z("isoWeek","W"),ee("week",5),ee("isoWeek",5),De("w",ye),De("ww",ye,me),De("W",ye),De("WW",ye,me),je(["w","ww","W","WW"],(function(e,t,i,s){t[s.substr(0,1)]=C(e)}));var Et={dow:0,doy:6};function It(){return this._week.dow}function kt(){return this._week.doy}function Dt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ot(e){var t=Tt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Pt(e,t){return"string"!==typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"===typeof e?e:null):parseInt(e,10)}function At(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function xt(e,t){return e.slice(t,7).concat(e.slice(0,t))}oe("d",0,"do","day"),oe("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),oe("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),oe("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),oe("e",0,0,"weekday"),oe("E",0,0,"isoWeekday"),Z("day","d"),Z("weekday","e"),Z("isoWeekday","E"),ee("day",11),ee("weekday",11),ee("isoWeekday",11),De("d",ye),De("e",ye),De("E",ye),De("dd",(function(e,t){return t.weekdaysMinRegex(e)})),De("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),De("dddd",(function(e,t){return t.weekdaysRegex(e)})),je(["dd","ddd","dddd"],(function(e,t,i,s){var r=i._locale.weekdaysParse(e,s,i._strict);null!=r?t.d=r:y(i).invalidWeekday=e})),je(["d","e","E"],(function(e,t,i,s){t[s]=C(e)}));var Yt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");function jt(e,t){var i=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?xt(i,this._week.dow):e?i[e.day()]:i}var Nt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function Ft(e){return!0===e?xt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}var Rt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ht(e){return!0===e?xt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Gt(e,t,i){var s,r,n,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)n=p([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(n,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(n,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(n,"").toLocaleLowerCase();return i?"dddd"===t?(r=Ke.call(this._weekdaysParse,a),-1!==r?r:null):"ddd"===t?(r=Ke.call(this._shortWeekdaysParse,a),-1!==r?r:null):(r=Ke.call(this._minWeekdaysParse,a),-1!==r?r:null):"dddd"===t?(r=Ke.call(this._weekdaysParse,a),-1!==r?r:(r=Ke.call(this._shortWeekdaysParse,a),-1!==r?r:(r=Ke.call(this._minWeekdaysParse,a),-1!==r?r:null))):"ddd"===t?(r=Ke.call(this._shortWeekdaysParse,a),-1!==r?r:(r=Ke.call(this._weekdaysParse,a),-1!==r?r:(r=Ke.call(this._minWeekdaysParse,a),-1!==r?r:null))):(r=Ke.call(this._minWeekdaysParse,a),-1!==r?r:(r=Ke.call(this._weekdaysParse,a),-1!==r?r:(r=Ke.call(this._shortWeekdaysParse,a),-1!==r?r:null)))}function zt(e,t,i){var s,r,n;if(this._weekdaysParseExact)return Gt.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(r=p([2e3,1]).day(s),i&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(n="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[s]=new RegExp(n.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(i&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(i&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!i&&this._weekdaysParse[s].test(e))return s}}function Bt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Pt(e,this.localeData()),this.add(e-t,"d")):t}function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ut(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=At(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}var Wt=Ie;function qt(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=Wt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}var Jt=Ie;function Kt(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Jt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}var Zt=Ie;function Qt(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Zt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xt(){function e(e,t){return t.length-e.length}var t,i,s,r,n,a=[],o=[],l=[],c=[];for(t=0;t<7;t++)i=p([2e3,1]).day(t),s=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),n=this.weekdays(i,""),a.push(s),o.push(r),l.push(n),c.push(s),c.push(r),c.push(n);for(a.sort(e),o.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)o[t]=Ae(o[t]),l[t]=Ae(l[t]),c[t]=Ae(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $t(){return this.hours()%12||12}function ei(){return this.hours()||24}function ti(e,t){oe(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function ii(e,t){return t._meridiemParse}function si(e){return"p"===(e+"").toLowerCase().charAt(0)}oe("H",["HH",2],0,"hour"),oe("h",["hh",2],0,$t),oe("k",["kk",2],0,ei),oe("hmm",0,0,(function(){return""+$t.apply(this)+ie(this.minutes(),2)})),oe("hmmss",0,0,(function(){return""+$t.apply(this)+ie(this.minutes(),2)+ie(this.seconds(),2)})),oe("Hmm",0,0,(function(){return""+this.hours()+ie(this.minutes(),2)})),oe("Hmmss",0,0,(function(){return""+this.hours()+ie(this.minutes(),2)+ie(this.seconds(),2)})),ti("a",!0),ti("A",!1),Z("hour","h"),ee("hour",13),De("a",ii),De("A",ii),De("H",ye),De("h",ye),De("k",ye),De("HH",ye,me),De("hh",ye,me),De("kk",ye,me),De("hmm",_e),De("hmmss",ve),De("Hmm",_e),De("Hmmss",ve),Ye(["H","HH"],Ge),Ye(["k","kk"],(function(e,t,i){var s=C(e);t[Ge]=24===s?0:s})),Ye(["a","A"],(function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e})),Ye(["h","hh"],(function(e,t,i){t[Ge]=C(e),y(i).bigHour=!0})),Ye("hmm",(function(e,t,i){var s=e.length-2;t[Ge]=C(e.substr(0,s)),t[ze]=C(e.substr(s)),y(i).bigHour=!0})),Ye("hmmss",(function(e,t,i){var s=e.length-4,r=e.length-2;t[Ge]=C(e.substr(0,s)),t[ze]=C(e.substr(s,2)),t[Be]=C(e.substr(r)),y(i).bigHour=!0})),Ye("Hmm",(function(e,t,i){var s=e.length-2;t[Ge]=C(e.substr(0,s)),t[ze]=C(e.substr(s))})),Ye("Hmmss",(function(e,t,i){var s=e.length-4,r=e.length-2;t[Ge]=C(e.substr(0,s)),t[ze]=C(e.substr(s,2)),t[Be]=C(e.substr(r))}));var ri=/[ap]\.?m?\.?/i;function ni(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}var ai,oi=Xe("Hours",!0),li={calendar:N,longDateFormat:R,invalidDate:G,ordinal:B,dayOfMonthOrdinalParse:V,relativeTime:W,months:at,monthsShort:lt,week:Et,weekdays:Yt,weekdaysMin:Rt,weekdaysShort:Nt,meridiemParse:ri},ci={},ui={};function hi(e){return e?e.toLowerCase().replace("_","-"):e}function di(e){var t,i,s,r,n=0;while(n<e.length){r=hi(e[n]).split("-"),t=r.length,i=hi(e[n+1]),i=i?i.split("-"):null;while(t>0){if(s=mi(r.slice(0,t).join("-")),s)return s;if(i&&i.length>=t&&E(r,i,!0)>=t-1)break;t--}n++}return ai}function mi(t){var s=null;if(!ci[t]&&"undefined"!==typeof e&&e&&e.exports)try{s=ai._abbr;i(562)("./"+t),gi(s)}catch(r){}return ci[t]}function gi(e,t){var i;return e&&(i=c(t)?yi(e):pi(e,t),i?ai=i:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ai._abbr}function pi(e,t){if(null!==t){var i,s=li;if(t.abbr=e,null!=ci[e])P("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=ci[e]._config;else if(null!=t.parentLocale)if(null!=ci[t.parentLocale])s=ci[t.parentLocale]._config;else{if(i=mi(t.parentLocale),null==i)return ui[t.parentLocale]||(ui[t.parentLocale]=[]),ui[t.parentLocale].push({name:e,config:t}),null;s=i._config}return ci[e]=new j(Y(s,t)),ui[e]&&ui[e].forEach((function(e){pi(e.name,e.config)})),gi(e),ci[e]}return delete ci[e],null}function fi(e,t){if(null!=t){var i,s,r=li;s=mi(e),null!=s&&(r=s._config),t=Y(r,t),i=new j(t),i.parentLocale=ci[e],ci[e]=i,gi(e)}else null!=ci[e]&&(null!=ci[e].parentLocale?ci[e]=ci[e].parentLocale:null!=ci[e]&&delete ci[e]);return ci[e]}function yi(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ai;if(!a(e)){if(t=mi(e),t)return t;e=[e]}return di(e)}function _i(){return D(ci)}function vi(e){var t,i=e._a;return i&&-2===y(e).overflow&&(t=i[Re]<0||i[Re]>11?Re:i[He]<1||i[He]>rt(i[Fe],i[Re])?He:i[Ge]<0||i[Ge]>24||24===i[Ge]&&(0!==i[ze]||0!==i[Be]||0!==i[Ve])?Ge:i[ze]<0||i[ze]>59?ze:i[Be]<0||i[Be]>59?Be:i[Ve]<0||i[Ve]>999?Ve:-1,y(e)._overflowDayOfYear&&(t<Fe||t>He)&&(t=He),y(e)._overflowWeeks&&-1===t&&(t=Ue),y(e)._overflowWeekday&&-1===t&&(t=We),y(e).overflow=t),e}function Li(e,t,i){return null!=e?e:null!=t?t:i}function Mi(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function bi(e){var t,i,s,r,n,a=[];if(!e._d){for(s=Mi(e),e._w&&null==e._a[He]&&null==e._a[Re]&&wi(e),null!=e._dayOfYear&&(n=Li(e._a[Fe],s[Fe]),(e._dayOfYear>qe(n)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),i=Mt(n,0,e._dayOfYear),e._a[Re]=i.getUTCMonth(),e._a[He]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[ze]&&0===e._a[Be]&&0===e._a[Ve]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?Mt:Lt).apply(null,a),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==r&&(y(e).weekdayMismatch=!0)}}function wi(e){var t,i,s,r,n,a,o,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)n=1,a=4,i=Li(t.GG,e._a[Fe],Tt(Ji(),1,4).year),s=Li(t.W,1),r=Li(t.E,1),(r<1||r>7)&&(l=!0);else{n=e._locale._week.dow,a=e._locale._week.doy;var c=Tt(Ji(),n,a);i=Li(t.gg,e._a[Fe],c.year),s=Li(t.w,c.week),null!=t.d?(r=t.d,(r<0||r>6)&&(l=!0)):null!=t.e?(r=t.e+n,(t.e<0||t.e>6)&&(l=!0)):r=n}s<1||s>St(i,n,a)?y(e)._overflowWeeks=!0:null!=l?y(e)._overflowWeekday=!0:(o=wt(i,s,r,n,a),e._a[Fe]=o.year,e._dayOfYear=o.dayOfYear)}var Ti=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Si=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ci=/Z|[+-]\d\d(?::?\d\d)?/,Ei=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ii=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ki=/^\/?Date\((\-?\d+)/i;function Di(e){var t,i,s,r,n,a,o=e._i,l=Ti.exec(o)||Si.exec(o);if(l){for(y(e).iso=!0,t=0,i=Ei.length;t<i;t++)if(Ei[t][1].exec(l[1])){r=Ei[t][0],s=!1!==Ei[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,i=Ii.length;t<i;t++)if(Ii[t][1].exec(l[3])){n=(l[2]||" ")+Ii[t][0];break}if(null==n)return void(e._isValid=!1)}if(!s&&null!=n)return void(e._isValid=!1);if(l[4]){if(!Ci.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=r+(n||"")+(a||""),Hi(e)}else e._isValid=!1}var Oi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Pi(e,t,i,s,r,n){var a=[Ai(e),lt.indexOf(t),parseInt(i,10),parseInt(s,10),parseInt(r,10)];return n&&a.push(parseInt(n,10)),a}function Ai(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xi(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Yi(e,t,i){if(e){var s=Nt.indexOf(e),r=new Date(t[0],t[1],t[2]).getDay();if(s!==r)return y(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}var ji={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ni(e,t,i){if(e)return ji[e];if(t)return 0;var s=parseInt(i,10),r=s%100,n=(s-r)/100;return 60*n+r}function Fi(e){var t=Oi.exec(xi(e._i));if(t){var i=Pi(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Yi(t[1],i,e))return;e._a=i,e._tzm=Ni(t[8],t[9],t[10]),e._d=Mt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function Ri(e){var t=ki.exec(e._i);null===t?(Di(e),!1===e._isValid&&(delete e._isValid,Fi(e),!1===e._isValid&&(delete e._isValid,r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Hi(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],y(e).empty=!0;var t,i,s,n,a,o=""+e._i,l=o.length,c=0;for(s=he(e._f,e._locale).match(se)||[],t=0;t<s.length;t++)n=s[t],i=(o.match(Oe(n,e))||[])[0],i&&(a=o.substr(0,o.indexOf(i)),a.length>0&&y(e).unusedInput.push(a),o=o.slice(o.indexOf(i)+i.length),c+=i.length),ae[n]?(i?y(e).empty=!1:y(e).unusedTokens.push(n),Ne(n,i,e)):e._strict&&!i&&y(e).unusedTokens.push(n);y(e).charsLeftOver=l-c,o.length>0&&y(e).unusedInput.push(o),e._a[Ge]<=12&&!0===y(e).bigHour&&e._a[Ge]>0&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[Ge]=Gi(e._locale,e._a[Ge],e._meridiem),bi(e),vi(e)}else Fi(e);else Di(e)}function Gi(e,t,i){var s;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?(s=e.isPM(i),s&&t<12&&(t+=12),s||12!==t||(t=0),t):t}function zi(e){var t,i,s,r,n;if(0===e._f.length)return y(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)n=0,t=M({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Hi(t),_(t)&&(n+=y(t).charsLeftOver,n+=10*y(t).unusedTokens.length,y(t).score=n,(null==s||n<s)&&(s=n,i=t));g(e,i||t)}function Bi(e){if(!e._d){var t=X(e._i);e._a=d([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),bi(e)}}function Vi(e){var t=new w(vi(Ui(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ui(e){var t=e._i,i=e._f;return e._locale=e._locale||yi(e._l),null===t||void 0===i&&""===t?v({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),T(t)?new w(vi(t)):(h(t)?e._d=t:a(i)?zi(e):i?Hi(e):Wi(e),_(e)||(e._d=null),e))}function Wi(e){var t=e._i;c(t)?e._d=new Date(r.now()):h(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Ri(e):a(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),bi(e)):o(t)?Bi(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function qi(e,t,i,s,r){var n={};return!0!==i&&!1!==i||(s=i,i=void 0),(o(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),n._isAMomentObject=!0,n._useUTC=n._isUTC=r,n._l=i,n._i=e,n._f=t,n._strict=s,Vi(n)}function Ji(e,t,i,s){return qi(e,t,i,s,!1)}r.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Ki=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ji.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()})),Zi=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ji.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()}));function Qi(e,t){var i,s;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Ji();for(i=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](i)||(i=t[s]);return i}function Xi(){var e=[].slice.call(arguments,0);return Qi("isBefore",e)}function $i(){var e=[].slice.call(arguments,0);return Qi("isAfter",e)}var es=function(){return Date.now?Date.now():+new Date},ts=["year","quarter","month","week","day","hour","minute","second","millisecond"];function is(e){for(var t in e)if(-1===Ke.call(ts,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var i=!1,s=0;s<ts.length;++s)if(e[ts[s]]){if(i)return!1;parseFloat(e[ts[s]])!==C(e[ts[s]])&&(i=!0)}return!0}function ss(){return this._isValid}function rs(){return Cs(NaN)}function ns(e){var t=X(e),i=t.year||0,s=t.quarter||0,r=t.month||0,n=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=is(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*o*60*60,this._days=+a+7*n,this._months=+r+3*s+12*i,this._data={},this._locale=yi(),this._bubble()}function as(e){return e instanceof ns}function os(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ls(e,t){oe(e,0,0,(function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+ie(~~(e/60),2)+t+ie(~~e%60,2)}))}ls("Z",":"),ls("ZZ",""),De("Z",Ce),De("ZZ",Ce),Ye(["Z","ZZ"],(function(e,t,i){i._useUTC=!0,i._tzm=us(Ce,e)}));var cs=/([\+\-]|\d\d)/gi;function us(e,t){var i=(t||"").match(e);if(null===i)return null;var s=i[i.length-1]||[],r=(s+"").match(cs)||["-",0,0],n=60*r[1]+C(r[2]);return 0===n?0:"+"===r[0]?n:-n}function hs(e,t){var i,s;return t._isUTC?(i=t.clone(),s=(T(e)||h(e)?e.valueOf():Ji(e).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+s),r.updateOffset(i,!1),i):Ji(e).local()}function ds(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function ms(e,t,i){var s,n=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(e=us(Ce,e),null===e)return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(s=ds(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Os(this,Cs(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?n:ds(this)}function gs(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ps(e){return this.utcOffset(0,e)}function fs(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ds(this),"m")),this}function ys(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=us(Se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function _s(e){return!!this.isValid()&&(e=e?Ji(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function vs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ls(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e={};if(M(e,this),e=Ui(e),e._a){var t=e._isUTC?p(e._a):Ji(e._a);this._isDSTShifted=this.isValid()&&E(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ms(){return!!this.isValid()&&!this._isUTC}function bs(){return!!this.isValid()&&this._isUTC}function ws(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}r.updateOffset=function(){};var Ts=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ss=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cs(e,t){var i,s,r,n=e,a=null;return as(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:u(e)?(n={},t?n[t]=e:n.milliseconds=e):(a=Ts.exec(e))?(i="-"===a[1]?-1:1,n={y:0,d:C(a[He])*i,h:C(a[Ge])*i,m:C(a[ze])*i,s:C(a[Be])*i,ms:C(os(1e3*a[Ve]))*i}):(a=Ss.exec(e))?(i="-"===a[1]?-1:1,n={y:Es(a[2],i),M:Es(a[3],i),w:Es(a[4],i),d:Es(a[5],i),h:Es(a[6],i),m:Es(a[7],i),s:Es(a[8],i)}):null==n?n={}:"object"===typeof n&&("from"in n||"to"in n)&&(r=ks(Ji(n.from),Ji(n.to)),n={},n.ms=r.milliseconds,n.M=r.months),s=new ns(n),as(e)&&m(e,"_locale")&&(s._locale=e._locale),s}function Es(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function Is(e,t){var i={};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function ks(e,t){var i;return e.isValid()&&t.isValid()?(t=hs(t,e),e.isBefore(t)?i=Is(e,t):(i=Is(t,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Ds(e,t){return function(i,s){var r,n;return null===s||isNaN(+s)||(P(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=i,i=s,s=n),i="string"===typeof i?+i:i,r=Cs(i,s),Os(this,r,e),this}}function Os(e,t,i,s){var n=t._milliseconds,a=os(t._days),o=os(t._months);e.isValid()&&(s=null==s||s,o&&dt(e,$e(e,"Month")+o*i),a&&et(e,"Date",$e(e,"Date")+a*i),n&&e._d.setTime(e._d.valueOf()+n*i),s&&r.updateOffset(e,a||o))}Cs.fn=ns.prototype,Cs.invalid=rs;var Ps=Ds(1,"add"),As=Ds(-1,"subtract");function xs(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Ys(e,t){var i=e||Ji(),s=hs(i,this).startOf("day"),n=r.calendarFormat(this,s)||"sameElse",a=t&&(A(t[n])?t[n].call(this,i):t[n]);return this.format(a||this.localeData().calendar(n,this,Ji(i)))}function js(){return new w(this)}function Ns(e,t){var i=T(e)?e:Ji(e);return!(!this.isValid()||!i.isValid())&&(t=Q(t)||"millisecond","millisecond"===t?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())}function Fs(e,t){var i=T(e)?e:Ji(e);return!(!this.isValid()||!i.isValid())&&(t=Q(t)||"millisecond","millisecond"===t?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())}function Rs(e,t,i,s){var r=T(e)?e:Ji(e),n=T(t)?t:Ji(t);return!!(this.isValid()&&r.isValid()&&n.isValid())&&(s=s||"()",("("===s[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===s[1]?this.isBefore(n,i):!this.isAfter(n,i)))}function Hs(e,t){var i,s=T(e)?e:Ji(e);return!(!this.isValid()||!s.isValid())&&(t=Q(t)||"millisecond","millisecond"===t?this.valueOf()===s.valueOf():(i=s.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))}function Gs(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function zs(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Bs(e,t,i){var s,r,n;if(!this.isValid())return NaN;if(s=hs(e,this),!s.isValid())return NaN;switch(r=6e4*(s.utcOffset()-this.utcOffset()),t=Q(t),t){case"year":n=Vs(this,s)/12;break;case"month":n=Vs(this,s);break;case"quarter":n=Vs(this,s)/3;break;case"second":n=(this-s)/1e3;break;case"minute":n=(this-s)/6e4;break;case"hour":n=(this-s)/36e5;break;case"day":n=(this-s-r)/864e5;break;case"week":n=(this-s-r)/6048e5;break;default:n=this-s}return i?n:S(n)}function Vs(e,t){var i,s,r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return t-n<0?(i=e.clone().add(r-1,"months"),s=(t-n)/(n-i)):(i=e.clone().add(r+1,"months"),s=(t-n)/(i-n)),-(r+s)||0}function Us(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ws(e){if(!this.isValid())return null;var t=!0!==e,i=t?this.clone().utc():this;return i.year()<0||i.year()>9999?ue(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ue(i,"Z")):ue(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function qs(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var i="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=t+'[")]';return this.format(i+s+r+n)}function Js(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=ue(this,e);return this.localeData().postformat(t)}function Ks(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ji(e).isValid())?Cs({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Zs(e){return this.from(Ji(),e)}function Qs(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ji(e).isValid())?Cs({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Xs(e){return this.to(Ji(),e)}function $s(e){var t;return void 0===e?this._locale._abbr:(t=yi(e),null!=t&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var er=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function tr(){return this._locale}var ir=1e3,sr=60*ir,rr=60*sr,nr=3506328*rr;function ar(e,t){return(e%t+t)%t}function or(e,t,i){return e<100&&e>=0?new Date(e+400,t,i)-nr:new Date(e,t,i).valueOf()}function lr(e,t,i){return e<100&&e>=0?Date.UTC(e+400,t,i)-nr:Date.UTC(e,t,i)}function cr(e){var t;if(e=Q(e),void 0===e||"millisecond"===e||!this.isValid())return this;var i=this._isUTC?lr:or;switch(e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ar(t+(this._isUTC?0:this.utcOffset()*sr),rr);break;case"minute":t=this._d.valueOf(),t-=ar(t,sr);break;case"second":t=this._d.valueOf(),t-=ar(t,ir);break}return this._d.setTime(t),r.updateOffset(this,!0),this}function ur(e){var t;if(e=Q(e),void 0===e||"millisecond"===e||!this.isValid())return this;var i=this._isUTC?lr:or;switch(e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=rr-ar(t+(this._isUTC?0:this.utcOffset()*sr),rr)-1;break;case"minute":t=this._d.valueOf(),t+=sr-ar(t,sr)-1;break;case"second":t=this._d.valueOf(),t+=ir-ar(t,ir)-1;break}return this._d.setTime(t),r.updateOffset(this,!0),this}function hr(){return this._d.valueOf()-6e4*(this._offset||0)}function dr(){return Math.floor(this.valueOf()/1e3)}function mr(){return new Date(this.valueOf())}function gr(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function pr(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function fr(){return this.isValid()?this.toISOString():null}function yr(){return _(this)}function _r(){return g({},y(this))}function vr(){return y(this).overflow}function Lr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Mr(e,t){oe(0,[e,e.length],0,t)}function br(e){return Cr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function wr(e){return Cr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Tr(){return St(this.year(),1,4)}function Sr(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Cr(e,t,i,s,r){var n;return null==e?Tt(this,s,r).year:(n=St(e,s,r),t>n&&(t=n),Er.call(this,e,t,i,s,r))}function Er(e,t,i,s,r){var n=wt(e,t,i,s,r),a=Mt(n.year,0,n.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Ir(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}oe(0,["gg",2],0,(function(){return this.weekYear()%100})),oe(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Mr("gggg","weekYear"),Mr("ggggg","weekYear"),Mr("GGGG","isoWeekYear"),Mr("GGGGG","isoWeekYear"),Z("weekYear","gg"),Z("isoWeekYear","GG"),ee("weekYear",1),ee("isoWeekYear",1),De("G",Te),De("g",Te),De("GG",ye,me),De("gg",ye,me),De("GGGG",Me,pe),De("gggg",Me,pe),De("GGGGG",be,fe),De("ggggg",be,fe),je(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,i,s){t[s.substr(0,2)]=C(e)})),je(["gg","GG"],(function(e,t,i,s){t[s]=r.parseTwoDigitYear(e)})),oe("Q",0,"Qo","quarter"),Z("quarter","Q"),ee("quarter",7),De("Q",de),Ye("Q",(function(e,t){t[Re]=3*(C(e)-1)})),oe("D",["DD",2],"Do","date"),Z("date","D"),ee("date",9),De("D",ye),De("DD",ye,me),De("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ye(["D","DD"],He),Ye("Do",(function(e,t){t[He]=C(e.match(ye)[0])}));var kr=Xe("Date",!0);function Dr(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}oe("DDD",["DDDD",3],"DDDo","dayOfYear"),Z("dayOfYear","DDD"),ee("dayOfYear",4),De("DDD",Le),De("DDDD",ge),Ye(["DDD","DDDD"],(function(e,t,i){i._dayOfYear=C(e)})),oe("m",["mm",2],0,"minute"),Z("minute","m"),ee("minute",14),De("m",ye),De("mm",ye,me),Ye(["m","mm"],ze);var Or=Xe("Minutes",!1);oe("s",["ss",2],0,"second"),Z("second","s"),ee("second",15),De("s",ye),De("ss",ye,me),Ye(["s","ss"],Be);var Pr,Ar=Xe("Seconds",!1);for(oe("S",0,0,(function(){return~~(this.millisecond()/100)})),oe(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),oe(0,["SSS",3],0,"millisecond"),oe(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),oe(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),oe(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),oe(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),oe(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),oe(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Z("millisecond","ms"),ee("millisecond",16),De("S",Le,de),De("SS",Le,me),De("SSS",Le,ge),Pr="SSSS";Pr.length<=9;Pr+="S")De(Pr,we);function xr(e,t){t[Ve]=C(1e3*("0."+e))}for(Pr="S";Pr.length<=9;Pr+="S")Ye(Pr,xr);var Yr=Xe("Milliseconds",!1);function jr(){return this._isUTC?"UTC":""}function Nr(){return this._isUTC?"Coordinated Universal Time":""}oe("z",0,0,"zoneAbbr"),oe("zz",0,0,"zoneName");var Fr=w.prototype;function Rr(e){return Ji(1e3*e)}function Hr(){return Ji.apply(null,arguments).parseZone()}function Gr(e){return e}Fr.add=Ps,Fr.calendar=Ys,Fr.clone=js,Fr.diff=Bs,Fr.endOf=ur,Fr.format=Js,Fr.from=Ks,Fr.fromNow=Zs,Fr.to=Qs,Fr.toNow=Xs,Fr.get=tt,Fr.invalidAt=vr,Fr.isAfter=Ns,Fr.isBefore=Fs,Fr.isBetween=Rs,Fr.isSame=Hs,Fr.isSameOrAfter=Gs,Fr.isSameOrBefore=zs,Fr.isValid=yr,Fr.lang=er,Fr.locale=$s,Fr.localeData=tr,Fr.max=Zi,Fr.min=Ki,Fr.parsingFlags=_r,Fr.set=it,Fr.startOf=cr,Fr.subtract=As,Fr.toArray=gr,Fr.toObject=pr,Fr.toDate=mr,Fr.toISOString=Ws,Fr.inspect=qs,Fr.toJSON=fr,Fr.toString=Us,Fr.unix=dr,Fr.valueOf=hr,Fr.creationData=Lr,Fr.year=Ze,Fr.isLeapYear=Qe,Fr.weekYear=br,Fr.isoWeekYear=wr,Fr.quarter=Fr.quarters=Ir,Fr.month=mt,Fr.daysInMonth=gt,Fr.week=Fr.weeks=Dt,Fr.isoWeek=Fr.isoWeeks=Ot,Fr.weeksInYear=Sr,Fr.isoWeeksInYear=Tr,Fr.date=kr,Fr.day=Fr.days=Bt,Fr.weekday=Vt,Fr.isoWeekday=Ut,Fr.dayOfYear=Dr,Fr.hour=Fr.hours=oi,Fr.minute=Fr.minutes=Or,Fr.second=Fr.seconds=Ar,Fr.millisecond=Fr.milliseconds=Yr,Fr.utcOffset=ms,Fr.utc=ps,Fr.local=fs,Fr.parseZone=ys,Fr.hasAlignedHourOffset=_s,Fr.isDST=vs,Fr.isLocal=Ms,Fr.isUtcOffset=bs,Fr.isUtc=ws,Fr.isUTC=ws,Fr.zoneAbbr=jr,Fr.zoneName=Nr,Fr.dates=k("dates accessor is deprecated. Use date instead.",kr),Fr.months=k("months accessor is deprecated. Use month instead",mt),Fr.years=k("years accessor is deprecated. Use year instead",Ze),Fr.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gs),Fr.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ls);var zr=j.prototype;function Br(e,t,i,s){var r=yi(),n=p().set(s,t);return r[i](n,e)}function Vr(e,t,i){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return Br(e,t,i,"month");var s,r=[];for(s=0;s<12;s++)r[s]=Br(e,s,i,"month");return r}function Ur(e,t,i,s){"boolean"===typeof e?(u(t)&&(i=t,t=void 0),t=t||""):(t=e,i=t,e=!1,u(t)&&(i=t,t=void 0),t=t||"");var r,n=yi(),a=e?n._week.dow:0;if(null!=i)return Br(t,(i+a)%7,s,"day");var o=[];for(r=0;r<7;r++)o[r]=Br(t,(r+a)%7,s,"day");return o}function Wr(e,t){return Vr(e,t,"months")}function qr(e,t){return Vr(e,t,"monthsShort")}function Jr(e,t,i){return Ur(e,t,i,"weekdays")}function Kr(e,t,i){return Ur(e,t,i,"weekdaysShort")}function Zr(e,t,i){return Ur(e,t,i,"weekdaysMin")}zr.calendar=F,zr.longDateFormat=H,zr.invalidDate=z,zr.ordinal=U,zr.preparse=Gr,zr.postformat=Gr,zr.relativeTime=q,zr.pastFuture=J,zr.set=x,zr.months=ot,zr.monthsShort=ct,zr.monthsParse=ht,zr.monthsRegex=_t,zr.monthsShortRegex=ft,zr.week=Ct,zr.firstDayOfYear=kt,zr.firstDayOfWeek=It,zr.weekdays=jt,zr.weekdaysMin=Ht,zr.weekdaysShort=Ft,zr.weekdaysParse=zt,zr.weekdaysRegex=qt,zr.weekdaysShortRegex=Kt,zr.weekdaysMinRegex=Qt,zr.isPM=si,zr.meridiem=ni,gi("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=1===C(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",gi),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",yi);var Qr=Math.abs;function Xr(){var e=this._data;return this._milliseconds=Qr(this._milliseconds),this._days=Qr(this._days),this._months=Qr(this._months),e.milliseconds=Qr(e.milliseconds),e.seconds=Qr(e.seconds),e.minutes=Qr(e.minutes),e.hours=Qr(e.hours),e.months=Qr(e.months),e.years=Qr(e.years),this}function $r(e,t,i,s){var r=Cs(t,i);return e._milliseconds+=s*r._milliseconds,e._days+=s*r._days,e._months+=s*r._months,e._bubble()}function en(e,t){return $r(this,e,t,1)}function tn(e,t){return $r(this,e,t,-1)}function sn(e){return e<0?Math.floor(e):Math.ceil(e)}function rn(){var e,t,i,s,r,n=this._milliseconds,a=this._days,o=this._months,l=this._data;return n>=0&&a>=0&&o>=0||n<=0&&a<=0&&o<=0||(n+=864e5*sn(an(o)+a),a=0,o=0),l.milliseconds=n%1e3,e=S(n/1e3),l.seconds=e%60,t=S(e/60),l.minutes=t%60,i=S(t/60),l.hours=i%24,a+=S(i/24),r=S(nn(a)),o+=r,a-=sn(an(r)),s=S(o/12),o%=12,l.days=a,l.months=o,l.years=s,this}function nn(e){return 4800*e/146097}function an(e){return 146097*e/4800}function on(e){if(!this.isValid())return NaN;var t,i,s=this._milliseconds;if(e=Q(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,i=this._months+nn(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(an(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}}function ln(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12):NaN}function cn(e){return function(){return this.as(e)}}var un=cn("ms"),hn=cn("s"),dn=cn("m"),mn=cn("h"),gn=cn("d"),pn=cn("w"),fn=cn("M"),yn=cn("Q"),_n=cn("y");function vn(){return Cs(this)}function Ln(e){return e=Q(e),this.isValid()?this[e+"s"]():NaN}function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var bn=Mn("milliseconds"),wn=Mn("seconds"),Tn=Mn("minutes"),Sn=Mn("hours"),Cn=Mn("days"),En=Mn("months"),In=Mn("years");function kn(){return S(this.days()/7)}var Dn=Math.round,On={ss:44,s:45,m:45,h:22,d:26,M:11};function Pn(e,t,i,s,r){return r.relativeTime(t||1,!!i,e,s)}function An(e,t,i){var s=Cs(e).abs(),r=Dn(s.as("s")),n=Dn(s.as("m")),a=Dn(s.as("h")),o=Dn(s.as("d")),l=Dn(s.as("M")),c=Dn(s.as("y")),u=r<=On.ss&&["s",r]||r<On.s&&["ss",r]||n<=1&&["m"]||n<On.m&&["mm",n]||a<=1&&["h"]||a<On.h&&["hh",a]||o<=1&&["d"]||o<On.d&&["dd",o]||l<=1&&["M"]||l<On.M&&["MM",l]||c<=1&&["y"]||["yy",c];return u[2]=t,u[3]=+e>0,u[4]=i,Pn.apply(null,u)}function xn(e){return void 0===e?Dn:"function"===typeof e&&(Dn=e,!0)}function Yn(e,t){return void 0!==On[e]&&(void 0===t?On[e]:(On[e]=t,"s"===e&&(On.ss=t-1),!0))}function jn(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),i=An(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)}var Nn=Math.abs;function Fn(e){return(e>0)-(e<0)||+e}function Rn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i,s=Nn(this._milliseconds)/1e3,r=Nn(this._days),n=Nn(this._months);e=S(s/60),t=S(e/60),s%=60,e%=60,i=S(n/12),n%=12;var a=i,o=n,l=r,c=t,u=e,h=s?s.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var m=d<0?"-":"",g=Fn(this._months)!==Fn(d)?"-":"",p=Fn(this._days)!==Fn(d)?"-":"",f=Fn(this._milliseconds)!==Fn(d)?"-":"";return m+"P"+(a?g+a+"Y":"")+(o?g+o+"M":"")+(l?p+l+"D":"")+(c||u||h?"T":"")+(c?f+c+"H":"")+(u?f+u+"M":"")+(h?f+h+"S":"")}var Hn=ns.prototype;return Hn.isValid=ss,Hn.abs=Xr,Hn.add=en,Hn.subtract=tn,Hn.as=on,Hn.asMilliseconds=un,Hn.asSeconds=hn,Hn.asMinutes=dn,Hn.asHours=mn,Hn.asDays=gn,Hn.asWeeks=pn,Hn.asMonths=fn,Hn.asQuarters=yn,Hn.asYears=_n,Hn.valueOf=ln,Hn._bubble=rn,Hn.clone=vn,Hn.get=Ln,Hn.milliseconds=bn,Hn.seconds=wn,Hn.minutes=Tn,Hn.hours=Sn,Hn.days=Cn,Hn.weeks=kn,Hn.months=En,Hn.years=In,Hn.humanize=jn,Hn.toISOString=Rn,Hn.toString=Rn,Hn.toJSON=Rn,Hn.locale=$s,Hn.localeData=tr,Hn.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rn),Hn.lang=er,oe("X",0,0,"unix"),oe("x",0,0,"valueOf"),De("x",Te),De("X",Ee),Ye("X",(function(e,t,i){i._d=new Date(1e3*parseFloat(e,10))})),Ye("x",(function(e,t,i){i._d=new Date(C(e))})),r.version="2.24.0",n(Ji),r.fn=Fr,r.min=Xi,r.max=$i,r.now=es,r.utc=p,r.unix=Rr,r.months=Wr,r.isDate=h,r.locale=gi,r.invalid=v,r.duration=Cs,r.isMoment=T,r.weekdays=Jr,r.parseZone=Hr,r.localeData=yi,r.isDuration=as,r.monthsShort=qr,r.weekdaysMin=Zr,r.defineLocale=pi,r.updateLocale=fi,r.locales=_i,r.weekdaysShort=Kr,r.normalizeUnits=Q,r.relativeTimeRounding=xn,r.relativeTimeThreshold=Yn,r.calendarFormat=xs,r.prototype=Fr,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}))}).call(this,i(561)(e))},function(e,t,i){"use strict";i.d(t,"d",(function(){return s})),i.d(t,"h",(function(){return r})),i.d(t,"g",(function(){return n})),i.d(t,"e",(function(){return a})),i.d(t,"f",(function(){return o})),i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return c})),i.d(t,"b",(function(){return u}));i(7),i(10);function s(e){const t=/^[+a-zA-Z0-9_.!#$%&\'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;return t.test(e)}function r(e,t){if(null!=e){const t=Number.parseInt(String(e),10);if(null!=t&&!Number.isNaN(t))return t}return void 0!==t?t:0}function n(e,t){if(e){const t=Number.parseFloat(String(e));if(null!=t&&!Number.isNaN(t))return t}return void 0!==t?t:0}function a(e,t){return null==e?t:"boolean"===typeof e?e:1===e||0!==e&&("string"===typeof e&&("true"===e.toLowerCase()||"1"===e.toLowerCase())||("string"!==typeof e||"false"!==e.toLowerCase()&&"0"!==e.toLowerCase())&&t)}function o(e,t,i){if(null!=e){const i=Object.values(t).find(t=>t==e);if(null!=i)return i}return i}function l(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0,i="x"==e?t:3&t|8;return i.toString(16)})}function c(e,t){Array.isArray(e)?e.forEach((e,i,s)=>{t.call(s,e),c(s[i],t)}):e&&"object"===typeof e&&Object.keys(e).forEach(i=>{t.call(e,e[i]),c(e[i],t)})}function u(e){const t=e.target.tagName.toUpperCase();return e.defaultPrevented||"INPUT"===t||"SELECT"===t||"TEXTAREA"===t}},,function(e,t,i){var s=i(8),r=i(536),n=i(283),a=i(29),o=i(11),l=o("iterator"),c=o("toStringTag"),u=n.values;for(var h in r){var d=s[h],m=d&&d.prototype;if(m){if(m[l]!==u)try{a(m,l,u)}catch(p){m[l]=u}if(m[c]||a(m,c,h),r[h])for(var g in n)if(m[g]!==n[g])try{a(m,g,n[g])}catch(p){m[g]=n[g]}}}},function(e,t,i){"use strict";function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){s(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}i.d(t,"a",(function(){return n}))},function(e,t,i){e.exports=i(541)},function(e,t,i){"use strict";var s=i(38),r=i(18),n=i(13),a=i(70),o="toString",l=RegExp.prototype,c=l[o],u=n((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),h=c.name!=o;(u||h)&&s(RegExp.prototype,o,(function(){var e=r(this),t=String(e.source),i=e.flags,s=String(void 0===i&&e instanceof RegExp&&!("flags"in l)?a.call(e):i);return"/"+t+"/"+s}),{unsafe:!0})},function(e,t,i){(function(t){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||Function("return this")()}).call(this,i(60))},function(e,t,i){(function(t){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||Function("return this")()}).call(this,i(60))},function(e,t,i){"use strict";var s=i(59),r=i(18),n=i(57),a=i(31),o=i(34),l=i(28),c=i(90),u=i(61),h=Math.max,d=Math.min,m=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,p=/\$([$&'`]|\d\d?)/g,f=function(e){return void 0===e?e:String(e)};s("replace",2,(function(e,t,i,s){return[function(i,s){var r=l(this),n=void 0==i?void 0:i[e];return void 0!==n?n.call(i,r,s):t.call(String(r),i,s)},function(e,n){if(s.REPLACE_KEEPS_$0||"string"===typeof n&&-1===n.indexOf("$0")){var l=i(t,e,this,n);if(l.done)return l.value}var m=r(e),g=String(this),p="function"===typeof n;p||(n=String(n));var _=m.global;if(_){var v=m.unicode;m.lastIndex=0}var L=[];while(1){var M=u(m,g);if(null===M)break;if(L.push(M),!_)break;var b=String(M[0]);""===b&&(m.lastIndex=c(g,a(m.lastIndex),v))}for(var w="",T=0,S=0;S<L.length;S++){M=L[S];for(var C=String(M[0]),E=h(d(o(M.index),g.length),0),I=[],k=1;k<M.length;k++)I.push(f(M[k]));var D=M.groups;if(p){var O=[C].concat(I,E,g);void 0!==D&&O.push(D);var P=String(n.apply(void 0,O))}else P=y(C,g,E,I,D,n);E>=T&&(w+=g.slice(T,E)+P,T=E+C.length)}return w+g.slice(T)}];function y(e,i,s,r,a,o){var l=s+e.length,c=r.length,u=p;return void 0!==a&&(a=n(a),u=g),t.call(o,u,(function(t,n){var o;switch(n.charAt(0)){case"$":return"$";case"&":return e;case"`":return i.slice(0,s);case"'":return i.slice(l);case"<":o=a[n.slice(1,-1)];break;default:var u=+n;if(0===u)return t;if(u>c){var h=m(u/10);return 0===h?t:h<=c?void 0===r[h-1]?n.charAt(1):r[h-1]+n.charAt(1):t}o=r[u-1]}return void 0===o?"":o}))}}))},function(e,t,i){var s=i(8),r=i(104),n=i(21),a=i(95),o=i(105),l=i(500),c=r("wks"),u=s.Symbol,h=l?u:u&&u.withoutSetter||a;e.exports=function(e){return n(c,e)||(o&&n(u,e)?c[e]=u[e]:c[e]=h("Symbol."+e)),c[e]}},function(e,t,i){"use strict";var s=i(40),r=i(138),n=i(28),a=i(139);s({target:"String",proto:!0,forced:!a("includes")},{includes:function(e){return!!~String(n(this)).indexOf(r(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,i){"use strict";var s=i(40),r=i(24),n=i(8),a=i(21),o=i(27),l=i(25).f,c=i(135),u=n.Symbol;if(r&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var h={},d=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof d?new u(e):void 0===e?u():u(e);return""===e&&(h[t]=!0),t};c(d,u);var m=d.prototype=u.prototype;m.constructor=d;var g=m.toString,p="Symbol(test)"==String(u("test")),f=/^Symbol\((.*)\)[^)]+$/;l(m,"description",{configurable:!0,get:function(){var e=o(this)?this.valueOf():this,t=g.call(e);if(a(h,e))return"";var i=p?t.slice(7,-1):t.replace(f,"$1");return""===i?void 0:i}}),s({global:!0,forced:!0},{Symbol:d})}},function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"c",(function(){return r})),i.d(t,"b",(function(){return n}));const s={NORTH:1,EAST:2,SOUTH:3,WEST:4},r={north:s.NORTH,east:s.EAST,south:s.SOUTH,west:s.WEST};function n(e){return Object.keys(r).find(t=>r[t]===e)}},function(e,t,i){"use strict";i(593),i(10),i(20),i(4);function s(e){const t=e.length-1;return e.filter((e,i)=>""!==e||i===t)}class r{static get className(){return"vcs.Url"}constructor(e){this.className=r.className,this.base=e.base,this.base.replace("/$",""),this.path=e.path||[],this.hashPath=e.hashPath||[],this.queryParams=e.queryParams||{}}addQueryParams(e){Object.keys(e).forEach(t=>{this.queryParams[t]=e[t]})}getQueryParams(){return this.queryParams}clearQueryParams(){this.queryParams={}}setPath(...e){const t=[];return e.forEach(e=>{t.push(...e.split("/"))}),this.path.splice(0,this.path.length),t.forEach(e=>{this.path.push(e)}),this.path=s(this.path),this}extendPath(...e){const t=[];return e.forEach(e=>{t.push(...e.split("/"))}),t.forEach(e=>{/^\.\.$/.test(e)?this.path.pop():this.path.push(e)}),this.path=s(this.path),this}clone(){return new r({base:this.base,path:this.path.slice(0),hashPath:this.hashPath.slice(0),queryParams:this._cloneQueryParams()})}_cloneQueryParams(){function e(t){const i={};return Object.keys(t).forEach(s=>{const r=t[s];Array.isArray(r)?i[s]=r.splice(0):i[s]="object"===typeof r?e(r):r},this),i}return e(this.queryParams)}toString(){let e=this.path.length?`${this.base}/${this.path.join("/")}`:this.base;return Object.keys(this.queryParams).length>0&&(e+="?"+this._getStringQueryParams()),this.hashPath.length>0&&(e+="#"+this.hashPath.join("/")),e}_getStringQueryParams(){return Object.keys(this.queryParams).map(e=>{const t=this.queryParams[e];let i;return i=t instanceof Object?JSON.stringify(t):String(t),`${e}=${encodeURIComponent(i)}`}).join("&")}static parse(e){if(r.isUrl(e)){const t=e.split("?"),i=e.split("#");let n=null;if(t.length>1){let e=t[1].split("#")[0];e.endsWith("/")&&(e=e.split("/")[0]),n=r.parseQueryParams(e)}let a=[];if(i.length>1){const e=i[1].split("?")[0];a=e.split("/")}let o,l=t[0].split("#")[0].split("/");return o=/^(https?:\/\/).*/.test(e)?l.splice(0,3).join("/"):l.splice(0,1).join(""),l=s(l),new r({base:o,path:l,queryParams:n,hashPath:a})}throw new Error("Cannot parse url: "+e)}static parseQueryParams(e){const t=e.split("&"),i={};return t.forEach(e=>{const t=e.split("=");let s;2===t.length&&t[1].length>0&&(s=decodeURIComponent(t[1]),/^\d*\.?\d*$/.test(s)?s=Number(s):/^(\[|\{)(.*)(\]|\})$/.test(s)?s=JSON.parse(s):"true"===s?s=!0:"false"===s&&(s=!1));const r=i[t[0]];r?Array.isArray(r)?r.push(s):i[t[0]]=[r,s]:i[t[0]]=s}),i}static isUrl(e){const t=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i;return t.test(e)}static hasSameOrigin(e){if(!/^[a-z][a-z0-9+.-]*:/.test(e))return!0;if(/^data:/.test(e))return!0;const t=r.parse(window.location.href),i=r.parse(e);return t.base.toLowerCase()===i.base.toLocaleLowerCase()}}t["a"]=r},,function(e,t,i){var s=i(27);e.exports=function(e){if(!s(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o})),i.d(t,"d",(function(){return l})),i.d(t,"c",(function(){return c})),i.d(t,"f",(function(){return u})),i.d(t,"e",(function(){return h}));i(4);var s=i(15);function r(e,t){const i=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(i*i+s*s)}function n(e,t=!1){const i=e.slice(),n=ol.extent.boundingExtent(i),a=[ol.extent.getBottomLeft(n),ol.extent.getBottomRight(n),ol.extent.getTopRight(n),ol.extent.getTopLeft(n)];let o=a.map(e=>{let t=0,s=1/0;return i.forEach((i,n)=>{const a=r(e,i);a<s&&(s=a,t=n)}),i.splice(t,1)[0]});return t===s["a"].EAST?o=[o[3],o[0],o[1],o[2]]:t===s["a"].SOUTH?o=[o[2],o[3],o[0],o[1]]:t===s["a"].WEST&&(o=[o[1],o[2],o[3],o[0]]),o}function a(e,t){const i=e[0]*t[0]+e[1]*t[1],s=Math.sqrt(e[0]**2+e[1]**2)*Math.sqrt(t[0]**2+t[1]**2);if(0===s)return console.error("caught div by 0 in angleBetweenTwo2DVectors"),null;let r=i/s;const n=1.00000002;return r<-1*n||r>n?(console.error("Number is much smaller than -1 or much larger than 1 in angleBetweenTwo2DVectors"),null):((r<-1||r>1)&&(r=Math.round(r)),Math.acos(r))}function o(e,t){const[[i,s],[r,n]]=e,[[a,o],[l,c]]=t;let u,h;const d={x:null,y:null,onLine1:!1,onLine2:!1},m=(c-o)*(r-i)-(l-a)*(n-s);if(0===m)return d;u=s-o,h=i-a;const g=(l-a)*u-(c-o)*h,p=(r-i)*u-(n-s)*h;return u=g/m,h=p/m,d.x=i+u*(r-i),d.y=s+u*(n-s),u>0&&u<1&&(d.onLine1=!0),h>0&&h<1&&(d.onLine2=!0),d}function l(e,t,i,s,l){const c=n(e,!i&&l),u=n(t,!!i&&l),h=[];for(let n=0;n<c.length;++n){const e=[];for(let l=0;l<c.length;++l){const t=l===c.length-1?0:l+1;if(n===l||n===t)continue;if(3===l&&0===t||1===l&&2===t)continue;const i=o([c[n],s],[c[l],c[t]]);if(null==i.x||null==i.y)continue;const u=[s[0]-c[n][0],s[1]-c[n][1]],h=[i.x-c[n][0],i.y-c[n][1]],d=a(u,h);if(null==d)continue;if(d/(180*Math.PI)>5)continue;const m=[c[l][0]-c[t][0],c[l][1]-c[t][1]],g=[c[t][0]-c[l][0],c[t][1]-c[l][1]],p=a(u,m);if(null==p)continue;const f=a(u,g);if(null==f)continue;const y=r(c[l],c[t]);if(0===y)continue;const _=r(c[l],[i.x,i.y])/y;let v=0;0!==_&&(v=a(g,[i.x-c[l][0],i.y-c[l][1]]),null==v)||e.push({cornerPoint:n,intrX:i.x,intrY:i.y,angle:p<=f?p:f,edgeStart:l,edgeEnd:t,ratioStart2End:v/Math.PI*180>5?-1*_:_})}let t=-1,i=-1;for(let s=0;s<e.length;++s)e[s].angle>t&&(t=e[s].angle,i=s);-1!==i&&h.push(e[i])}if(h.length<2)return null;const d=[];for(let r=0;r<h.length;++r)for(let e=r+1;e<h.length;++e)d.push([h[r].angle+h[e].angle,r,e]);let m=null;return d.sort().reverse().find(e=>{const t=[h[e[1]],h[e[2]]],i=u[t[0].edgeEnd],s=u[t[0].edgeStart],r=[i[0]-s[0],i[1]-s[1]],n=[s[0]+r[0]*t[0].ratioStart2End,s[1]+r[1]*t[0].ratioStart2End],l=u[t[1].edgeEnd],c=u[t[1].edgeStart],d=[l[0]-c[0],l[1]-c[1]],g=[c[0]+d[0]*t[1].ratioStart2End,c[1]+d[1]*t[1].ratioStart2End],p=[n[0]-u[t[0].cornerPoint][0],n[1]-u[t[0].cornerPoint][1]],f=[g[0]-u[t[1].cornerPoint][0],g[1]-u[t[1].cornerPoint][1]],y=a(p,f);return null!=y&&(m=o([u[t[0].cornerPoint],n],[u[t[1].cornerPoint],g]),null!=m.x&&null!=m.y)}),m}function c(e,t,i){const s=ol.proj.get("EPSG:4326"),r=i?ol.proj.getTransform(i,s):null,n=t.map(e=>{const t=r?r(e.slice(0,2)):e;return Cesium.Cartographic.fromDegrees(t[0],t[1])});return new Promise((i,s)=>{Cesium.sampleTerrainMostDetailed(e,n).then(e=>{e.forEach((e,i)=>{t[i][2]=e.height}),i(t)},s)})}function u(e,t,i={}){const s=i.dataProjection?ol.proj.transform(t,i.dataProjection,e.projection):t;function r(){const t=e.transformRealWorld2Image(s);return{coords:t,height:e.averageHeight,estimate:!0}}if(t[2]){const i=e.transformRealWorld2Image(s,t[2]);return Promise.resolve({coords:i,height:t[2],estimate:!1})}return!i.dontUseTerrain&&e.terrainProvider?c(e.terrainProvider,[s],e.projection).then(()=>{if(s[2]){const t=e.transformRealWorld2Image(s,s[2]);return{coords:t,height:s[2],estimate:!1}}return console.warn("The configured terrain on the oblique layer could not be queried, position might be inaccurate"),r()}).catch(()=>r()):Promise.resolve(r())}function h(e,t,i={}){const s=ol.proj.get("EPSG:4326"),r=ol.proj.transform(e.transformImage2RealWorld(t,e.averageHeight),e.projection,s),n=i.terrainErrorThreshold||1,a=i.terrainErrorCountThreshold||3;let o=0;function l(i,r){return o+=1,c(e.terrainProvider,[i]).then(()=>{if(null!=i[2]){const c=ol.proj.transform(e.transformImage2RealWorld(t,i[2]),e.projection,s);return c[2]=i[2],Math.abs(r-i[2])<n||o>a?{coords:c,estimate:!1}:l(c,i[2])}return console.log("The configured terrain on the oblique layer could not be queried, position might be inaccurate"),{coords:i,estimate:!0}}).catch(()=>({coords:i,estimate:!0}))}const u=!i.dontUseTerrain&&e.terrainProvider?l(r,e.getAverageHeight()):Promise.resolve({coords:r,estimate:!0});return u.then(t=>(t.coords=i.dataProjection?ol.proj.transform(t.coords,s,i.dataProjection):ol.proj.transform(t.coords,s,e.projection),t))}},function(e,t,i){"use strict";var s=i(59),r=i(89),n=i(18),a=i(28),o=i(535),l=i(90),c=i(31),u=i(61),h=i(80),d=i(13),m=[].push,g=Math.min,p=4294967295,f=!d((function(){return!RegExp(p,"y")}));s("split",2,(function(e,t,i){var s;return s="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,i){var s=String(a(this)),n=void 0===i?p:i>>>0;if(0===n)return[];if(void 0===e)return[s];if(!r(e))return t.call(s,e,n);var o,l,c,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,f=new RegExp(e.source,d+"g");while(o=h.call(f,s)){if(l=f.lastIndex,l>g&&(u.push(s.slice(g,o.index)),o.length>1&&o.index<s.length&&m.apply(u,o.slice(1)),c=o[0].length,g=l,u.length>=n))break;f.lastIndex===o.index&&f.lastIndex++}return g===s.length?!c&&f.test("")||u.push(""):u.push(s.slice(g)),u.length>n?u.slice(0,n):u}:"0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:t.call(this,e,i)}:t,[function(t,i){var r=a(this),n=void 0==t?void 0:t[e];return void 0!==n?n.call(t,r,i):s.call(String(r),t,i)},function(e,r){var a=i(s,e,this,r,s!==t);if(a.done)return a.value;var h=n(e),d=String(this),m=o(h,RegExp),y=h.unicode,_=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(f?"y":"g"),v=new m(f?h:"^(?:"+h.source+")",_),L=void 0===r?p:r>>>0;if(0===L)return[];if(0===d.length)return null===u(v,d)?[d]:[];var M=0,b=0,w=[];while(b<d.length){v.lastIndex=f?b:0;var T,S=u(v,f?d:d.slice(b));if(null===S||(T=g(c(v.lastIndex+(f?0:b)),d.length))===M)b=l(d,b,y);else{if(w.push(d.slice(M,b)),w.length===L)return w;for(var C=1;C<=S.length-1;C++)if(w.push(S[C]),w.length===L)return w;b=M=T}}return w.push(d.slice(M)),w}]}),!f)},function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,i){"use strict";var s=i(142),r=i(542),n=Object.prototype.toString;function a(e){return"[object Array]"===n.call(e)}function o(e){return"[object ArrayBuffer]"===n.call(e)}function l(e){return"undefined"!==typeof FormData&&e instanceof FormData}function c(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function u(e){return"string"===typeof e}function h(e){return"number"===typeof e}function d(e){return"undefined"===typeof e}function m(e){return null!==e&&"object"===typeof e}function g(e){return"[object Date]"===n.call(e)}function p(e){return"[object File]"===n.call(e)}function f(e){return"[object Blob]"===n.call(e)}function y(e){return"[object Function]"===n.call(e)}function _(e){return m(e)&&y(e.pipe)}function v(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function L(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function M(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function b(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}function w(){var e={};function t(t,i){"object"===typeof e[i]&&"object"===typeof t?e[i]=w(e[i],t):e[i]=t}for(var i=0,s=arguments.length;i<s;i++)b(arguments[i],t);return e}function T(e,t,i){return b(t,(function(t,r){e[r]=i&&"function"===typeof t?s(t,i):t})),e}e.exports={isArray:a,isArrayBuffer:o,isBuffer:r,isFormData:l,isArrayBufferView:c,isString:u,isNumber:h,isObject:m,isUndefined:d,isDate:g,isFile:p,isBlob:f,isFunction:y,isStream:_,isURLSearchParams:v,isStandardBrowserEnv:M,forEach:b,merge:w,extend:T,trim:L}},,function(e,t,i){var s=i(13);e.exports=!s((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,i){var s=i(24),r=i(100),n=i(18),a=i(76),o=Object.defineProperty;t.f=s?o:function(e,t,i){if(n(e),t=a(t,!0),n(i),r)try{return o(e,t,i)}catch(s){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},,function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,i){var s=i(24),r=i(25),n=i(55);e.exports=s?function(e,t,i){return r.f(e,t,n(1,i))}:function(e,t,i){return e[t]=i,e}},function(e,t,i){var s=i(9),r=i(115),n=i(39),a=i(116),o=i(125),l=i(513),c=r("wks"),u=s.Symbol,h=l?u:u&&u.withoutSetter||a;e.exports=function(e){return n(c,e)||(o&&n(u,e)?c[e]=u[e]:c[e]=h("Symbol."+e)),c[e]}},function(e,t,i){var s=i(34),r=Math.min;e.exports=function(e){return e>0?r(s(e),9007199254740991):0}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},,function(e,t){var i=Math.ceil,s=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?s:i)(e)}},function(e,t,i){"use strict";function s(e,t,i){void 0===i&&(i={});var s={type:"Feature"};return(0===i.id||i.id)&&(s.id=i.id),i.bbox&&(s.bbox=i.bbox),s.properties=t||{},s.geometry=e,s}function r(e,t,i){switch(void 0===i&&(i={}),e){case"Point":return n(t).geometry;case"LineString":return c(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return m(t).geometry;case"MultiLineString":return d(t).geometry;case"MultiPolygon":return g(t).geometry;default:throw new Error(e+" is invalid")}}function n(e,t,i){void 0===i&&(i={});var r={type:"Point",coordinates:e};return s(r,t,i)}function a(e,t,i){return void 0===i&&(i={}),h(e.map((function(e){return n(e,t)})),i)}function o(e,t,i){void 0===i&&(i={});for(var r=0,n=e;r<n.length;r++){var a=n[r];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<a[a.length-1].length;o++)if(a[a.length-1][o]!==a[0][o])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:e};return s(l,t,i)}function l(e,t,i){return void 0===i&&(i={}),h(e.map((function(e){return o(e,t)})),i)}function c(e,t,i){if(void 0===i&&(i={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:e};return s(r,t,i)}function u(e,t,i){return void 0===i&&(i={}),h(e.map((function(e){return c(e,t)})),i)}function h(e,t){void 0===t&&(t={});var i={type:"FeatureCollection"};return t.id&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.features=e,i}function d(e,t,i){void 0===i&&(i={});var r={type:"MultiLineString",coordinates:e};return s(r,t,i)}function m(e,t,i){void 0===i&&(i={});var r={type:"MultiPoint",coordinates:e};return s(r,t,i)}function g(e,t,i){void 0===i&&(i={});var r={type:"MultiPolygon",coordinates:e};return s(r,t,i)}function p(e,t,i){void 0===i&&(i={});var r={type:"GeometryCollection",geometries:e};return s(r,t,i)}function f(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var i=Math.pow(10,t||0);return Math.round(e*i)/i}function y(e,i){void 0===i&&(i="kilometers");var s=t.factors[i];if(!s)throw new Error(i+" units is invalid");return e*s}function _(e,i){void 0===i&&(i="kilometers");var s=t.factors[i];if(!s)throw new Error(i+" units is invalid");return e/s}function v(e,t){return M(_(e,t))}function L(e){var t=e%360;return t<0&&(t+=360),t}function M(e){var t=e%(2*Math.PI);return 180*t/Math.PI}function b(e){var t=e%360;return t*Math.PI/180}function w(e,t,i){if(void 0===t&&(t="kilometers"),void 0===i&&(i="kilometers"),!(e>=0))throw new Error("length must be a positive number");return y(_(e,t),i)}function T(e,i,s){if(void 0===i&&(i="meters"),void 0===s&&(s="kilometers"),!(e>=0))throw new Error("area must be a positive number");var r=t.areaFactors[i];if(!r)throw new Error("invalid original units");var n=t.areaFactors[s];if(!n)throw new Error("invalid final units");return e/r*n}function S(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)&&!/^\s*$/.test(e)}function C(e){return!!e&&e.constructor===Object}function E(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!S(e))throw new Error("bbox must only contain numbers")}))}function I(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}function k(){throw new Error("method has been renamed to `radiansToDegrees`")}function D(){throw new Error("method has been renamed to `degreesToRadians`")}function O(){throw new Error("method has been renamed to `lengthToDegrees`")}function P(){throw new Error("method has been renamed to `lengthToRadians`")}function A(){throw new Error("method has been renamed to `radiansToLength`")}function x(){throw new Error("method has been renamed to `bearingToAzimuth`")}function Y(){throw new Error("method has been renamed to `convertLength`")}Object.defineProperty(t,"__esModule",{value:!0}),t.earthRadius=6371008.8,t.factors={centimeters:100*t.earthRadius,centimetres:100*t.earthRadius,degrees:t.earthRadius/111325,feet:3.28084*t.earthRadius,inches:39.37*t.earthRadius,kilometers:t.earthRadius/1e3,kilometres:t.earthRadius/1e3,meters:t.earthRadius,metres:t.earthRadius,miles:t.earthRadius/1609.344,millimeters:1e3*t.earthRadius,millimetres:1e3*t.earthRadius,nauticalmiles:t.earthRadius/1852,radians:1,yards:t.earthRadius/1.0936},t.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/t.earthRadius,yards:1/1.0936},t.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},t.feature=s,t.geometry=r,t.point=n,t.points=a,t.polygon=o,t.polygons=l,t.lineString=c,t.lineStrings=u,t.featureCollection=h,t.multiLineString=d,t.multiPoint=m,t.multiPolygon=g,t.geometryCollection=p,t.round=f,t.radiansToLength=y,t.lengthToRadians=_,t.lengthToDegrees=v,t.bearingToAzimuth=L,t.radiansToDegrees=M,t.degreesToRadians=b,t.convertLength=w,t.convertArea=T,t.isNumber=S,t.isObject=C,t.validateBBox=E,t.validateId=I,t.radians2degrees=k,t.degrees2radians=D,t.distanceToDegrees=O,t.distanceToRadians=P,t.radiansToDistance=A,t.bearingToAngle=x,t.convertDistance=Y},,,function(e,t,i){var s=i(8),r=i(29),n=i(21),a=i(77),o=i(102),l=i(50),c=l.get,u=l.enforce,h=String(String).split("String");(e.exports=function(e,t,i,o){var l=!!o&&!!o.unsafe,c=!!o&&!!o.enumerable,d=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||n(i,"name")||r(i,"name",t),u(i).source=h.join("string"==typeof t?t:"")),e!==s?(l?!d&&e[t]&&(c=!0):delete e[t],c?e[t]=i:r(e,t,i)):c?e[t]=i:a(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||o(this)}))},function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,i){var s=i(8),r=i(71).f,n=i(29),a=i(38),o=i(77),l=i(135),c=i(137);e.exports=function(e,t){var i,u,h,d,m,g,p=e.target,f=e.global,y=e.stat;if(u=f?s:y?s[p]||o(p,{}):(s[p]||{}).prototype,u)for(h in t){if(m=t[h],e.noTargetGet?(g=r(u,h),d=g&&g.value):d=u[h],i=c(f?h:p+(y?".":"#")+h,e.forced),!i&&void 0!==d){if(typeof m===typeof d)continue;l(m,d)}(e.sham||d&&d.sham)&&n(m,"sham",!0),a(u,h,m,e)}}},function(e,t,i){"use strict";var s=i(40),r=i(34),n=i(559),a=i(560),o=i(13),l=1..toFixed,c=Math.floor,u=function(e,t,i){return 0===t?i:t%2===1?u(e,t-1,i*e):u(e*e,t/2,i)},h=function(e){var t=0,i=e;while(i>=4096)t+=12,i/=4096;while(i>=2)t+=1,i/=2;return t},d=l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!o((function(){l.call({})}));s({target:"Number",proto:!0,forced:d},{toFixed:function(e){var t,i,s,o,l=n(this),d=r(e),m=[0,0,0,0,0,0],g="",p="0",f=function(e,t){var i=-1,s=t;while(++i<6)s+=e*m[i],m[i]=s%1e7,s=c(s/1e7)},y=function(e){var t=6,i=0;while(--t>=0)i+=m[t],m[t]=c(i/e),i=i%e*1e7},_=function(){var e=6,t="";while(--e>=0)if(""!==t||0===e||0!==m[e]){var i=String(m[e]);t=""===t?i:t+a.call("0",7-i.length)+i}return t};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(g="-",l=-l),l>1e-21)if(t=h(l*u(2,69,1))-69,i=t<0?l*u(2,-t,1):l/u(2,t,1),i*=4503599627370496,t=52-t,t>0){f(0,i),s=d;while(s>=7)f(1e7,0),s-=7;f(u(10,s,1),0),s=t-1;while(s>=23)y(1<<23),s-=23;y(1<<s),f(1,1),y(2),p=_()}else f(0,i),f(1<<-t,0),p=_()+a.call("0",d);return d>0?(o=p.length,p=g+(o<=d?"0."+a.call("0",d-o)+p:p.slice(0,o-d)+"."+p.slice(o-d))):p=g+p,p}})},,function(e,t,i){"use strict";var s=i(59),r=i(18),n=i(31),a=i(28),o=i(90),l=i(61);s("match",1,(function(e,t,i){return[function(t){var i=a(this),s=void 0==t?void 0:t[e];return void 0!==s?s.call(t,i):new RegExp(t)[e](String(i))},function(e){var s=i(t,e,this);if(s.done)return s.value;var a=r(e),c=String(this);if(!a.global)return l(a,c);var u=a.unicode;a.lastIndex=0;var h,d=[],m=0;while(null!==(h=l(a,c))){var g=String(h[0]);d[m]=g,""===g&&(a.lastIndex=o(c,n(a.lastIndex),u)),m++}return 0===m?null:d}]}))},function(e,t,i){"use strict";var s,r=i(611),n=r.template;function a(e,t,i){return n(e,t,i)}a._=r,e.exports=a,s=function(){return a}.call(t,i,t,e),void 0===s||(e.exports=s)},function(e,t,i){"use strict";var s=i(59),r=i(18),n=i(28),a=i(501),o=i(61);s("search",1,(function(e,t,i){return[function(t){var i=n(this),s=void 0==t?void 0:t[e];return void 0!==s?s.call(t,i):new RegExp(t)[e](String(i))},function(e){var s=i(t,e,this);if(s.done)return s.value;var n=r(e),l=String(this),c=n.lastIndex;a(c,0)||(n.lastIndex=0);var u=o(n,l);return a(n.lastIndex,c)||(n.lastIndex=c),null===u?-1:u.index}]}))},function(e,t,i){var s=i(32);e.exports=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t,i){var s=i(47);e.exports=function(e){if(!s(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,i){var s=i(507),r=i(9),n=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?n(s[e])||n(r[e]):s[e]&&s[e][t]||r[e]&&r[e][t]}},function(e,t,i){var s,r,n,a=i(499),o=i(8),l=i(27),c=i(29),u=i(21),h=i(78),d=i(79),m=o.WeakMap,g=function(e){return n(e)?r(e):s(e,{})},p=function(e){return function(t){var i;if(!l(t)||(i=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}};if(a){var f=new m,y=f.get,_=f.has,v=f.set;s=function(e,t){return v.call(f,e,t),t},r=function(e){return y.call(f,e)||{}},n=function(e){return _.call(f,e)}}else{var L=h("state");d[L]=!0,s=function(e,t){return c(e,L,t),t},r=function(e){return u(e,L)?e[L]:{}},n=function(e){return u(e,L)}}e.exports={set:s,get:r,has:n,enforce:g,getterFor:p}},,function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,t,i){var s=i(571),r=i(572);function n(e,t,i){var n=t&&i||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;o<16;++o)t[n+o]=a[o];return t||r(a)}e.exports=n},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=!1},function(e,t,i){var s=i(28);e.exports=function(e){return Object(s(e))}},function(e,t,i){var s=i(24),r=i(8),n=i(137),a=i(288),o=i(25).f,l=i(87).f,c=i(89),u=i(70),h=i(96),d=i(38),m=i(13),g=i(50).set,p=i(289),f=i(11),y=f("match"),_=r.RegExp,v=_.prototype,L=/a/g,M=/a/g,b=new _(L)!==L,w=h.UNSUPPORTED_Y,T=s&&n("RegExp",!b||w||m((function(){return M[y]=!1,_(L)!=L||_(M)==M||"/a/i"!=_(L,"i")})));if(T){var S=function(e,t){var i,s=this instanceof S,r=c(e),n=void 0===t;if(!s&&r&&e.constructor===S&&n)return e;b?r&&!n&&(e=e.source):e instanceof S&&(n&&(t=u.call(e)),e=e.source),w&&(i=!!t&&t.indexOf("y")>-1,i&&(t=t.replace(/y/g,"")));var o=a(b?new _(e,t):_(e,t),s?this:v,S);return w&&i&&g(o,{sticky:i}),o},C=function(e){e in S||o(S,e,{configurable:!0,get:function(){return _[e]},set:function(t){_[e]=t}})},E=l(_),I=0;while(E.length>I)C(E[I++]);v.constructor=S,S.prototype=v,d(r,"RegExp",S)}p("RegExp")},function(e,t,i){"use strict";var s=i(38),r=i(13),n=i(11),a=i(80),o=i(29),l=n("species"),c=!r((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),u=function(){return"$0"==="a".replace(/./,"$0")}(),h=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}));e.exports=function(e,t,i,d){var m=n(e),g=!r((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),p=g&&!r((function(){var t=!1,i=/a/;return"split"===e&&(i={},i.constructor={},i.constructor[l]=function(){return i},i.flags="",i[m]=/./[m]),i.exec=function(){return t=!0,null},i[m](""),!t}));if(!g||!p||"replace"===e&&(!c||!u)||"split"===e&&!h){var f=/./[m],y=i(m,""[e],(function(e,t,i,s,r){return t.exec===a?g&&!r?{done:!0,value:f.call(t,i,s)}:{done:!0,value:e.call(i,t,s)}:{done:!1}}),{REPLACE_KEEPS_$0:u}),_=y[0],v=y[1];s(String.prototype,e,_),s(RegExp.prototype,m,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)})}d&&o(RegExp.prototype[m],"sham",!0)}},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(s){"object"===typeof window&&(i=window)}e.exports=i},function(e,t,i){var s=i(52),r=i(80);e.exports=function(e,t){var i=e.exec;if("function"===typeof i){var n=i.call(e,t);if("object"!==typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==s(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,i){var s=i(46),r=i(63),n=i(107);e.exports=s?function(e,t,i){return r.f(e,t,n(1,i))}:function(e,t,i){return e[t]=i,e}},function(e,t,i){var s=i(46),r=i(111),n=i(48),a=i(110),o=Object.defineProperty;t.f=s?o:function(e,t,i){if(n(e),t=a(t,!0),n(i),r)try{return o(e,t,i)}catch(s){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},function(e,t,i){var s=i(9),r=i(62),n=i(39),a=i(84),o=i(85),l=i(114),c=l.get,u=l.enforce,h=String(String).split("String");(e.exports=function(e,t,i,o){var l=!!o&&!!o.unsafe,c=!!o&&!!o.enumerable,d=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||n(i,"name")||r(i,"name",t),u(i).source=h.join("string"==typeof t?t:"")),e!==s?(l?!d&&e[t]&&(c=!0):delete e[t],c?e[t]=i:r(e,t,i)):c?e[t]=i:a(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||o(this)}))},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,i){var s=i(134),r=i(28);e.exports=function(e){return s(r(e))}},function(e,t){e.exports={}},,function(e,t,i){"use strict";i(4);var s=i(563),r=i.n(s),n=i(565),a=i.n(n),o=i(19);const l={LOADING:-1,INACTIVE:0,ACTIVE:1};class c{static get STATE(){return l}constructor(e){this.currentImage=null,this.currentView=null;const t=new ol.source.Vector({features:e.footPrintFeatures});this.footPrintsLayer=new ol.layer.Vector({source:t}),this.rTree=r()(),this.rTree.load(e.rTreeItems),this.olMap=null,this.state=l.INACTIVE,this.images=e.images||{},this.projection=e.projection,this.terrainProvider=e.terrainProvider||null,this.direction=e.direction}activate(e,t,i){return this.olMap&&this.olMap!==e&&this.deactivate(),this.state===l.INACTIVE?(this.state=l.LOADING,this.olMap=e,this.setView(t,i).then(()=>{this.state=l.ACTIVE})):Promise.resolve(this.state)}deactivate(){this.currentView&&(this.olMap.removeLayer(this.currentView.layer),this.currentView=null),this.currentImage=null,this.state=l.INACTIVE}setView(e,t){const i=this.getImageNameForCoordinates(e);return null!==i?this.setImageOnMap(i).then(()=>{const{view:e}=this.currentView;e.setZoom(t)}):Promise.reject(new Error("could not find an image in this direction"))}addOptions(e){this.footPrintsLayer.getSource().addFeatures(e.footPrintFeatures),this.rTree.load(e.rTreeItems),Object.assign(this.images,e.images)}postRenderHandler(e){if(this.state===l.ACTIVE){const t=this._pullCoordinateToImageCenter(e.slice()),i=this.currentImage.transformImage2RealWorld(t),s=this.getImageNameForCoordinates(i);null!==s&&s!==this.currentImage.name&&(this.state=l.LOADING,Object(o["e"])(this.currentImage,e).then(e=>this.setImageOnMap(s,e.coords)).catch(()=>{console.warn(`an error occured while setting image ${s} onto the map`),this.state===c.STATE.LOADING&&(this.state=l.ACTIVE)}))}}_pullCoordinateToImageCenter(e){if(this.currentImage){const t=[this.currentImage.size[0]/2,this.currentImage.size[1]/2];e[0]<t[0]?e[0]+=50:e[0]-=50,e[1]<t[1]?e[1]+=50:e[1]-=50}return e}setImageOnMap(e,t){function i(e,t){return e<0?0:e>t?t:e}if(this.state===c.STATE.INACTIVE)return Promise.resolve();this.state=c.STATE.LOADING;let s=Promise.resolve();if(!this.currentImage||e!==this.currentImage.name){const t=this.images[e];s=t.calculateImageAverageHeight().then(()=>{if(this.state===c.STATE.INACTIVE)return;this.currentImage=t;const{view:e}=this.currentImage,i=!this.currentView||this.currentView&&this.currentView.id!==e.id;this.currentView&&this.currentView.id!==e.id&&this.olMap.removeLayer(this.currentView.layer),this.currentView=e,this.currentView.setImageName(this.currentImage.name),this.olMap.getView()&&this.olMap.getView().getResolution()&&this.currentView.view.setResolution(this.olMap.getView().getResolution()),this.olMap.setView(this.currentView.view),i&&this.olMap.addLayer(this.currentView.layer)})}return s.then(()=>{if(this.state===c.STATE.INACTIVE)return;const[e,s]=this.currentImage.size;let r=[e/2,s/2];if(t){const n=this.currentImage.transformRealWorld2Image(t,t[2]);n[0]=i(n[0],e),n[1]=i(n[1],s),r=n}this.currentView.view.setCenter(r),this.state=c.STATE.ACTIVE})}getImageIdInDirection(e,t=Math.PI/4){if(!this.currentImage)return null;const{centerPointOnGround:i}=this.currentImage,s=a()(this.rTree,i[0],i[1],20),r=s.find(s=>{if(s.name!==this.currentImage.name){let r=Math.atan2(s.minY-i[1],s.minX-i[0]);r<=0&&(r+=2*Math.PI);let n=r-e;if(n>Math.PI?n-=2*Math.PI:n<-Math.PI&&(n+=2*Math.PI),n<=t&&n>=-t)return s}return!1});return r?r.name:null}getImageNameForCoordinates(e){const t=a()(this.rTree,e[0],e[1],1);return t.length?t[0].name:null}}t["a"]=c},function(e,t,i){"use strict";var s=i(18);e.exports=function(){var e=s(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,i){var s=i(24),r=i(278),n=i(55),a=i(66),o=i(76),l=i(21),c=i(100),u=Object.getOwnPropertyDescriptor;t.f=s?u:function(e,t){if(e=a(e),t=o(t,!0),c)try{return u(e,t)}catch(i){}if(l(e,t))return n(!r.f.call(e,t),e[t])}},function(e,t,i){var s=i(279),r=i(8),n=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?n(s[e])||n(r[e]):s[e]&&s[e][t]||r[e]&&r[e][t]}},function(e,t,i){var s=i(25).f,r=i(21),n=i(11),a=n("toStringTag");e.exports=function(e,t,i){e&&!r(e=i?e:e.prototype,a)&&s(e,a,{configurable:!0,value:t})}},,,function(e,t,i){var s=i(27);e.exports=function(e,t){if(!s(e))return e;var i,r;if(t&&"function"==typeof(i=e.toString)&&!s(r=i.call(e)))return r;if("function"==typeof(i=e.valueOf)&&!s(r=i.call(e)))return r;if(!t&&"function"==typeof(i=e.toString)&&!s(r=i.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,i){var s=i(8),r=i(29);e.exports=function(e,t){try{r(s,e,t)}catch(i){s[e]=t}return t}},function(e,t,i){var s=i(104),r=i(95),n=s("keys");e.exports=function(e){return n[e]||(n[e]=r(e))}},function(e,t){e.exports={}},function(e,t,i){"use strict";var s=i(70),r=i(96),n=RegExp.prototype.exec,a=String.prototype.replace,o=n,l=function(){var e=/a/,t=/b*/g;return n.call(e,"a"),n.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),c=r.UNSUPPORTED_Y||r.BROKEN_CARET,u=void 0!==/()??/.exec("")[1],h=l||u||c;h&&(o=function(e){var t,i,r,o,h=this,d=c&&h.sticky,m=s.call(h),g=h.source,p=0,f=e;return d&&(m=m.replace("y",""),-1===m.indexOf("g")&&(m+="g"),f=String(e).slice(h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==e[h.lastIndex-1])&&(g="(?: "+g+")",f=" "+f,p++),i=new RegExp("^(?:"+g+")",m)),u&&(i=new RegExp("^"+g+"$(?!\\s)",m)),l&&(t=h.lastIndex),r=n.call(d?i:h,f),d?r?(r.input=r.input.slice(p),r[0]=r[0].slice(p),r.index=h.lastIndex,h.lastIndex+=r[0].length):h.lastIndex=0:l&&r&&(h.lastIndex=h.global?r.index+r[0].length:t),u&&r&&r.length>1&&a.call(r[0],i,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=o},function(e,t,i){var s=i(9),r=i(82).f,n=i(62),a=i(64),o=i(84),l=i(505),c=i(123);e.exports=function(e,t){var i,u,h,d,m,g,p=e.target,f=e.global,y=e.stat;if(u=f?s:y?s[p]||o(p,{}):(s[p]||{}).prototype,u)for(h in t){if(m=t[h],e.noTargetGet?(g=r(u,h),d=g&&g.value):d=u[h],i=c(f?h:p+(y?".":"#")+h,e.forced),!i&&void 0!==d){if(typeof m===typeof d)continue;l(m,d)}(e.sham||d&&d.sham)&&n(m,"sham",!0),a(u,h,m,e)}}},function(e,t,i){var s=i(46),r=i(106),n=i(107),a=i(83),o=i(110),l=i(39),c=i(111),u=Object.getOwnPropertyDescriptor;t.f=s?u:function(e,t){if(e=a(e),t=o(t,!0),c)try{return u(e,t)}catch(i){}if(l(e,t))return n(!r.f.call(e,t),e[t])}},function(e,t,i){var s=i(108),r=i(109);e.exports=function(e){return s(r(e))}},function(e,t,i){var s=i(9),r=i(62);e.exports=function(e,t){try{r(s,e,t)}catch(i){s[e]=t}return t}},function(e,t,i){var s=i(113),r=Function.toString;"function"!=typeof s.inspectSource&&(s.inspectSource=function(e){return r.call(e)}),e.exports=s.inspectSource},function(e,t){e.exports=!1},function(e,t,i){var s=i(136),r=i(88),n=r.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,i){var s=i(27),r=i(52),n=i(11),a=n("match");e.exports=function(e){var t;return s(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==r(e))}},function(e,t,i){"use strict";var s=i(140).charAt;e.exports=function(e,t,i){return t+(i?s(e,t).length:1)}},function(e,t,i){var s,r=i(18),n=i(284),a=i(88),o=i(79),l=i(538),c=i(101),u=i(78),h=">",d="<",m="prototype",g="script",p=u("IE_PROTO"),f=function(){},y=function(e){return d+g+h+e+d+"/"+g+h},_=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){var e,t=c("iframe"),i="java"+g+":";return t.style.display="none",l.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(y("document.F=Object")),e.close(),e.F},L=function(){try{s=document.domain&&new ActiveXObject("htmlfile")}catch(t){}L=s?_(s):v();var e=a.length;while(e--)delete L[m][a[e]];return L()};o[p]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(f[m]=r(e),i=new f,f[m]=null,i[p]=e):i=L(),void 0===t?i:n(i,t)}},function(e,t,i){var s=i(18),r=i(540);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(i,[]),t=i instanceof Array}catch(n){}return function(i,n){return s(i),r(n),t?e.call(i,n):i.__proto__=n,i}}():void 0)},function(e,t,i){"use strict";(function(t){var s=i(22),r=i(545),n={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t)&&(e=i(144)),e}var l={adapter:o(),transformRequest:[function(e,t){return r(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};s.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),s.forEach(["post","put","patch"],(function(e){l.headers[e]=s.merge(n)})),e.exports=l}).call(this,i(143))},,function(e,t){var i=0,s=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++i+s).toString(36)}},function(e,t,i){"use strict";var s=i(13);function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=s((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=s((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,i){var s=i(21),r=i(57),n=i(78),a=i(539),o=n("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=r(e),s(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,i){"use strict";var s=i(54),r=i.n(s),n=i(19);class a{constructor(e){this.id=r()(),this.name=e.name,this.meta=e.meta,this.viewDirection=e.viewDirection,this.viewDirectionAngle=null!=e.viewDirectionAngle&&this.meta.version>=3.4&&this.meta.buildNumber>=18?e.viewDirectionAngle:null,this.camera=e.camera,this.groundCoordinates=e.groundCoordinates,this.centerPointOnGround=e.centerPointOnGround,this.pToRealworld=e.pToRealworld||null,this.pToImage=e.pToImage||null,this.projectionCenter=e.projectionCenter||null,this.projection=e.projection,this.averageHeight=null,this.terrainProvider=e.terrainProvider||null}get size(){return this.camera&&this.camera.size?this.camera.size:this.meta.size}get view(){return this.camera&&this.camera.view?this.camera.view:this.meta.getView(this.viewDirection)}getAverageHeight(){return null!=this.averageHeight?this.averageHeight:0}transformImage2RealWorld(e,t){let i=e;if(!this.camera)return this.transformNoCamera(i,!0,t);this.camera.hasRadial&&(i=this.camera.radialDistortionCoordinate(i,!0));const s=new Cesium.Cartesian3(i[0],this.size[1]-i[1],1),r=Cesium.Matrix3.multiplyByVector(this.pToRealworld,s,new Cesium.Cartesian3),n=t||this.getAverageHeight(),a=new Cesium.Cartesian3(this.centerPointOnGround[0],this.centerPointOnGround[1],n),o=Cesium.Cartesian3.subtract(this.projectionCenter,a,new Cesium.Cartesian3),l=-1*Cesium.Cartesian3.dot(Cesium.Cartesian3.UNIT_Z,o),c=Cesium.Cartesian3.dot(Cesium.Cartesian3.UNIT_Z,r),u=l/c,h=Cesium.Cartesian3.add(this.projectionCenter,Cesium.Cartesian3.multiplyByScalar(r,u,new Cesium.Cartesian3),new Cesium.Cartesian3);return[h.x,h.y,n]}transformRealWorld2Image(e,t){if(!this.camera)return this.transformNoCamera(e,!1,t);const i=t||this.getAverageHeight(),s=new Cesium.Cartesian4(e[0],e[1],i,1),r=Cesium.Matrix4.multiplyByVector(this.pToImage,s,new Cesium.Cartesian4),n=[r.x/r.z,r.y/r.z],a=[n[0],this.size[1]-n[1]];return this.camera.radialDistortionCoordinate(a,!1)}transformNoCamera(e,t,i){const s=[[0,0],[this.size[0],0],this.size,[0,this.size[1]]],r=Object(n["d"])(t?s:this.groundCoordinates,t?this.groundCoordinates:s,t,e,this.viewDirection),a=i||this.getAverageHeight();if(null===r||null==r.x||null==r.y){console.error("Real world coordinate could not be determined from footprint data, center will be returned");const e=[this.centerPointOnGround[0],this.centerPointOnGround[1]];return t&&e.push(a),e}const o=[r.x,r.y];return t&&o.push(a),o}calculateImageAverageHeight(){if(null===this.averageHeight){const e=(this.groundCoordinates[0][2]+this.groundCoordinates[1][2]+this.groundCoordinates[2][2]+this.groundCoordinates[3][2])/4;if(0===e&&this.terrainProvider)return Object(n["c"])(this.terrainProvider,[this.centerPointOnGround.slice()],this.projection).then(e=>{e[0]&&null!=e[0][2]&&(this.averageHeight=e[0][2])}).catch(()=>{this.averageHeight=e});this.averageHeight=e}return Promise.resolve()}}t["a"]=a},,function(e,t,i){var s=i(24),r=i(13),n=i(101);e.exports=!s&&!r((function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))},function(e,t,i){var s=i(8),r=i(27),n=s.document,a=r(n)&&r(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},function(e,t,i){var s=i(103),r=Function.toString;"function"!=typeof s.inspectSource&&(s.inspectSource=function(e){return r.call(e)}),e.exports=s.inspectSource},function(e,t,i){var s=i(8),r=i(77),n="__core-js_shared__",a=s[n]||r(n,{});e.exports=a},function(e,t,i){var s=i(56),r=i(103);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.1",mode:s?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,i){var s=i(13);e.exports=!!Object.getOwnPropertySymbols&&!s((function(){return!String(Symbol())}))},function(e,t,i){"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!s.call({1:2},1);t.f=n?function(e){var t=r(this,e);return!!t&&t.enumerable}:s},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,i){var s=i(32),r=i(53),n="".split;e.exports=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?n.call(e,""):Object(e)}:Object},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,i){var s=i(47);e.exports=function(e,t){if(!s(e))return e;var i,r;if(t&&"function"==typeof(i=e.toString)&&!s(r=i.call(e)))return r;if("function"==typeof(i=e.valueOf)&&!s(r=i.call(e)))return r;if(!t&&"function"==typeof(i=e.toString)&&!s(r=i.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,i){var s=i(46),r=i(32),n=i(112);e.exports=!s&&!r((function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))},function(e,t,i){var s=i(9),r=i(47),n=s.document,a=r(n)&&r(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},function(e,t,i){var s=i(9),r=i(84),n="__core-js_shared__",a=s[n]||r(n,{});e.exports=a},function(e,t,i){var s,r,n,a=i(503),o=i(9),l=i(47),c=i(62),u=i(39),h=i(504),d=i(117),m=o.WeakMap,g=function(e){return n(e)?r(e):s(e,{})},p=function(e){return function(t){var i;if(!l(t)||(i=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}};if(a){var f=new m,y=f.get,_=f.has,v=f.set;s=function(e,t){return v.call(f,e,t),t},r=function(e){return y.call(f,e)||{}},n=function(e){return _.call(f,e)}}else{var L=h("state");d[L]=!0,s=function(e,t){return c(e,L,t),t},r=function(e){return u(e,L)?e[L]:{}},n=function(e){return u(e,L)}}e.exports={set:s,get:r,has:n,enforce:g,getterFor:p}},function(e,t,i){var s=i(86),r=i(113);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:s?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var i=0,s=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++i+s).toString(36)}},function(e,t){e.exports={}},function(e,t,i){var s=i(39),r=i(83),n=i(509).indexOf,a=i(117);e.exports=function(e,t){var i,o=r(e),l=0,c=[];for(i in o)!s(a,i)&&s(o,i)&&c.push(i);while(t.length>l)s(o,i=t[l++])&&(~n(c,i)||c.push(i));return c}},function(e,t,i){var s=i(120),r=Math.min;e.exports=function(e){return e>0?r(s(e),9007199254740991):0}},function(e,t){var i=Math.ceil,s=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?s:i)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,i){var s=i(32),r=/#|\.prototype\./,n=function(e,t){var i=o[a(e)];return i==c||i!=l&&("function"==typeof t?s(t):!!t)},a=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},o=n.data={},l=n.NATIVE="N",c=n.POLYFILL="P";e.exports=n},function(e,t,i){var s=i(9);e.exports=s.Promise},function(e,t,i){var s=i(32);e.exports=!!Object.getOwnPropertySymbols&&!s((function(){return!String(Symbol())}))},function(e,t){e.exports={}},function(e,t,i){var s=i(65);e.exports=function(e,t,i){if(s(e),void 0===t)return e;switch(i){case 0:return function(){return e.call(t)};case 1:return function(i){return e.call(t,i)};case 2:return function(i,s){return e.call(t,i,s)};case 3:return function(i,s,r){return e.call(t,i,s,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,i){var s=i(48),r=i(65),n=i(30),a=n("species");e.exports=function(e,t){var i,n=s(e).constructor;return void 0===n||void 0==(i=s(n)[a])?t:r(i)}},function(e,t,i){var s,r,n,a=i(9),o=i(32),l=i(53),c=i(127),u=i(523),h=i(112),d=i(130),m=a.location,g=a.setImmediate,p=a.clearImmediate,f=a.process,y=a.MessageChannel,_=a.Dispatch,v=0,L={},M="onreadystatechange",b=function(e){if(L.hasOwnProperty(e)){var t=L[e];delete L[e],t()}},w=function(e){return function(){b(e)}},T=function(e){b(e.data)},S=function(e){a.postMessage(e+"",m.protocol+"//"+m.host)};g&&p||(g=function(e){var t=[],i=1;while(arguments.length>i)t.push(arguments[i++]);return L[++v]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},s(v),v},p=function(e){delete L[e]},"process"==l(f)?s=function(e){f.nextTick(w(e))}:_&&_.now?s=function(e){_.now(w(e))}:y&&!d?(r=new y,n=r.port2,r.port1.onmessage=T,s=c(n.postMessage,n,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||o(S)||"file:"===m.protocol?s=M in h("script")?function(e){u.appendChild(h("script"))[M]=function(){u.removeChild(this),b(e)}}:function(e){setTimeout(w(e),0)}:(s=S,a.addEventListener("message",T,!1))),e.exports={set:g,clear:p}},function(e,t,i){var s=i(131);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(s)},function(e,t,i){var s=i(49);e.exports=s("navigator","userAgent")||""},function(e,t,i){var s=i(48),r=i(47),n=i(133);e.exports=function(e,t){if(s(e),r(t)&&t.constructor===e)return t;var i=n.f(e),a=i.resolve;return a(t),i.promise}},function(e,t,i){"use strict";var s=i(65),r=function(e){var t,i;this.promise=new e((function(e,s){if(void 0!==t||void 0!==i)throw TypeError("Bad Promise constructor");t=e,i=s})),this.resolve=s(t),this.reject=s(i)};e.exports.f=function(e){return new r(e)}},function(e,t,i){var s=i(13),r=i(52),n="".split;e.exports=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?n.call(e,""):Object(e)}:Object},function(e,t,i){var s=i(21),r=i(533),n=i(71),a=i(25);e.exports=function(e,t){for(var i=r(t),o=a.f,l=n.f,c=0;c<i.length;c++){var u=i[c];s(e,u)||o(e,u,l(t,u))}}},function(e,t,i){var s=i(21),r=i(66),n=i(534).indexOf,a=i(79);e.exports=function(e,t){var i,o=r(e),l=0,c=[];for(i in o)!s(a,i)&&s(o,i)&&c.push(i);while(t.length>l)s(o,i=t[l++])&&(~n(c,i)||c.push(i));return c}},function(e,t,i){var s=i(13),r=/#|\.prototype\./,n=function(e,t){var i=o[a(e)];return i==c||i!=l&&("function"==typeof t?s(t):!!t)},a=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},o=n.data={},l=n.NATIVE="N",c=n.POLYFILL="P";e.exports=n},function(e,t,i){var s=i(89);e.exports=function(e){if(s(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,i){var s=i(11),r=s("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[r]=!1,"/./"[e](t)}catch(s){}}return!1}},function(e,t,i){var s=i(34),r=i(28),n=function(e){return function(t,i){var n,a,o=String(r(t)),l=s(i),c=o.length;return l<0||l>=c?e?"":void 0:(n=o.charCodeAt(l),n<55296||n>56319||l+1===c||(a=o.charCodeAt(l+1))<56320||a>57343?e?o.charAt(l):n:e?o.slice(l,l+2):a-56320+(n-55296<<10)+65536)}};e.exports={codeAt:n(!1),charAt:n(!0)}},function(e,t,i){"use strict";var s,r,n,a=i(97),o=i(29),l=i(21),c=i(11),u=i(56),h=c("iterator"),d=!1,m=function(){return this};[].keys&&(n=[].keys(),"next"in n?(r=a(a(n)),r!==Object.prototype&&(s=r)):d=!0),void 0==s&&(s={}),u||l(s,h)||o(s,h,m),e.exports={IteratorPrototype:s,BUGGY_SAFARI_ITERATORS:d}},function(e,t,i){"use strict";e.exports=function(e,t){return function(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];return e.apply(t,i)}}},function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,s="/";t.cwd=function(){return s},t.chdir=function(t){e||(e=i(544)),s=e.resolve(t,s)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},function(e,t,i){"use strict";var s=i(22),r=i(546),n=i(548),a=i(549),o=i(550),l=i(145);e.exports=function(e){return new Promise((function(t,c){var u=e.data,h=e.headers;s.isFormData(u)&&delete h["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password||"";h.Authorization="Basic "+btoa(m+":"+g)}if(d.open(e.method.toUpperCase(),n(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,s=e.responseType&&"text"!==e.responseType?d.response:d.responseText,n={data:s,status:d.status,statusText:d.statusText,headers:i,config:e,request:d};r(t,c,n),d=null}},d.onerror=function(){c(l("Network Error",e,null,d)),d=null},d.ontimeout=function(){c(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},s.isStandardBrowserEnv()){var p=i(551),f=(e.withCredentials||o(e.url))&&e.xsrfCookieName?p.read(e.xsrfCookieName):void 0;f&&(h[e.xsrfHeaderName]=f)}if("setRequestHeader"in d&&s.forEach(h,(function(e,t){"undefined"===typeof u&&"content-type"===t.toLowerCase()?delete h[t]:d.setRequestHeader(t,e)})),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(y){if("json"!==e.responseType)throw y}"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),c(e),d=null)})),void 0===u&&(u=null),d.send(u)}))}},function(e,t,i){"use strict";var s=i(547);e.exports=function(e,t,i,r,n){var a=new Error(e);return s(a,t,i,r,n)}},function(e,t,i){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,i){"use strict";function s(e){this.message=e}s.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},s.prototype.__CANCEL__=!0,e.exports=s},function(e,t,i){"use strict";var s,r=i(24),n=i(8),a=i(27),o=i(21),l=i(290),c=i(29),u=i(38),h=i(25).f,d=i(97),m=i(92),g=i(11),p=i(95),f=n.DataView,y=f&&f.prototype,_=n.Int8Array,v=_&&_.prototype,L=n.Uint8ClampedArray,M=L&&L.prototype,b=_&&d(_),w=v&&d(v),T=Object.prototype,S=T.isPrototypeOf,C=g("toStringTag"),E=p("TYPED_ARRAY_TAG"),I=!(!n.ArrayBuffer||!f),k=I&&!!m&&"Opera"!==l(n.opera),D=!1,O={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},P=function(e){var t=l(e);return"DataView"===t||o(O,t)},A=function(e){return a(e)&&o(O,l(e))},x=function(e){if(A(e))return e;throw TypeError("Target is not a typed array")},Y=function(e){if(m){if(S.call(b,e))return e}else for(var t in O)if(o(O,s)){var i=n[t];if(i&&(e===i||S.call(i,e)))return e}throw TypeError("Target is not a typed array constructor")},j=function(e,t,i){if(r){if(i)for(var s in O){var a=n[s];a&&o(a.prototype,e)&&delete a.prototype[e]}w[e]&&!i||u(w,e,i?t:k&&v[e]||t)}},N=function(e,t,i){var s,a;if(r){if(m){if(i)for(s in O)a=n[s],a&&o(a,e)&&delete a[e];if(b[e]&&!i)return;try{return u(b,e,i?t:k&&_[e]||t)}catch(l){}}for(s in O)a=n[s],!a||a[e]&&!i||u(a,e,t)}};for(s in O)n[s]||(k=!1);if((!k||"function"!=typeof b||b===Function.prototype)&&(b=function(){throw TypeError("Incorrect invocation")},k))for(s in O)n[s]&&m(n[s],b);if((!k||!w||w===T)&&(w=b.prototype,k))for(s in O)n[s]&&m(n[s].prototype,w);if(k&&d(M)!==w&&m(M,w),r&&!o(w,C))for(s in D=!0,h(w,C,{get:function(){return a(this)?this[E]:void 0}}),O)n[s]&&c(n[s],E,s);I&&m&&d(y)!==T&&m(y,T),e.exports={NATIVE_ARRAY_BUFFER:I,NATIVE_ARRAY_BUFFER_VIEWS:k,TYPED_ARRAY_TAG:D&&E,aTypedArray:x,aTypedArrayConstructor:Y,exportTypedArrayMethod:j,exportTypedArrayStaticMethod:N,isView:P,isTypedArray:A,TypedArray:b,TypedArrayPrototype:w}},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,i){return e<12?i?"vm":"VM":i?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},n=function(e){return function(t,i,n,a){var o=s(t),l=r[e][s(t)];return 2===o&&(l=l[i?0:1]),l.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],o=e.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:n("s"),ss:n("s"),m:n("m"),mm:n("m"),h:n("h"),hh:n("h"),d:n("d"),dd:n("d"),M:n("M"),MM:n("M"),y:n("y"),yy:n("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return i[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return o}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},s={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(t,r,n,a){var o=i(t),l=s[e][i(t)];return 2===o&&(l=l[r?0:1]),l.replace(/%d/i,t)}},n=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],a=e.defineLocale("ar-ly",{months:n,monthsShort:n,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return a}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return i[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},i=e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,i){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var i=e%10,s=e%100-i,r=e>=100?100:null;return e+(t[i]||t[s]||t[r])},week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t){var i=e.split("_");return t%10===1&&t%100!==11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function i(e,i,s){var r={ss:i?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:i?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:i?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===s?i?"хвіліна":"хвіліну":"h"===s?i?"гадзіна":"гадзіну":e+" "+t(r[s],+e)}var s=e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:i,mm:i,h:i,hh:i,d:"дзень",dd:i,M:"месяц",MM:i,y:"год",yy:i},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,i=e%100;return 0===e?e+"-ев":0===i?e+"-ен":i>10&&i<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},i={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},s=e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,i){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},i={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},s=e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,i){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i){var s={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+r(s[i],e)}function i(e){switch(s(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function s(e){return e>9?s(e%10):e}function r(e,t){return 2===t?n(e):e}function n(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}var a=e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:i},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=1===e?"añ":"vet";return e+t},week:{dow:1,doy:4}});return a}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i){var s=e+" ";switch(i){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",s;case"m":return t?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",s;case"h":return t?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",s;case"dd":return s+=1===e?"dan":"dana",s;case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",s;case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",s}}var i=e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var i=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(i="a"),e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),i="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),s=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],r=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function n(e){return e>1&&e<5&&1!==~~(e/10)}function a(e,t,i,s){var r=e+" ";switch(i){case"s":return t||s?"pár sekund":"pár sekundami";case"ss":return t||s?r+(n(e)?"sekundy":"sekund"):r+"sekundami";case"m":return t?"minuta":s?"minutu":"minutou";case"mm":return t||s?r+(n(e)?"minuty":"minut"):r+"minutami";case"h":return t?"hodina":s?"hodinu":"hodinou";case"hh":return t||s?r+(n(e)?"hodiny":"hodin"):r+"hodinami";case"d":return t||s?"den":"dnem";case"dd":return t||s?r+(n(e)?"dny":"dní"):r+"dny";case"M":return t||s?"měsíc":"měsícem";case"MM":return t||s?r+(n(e)?"měsíce":"měsíců"):r+"měsíci";case"y":return t||s?"rok":"rokem";case"yy":return t||s?r+(n(e)?"roky":"let"):r+"lety"}}var o=e.defineLocale("cs",{months:t,monthsShort:i,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран";return e+t},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,i="",s=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return t>20?i=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(i=s[t]),e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i,s){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}var i=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i,s){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}var i=e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i,s){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}var i=e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],i=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],s=e.defineLocale("dv",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,i){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}var i=e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"===typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,i){return e>11?i?"μμ":"ΜΜ":i?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,i){var s=this._calendarEl[e],r=i&&i.hours();return t(s)&&(s=s.apply(i)),s.replace("{}",r%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,i){return e>11?i?"p.t.m.":"P.T.M.":i?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,n=e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,n=e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,n=e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i,s){var r={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?r[i][2]?r[i][2]:r[i][1]:s?r[i][0]:r[i][1]}var i=e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},i={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},s=e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,i){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return i[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),i=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function s(e,t,i,s){var n="";switch(i){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":return s?"sekunnin":"sekuntia";case"m":return s?"minuutin":"minuutti";case"mm":n=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":n=s?"tunnin":"tuntia";break;case"d":return s?"päivän":"päivä";case"dd":n=s?"päivän":"päivää";break;case"M":return s?"kuukauden":"kuukausi";case"MM":n=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":n=s?"vuoden":"vuotta";break}return n=r(e,s)+" "+n,n}function r(e,s){return e<10?s?i[e]:t[e]:e}var n=e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),i="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),s=e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Méitheamh","Iúil","Lúnasa","Meán Fómhair","Deaireadh Fómhair","Samhain","Nollaig"],i=["Eaná","Feab","Márt","Aibr","Beal","Méit","Iúil","Lúna","Meán","Deai","Samh","Noll"],s=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Satharn"],r=["Dom","Lua","Mái","Céa","Déa","hAo","Sat"],n=["Do","Lu","Má","Ce","Dé","hA","Sa"],a=e.defineLocale("ga",{months:t,monthsShort:i,monthsParseExact:!0,weekdays:s,weekdaysShort:r,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return a}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],i=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],s=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],r=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],n=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],a=e.defineLocale("gd",{months:t,monthsShort:i,monthsParseExact:!0,weekdays:s,weekdaysShort:r,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return a}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i,s){var r={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?r[i][0]:r[i][1]}var i=e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},i={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},s=e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10===0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,i){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?i?'לפנה"צ':"לפני הצהריים":e<18?i?'אחה"צ':"אחרי הצהריים":"בערב"}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},s=e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i){var s=e+" ";switch(i){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",s;case"m":return t?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",s;case"h":return t?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",s;case"dd":return s+=1===e?"dan":"dana",s;case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",s;case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",s}}var i=e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function i(e,t,i,s){var r=e;switch(i){case"s":return s||t?"néhány másodperc":"néhány másodperce";case"ss":return r+(s||t)?" másodperc":" másodperce";case"m":return"egy"+(s||t?" perc":" perce");case"mm":return r+(s||t?" perc":" perce");case"h":return"egy"+(s||t?" óra":" órája");case"hh":return r+(s||t?" óra":" órája");case"d":return"egy"+(s||t?" nap":" napja");case"dd":return r+(s||t?" nap":" napja");case"M":return"egy"+(s||t?" hónap":" hónapja");case"MM":return r+(s||t?" hónap":" hónapja");case"y":return"egy"+(s||t?" év":" éve");case"yy":return r+(s||t?" év":" éve")}return""}function s(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}var r=e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,i){return e<12?!0===i?"de":"DE":!0===i?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return s.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return s.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e){return e%100===11||e%10!==1}function i(e,i,s,r){var n=e+" ";switch(s){case"s":return i||r?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?n+(i||r?"sekúndur":"sekúndum"):n+"sekúnda";case"m":return i?"mínúta":"mínútu";case"mm":return t(e)?n+(i||r?"mínútur":"mínútum"):i?n+"mínúta":n+"mínútu";case"hh":return t(e)?n+(i||r?"klukkustundir":"klukkustundum"):n+"klukkustund";case"d":return i?"dagur":r?"dag":"degi";case"dd":return t(e)?i?n+"dagar":n+(r?"daga":"dögum"):i?n+"dagur":n+(r?"dag":"degi");case"M":return i?"mánuður":r?"mánuð":"mánuði";case"MM":return t(e)?i?n+"mánuðir":n+(r?"mánuði":"mánuðum"):i?n+"mánuður":n+(r?"mánuð":"mánuði");case"y":return i||r?"ár":"ári";case"yy":return t(e)?n+(i||r?"ár":"árum"):n+(i||r?"ár":"ári")}}var s=e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:i,ss:i,m:i,mm:i,h:"klukkustund",hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,i){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()<this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()<e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20===0||e%100===0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},i=e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var i=e%10,s=e>=100?100:null;return e+(t[e]||t[i]||t[s])},week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},i={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},s=e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,i){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},i={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},s=e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,i){return e<12?"오전":"오후"}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],r=e.defineLocale("ku",{months:s,monthsShort:s,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,i){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return i[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return r}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},i=e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var i=e%10,s=e>=100?100:null;return e+(t[e]||t[i]||t[s])},week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i,s){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[i][0]:r[i][1]}function i(e){var t=e.substr(0,e.indexOf(" "));return r(t)?"a "+e:"an "+e}function s(e){var t=e.substr(0,e.indexOf(" "));return r(t)?"viru "+e:"virun "+e}function r(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,i=e/10;return r(0===t?i:t)}if(e<1e4){while(e>=10)e/=10;return r(e)}return e/=1e3,r(e)}var n=e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:i,past:s,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,i){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function i(e,t,i,s){return t?"kelios sekundės":s?"kelių sekundžių":"kelias sekundes"}function s(e,t,i,s){return t?n(i)[0]:s?n(i)[1]:n(i)[2]}function r(e){return e%10===0||e>10&&e<20}function n(e){return t[e].split("_")}function a(e,t,i,a){var o=e+" ";return 1===e?o+s(e,t,i[0],a):t?o+(r(e)?n(i)[1]:n(i)[0]):a?o+n(i)[1]:o+(r(e)?n(i)[1]:n(i)[2])}var o=e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:i,ss:a,m:s,mm:a,h:s,hh:a,d:s,dd:a,M:s,MM:a,y:s,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});return o}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function i(e,t,i){return i?t%10===1&&t%100!==11?e[2]:e[3]:t%10===1&&t%100!==11?e[0]:e[1]}function s(e,s,r){return e+" "+i(t[r],e,s)}function r(e,s,r){return i(t[r],e,s)}function n(e,t){return t?"dažas sekundes":"dažām sekundēm"}var a=e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:n,ss:s,m:r,mm:s,h:r,hh:s,d:r,dd:s,M:r,MM:s,y:r,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,i,s){var r=t.words[s];return 1===s.length?i?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}},i=e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,i=e%100;return 0===e?e+"-ев":0===i?e+"-ен":i>10&&i<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,i){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i,s){switch(i){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}var i=e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,i){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function s(e,t,i,s){var r="";if(t)switch(i){case"s":r="काही सेकंद";break;case"ss":r="%d सेकंद";break;case"m":r="एक मिनिट";break;case"mm":r="%d मिनिटे";break;case"h":r="एक तास";break;case"hh":r="%d तास";break;case"d":r="एक दिवस";break;case"dd":r="%d दिवस";break;case"M":r="एक महिना";break;case"MM":r="%d महिने";break;case"y":r="एक वर्ष";break;case"yy":r="%d वर्षे";break}else switch(i){case"s":r="काही सेकंदां";break;case"ss":r="%d सेकंदां";break;case"m":r="एका मिनिटा";break;case"mm":r="%d मिनिटां";break;case"h":r="एका तासा";break;case"hh":r="%d तासां";break;case"d":r="एका दिवसा";break;case"dd":r="%d दिवसां";break;case"M":r="एका महिन्या";break;case"MM":r="%d महिन्यां";break;case"y":r="एका वर्षा";break;case"yy":r="%d वर्षां";break}return r.replace(/%d/i,e)}var r=e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}});return r}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},i={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},s=e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},s=e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,i){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,n=e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,n=e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},i={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},s=e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function s(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function r(e,t,i){var r=e+" ";switch(i){case"ss":return r+(s(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(s(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(s(e)?"godziny":"godzin");case"MM":return r+(s(e)?"miesiące":"miesięcy");case"yy":return r+(s(e)?"lata":"lat")}}var n=e.defineLocale("pl",{months:function(e,s){return e?""===s?"("+i[e.month()]+"|"+t[e.month()]+")":/D MMMM/.test(s)?i[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:r,m:r,mm:r,h:r,hh:r,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:r,y:"rok",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i){var s={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},r=" ";return(e%100>=20||e>=100&&e%100===0)&&(r=" de "),e+r+s[i]}var i=e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t){var i=e.split("_");return t%10===1&&t%100!==11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function i(e,i,s){var r={ss:i?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:i?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===s?i?"минута":"минуту":e+" "+t(r[s],+e)}var s=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],r=e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:s,longMonthsParse:s,shortMonthsParse:s,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:i,m:i,mm:i,h:"час",hh:i,d:"день",dd:i,M:"месяц",MM:i,y:"год",yy:i},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}});return r}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],i=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],s=e.defineLocale("sd",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,i){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,i){return e>11?i?"ප.ව.":"පස් වරු":i?"පෙ.ව.":"පෙර වරු"}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),i="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function s(e){return e>1&&e<5}function r(e,t,i,r){var n=e+" ";switch(i){case"s":return t||r?"pár sekúnd":"pár sekundami";case"ss":return t||r?n+(s(e)?"sekundy":"sekúnd"):n+"sekundami";case"m":return t?"minúta":r?"minútu":"minútou";case"mm":return t||r?n+(s(e)?"minúty":"minút"):n+"minútami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?n+(s(e)?"hodiny":"hodín"):n+"hodinami";case"d":return t||r?"deň":"dňom";case"dd":return t||r?n+(s(e)?"dni":"dní"):n+"dňami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?n+(s(e)?"mesiace":"mesiacov"):n+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?n+(s(e)?"roky":"rokov"):n+"rokmi"}}var n=e.defineLocale("sk",{months:t,monthsShort:i,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t,i,s){var r=e+" ";switch(i){case"s":return t||s?"nekaj sekund":"nekaj sekundami";case"ss":return r+=1===e?t?"sekundo":"sekundi":2===e?t||s?"sekundi":"sekundah":e<5?t||s?"sekunde":"sekundah":"sekund",r;case"m":return t?"ena minuta":"eno minuto";case"mm":return r+=1===e?t?"minuta":"minuto":2===e?t||s?"minuti":"minutama":e<5?t||s?"minute":"minutami":t||s?"minut":"minutami",r;case"h":return t?"ena ura":"eno uro";case"hh":return r+=1===e?t?"ura":"uro":2===e?t||s?"uri":"urama":e<5?t||s?"ure":"urami":t||s?"ur":"urami",r;case"d":return t||s?"en dan":"enim dnem";case"dd":return r+=1===e?t||s?"dan":"dnem":2===e?t||s?"dni":"dnevoma":t||s?"dni":"dnevi",r;case"M":return t||s?"en mesec":"enim mesecem";case"MM":return r+=1===e?t||s?"mesec":"mesecem":2===e?t||s?"meseca":"mesecema":e<5?t||s?"mesece":"meseci":t||s?"mesecev":"meseci",r;case"y":return t||s?"eno leto":"enim letom";case"yy":return r+=1===e?t||s?"leto":"letom":2===e?t||s?"leti":"letoma":e<5?t||s?"leta":"leti":t||s?"let":"leti",r}}var i=e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,i){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,i,s){var r=t.words[s];return 1===s.length?i?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}},i=e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,i,s){var r=t.words[s];return 1===s.length?i?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}},i=e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,i){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"e":1===t||2===t?"a":"e";return e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},i={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},s=e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,i){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},i=e.defineLocale("tg",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Пагоҳ соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var i=e%10,s=e>=100?100:null;return e+(t[e]||t[i]||t[s])},week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,i){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function i(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq",t}function s(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret",t}function r(e,t,i,s){var r=n(e);switch(i){case"ss":return r+" lup";case"mm":return r+" tup";case"hh":return r+" rep";case"dd":return r+" jaj";case"MM":return r+" jar";case"yy":return r+" DIS"}}function n(e){var i=Math.floor(e%1e3/100),s=Math.floor(e%100/10),r=e%10,n="";return i>0&&(n+=t[i]+"vatlh"),s>0&&(n+=(""!==n?" ":"")+t[s]+"maH"),r>0&&(n+=(""!==n?" ":"")+t[r]),""===n?"pagh":n}var a=e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:i,past:s,s:"puS lup",ss:r,m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},i=e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,i){switch(i){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var s=e%10,r=e%100-s,n=e>=100?100:null;return e+(t[s]||t[r]||t[n])}},week:{dow:1,doy:7}});return i}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,i){return e>11?i?"d'o":"D'O":i?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});function i(e,t,i,s){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return s||t?r[i][0]:r[i][1]}return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,i){var s=100*e+t;return s<600?"يېرىم كېچە":s<900?"سەھەر":s<1130?"چۈشتىن بۇرۇن":s<1230?"چۈش":s<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";function t(e,t){var i=e.split("_");return t%10===1&&t%100!==11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function i(e,i,s){var r={ss:i?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:i?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:i?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===s?i?"хвилина":"хвилину":"h"===s?i?"година":"годину":e+" "+t(r[s],+e)}function s(e,t){var i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};if(!0===e)return i["nominative"].slice(1,7).concat(i["nominative"].slice(0,1));if(!e)return i["nominative"];var s=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative";return i[s][e.day()]}function r(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var n=e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:s,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:r("[Сьогодні "),nextDay:r("[Завтра "),lastDay:r("[Вчора "),nextWeek:r("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return r("[Минулої] dddd [").call(this);case 1:case 2:case 4:return r("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:i,m:i,mm:i,h:"годину",hh:i,d:"день",dd:i,M:"місяць",MM:i,y:"рік",yy:i},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return n}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],i=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],s=e.defineLocale("ur",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,i){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return s}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,i){return e<12?i?"sa":"SA":i?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,i){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},function(e,t,i){(function(e,t){t(i(1))})(0,(function(e){"use strict";var t=e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(35);function r(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function n(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function a(e){if(e.length>1&&s.isNumber(e[0])&&s.isNumber(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return a(e[0]);throw new Error("coordinates must only contain numbers")}function o(e,t,i){if(!t||!i)throw new Error("type and name required");if(!e||e.type!==t)throw new Error("Invalid input to "+i+": must be a "+t+", given "+e.type)}function l(e,t,i){if(!e)throw new Error("No feature passed");if(!i)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!e.geometry)throw new Error("Invalid input to "+i+", Feature with geometry required");if(!e.geometry||e.geometry.type!==t)throw new Error("Invalid input to "+i+": must be a "+t+", given "+e.geometry.type)}function c(e,t,i){if(!e)throw new Error("No featureCollection passed");if(!i)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+i+", FeatureCollection required");for(var s=0,r=e.features;s<r.length;s++){var n=r[s];if(!n||"Feature"!==n.type||!n.geometry)throw new Error("Invalid input to "+i+", Feature with geometry required");if(!n.geometry||n.geometry.type!==t)throw new Error("Invalid input to "+i+": must be a "+t+", given "+n.geometry.type)}}function u(e){return"Feature"===e.type?e.geometry:e}function h(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}t.getCoord=r,t.getCoords=n,t.containsNumber=a,t.geojsonType=o,t.featureOf=l,t.collectionOf=c,t.getGeom=u,t.getType=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(35);function r(e,t,i){if(null!==e)for(var s,n,a,o,l,c,u,h,d=0,m=0,g=e.type,p="FeatureCollection"===g,f="Feature"===g,y=p?e.features.length:1,_=0;_<y;_++){u=p?e.features[_].geometry:f?e.geometry:e,h=!!u&&"GeometryCollection"===u.type,l=h?u.geometries.length:1;for(var v=0;v<l;v++){var L=0,M=0;if(o=h?u.geometries[v]:u,null!==o){c=o.coordinates;var b=o.type;switch(d=!i||"Polygon"!==b&&"MultiPolygon"!==b?0:1,b){case null:break;case"Point":if(!1===t(c,m,_,L,M))return!1;m++,L++;break;case"LineString":case"MultiPoint":for(s=0;s<c.length;s++){if(!1===t(c[s],m,_,L,M))return!1;m++,"MultiPoint"===b&&L++}"LineString"===b&&L++;break;case"Polygon":case"MultiLineString":for(s=0;s<c.length;s++){for(n=0;n<c[s].length-d;n++){if(!1===t(c[s][n],m,_,L,M))return!1;m++}"MultiLineString"===b&&L++,"Polygon"===b&&M++}"Polygon"===b&&L++;break;case"MultiPolygon":for(s=0;s<c.length;s++){for(M=0,n=0;n<c[s].length;n++){for(a=0;a<c[s][n].length-d;a++){if(!1===t(c[s][n][a],m,_,L,M))return!1;m++}M++}L++}break;case"GeometryCollection":for(s=0;s<o.geometries.length;s++)if(!1===r(o.geometries[s],t,i))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function n(e,t,i,s){var n=i;return r(e,(function(e,s,r,a,o){n=0===s&&void 0===i?e:t(n,e,s,r,a,o)}),s),n}function a(e,t){var i;switch(e.type){case"FeatureCollection":for(i=0;i<e.features.length;i++)if(!1===t(e.features[i].properties,i))break;break;case"Feature":t(e.properties,0);break}}function o(e,t,i){var s=i;return a(e,(function(e,r){s=0===r&&void 0===i?e:t(s,e,r)})),s}function l(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var i=0;i<e.features.length;i++)if(!1===t(e.features[i],i))break}function c(e,t,i){var s=i;return l(e,(function(e,r){s=0===r&&void 0===i?e:t(s,e,r)})),s}function u(e){var t=[];return r(e,(function(e){t.push(e)})),t}function h(e,t){var i,s,r,n,a,o,l,c,u,h,d=0,m="FeatureCollection"===e.type,g="Feature"===e.type,p=m?e.features.length:1;for(i=0;i<p;i++){for(o=m?e.features[i].geometry:g?e.geometry:e,c=m?e.features[i].properties:g?e.properties:{},u=m?e.features[i].bbox:g?e.bbox:void 0,h=m?e.features[i].id:g?e.id:void 0,l=!!o&&"GeometryCollection"===o.type,a=l?o.geometries.length:1,r=0;r<a;r++)if(n=l?o.geometries[r]:o,null!==n)switch(n.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(n,d,c,u,h))return!1;break;case"GeometryCollection":for(s=0;s<n.geometries.length;s++)if(!1===t(n.geometries[s],d,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,c,u,h))return!1;d++}}function d(e,t,i){var s=i;return h(e,(function(e,r,n,a,o){s=0===r&&void 0===i?e:t(s,e,r,n,a,o)})),s}function m(e,t){h(e,(function(e,i,r,n,a){var o,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(s.feature(e,r,{bbox:n,id:a}),i,0)&&void 0}switch(l){case"MultiPoint":o="Point";break;case"MultiLineString":o="LineString";break;case"MultiPolygon":o="Polygon";break}for(var c=0;c<e.coordinates.length;c++){var u=e.coordinates[c],h={type:o,coordinates:u};if(!1===t(s.feature(h,r),i,c))return!1}}))}function g(e,t,i){var s=i;return m(e,(function(e,r,n){s=0===r&&0===n&&void 0===i?e:t(s,e,r,n)})),s}function p(e,t){m(e,(function(e,i,n){var a=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var l,c=0,u=0,h=0;return!1!==r(e,(function(r,o,d,m,g){if(void 0===l||i>c||m>u||g>h)return l=r,c=i,u=m,h=g,void(a=0);var p=s.lineString([l,r],e.properties);if(!1===t(p,i,n,g,a))return!1;a++,l=r}))&&void 0}}}))}function f(e,t,i){var s=i,r=!1;return p(e,(function(e,n,a,o,l){s=!1===r&&void 0===i?e:t(s,e,n,a,o,l),r=!0})),s}function y(e,t){if(!e)throw new Error("geojson is required");m(e,(function(e,i,r){if(null!==e.geometry){var n=e.geometry.type,a=e.geometry.coordinates;switch(n){case"LineString":if(!1===t(e,i,r,0,0))return!1;break;case"Polygon":for(var o=0;o<a.length;o++)if(!1===t(s.lineString(a[o],e.properties),i,r,o))return!1;break}}}))}function _(e,t,i){var s=i;return y(e,(function(e,r,n,a){s=0===r&&void 0===i?e:t(s,e,r,n,a)})),s}function v(e,t){if(t=t||{},!s.isObject(t))throw new Error("options is invalid");var i,r=t.featureIndex||0,n=t.multiFeatureIndex||0,a=t.geometryIndex||0,o=t.segmentIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),l=l||e.features[r].properties,i=e.features[r].geometry;break;case"Feature":l=l||e.properties,i=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":i=e;break;default:throw new Error("geojson is invalid")}if(null===i)return null;var c=i.coordinates;switch(i.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=c.length+o-1),s.lineString([c[o],c[o+1]],l,t);case"Polygon":return a<0&&(a=c.length+a),o<0&&(o=c[a].length+o-1),s.lineString([c[a][o],c[a][o+1]],l,t);case"MultiLineString":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o-1),s.lineString([c[n][o],c[n][o+1]],l,t);case"MultiPolygon":return n<0&&(n=c.length+n),a<0&&(a=c[n].length+a),o<0&&(o=c[n][a].length-o-1),s.lineString([c[n][a][o],c[n][a][o+1]],l,t)}throw new Error("geojson is invalid")}function L(e,t){if(t=t||{},!s.isObject(t))throw new Error("options is invalid");var i,r=t.featureIndex||0,n=t.multiFeatureIndex||0,a=t.geometryIndex||0,o=t.coordIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),l=l||e.features[r].properties,i=e.features[r].geometry;break;case"Feature":l=l||e.properties,i=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":i=e;break;default:throw new Error("geojson is invalid")}if(null===i)return null;var c=i.coordinates;switch(i.type){case"Point":return s.point(c,l,t);case"MultiPoint":return n<0&&(n=c.length+n),s.point(c[n],l,t);case"LineString":return o<0&&(o=c.length+o),s.point(c[o],l,t);case"Polygon":return a<0&&(a=c.length+a),o<0&&(o=c[a].length+o),s.point(c[a][o],l,t);case"MultiLineString":return n<0&&(n=c.length+n),o<0&&(o=c[n].length+o),s.point(c[n][o],l,t);case"MultiPolygon":return n<0&&(n=c.length+n),a<0&&(a=c[n].length+a),o<0&&(o=c[n][a].length-o),s.point(c[n][a][o],l,t)}throw new Error("geojson is invalid")}t.coordEach=r,t.coordReduce=n,t.propEach=a,t.propReduce=o,t.featureEach=l,t.featureReduce=c,t.coordAll=u,t.geomEach=h,t.geomReduce=d,t.flattenEach=m,t.flattenReduce=g,t.segmentEach=p,t.segmentReduce=f,t.lineEach=y,t.lineReduce=_,t.findSegment=v,t.findPoint=L},function(e,t,i){"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!s.call({1:2},1);t.f=n?function(e){var t=r(this,e);return!!t&&t.enumerable}:s},function(e,t,i){var s=i(8);e.exports=s},function(e,t,i){var s=i(34),r=Math.max,n=Math.min;e.exports=function(e,t){var i=s(e);return i<0?r(i+t,0):n(i,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,i){"use strict";var s=i(66),r=i(537),n=i(67),a=i(50),o=i(286),l="Array Iterator",c=a.set,u=a.getterFor(l);e.exports=o(Array,"Array",(function(e,t){c(this,{type:l,target:s(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,i=e.kind,s=e.index++;return!t||s>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:s,done:!1}:"values"==i?{value:t[s],done:!1}:{value:[s,t[s]],done:!1}}),"values"),n.Arguments=n.Array,r("keys"),r("values"),r("entries")},function(e,t,i){var s=i(24),r=i(25),n=i(18),a=i(285);e.exports=s?Object.defineProperties:function(e,t){n(e);var i,s=a(t),o=s.length,l=0;while(o>l)r.f(e,i=s[l++],t[i]);return e}},function(e,t,i){var s=i(136),r=i(88);e.exports=Object.keys||function(e){return s(e,r)}},function(e,t,i){"use strict";var s=i(40),r=i(287),n=i(97),a=i(92),o=i(73),l=i(29),c=i(38),u=i(11),h=i(56),d=i(67),m=i(141),g=m.IteratorPrototype,p=m.BUGGY_SAFARI_ITERATORS,f=u("iterator"),y="keys",_="values",v="entries",L=function(){return this};e.exports=function(e,t,i,u,m,M,b){r(i,t,u);var w,T,S,C=function(e){if(e===m&&O)return O;if(!p&&e in k)return k[e];switch(e){case y:return function(){return new i(this,e)};case _:return function(){return new i(this,e)};case v:return function(){return new i(this,e)}}return function(){return new i(this)}},E=t+" Iterator",I=!1,k=e.prototype,D=k[f]||k["@@iterator"]||m&&k[m],O=!p&&D||C(m),P="Array"==t&&k.entries||D;if(P&&(w=n(P.call(new e)),g!==Object.prototype&&w.next&&(h||n(w)===g||(a?a(w,g):"function"!=typeof w[f]&&l(w,f,L)),o(w,E,!0,!0),h&&(d[E]=L))),m==_&&D&&D.name!==_&&(I=!0,O=function(){return D.call(this)}),h&&!b||k[f]===O||l(k,f,O),d[t]=O,m)if(T={values:C(_),keys:M?O:C(y),entries:C(v)},b)for(S in T)(p||I||!(S in k))&&c(k,S,T[S]);else s({target:t,proto:!0,forced:p||I},T);return T}},function(e,t,i){"use strict";var s=i(141).IteratorPrototype,r=i(91),n=i(55),a=i(73),o=i(67),l=function(){return this};e.exports=function(e,t,i){var c=t+" Iterator";return e.prototype=r(s,{next:n(1,i)}),a(e,c,!1,!0),o[c]=l,e}},function(e,t,i){var s=i(27),r=i(92);e.exports=function(e,t,i){var n,a;return r&&"function"==typeof(n=t.constructor)&&n!==i&&s(a=n.prototype)&&a!==i.prototype&&r(e,a),e}},function(e,t,i){"use strict";var s=i(72),r=i(25),n=i(11),a=i(24),o=n("species");e.exports=function(e){var t=s(e),i=r.f;a&&t&&!t[o]&&i(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,i){var s=i(600),r=i(52),n=i(11),a=n("toStringTag"),o="Arguments"==r(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(i){}};e.exports=s?r:function(e){var t,i,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=l(t=Object(e),a))?i:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t){e.exports=function(e,t,i){if(!(e instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return e}},function(e,t,i){var s=i(290),r=i(67),n=i(11),a=n("iterator");e.exports=function(e){if(void 0!=e)return e[a]||e["@@iterator"]||r[s(e)]}},function(e,t,i){var s=i(282);e.exports=function(e,t,i){if(s(e),void 0===t)return e;switch(i){case 0:return function(){return e.call(t)};case 1:return function(i){return e.call(t,i)};case 2:return function(i,s){return e.call(t,i,s)};case 3:return function(i,s,r){return e.call(t,i,s,r)}}return function(){return e.apply(t,arguments)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){"use strict";var s=i(19);class r{constructor(e){this.name=e.name,this.principalPoint=e["principal-point"],this.pixelSize=e["pixel-size"],this.radialE2F=e["radial-distorsion-expected-2-found"],this.radialF2E=e["radial-distorsion-found-2-expected"],this.hasRadial=!!(this.pixelSize&&this.radialE2F&&this.radialF2E),this.size=e.size||null,this.view=e.view||null}radialDistortionCoordinate(e,t){if(this.hasRadial){const i=t?this.radialF2E:this.radialE2F,r=Object(s["a"])(this.principalPoint,e)*this.pixelSize[0];if(0===r)return e.slice();const n=e[0]-this.principalPoint[0],a=e[1]-this.principalPoint[1];let o=0;for(let e=0;e<i.length;++e)o+=i[e]*r**e;const l=(r+o)/this.pixelSize[0],c=Math.atan2(a,n);return[this.principalPoint[0]+l*Math.cos(c),this.principalPoint[1]+l*Math.sin(c)]}return e.slice()}}t["a"]=r},function(e,t,i){var s=i(629),r=i(54),n=r;n.v1=s,n.v4=r,e.exports=n},,,,,function(e,t,i){var s=i(8),r=i(102),n=s.WeakMap;e.exports="function"===typeof n&&/native code/.test(r(n))},function(e,t,i){var s=i(105);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,i){"use strict";var s,r,n,a,o=i(81),l=i(86),c=i(9),u=i(49),h=i(124),d=i(64),m=i(511),g=i(512),p=i(514),f=i(47),y=i(65),_=i(515),v=i(53),L=i(85),M=i(516),b=i(522),w=i(128),T=i(129).set,S=i(524),C=i(132),E=i(525),I=i(133),k=i(526),D=i(114),O=i(123),P=i(30),A=i(527),x=P("species"),Y="Promise",j=D.get,N=D.set,F=D.getterFor(Y),R=h,H=c.TypeError,G=c.document,z=c.process,B=u("fetch"),V=I.f,U=V,W="process"==v(z),q=!!(G&&G.createEvent&&c.dispatchEvent),J="unhandledrejection",K="rejectionhandled",Z=0,Q=1,X=2,$=1,ee=2,te=O(Y,(function(){var e=L(R)!==String(R);if(!e){if(66===A)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!R.prototype["finally"])return!0;if(A>=51&&/native code/.test(R))return!1;var t=R.resolve(1),i=function(e){e((function(){}),(function(){}))},s=t.constructor={};return s[x]=i,!(t.then((function(){}))instanceof i)})),ie=te||!b((function(e){R.all(e)["catch"]((function(){}))})),se=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},re=function(e,t,i){if(!t.notified){t.notified=!0;var s=t.reactions;S((function(){var r=t.value,n=t.state==Q,a=0;while(s.length>a){var o,l,c,u=s[a++],h=n?u.ok:u.fail,d=u.resolve,m=u.reject,g=u.domain;try{h?(n||(t.rejection===ee&&le(e,t),t.rejection=$),!0===h?o=r:(g&&g.enter(),o=h(r),g&&(g.exit(),c=!0)),o===u.promise?m(H("Promise-chain cycle")):(l=se(o))?l.call(o,d,m):d(o)):m(r)}catch(p){g&&!c&&g.exit(),m(p)}}t.reactions=[],t.notified=!1,i&&!t.rejection&&ae(e,t)}))}},ne=function(e,t,i){var s,r;q?(s=G.createEvent("Event"),s.promise=t,s.reason=i,s.initEvent(e,!1,!0),c.dispatchEvent(s)):s={promise:t,reason:i},(r=c["on"+e])?r(s):e===J&&E("Unhandled promise rejection",i)},ae=function(e,t){T.call(c,(function(){var i,s=t.value,r=oe(t);if(r&&(i=k((function(){W?z.emit("unhandledRejection",s,e):ne(J,e,s)})),t.rejection=W||oe(t)?ee:$,i.error))throw i.value}))},oe=function(e){return e.rejection!==$&&!e.parent},le=function(e,t){T.call(c,(function(){W?z.emit("rejectionHandled",e):ne(K,e,t.value)}))},ce=function(e,t,i,s){return function(r){e(t,i,r,s)}},ue=function(e,t,i,s){t.done||(t.done=!0,s&&(t=s),t.value=i,t.state=X,re(e,t,!0))},he=function(e,t,i,s){if(!t.done){t.done=!0,s&&(t=s);try{if(e===i)throw H("Promise can't be resolved itself");var r=se(i);r?S((function(){var s={done:!1};try{r.call(i,ce(he,e,s,t),ce(ue,e,s,t))}catch(n){ue(e,s,n,t)}})):(t.value=i,t.state=Q,re(e,t,!1))}catch(n){ue(e,{done:!1},n,t)}}};te&&(R=function(e){_(this,R,Y),y(e),s.call(this);var t=j(this);try{e(ce(he,this,t),ce(ue,this,t))}catch(i){ue(this,t,i)}},s=function(e){N(this,{type:Y,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:Z,value:void 0})},s.prototype=m(R.prototype,{then:function(e,t){var i=F(this),s=V(w(this,R));return s.ok="function"!=typeof e||e,s.fail="function"==typeof t&&t,s.domain=W?z.domain:void 0,i.parent=!0,i.reactions.push(s),i.state!=Z&&re(this,i,!1),s.promise},catch:function(e){return this.then(void 0,e)}}),r=function(){var e=new s,t=j(e);this.promise=e,this.resolve=ce(he,e,t),this.reject=ce(ue,e,t)},I.f=V=function(e){return e===R||e===n?new r(e):U(e)},l||"function"!=typeof h||(a=h.prototype.then,d(h.prototype,"then",(function(e,t){var i=this;return new R((function(e,t){a.call(i,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof B&&o({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(R,B.apply(c,arguments))}}))),o({global:!0,wrap:!0,forced:te},{Promise:R}),g(R,Y,!1,!0),p(Y),n=u(Y),o({target:Y,stat:!0,forced:te},{reject:function(e){var t=V(this);return t.reject.call(void 0,e),t.promise}}),o({target:Y,stat:!0,forced:l||te},{resolve:function(e){return C(l&&this===n?R:this,e)}}),o({target:Y,stat:!0,forced:ie},{all:function(e){var t=this,i=V(t),s=i.resolve,r=i.reject,n=k((function(){var i=y(t.resolve),n=[],a=0,o=1;M(e,(function(e){var l=a++,c=!1;n.push(void 0),o++,i.call(t,e).then((function(e){c||(c=!0,n[l]=e,--o||s(n))}),r)})),--o||s(n)}));return n.error&&r(n.value),i.promise},race:function(e){var t=this,i=V(t),s=i.reject,r=k((function(){var r=y(t.resolve);M(e,(function(e){r.call(t,e).then(i.resolve,s)}))}));return r.error&&s(r.value),i.promise}})},function(e,t,i){var s=i(9),r=i(85),n=s.WeakMap;e.exports="function"===typeof n&&/native code/.test(r(n))},function(e,t,i){var s=i(115),r=i(116),n=s("keys");e.exports=function(e){return n[e]||(n[e]=r(e))}},function(e,t,i){var s=i(39),r=i(506),n=i(82),a=i(63);e.exports=function(e,t){for(var i=r(t),o=a.f,l=n.f,c=0;c<i.length;c++){var u=i[c];s(e,u)||o(e,u,l(t,u))}}},function(e,t,i){var s=i(49),r=i(508),n=i(122),a=i(48);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(a(e)),i=n.f;return i?t.concat(i(e)):t}},function(e,t,i){var s=i(9);e.exports=s},function(e,t,i){var s=i(118),r=i(121),n=r.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},function(e,t,i){var s=i(83),r=i(119),n=i(510),a=function(e){return function(t,i,a){var o,l=s(t),c=r(l.length),u=n(a,c);if(e&&i!=i){while(c>u)if(o=l[u++],o!=o)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,i){var s=i(120),r=Math.max,n=Math.min;e.exports=function(e,t){var i=s(e);return i<0?r(i+t,0):n(i,t)}},function(e,t,i){var s=i(64);e.exports=function(e,t,i){for(var r in t)s(e,r,t[r],i);return e}},function(e,t,i){var s=i(63).f,r=i(39),n=i(30),a=n("toStringTag");e.exports=function(e,t,i){e&&!r(e=i?e:e.prototype,a)&&s(e,a,{configurable:!0,value:t})}},function(e,t,i){var s=i(125);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,i){"use strict";var s=i(49),r=i(63),n=i(30),a=i(46),o=n("species");e.exports=function(e){var t=s(e),i=r.f;a&&t&&!t[o]&&i(t,o,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,i){if(!(e instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return e}},function(e,t,i){var s=i(48),r=i(517),n=i(119),a=i(127),o=i(518),l=i(521),c=function(e,t){this.stopped=e,this.result=t},u=e.exports=function(e,t,i,u,h){var d,m,g,p,f,y,_,v=a(t,i,u?2:1);if(h)d=e;else{if(m=o(e),"function"!=typeof m)throw TypeError("Target is not iterable");if(r(m)){for(g=0,p=n(e.length);p>g;g++)if(f=u?v(s(_=e[g])[0],_[1]):v(e[g]),f&&f instanceof c)return f;return new c(!1)}d=m.call(e)}y=d.next;while(!(_=y.call(d)).done)if(f=l(d,v,_.value,u),"object"==typeof f&&f&&f instanceof c)return f;return new c(!1)};u.stop=function(e){return new c(!0,e)}},function(e,t,i){var s=i(30),r=i(126),n=s("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[n]===e)}},function(e,t,i){var s=i(519),r=i(126),n=i(30),a=n("iterator");e.exports=function(e){if(void 0!=e)return e[a]||e["@@iterator"]||r[s(e)]}},function(e,t,i){var s=i(520),r=i(53),n=i(30),a=n("toStringTag"),o="Arguments"==r(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(i){}};e.exports=s?r:function(e){var t,i,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=l(t=Object(e),a))?i:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,i){var s=i(30),r=s("toStringTag"),n={};n[r]="z",e.exports="[object z]"===String(n)},function(e,t,i){var s=i(48);e.exports=function(e,t,i,r){try{return r?t(s(i)[0],i[1]):t(i)}catch(a){var n=e["return"];throw void 0!==n&&s(n.call(e)),a}}},function(e,t,i){var s=i(30),r=s("iterator"),n=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){n=!0}};o[r]=function(){return this},Array.from(o,(function(){throw 2}))}catch(l){}e.exports=function(e,t){if(!t&&!n)return!1;var i=!1;try{var s={};s[r]=function(){return{next:function(){return{done:i=!0}}}},e(s)}catch(l){}return i}},function(e,t,i){var s=i(49);e.exports=s("document","documentElement")},function(e,t,i){var s,r,n,a,o,l,c,u,h=i(9),d=i(82).f,m=i(53),g=i(129).set,p=i(130),f=h.MutationObserver||h.WebKitMutationObserver,y=h.process,_=h.Promise,v="process"==m(y),L=d(h,"queueMicrotask"),M=L&&L.value;M||(s=function(){var e,t;v&&(e=y.domain)&&e.exit();while(r){t=r.fn,r=r.next;try{t()}catch(i){throw r?a():n=void 0,i}}n=void 0,e&&e.enter()},v?a=function(){y.nextTick(s)}:f&&!p?(o=!0,l=document.createTextNode(""),new f(s).observe(l,{characterData:!0}),a=function(){l.data=o=!o}):_&&_.resolve?(c=_.resolve(void 0),u=c.then,a=function(){u.call(c,s)}):a=function(){g.call(h,s)}),e.exports=M||function(e){var t={fn:e,next:void 0};n&&(n.next=t),r||(r=t,a()),n=t}},function(e,t,i){var s=i(9);e.exports=function(e,t){var i=s.console;i&&i.error&&(1===arguments.length?i.error(e):i.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,i){var s,r,n=i(9),a=i(131),o=n.process,l=o&&o.versions,c=l&&l.v8;c?(s=c.split("."),r=s[0]+s[1]):a&&(s=a.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=a.match(/Chrome\/(\d+)/),s&&(r=s[1]))),e.exports=r&&+r},function(e,t,i){var s=i(81),r=i(529);s({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,i){"use strict";var s=i(46),r=i(32),n=i(530),a=i(122),o=i(106),l=i(531),c=i(108),u=Object.assign,h=Object.defineProperty;e.exports=!u||r((function(){if(s&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol(),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[i]||n(u({},t)).join("")!=r}))?function(e,t){var i=l(e),r=arguments.length,u=1,h=a.f,d=o.f;while(r>u){var m,g=c(arguments[u++]),p=h?n(g).concat(h(g)):n(g),f=p.length,y=0;while(f>y)m=p[y++],s&&!d.call(g,m)||(i[m]=g[m])}return i}:u},function(e,t,i){var s=i(118),r=i(121);e.exports=Object.keys||function(e){return s(e,r)}},function(e,t,i){var s=i(109);e.exports=function(e){return Object(s(e))}},function(e,t,i){"use strict";var s=i(81),r=i(86),n=i(124),a=i(32),o=i(49),l=i(128),c=i(132),u=i(64),h=!!n&&a((function(){n.prototype["finally"].call({then:function(){}},(function(){}))}));s({target:"Promise",proto:!0,real:!0,forced:h},{finally:function(e){var t=l(this,o("Promise")),i="function"==typeof e;return this.then(i?function(i){return c(t,e()).then((function(){return i}))}:e,i?function(i){return c(t,e()).then((function(){throw i}))}:e)}}),r||"function"!=typeof n||n.prototype["finally"]||u(n.prototype,"finally",o("Promise").prototype["finally"])},function(e,t,i){var s=i(72),r=i(87),n=i(281),a=i(18);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(a(e)),i=n.f;return i?t.concat(i(e)):t}},function(e,t,i){var s=i(66),r=i(31),n=i(280),a=function(e){return function(t,i,a){var o,l=s(t),c=r(l.length),u=n(a,c);if(e&&i!=i){while(c>u)if(o=l[u++],o!=o)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,i){var s=i(18),r=i(282),n=i(11),a=n("species");e.exports=function(e,t){var i,n=s(e).constructor;return void 0===n||void 0==(i=s(n)[a])?t:r(i)}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,i){var s=i(11),r=i(91),n=i(25),a=s("unscopables"),o=Array.prototype;void 0==o[a]&&n.f(o,a,{configurable:!0,value:r(null)}),e.exports=function(e){o[a][e]=!0}},function(e,t,i){var s=i(72);e.exports=s("document","documentElement")},function(e,t,i){var s=i(13);e.exports=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,i){var s=i(27);e.exports=function(e){if(!s(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,i){"use strict";var s=i(22),r=i(142),n=i(543),a=i(93);function o(e){var t=new n(e),i=r(n.prototype.request,t);return s.extend(i,n.prototype,t),s.extend(i,t),i}var l=o(a);l.Axios=n,l.create=function(e){return o(s.merge(a,e))},l.Cancel=i(147),l.CancelToken=i(557),l.isCancel=i(146),l.all=function(e){return Promise.all(e)},l.spread=i(558),e.exports=l,e.exports.default=l},function(e,t){
Patrick's avatar
Patrick committed
8
9
10
11
12
13
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
Patrick's avatar
Patrick committed
14
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,i){"use strict";var s=i(93),r=i(22),n=i(552),a=i(553);function o(e){this.defaults=e,this.interceptors={request:new n,response:new n}}o.prototype.request=function(e){"string"===typeof e&&(e=r.merge({url:arguments[0]},arguments[1])),e=r.merge(s,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[a,void 0],i=Promise.resolve(e);this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));while(t.length)i=i.then(t.shift(),t.shift());return i},r.forEach(["delete","get","head","options"],(function(e){o.prototype[e]=function(t,i){return this.request(r.merge(i||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){o.prototype[e]=function(t,i,s){return this.request(r.merge(s||{},{method:e,url:t,data:i}))}})),e.exports=o},function(e,t,i){(function(e){function i(e,t){for(var i=0,s=e.length-1;s>=0;s--){var r=e[s];"."===r?e.splice(s,1):".."===r?(e.splice(s,1),i++):i&&(e.splice(s,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function s(e){"string"!==typeof e&&(e+="");var t,i=0,s=-1,r=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!r){i=t+1;break}}else-1===s&&(r=!1,s=t+1);return-1===s?"":e.slice(i,s)}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],s=0;s<e.length;s++)t(e[s],s,e)&&i.push(e[s]);return i}t.resolve=function(){for(var t="",s=!1,n=arguments.length-1;n>=-1&&!s;n--){var a=n>=0?arguments[n]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,s="/"===a.charAt(0))}return t=i(r(t.split("/"),(function(e){return!!e})),!s).join("/"),(s?"/":"")+t||"."},t.normalize=function(e){var s=t.isAbsolute(e),a="/"===n(e,-1);return e=i(r(e.split("/"),(function(e){return!!e})),!s).join("/"),e||s||(e="."),e&&a&&(e+="/"),(s?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function s(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var i=e.length-1;i>=0;i--)if(""!==e[i])break;return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var r=s(e.split("/")),n=s(i.split("/")),a=Math.min(r.length,n.length),o=a,l=0;l<a;l++)if(r[l]!==n[l]){o=l;break}var c=[];for(l=o;l<r.length;l++)c.push("..");return c=c.concat(n.slice(o)),c.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!==typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,s=-1,r=!0,n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),47===t){if(!r){s=n;break}}else r=!1;return-1===s?i?"/":".":i&&1===s?"/":e.slice(0,s)},t.basename=function(e,t){var i=s(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,i=0,s=-1,r=!0,n=0,a=e.length-1;a>=0;--a){var o=e.charCodeAt(a);if(47!==o)-1===s&&(r=!1,s=a+1),46===o?-1===t?t=a:1!==n&&(n=1):-1!==t&&(n=-1);else if(!r){i=a+1;break}}return-1===t||-1===s||0===n||1===n&&t===s-1&&t===i+1?"":e.slice(t,s)};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i(143))},function(e,t,i){"use strict";var s=i(22);e.exports=function(e,t){s.forEach(e,(function(i,s){s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[s])}))}},function(e,t,i){"use strict";var s=i(145);e.exports=function(e,t,i){var r=i.config.validateStatus;i.status&&r&&!r(i.status)?t(s("Request failed with status code "+i.status,i.config,null,i.request,i)):e(i)}},function(e,t,i){"use strict";e.exports=function(e,t,i,s,r){return e.config=t,i&&(e.code=i),e.request=s,e.response=r,e}},function(e,t,i){"use strict";var s=i(22);function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var n;if(i)n=i(t);else if(s.isURLSearchParams(t))n=t.toString();else{var a=[];s.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(s.isArray(e)?t+="[]":e=[e],s.forEach(e,(function(e){s.isDate(e)?e=e.toISOString():s.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))})))})),n=a.join("&")}return n&&(e+=(-1===e.indexOf("?")?"?":"&")+n),e}},function(e,t,i){"use strict";var s=i(22),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,n,a={};return e?(s.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=s.trim(e.substr(0,n)).toLowerCase(),i=s.trim(e.substr(n+1)),t){if(a[t]&&r.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([i]):a[t]?a[t]+", "+i:i}})),a):a}},function(e,t,i){"use strict";var s=i(22);e.exports=s.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function r(e){var s=e;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=r(window.location.href),function(t){var i=s.isString(t)?r(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(e,t,i){"use strict";var s=i(22);e.exports=s.isStandardBrowserEnv()?function(){return{write:function(e,t,i,r,n,a){var o=[];o.push(e+"="+encodeURIComponent(t)),s.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),s.isString(r)&&o.push("path="+r),s.isString(n)&&o.push("domain="+n),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,i){"use strict";var s=i(22);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){s.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},function(e,t,i){"use strict";var s=i(22),r=i(554),n=i(146),a=i(93),o=i(555),l=i(556);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){c(e),e.baseURL&&!o(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=s.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),s.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||a.adapter;return t(e).then((function(t){return c(e),t.data=r(t.data,t.headers,e.transformResponse),t}),(function(t){return n(t)||(c(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,i){"use strict";var s=i(22);e.exports=function(e,t,i){return s.forEach(i,(function(i){e=i(e,t)})),e}},function(e,t,i){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,i){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,i){"use strict";var s=i(147);function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var i=this;e((function(e){i.reason||(i.reason=new s(e),t(i.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r((function(t){e=t}));return{token:t,cancel:e}},e.exports=r},function(e,t,i){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,i){var s=i(52);e.exports=function(e){if("number"!=typeof e&&"Number"!=s(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,i){"use strict";var s=i(34),r=i(28);e.exports="".repeat||function(e){var t=String(r(this)),i="",n=s(e);if(n<0||n==1/0)throw RangeError("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(i+=t);return i}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){var s={"./af":149,"./af.js":149,"./ar":150,"./ar-dz":151,"./ar-dz.js":151,"./ar-kw":152,"./ar-kw.js":152,"./ar-ly":153,"./ar-ly.js":153,"./ar-ma":154,"./ar-ma.js":154,"./ar-sa":155,"./ar-sa.js":155,"./ar-tn":156,"./ar-tn.js":156,"./ar.js":150,"./az":157,"./az.js":157,"./be":158,"./be.js":158,"./bg":159,"./bg.js":159,"./bm":160,"./bm.js":160,"./bn":161,"./bn.js":161,"./bo":162,"./bo.js":162,"./br":163,"./br.js":163,"./bs":164,"./bs.js":164,"./ca":165,"./ca.js":165,"./cs":166,"./cs.js":166,"./cv":167,"./cv.js":167,"./cy":168,"./cy.js":168,"./da":169,"./da.js":169,"./de":170,"./de-at":171,"./de-at.js":171,"./de-ch":172,"./de-ch.js":172,"./de.js":170,"./dv":173,"./dv.js":173,"./el":174,"./el.js":174,"./en-SG":175,"./en-SG.js":175,"./en-au":176,"./en-au.js":176,"./en-ca":177,"./en-ca.js":177,"./en-gb":178,"./en-gb.js":178,"./en-ie":179,"./en-ie.js":179,"./en-il":180,"./en-il.js":180,"./en-nz":181,"./en-nz.js":181,"./eo":182,"./eo.js":182,"./es":183,"./es-do":184,"./es-do.js":184,"./es-us":185,"./es-us.js":185,"./es.js":183,"./et":186,"./et.js":186,"./eu":187,"./eu.js":187,"./fa":188,"./fa.js":188,"./fi":189,"./fi.js":189,"./fo":190,"./fo.js":190,"./fr":191,"./fr-ca":192,"./fr-ca.js":192,"./fr-ch":193,"./fr-ch.js":193,"./fr.js":191,"./fy":194,"./fy.js":194,"./ga":195,"./ga.js":195,"./gd":196,"./gd.js":196,"./gl":197,"./gl.js":197,"./gom-latn":198,"./gom-latn.js":198,"./gu":199,"./gu.js":199,"./he":200,"./he.js":200,"./hi":201,"./hi.js":201,"./hr":202,"./hr.js":202,"./hu":203,"./hu.js":203,"./hy-am":204,"./hy-am.js":204,"./id":205,"./id.js":205,"./is":206,"./is.js":206,"./it":207,"./it-ch":208,"./it-ch.js":208,"./it.js":207,"./ja":209,"./ja.js":209,"./jv":210,"./jv.js":210,"./ka":211,"./ka.js":211,"./kk":212,"./kk.js":212,"./km":213,"./km.js":213,"./kn":214,"./kn.js":214,"./ko":215,"./ko.js":215,"./ku":216,"./ku.js":216,"./ky":217,"./ky.js":217,"./lb":218,"./lb.js":218,"./lo":219,"./lo.js":219,"./lt":220,"./lt.js":220,"./lv":221,"./lv.js":221,"./me":222,"./me.js":222,"./mi":223,"./mi.js":223,"./mk":224,"./mk.js":224,"./ml":225,"./ml.js":225,"./mn":226,"./mn.js":226,"./mr":227,"./mr.js":227,"./ms":228,"./ms-my":229,"./ms-my.js":229,"./ms.js":228,"./mt":230,"./mt.js":230,"./my":231,"./my.js":231,"./nb":232,"./nb.js":232,"./ne":233,"./ne.js":233,"./nl":234,"./nl-be":235,"./nl-be.js":235,"./nl.js":234,"./nn":236,"./nn.js":236,"./pa-in":237,"./pa-in.js":237,"./pl":238,"./pl.js":238,"./pt":239,"./pt-br":240,"./pt-br.js":240,"./pt.js":239,"./ro":241,"./ro.js":241,"./ru":242,"./ru.js":242,"./sd":243,"./sd.js":243,"./se":244,"./se.js":244,"./si":245,"./si.js":245,"./sk":246,"./sk.js":246,"./sl":247,"./sl.js":247,"./sq":248,"./sq.js":248,"./sr":249,"./sr-cyrl":250,"./sr-cyrl.js":250,"./sr.js":249,"./ss":251,"./ss.js":251,"./sv":252,"./sv.js":252,"./sw":253,"./sw.js":253,"./ta":254,"./ta.js":254,"./te":255,"./te.js":255,"./tet":256,"./tet.js":256,"./tg":257,"./tg.js":257,"./th":258,"./th.js":258,"./tl-ph":259,"./tl-ph.js":259,"./tlh":260,"./tlh.js":260,"./tr":261,"./tr.js":261,"./tzl":262,"./tzl.js":262,"./tzm":263,"./tzm-latn":264,"./tzm-latn.js":264,"./tzm.js":263,"./ug-cn":265,"./ug-cn.js":265,"./uk":266,"./uk.js":266,"./ur":267,"./ur.js":267,"./uz":268,"./uz-latn":269,"./uz-latn.js":269,"./uz.js":268,"./vi":270,"./vi.js":270,"./x-pseudo":271,"./x-pseudo.js":271,"./yo":272,"./yo.js":272,"./zh-cn":273,"./zh-cn.js":273,"./zh-hk":274,"./zh-hk.js":274,"./zh-tw":275,"./zh-tw.js":275};function r(e){var t=n(e);return i(t)}function n(e){if(!i.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}r.keys=function(){return Object.keys(s)},r.resolve=n,e.exports=r,r.id=562},function(e,t,i){"use strict";e.exports=r,e.exports.default=r;var s=i(594);function r(e,t){if(!(this instanceof r))return new r(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function n(e,t,i){if(!i)return t.indexOf(e);for(var s=0;s<t.length;s++)if(i(e,t[s]))return s;return-1}function a(e,t){o(e,0,e.children.length,t,e)}function o(e,t,i,s,r){r||(r=y(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var n,a=t;a<i;a++)n=e.children[a],l(r,e.leaf?s(n):n);return r}function l(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function c(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){var i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(e,t,i,r,n){var a,o=[t,i];while(o.length)i=o.pop(),t=o.pop(),i-t<=r||(a=t+Math.ceil((i-t)/r/2)*r,s(e,a,t,i,n),o.push(t,a,a,i))}r.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],s=this.toBBox;if(!f(e,t))return i;var r,n,a,o,l=[];while(t){for(r=0,n=t.children.length;r<n;r++)a=t.children[r],o=t.leaf?s(a):a,f(e,o)&&(t.leaf?i.push(a):p(e,o)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!f(e,t))return!1;var s,r,n,a,o=[];while(t){for(s=0,r=t.children.length;s<r;s++)if(n=t.children[s],a=t.leaf?i(n):n,f(e,a)){if(t.leaf||p(e,a))return!0;o.push(n)}t=o.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var s=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===s.height)this._splitRoot(this.data,s);else{if(this.data.height<s.height){var r=this.data;this.data=s,s=r}this._insert(s,this.data.height-s.height-1,!0)}else this.data=s;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=y([]),this},remove:function(e,t){if(!e)return this;var i,s,r,a,o=this.data,l=this.toBBox(e),c=[],u=[];while(o||c.length){if(o||(o=c.pop(),s=c[c.length-1],i=u.pop(),a=!0),o.leaf&&(r=n(e,o.children,t),-1!==r))return o.children.splice(r,1),c.push(o),this._condense(c),this;a||o.leaf||!p(o,l)?s?(i++,o=s.children[i],a=!1):o=null:(c.push(o),u.push(i),i=0,s=o,o=o.children[0])}return this},toBBox:function(e){return e},compareMinX:c,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){var i=[];while(e)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,s){var r,n=i-t+1,o=this._maxEntries;if(n<=o)return r=y(e.slice(t,i+1)),a(r,this.toBBox),r;s||(s=Math.ceil(Math.log(n)/Math.log(o)),o=Math.ceil(n/Math.pow(o,s-1))),r=y([]),r.leaf=!1,r.height=s;var l,c,u,h,d=Math.ceil(n/o),m=d*Math.ceil(Math.sqrt(o));for(_(e,t,i,m,this.compareMinX),l=t;l<=i;l+=m)for(u=Math.min(l+m-1,i),_(e,l,u,d,this.compareMinY),c=l;c<=u;c+=d)h=Math.min(c+d-1,u),r.children.push(this._build(e,c,h,s-1));return a(r,this.toBBox),r},_chooseSubtree:function(e,t,i,s){var r,n,a,o,l,c,u,d;while(1){if(s.push(t),t.leaf||s.length-1===i)break;for(u=d=1/0,r=0,n=t.children.length;r<n;r++)a=t.children[r],l=h(a),c=m(e,a)-l,c<d?(d=c,u=l<u?l:u,o=a):c===d&&l<u&&(u=l,o=a);t=o||t.children[0]}return t},_insert:function(e,t,i){var s=this.toBBox,r=i?e:s(e),n=[],a=this._chooseSubtree(r,this.data,t,n);a.children.push(e),l(a,r);while(t>=0){if(!(n[t].children.length>this._maxEntries))break;this._split(n,t),t--}this._adjustParentBBoxes(r,n,t)},_split:function(e,t){var i=e[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);var n=this._chooseSplitIndex(i,r,s),o=y(i.children.splice(n,i.children.length-n));o.height=i.height,o.leaf=i.leaf,a(i,this.toBBox),a(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(e,t){this.data=y([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var s,r,n,a,l,c,u,d;for(c=u=1/0,s=t;s<=i-t;s++)r=o(e,0,s,this.toBBox),n=o(e,s,i,this.toBBox),a=g(r,n),l=h(r)+h(n),a<c?(c=a,d=s,u=l<u?l:u):a===c&&l<u&&(u=l,d=s);return d},_chooseSplitAxis:function(e,t,i){var s=e.leaf?this.compareMinX:c,r=e.leaf?this.compareMinY:u,n=this._allDistMargin(e,t,i,s),a=this._allDistMargin(e,t,i,r);n<a&&e.children.sort(s)},_allDistMargin:function(e,t,i,s){e.children.sort(s);var r,n,a=this.toBBox,c=o(e,0,t,a),u=o(e,i-t,i,a),h=d(c)+d(u);for(r=t;r<i-t;r++)n=e.children[r],l(c,e.leaf?a(n):n),h+=d(c);for(r=i-t-1;r>=t;r--)n=e.children[r],l(u,e.leaf?a(n):n),h+=d(u);return h},_adjustParentBBoxes:function(e,t,i){for(var s=i;s>=0;s--)l(t[s],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children,t.splice(t.indexOf(e[i]),1)):this.clear():a(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},function(e,t,i){"use strict";(function(e){i(43),i(20),i(570),i(4);var s=i(54),r=i.n(s),n=i(6),a=i.n(n),o=i(579),l=i(98),c=i(493),u=i(580),h=i(2),d=i(69);class m{constructor(e){this.terrainProvider=e.terrainProvider||null,this.projection=e.projection||null,this.directions={},this.options=e,this.meta=[],this.extent=ol.extent.createEmpty(),this.minZoom=Object(h["h"])(e.minZoom,0),this.maxZoom=Object(h["h"])(e.maxZoom,0),this.hideLevels=Object(h["h"])(e.hideLevels,0),this.tiledSources=[],this.tileLevel=null,this.tileGrid=ol.tilegrid.createXYZ(),this.tileFootPrintsSource=new ol.source.Vector,this.tileFootPrintsLayer=new ol.layer.Vector({source:this.tileFootPrintsSource})}get isTiled(){return this.tileLevel>0}loadData(e){const t=[],i=Array.isArray(e)?e:[e],s=a.a.create();return s.interceptors.response.use(e=>e,e=>String(e.response.status).startsWith("4")&&e.config&&!e.config.retriedWithNewURL?(e.config.retriedWithNewURL=!0,e.config.url=e.config.url+"/image.json",s.request(e.config)):Promise.reject(e)),i.forEach(e=>{t.push(s.get(e).then(({data:e,config:t})=>{const i=t.url.substring(0,t.url.lastIndexOf("/"));return this.handleMetadataResponse(e,i)}).catch(t=>{console.log(`Invalid image.json data. Please correct, File: ${e}, Error ${t.message}`)}))}),Promise.all(t)}handleMetadataResponse(e,t){const i=m.getVersion(e);return i.version>=3.5||3.4===i.version&&i.buildNumber>=36?this.handleMetadataResponseV35(e,t,i):(console.log("Could not load Meta Data, only meta data version 3.5 and higher are supported"),Promise.resolve())}getImageMeta(e,t,i,s,r){const n=this.hideLevels?i.slice(0,i.length-this.hideLevels):i,a=this.meta.find(i=>i.isEqual(e,t,n));if(a)return a;const l=new u["a"]({url:e,size:t,tileSize:s,tileResolution:n,minZoom:this.minZoom,maxZoom:this.maxZoom}),c=new o["a"]({size:t,view:l,version:r.version,buildNumber:r.buildNumber});return this.meta.push(c),c}handleMetadataResponseV35(t,i,s){const n=[t.generalImageInfo.width,t.generalImageInfo.height],a=t.generalImageInfo["tile-resolution"],o=[t.generalImageInfo["tile-width"],t.generalImageInfo["tile-width"]];t.generalImageInfo.width&&t.generalImageInfo.height&&t.generalImageInfo["tile-resolution"]&&this.getImageMeta(i,n,a,o,s);const l=[];t.generalImageInfo.cameraParameter&&Array.isArray(t.generalImageInfo.cameraParameter)&&t.generalImageInfo.cameraParameter.forEach(e=>{l.push(new c["a"](e))});let u=null;if(t.generalImageInfo.crs){const i=r()();e.proj4.defs(i,t.generalImageInfo.crs),u=ol.proj.get(i)}const h={url:i,version:s,size:n,tileResolution:a,tileSize:o,cameras:l,imageProjection:u},d=null!=t.tileLevel?{}:this.handleImageResponse(t,h);if(t.tileLevel){if(this.tileLevel&&this.tileLevel!==t.tileLevel)throw new Error("Cannot add multiple tiled image.json data sources, if they do not have the same tile level");const e=!this.isTiled;this.tileLevel=t.tileLevel,this.tiledSources.push({imageConfig:h,availableTiles:new Set(t.availableTiles),cache:new Set});const i=t.availableTiles.map(e=>{const t=e.split("/").map(e=>Number(e));t[2]+=1,t[2]*=-1;const i=new ol.Feature({geometry:ol.geom.Polygon.fromExtent(this.tileGrid.getTileCoordExtent(t))});return i.setId(e),i}).filter(e=>!this.tileFootPrintsSource.getFeatureById(e.getId()));if(this.tileFootPrintsSource.addFeatures(i),e)return this.loadTiledImageJson(ol.extent.getCenter(this.tileFootPrintsSource.getExtent()))}return this.handleDirectionOptions(d),Promise.resolve()}handleDirectionOptions(e){Object.keys(e).forEach(t=>{this.directions[t]?this.directions[t].addOptions(e[t]):this.directions[t]=this.createDirection(e[t]),this.extent=ol.extent.extend(this.extent,this.directions[t].footPrintsLayer.getSource().getExtent())})}getTileCoordinate(e){const t=this.tileGrid.getTileCoordForCoordAndZ(e,this.tileLevel);return t[2]*=-1,t[2]-=1,t}loadTiledImageJson(e){return this.loadTile(this.getTileCoordinate(e).join("/"))}loadTile(e){const t=this.tileFootPrintsSource.getFeatureById(e);return t&&this.tileFootPrintsSource.removeFeature(t),Promise.all(this.tiledSources.map(t=>{if(t.availableTiles.has(e)&&!t.cache.has(e)){t.cache.add(e);const i=t.imageConfig.url,s=a.a.create();return s.get(`${i}/${e}.json`).then(({data:e})=>{const i=this.handleImageResponse(e,t.imageConfig);this.handleDirectionOptions(i)}).catch(e=>{console.error(e)})}return Promise.resolve()}))}handleImageResponse(e,t){const{url:i,version:s,size:r,tileResolution:n,tileSize:a,cameras:o,imageProjection:c}=t,u=e.images.shift(),h={name:u.indexOf("name"),width:u.indexOf("width"),height:u.indexOf("height"),tileResolution:u.indexOf("tile-resolution"),viewDirection:u.indexOf("view-direction"),viewDirectionAngle:u.indexOf("view-direction-angle"),groundCoordinates:u.indexOf("groundCoordinates"),centerPointOnGround:u.indexOf("centerPointOnGround"),cameraIndex:u.indexOf("camera-index"),projectionCenter:u.indexOf("projection-center"),pToRealworld:u.indexOf("p-to-realworld"),pToImage:u.indexOf("p-to-image")},d={};return e.images.forEach(e=>{const t=[];e[h.pToRealworld]&&e[h.pToRealworld].forEach(e=>{t.push(...e)});const u=e[h.pToRealworld]?new Cesium.Matrix3(...t):null,m=[];e[h.pToImage]&&(e[h.pToImage].forEach(e=>{m.push(...e)}),m.push(0,0,0,1));const g=e[h.projectionCenter]?Cesium.Cartesian3.fromArray(e[h.projectionCenter]):null,p=e[h.pToImage]?new Cesium.Matrix4(...m):null,f=e[h.width]&&e[h.height]?[e[h.width],e[h.height]]:r,y=e[h.tileResolution]?e[h.tileResolution]:n,_=this.getImageMeta(i,f,y,a,s),v={name:e[h.name],viewDirection:e[h.viewDirection],viewDirectionAngle:e[h.viewDirectionAngle],groundCoordinates:e[h.groundCoordinates],centerPointOnGround:e[h.centerPointOnGround],meta:_,camera:o[e[h.cameraIndex]],projectionCenter:g,pToRealworld:u,pToImage:p,projection:this.projection||c,terrainProvider:this.terrainProvider},L=new l["a"](v);d[L.viewDirection]||(d[L.viewDirection]={direction:L.viewDirection,images:{},rTreeItems:[],footPrintFeatures:[],projection:this.projection||c,terrainProvider:this.terrainProvider}),d[L.viewDirection].images[L.name]=L,d[L.viewDirection].rTreeItems.push({minX:L.centerPointOnGround[0],minY:L.centerPointOnGround[1],maxX:L.centerPointOnGround[0],maxY:L.centerPointOnGround[1],name:L.name});const M=new ol.geom.Polygon([L.groundCoordinates.concat([L.groundCoordinates[0]])]);M.transform(this.projection||c,ol.proj.get("EPSG:3857"));const b=new ol.Feature({geometry:M});b.setId(L.name),d[L.viewDirection].footPrintFeatures.push(b)}),d}createDirection(e){return new d["a"](e)}static getVersion(e){const t={version:null,buildNumber:null};if(e.version){const i=e.version.match(/\d+\.\d+/);i&&(t.version=Number(i[0]));const s=e.version.match(/-\d+-/);s&&(t.buildNumber=Number(s[0].match(/\d+/)[0]))}return t}getImageByName(e){const t=Object.values(this.directions);for(let i=0;i<t.length;i++){const s=t[i];if(s.images[e])return s.images[e]}return null}destroy(){this.directions={},this.meta=[],this.tiledSources=[],this.tileGrid=null,this.tileFootPrintsSource.clear(),this.tileFootPrintsLayer=null}}t["a"]=m}).call(this,i(60))},function(e,t,i){"use strict";var s=i(595);function r(e,t,i,r,o,l){var c,u,h,d,m=e.data,g=[],p=e.toBBox,f=new s(null,n);while(m){for(c=0;c<m.children.length;c++)u=m.children[c],h=a(t,i,m.leaf?p(u):u),(!l||h<=l)&&f.push({node:u,isItem:m.leaf,dist:h});while(f.length&&f.peek().isItem)if(d=f.pop().node,o&&!o(d)||g.push(d),r&&g.length===r)return g;m=f.pop(),m&&(m=m.node)}return g}function n(e,t){return e.dist-t.dist}function a(e,t,i){var s=o(e,i.minX,i.maxX),r=o(t,i.minY,i.maxY);return s*s+r*r}function o(e,t,i){return e<t?t-e:e<=i?0:e-i}e.exports=r,e.exports.default=r},function(e,t,i){var s=i(612);e.exports=s},function(e,t,i){"use strict";e.exports={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},,function(e,t,i){var s=i(24),r=i(25),n=i(70),a=i(96).UNSUPPORTED_Y;s&&("g"!=/./g.flags||a)&&r.f(RegExp.prototype,"flags",{configurable:!0,get:n})},function(e,t,i){"use strict";var s=i(40),r=i(71).f,n=i(31),a=i(138),o=i(28),l=i(139),c=i(56),u="".startsWith,h=Math.min,d=l("startsWith"),m=!c&&!d&&!!function(){var e=r(String.prototype,"startsWith");return e&&!e.writable}();s({target:"String",proto:!0,forced:!m&&!d},{startsWith:function(e){var t=String(o(this));a(e);var i=n(h(arguments.length>1?arguments[1]:void 0,t.length)),s=String(e);return u?u.call(t,s,i):t.slice(i,i+s.length)===s}})},function(e,t){var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(i){var s=new Uint8Array(16);e.exports=function(){return i(s),s}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},function(e,t){for(var i=[],s=0;s<256;++s)i[s]=(s+256).toString(16).substr(1);function r(e,t){var s=t||0,r=i;return[r[e[s++]],r[e[s++]],r[e[s++]],r[e[s++]],"-",r[e[s++]],r[e[s++]],"-",r[e[s++]],r[e[s++]],"-",r[e[s++]],r[e[s++]],"-",r[e[s++]],r[e[s++]],r[e[s++]],r[e[s++]],r[e[s++]],r[e[s++]]].join("")}e.exports=r},function(e,t,i){var s=i(38);e.exports=function(e,t,i){for(var r in t)s(e,r,t[r],i);return e}},function(e,t,i){var s=i(34),r=i(31);e.exports=function(e){if(void 0===e)return 0;var t=s(e),i=r(t);if(t!==i)throw RangeError("Wrong length or index");return i}},function(e,t,i){var s=i(11),r=i(67),n=s("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[n]===e)}},function(e,t,i){"use strict";i(614);var s,r=i(40),n=i(24),a=i(577),o=i(8),l=i(284),c=i(38),u=i(291),h=i(21),d=i(615),m=i(616),g=i(140).codeAt,p=i(619),f=i(73),y=i(578),_=i(50),v=o.URL,L=y.URLSearchParams,M=y.getState,b=_.set,w=_.getterFor("URL"),T=Math.floor,S=Math.pow,C="Invalid authority",E="Invalid scheme",I="Invalid host",k="Invalid port",D=/[A-Za-z]/,O=/[\d+\-.A-Za-z]/,P=/\d/,A=/^(0x|0X)/,x=/^[0-7]+$/,Y=/^\d+$/,j=/^[\dA-Fa-f]+$/,N=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,F=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,R=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,H=/[\u0009\u000A\u000D]/g,G=function(e,t){var i,s,r;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return I;if(i=B(t.slice(1,-1)),!i)return I;e.host=i}else if(X(e)){if(t=p(t),N.test(t))return I;if(i=z(t),null===i)return I;e.host=i}else{if(F.test(t))return I;for(i="",s=m(t),r=0;r<s.length;r++)i+=Z(s[r],W);e.host=i}},z=function(e){var t,i,s,r,n,a,o,l=e.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),t=l.length,t>4)return e;for(i=[],s=0;s<t;s++){if(r=l[s],""==r)return e;if(n=10,r.length>1&&"0"==r.charAt(0)&&(n=A.test(r)?16:8,r=r.slice(8==n?1:2)),""===r)a=0;else{if(!(10==n?Y:8==n?x:j).test(r))return e;a=parseInt(r,n)}i.push(a)}for(s=0;s<t;s++)if(a=i[s],s==t-1){if(a>=S(256,5-t))return null}else if(a>255)return null;for(o=i.pop(),s=0;s<i.length;s++)o+=i[s]*S(256,3-s);return o},B=function(e){var t,i,s,r,n,a,o,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,d=function(){return e.charAt(h)};if(":"==d()){if(":"!=e.charAt(1))return;h+=2,c++,u=c}while(d()){if(8==c)return;if(":"!=d()){t=i=0;while(i<4&&j.test(d()))t=16*t+parseInt(d(),16),h++,i++;if("."==d()){if(0==i)return;if(h-=i,c>6)return;s=0;while(d()){if(r=null,s>0){if(!("."==d()&&s<4))return;h++}if(!P.test(d()))return;while(P.test(d())){if(n=parseInt(d(),10),null===r)r=n;else{if(0==r)return;r=10*r+n}if(r>255)return;h++}l[c]=256*l[c]+r,s++,2!=s&&4!=s||c++}if(4!=s)return;break}if(":"==d()){if(h++,!d())return}else if(d())return;l[c++]=t}else{if(null!==u)return;h++,c++,u=c}}if(null!==u){a=c-u,c=7;while(0!=c&&a>0)o=l[c],l[c--]=l[u+a-1],l[u+--a]=o}else if(8!=c)return;return l},V=function(e){for(var t=null,i=1,s=null,r=0,n=0;n<8;n++)0!==e[n]?(r>i&&(t=s,i=r),s=null,r=0):(null===s&&(s=n),++r);return r>i&&(t=s,i=r),t},U=function(e){var t,i,s,r;if("number"==typeof e){for(t=[],i=0;i<4;i++)t.unshift(e%256),e=T(e/256);return t.join(".")}if("object"==typeof e){for(t="",s=V(e),i=0;i<8;i++)r&&0===e[i]||(r&&(r=!1),s===i?(t+=i?":":"::",r=!0):(t+=e[i].toString(16),i<7&&(t+=":")));return"["+t+"]"}return e},W={},q=d({},W,{" ":1,'"':1,"<":1,">":1,"`":1}),J=d({},q,{"#":1,"?":1,"{":1,"}":1}),K=d({},J,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Z=function(e,t){var i=g(e,0);return i>32&&i<127&&!h(t,e)?e:encodeURIComponent(e)},Q={ftp:21,file:null,http:80,https:443,ws:80,wss:443},X=function(e){return h(Q,e.scheme)},$=function(e){return""!=e.username||""!=e.password},ee=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},te=function(e,t){var i;return 2==e.length&&D.test(e.charAt(0))&&(":"==(i=e.charAt(1))||!t&&"|"==i)},ie=function(e){var t;return e.length>1&&te(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},se=function(e){var t=e.path,i=t.length;!i||"file"==e.scheme&&1==i&&te(t[0],!0)||t.pop()},re=function(e){return"."===e||"%2e"===e.toLowerCase()},ne=function(e){return e=e.toLowerCase(),".."===e||"%2e."===e||".%2e"===e||"%2e%2e"===e},ae={},oe={},le={},ce={},ue={},he={},de={},me={},ge={},pe={},fe={},ye={},_e={},ve={},Le={},Me={},be={},we={},Te={},Se={},Ce={},Ee=function(e,t,i,r){var n,a,o,l,c=i||ae,u=0,d="",g=!1,p=!1,f=!1;i||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(R,"")),t=t.replace(H,""),n=m(t);while(u<=n.length){switch(a=n[u],c){case ae:if(!a||!D.test(a)){if(i)return E;c=le;continue}d+=a.toLowerCase(),c=oe;break;case oe:if(a&&(O.test(a)||"+"==a||"-"==a||"."==a))d+=a.toLowerCase();else{if(":"!=a){if(i)return E;d="",c=le,u=0;continue}if(i&&(X(e)!=h(Q,d)||"file"==d&&($(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,i)return void(X(e)&&Q[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?c=ve:X(e)&&r&&r.scheme==e.scheme?c=ce:X(e)?c=me:"/"==n[u+1]?(c=ue,u++):(e.cannotBeABaseURL=!0,e.path.push(""),c=Te)}break;case le:if(!r||r.cannotBeABaseURL&&"#"!=a)return E;if(r.cannotBeABaseURL&&"#"==a){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,c=Ce;break}c="file"==r.scheme?ve:he;continue;case ce:if("/"!=a||"/"!=n[u+1]){c=he;continue}c=ge,u++;break;case ue:if("/"==a){c=pe;break}c=we;continue;case he:if(e.scheme=r.scheme,a==s)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==a||"\\"==a&&X(e))c=de;else if("?"==a)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",c=Se;else{if("#"!=a){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),c=we;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",c=Ce}break;case de:if(!X(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,c=we;continue}c=pe}else c=ge;break;case me:if(c=ge,"/"!=a||"/"!=d.charAt(u+1))continue;u++;break;case ge:if("/"!=a&&"\\"!=a){c=pe;continue}break;case pe:if("@"==a){g&&(d="%40"+d),g=!0,o=m(d);for(var y=0;y<o.length;y++){var _=o[y];if(":"!=_||f){var v=Z(_,K);f?e.password+=v:e.username+=v}else f=!0}d=""}else if(a==s||"/"==a||"?"==a||"#"==a||"\\"==a&&X(e)){if(g&&""==d)return C;u-=m(d).length+1,d="",c=fe}else d+=a;break;case fe:case ye:if(i&&"file"==e.scheme){c=Me;continue}if(":"!=a||p){if(a==s||"/"==a||"?"==a||"#"==a||"\\"==a&&X(e)){if(X(e)&&""==d)return I;if(i&&""==d&&($(e)||null!==e.port))return;if(l=G(e,d),l)return l;if(d="",c=be,i)return;continue}"["==a?p=!0:"]"==a&&(p=!1),d+=a}else{if(""==d)return I;if(l=G(e,d),l)return l;if(d="",c=_e,i==ye)return}break;case _e:if(!P.test(a)){if(a==s||"/"==a||"?"==a||"#"==a||"\\"==a&&X(e)||i){if(""!=d){var L=parseInt(d,10);if(L>65535)return k;e.port=X(e)&&L===Q[e.scheme]?null:L,d=""}if(i)return;c=be;continue}return k}d+=a;break;case ve:if(e.scheme="file","/"==a||"\\"==a)c=Le;else{if(!r||"file"!=r.scheme){c=we;continue}if(a==s)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==a)e.host=r.host,e.path=r.path.slice(),e.query="",c=Se;else{if("#"!=a){ie(n.slice(u).join(""))||(e.host=r.host,e.path=r.path.slice(),se(e)),c=we;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",c=Ce}}break;case Le:if("/"==a||"\\"==a){c=Me;break}r&&"file"==r.scheme&&!ie(n.slice(u).join(""))&&(te(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),c=we;continue;case Me:if(a==s||"/"==a||"\\"==a||"?"==a||"#"==a){if(!i&&te(d))c=we;else if(""==d){if(e.host="",i)return;c=be}else{if(l=G(e,d),l)return l;if("localhost"==e.host&&(e.host=""),i)return;d="",c=be}continue}d+=a;break;case be:if(X(e)){if(c=we,"/"!=a&&"\\"!=a)continue}else if(i||"?"!=a)if(i||"#"!=a){if(a!=s&&(c=we,"/"!=a))continue}else e.fragment="",c=Ce;else e.query="",c=Se;break;case we:if(a==s||"/"==a||"\\"==a&&X(e)||!i&&("?"==a||"#"==a)){if(ne(d)?(se(e),"/"==a||"\\"==a&&X(e)||e.path.push("")):re(d)?"/"==a||"\\"==a&&X(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&te(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(a==s||"?"==a||"#"==a))while(e.path.length>1&&""===e.path[0])e.path.shift();"?"==a?(e.query="",c=Se):"#"==a&&(e.fragment="",c=Ce)}else d+=Z(a,J);break;case Te:"?"==a?(e.query="",c=Se):"#"==a?(e.fragment="",c=Ce):a!=s&&(e.path[0]+=Z(a,W));break;case Se:i||"#"!=a?a!=s&&("'"==a&&X(e)?e.query+="%27":e.query+="#"==a?"%23":Z(a,W)):(e.fragment="",c=Ce);break;case Ce:a!=s&&(e.fragment+=Z(a,q));break}u++}},Ie=function(e){var t,i,s=u(this,Ie,"URL"),r=arguments.length>1?arguments[1]:void 0,a=String(e),o=b(s,{type:"URL"});if(void 0!==r)if(r instanceof Ie)t=w(r);else if(i=Ee(t={},String(r)),i)throw TypeError(i);if(i=Ee(o,a,null,t),i)throw TypeError(i);var l=o.searchParams=new L,c=M(l);c.updateSearchParams(o.query),c.updateURL=function(){o.query=String(l)||null},n||(s.href=De.call(s),s.origin=Oe.call(s),s.protocol=Pe.call(s),s.username=Ae.call(s),s.password=xe.call(s),s.host=Ye.call(s),s.hostname=je.call(s),s.port=Ne.call(s),s.pathname=Fe.call(s),s.search=Re.call(s),s.searchParams=He.call(s),s.hash=Ge.call(s))},ke=Ie.prototype,De=function(){var e=w(this),t=e.scheme,i=e.username,s=e.password,r=e.host,n=e.port,a=e.path,o=e.query,l=e.fragment,c=t+":";return null!==r?(c+="//",$(e)&&(c+=i+(s?":"+s:"")+"@"),c+=U(r),null!==n&&(c+=":"+n)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==o&&(c+="?"+o),null!==l&&(c+="#"+l),c},Oe=function(){var e=w(this),t=e.scheme,i=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(s){return"null"}return"file"!=t&&X(e)?t+"://"+U(e.host)+(null!==i?":"+i:""):"null"},Pe=function(){return w(this).scheme+":"},Ae=function(){return w(this).username},xe=function(){return w(this).password},Ye=function(){var e=w(this),t=e.host,i=e.port;return null===t?"":null===i?U(t):U(t)+":"+i},je=function(){var e=w(this).host;return null===e?"":U(e)},Ne=function(){var e=w(this).port;return null===e?"":String(e)},Fe=function(){var e=w(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Re=function(){var e=w(this).query;return e?"?"+e:""},He=function(){return w(this).searchParams},Ge=function(){var e=w(this).fragment;return e?"#"+e:""},ze=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(n&&l(ke,{href:ze(De,(function(e){var t=w(this),i=String(e),s=Ee(t,i);if(s)throw TypeError(s);M(t.searchParams).updateSearchParams(t.query)})),origin:ze(Oe),protocol:ze(Pe,(function(e){var t=w(this);Ee(t,String(e)+":",ae)})),username:ze(Ae,(function(e){var t=w(this),i=m(String(e));if(!ee(t)){t.username="";for(var s=0;s<i.length;s++)t.username+=Z(i[s],K)}})),password:ze(xe,(function(e){var t=w(this),i=m(String(e));if(!ee(t)){t.password="";for(var s=0;s<i.length;s++)t.password+=Z(i[s],K)}})),host:ze(Ye,(function(e){var t=w(this);t.cannotBeABaseURL||Ee(t,String(e),fe)})),hostname:ze(je,(function(e){var t=w(this);t.cannotBeABaseURL||Ee(t,String(e),ye)})),port:ze(Ne,(function(e){var t=w(this);ee(t)||(e=String(e),""==e?t.port=null:Ee(t,e,_e))})),pathname:ze(Fe,(function(e){var t=w(this);t.cannotBeABaseURL||(t.path=[],Ee(t,e+"",be))})),search:ze(Re,(function(e){var t=w(this);e=String(e),""==e?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Ee(t,e,Se)),M(t.searchParams).updateSearchParams(t.query)})),searchParams:ze(He),hash:ze(Ge,(function(e){var t=w(this);e=String(e),""!=e?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Ee(t,e,Ce)):t.fragment=null}))}),c(ke,"toJSON",(function(){return De.call(this)}),{enumerable:!0}),c(ke,"toString",(function(){return De.call(this)}),{enumerable:!0}),v){var Be=v.createObjectURL,Ve=v.revokeObjectURL;Be&&c(Ie,"createObjectURL",(function(e){return Be.apply(v,arguments)})),Ve&&c(Ie,"revokeObjectURL",(function(e){return Ve.apply(v,arguments)}))}f(Ie,"URL"),r({global:!0,forced:!a,sham:!n},{URL:Ie})},function(e,t,i){var s=i(13),r=i(11),n=i(56),a=r("iterator");e.exports=!s((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,i="";return e.pathname="c%20d",t.forEach((function(e,s){t["delete"]("b"),i+=s+e})),n&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},function(e,t,i){"use strict";i(283);var s=i(40),r=i(72),n=i(577),a=i(38),o=i(573),l=i(73),c=i(287),u=i(50),h=i(291),d=i(21),m=i(293),g=i(290),p=i(18),f=i(27),y=i(91),_=i(55),v=i(620),L=i(292),M=i(11),b=r("fetch"),w=r("Headers"),T=M("iterator"),S="URLSearchParams",C=S+"Iterator",E=u.set,I=u.getterFor(S),k=u.getterFor(C),D=/\+/g,O=Array(4),P=function(e){return O[e-1]||(O[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},A=function(e){try{return decodeURIComponent(e)}catch(t){return e}},x=function(e){var t=e.replace(D," "),i=4;try{return decodeURIComponent(t)}catch(s){while(i)t=t.replace(P(i--),A);return t}},Y=/[!'()~]|%20/g,j={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},N=function(e){return j[e]},F=function(e){return encodeURIComponent(e).replace(Y,N)},R=function(e,t){if(t){var i,s,r=t.split("&"),n=0;while(n<r.length)i=r[n++],i.length&&(s=i.split("="),e.push({key:x(s.shift()),value:x(s.join("="))}))}},H=function(e){this.entries.length=0,R(this.entries,e)},G=function(e,t){if(e<t)throw TypeError("Not enough arguments")},z=c((function(e,t){E(this,{type:C,iterator:v(I(e).entries),kind:t})}),"Iterator",(function(){var e=k(this),t=e.kind,i=e.iterator.next(),s=i.value;return i.done||(i.value="keys"===t?s.key:"values"===t?s.value:[s.key,s.value]),i})),B=function(){h(this,B,S);var e,t,i,s,r,n,a,o,l,c=arguments.length>0?arguments[0]:void 0,u=this,m=[];if(E(u,{type:S,entries:m,updateURL:function(){},updateSearchParams:H}),void 0!==c)if(f(c))if(e=L(c),"function"===typeof e){t=e.call(c),i=t.next;while(!(s=i.call(t)).done){if(r=v(p(s.value)),n=r.next,(a=n.call(r)).done||(o=n.call(r)).done||!n.call(r).done)throw TypeError("Expected sequence with length 2");m.push({key:a.value+"",value:o.value+""})}}else for(l in c)d(c,l)&&m.push({key:l,value:c[l]+""});else R(m,"string"===typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},V=B.prototype;o(V,{append:function(e,t){G(arguments.length,2);var i=I(this);i.entries.push({key:e+"",value:t+""}),i.updateURL()},delete:function(e){G(arguments.length,1);var t=I(this),i=t.entries,s=e+"",r=0;while(r<i.length)i[r].key===s?i.splice(r,1):r++;t.updateURL()},get:function(e){G(arguments.length,1);for(var t=I(this).entries,i=e+"",s=0;s<t.length;s++)if(t[s].key===i)return t[s].value;return null},getAll:function(e){G(arguments.length,1);for(var t=I(this).entries,i=e+"",s=[],r=0;r<t.length;r++)t[r].key===i&&s.push(t[r].value);return s},has:function(e){G(arguments.length,1);var t=I(this).entries,i=e+"",s=0;while(s<t.length)if(t[s++].key===i)return!0;return!1},set:function(e,t){G(arguments.length,1);for(var i,s=I(this),r=s.entries,n=!1,a=e+"",o=t+"",l=0;l<r.length;l++)i=r[l],i.key===a&&(n?r.splice(l--,1):(n=!0,i.value=o));n||r.push({key:a,value:o}),s.updateURL()},sort:function(){var e,t,i,s=I(this),r=s.entries,n=r.slice();for(r.length=0,i=0;i<n.length;i++){for(e=n[i],t=0;t<i;t++)if(r[t].key>e.key){r.splice(t,0,e);break}t===i&&r.push(e)}s.updateURL()},forEach:function(e){var t,i=I(this).entries,s=m(e,arguments.length>1?arguments[1]:void 0,3),r=0;while(r<i.length)t=i[r++],s(t.value,t.key,this)},keys:function(){return new z(this,"keys")},values:function(){return new z(this,"values")},entries:function(){return new z(this,"entries")}},{enumerable:!0}),a(V,T,V.entries),a(V,"toString",(function(){var e,t=I(this).entries,i=[],s=0;while(s<t.length)e=t[s++],i.push(F(e.key)+"="+F(e.value));return i.join("&")}),{enumerable:!0}),l(B,S),s({global:!0,forced:!n},{URLSearchParams:B}),n||"function"!=typeof b||"function"!=typeof w||s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,i,s,r=[e];return arguments.length>1&&(t=arguments[1],f(t)&&(i=t.body,g(i)===S&&(s=t.headers?new w(t.headers):new w,s.has("content-type")||s.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=y(t,{body:_(0,String(i)),headers:_(0,s)}))),r.push(t)),b.apply(this,r)}}),e.exports={URLSearchParams:B,getState:I}},function(e,t,i){"use strict";i(4);var s=i(15);class r{constructor(e){this.size=e.size,this.views=new Map,e.view&&Object.values(s["a"]).forEach(t=>{this.views.set(t,e.view.clone())}),this.version=e.version||3.1,this.buildNumber=e.buildNumber||0}getView(e){return this.views.get(e)}isEqual(e,t,i){return this.size[0]===t[0]&&this.size[1]===t[1]&&(this.views.values().next().value.tileResolution.length===i.length&&this.views.values().next().value.url===e)}}t["a"]=r},function(e,t,i){"use strict";i(4);var s=i(16);let r=0;class n{constructor(e){this.id=r,r+=1,this.size=e.size,this.url=e.url,this.tileSize=e.tileSize,this.tileResolution=e.tileResolution,this.format=e.format||"jpg",this.minZoom=e.minZoom,this.maxZoom=e.maxZoom,this._createViewAndLayer()}_createViewAndLayer(){const e=[0,0,...this.size],t=new ol.proj.Projection({code:"ZOOMIFY",units:"pixels",extent:e});this.view=new ol.View({projection:t,center:[this.size[0]/2,this.size[1]/2],minZoom:this.minZoom,maxZoom:this.maxZoom>0?this.maxZoom:this.tileResolution.length+4,extent:[-2e3,-2e3,this.size[0]+2e3,this.size[1]+2e3],zoom:this.minZoom});const i={projection:t,tileGrid:new ol.tilegrid.TileGrid({origin:[0,0],extent:e,resolutions:this.tileResolution,tileSize:this.tileSize})};s["a"].hasSameOrigin(this.url)||(i.crossOrigin="anonymous"),this.tileImageSource=new ol.source.TileImage(i),this.layer=new ol.layer.Tile({source:this.tileImageSource,extent:e})}clone(){return new n({size:this.size,url:this.url,tileSize:this.tileSize,tileResolution:this.tileResolution,minZoom:this.minZoom,maxZoom:this.maxZoom})}setSize(e){this.size=e,this._createViewAndLayer()}setImageName(e){this.tileImageSource.setTileUrlFunction(t=>{const[i,s,r]=t;return`${this.url}/${e}/${i}/${s}/${r}.${this.format}`}),this.tileImageSource.refresh()}}t["a"]=n},function(e,t,i){"use strict";var s=Array.isArray,r=Object.keys,n=Object.prototype.hasOwnProperty;e.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){var a,o,l,c=s(t),u=s(i);if(c&&u){if(o=t.length,o!=i.length)return!1;for(a=o;0!==a--;)if(!e(t[a],i[a]))return!1;return!0}if(c!=u)return!1;var h=t instanceof Date,d=i instanceof Date;if(h!=d)return!1;if(h&&d)return t.getTime()==i.getTime();var m=t instanceof RegExp,g=i instanceof RegExp;if(m!=g)return!1;if(m&&g)return t.toString()==i.toString();var p=r(t);if(o=p.length,o!==r(i).length)return!1;for(a=o;0!==a--;)if(!n.call(i,p[a]))return!1;for(a=o;0!==a--;)if(l=p[a],!e(t[l],i[l]))return!1;return!0}return t!==t&&i!==i}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJhSURBVFiF7ZW/a1pRFMc/70XFYqVFUCq1hSClvCIShw6FItQ9U8EtHVySuYvg0C2BLB0KDeQf6NLFxU0KLRSKGMmDtKldqg3FEKVNaoqa6Hsd9JXrxR9tYsziF85wzzucz/fd++55cHYtAt97sXiOPmdSEPgFmL04Bu5OC24DPghwK/KAYxoGVgfArVi9aPhDoD3CQAd4dFHw60BJBPp8vhOfz3cimSj1aieuVyJIVVUznU4XM5lMUVVVQzLxetLwJxLAXFlZqZimmTdNM7+8vLwvPweWJgWfB47E5pqm/W42m1uWgVartRUKhY4lA3XgznnhNuC92NjhcHRyudxHC25FoVDYcTqdHclEDrCPAsyNMfAMaSvX1tb24vH4kVzo9/vbdru9k81mrwnpm3RvxtsxnIG6D/R94dFo9NAwjLz89mLEYrGf9O/CKfBgGEQZkr8KFBDO0OPxtHVd/xQIBE5Hua5UKrZwOHyvVquJW/8VWKA7vvukDunzUoQrisLGxkZpHBy6R7G5uVlSlL53mwdeDKof9A08RhqpiUTiIJVKHYyDW9I0rVUul23b29suIb0AfAF2xFr5CAKADnisRDAYbOi6/tnlchn/agCg0WgokUhEKxaLV4T0Yc9IeZCBOeANELUSqqqyvr7+TdO0pgzwer1tt9ttANTrdbVardrkmt3dXWcymbxtGH3e3wExurejT0mG/2QmHUkZDlCbooGaBRVvwY9Bri5If1niuS0Bz4EbUvEtaT1ytNIdPKL2pPU+8NRaDBtEo2SOef5fPYcNoqlpZmBmYGZgZuDSDfwBYHFBvEfx+bgAAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABOSURBVFiF7dexDQAgCETRO+My7r+GveNga7AmNP86aHihAkvaaszoHA5AkmZuRMSpHGh7vXX7BgAAAAAAAAAAAAAAAPD9Bflur077BgBceZ8FPDUm8YQAAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPnSURBVFiFtZdNTGNVFMd/fZ1SCjPFxohtnyGY8SMhMaRm2LkRmrqYgG2gJCbETBcTNEZXysLERU10oTvjAhIIloWbBpuujE1oWKgLP1IYYWF00uQlfbwymRJgmBHKe3XxaH1zbUvLlP/ynHPv+d97zr3nHButoxd4DRgBXgJ8wLUz3SGwA/wJ/Ar8CDxsZVNbCzYDwC0gBHS3SPYf4AcgASgXJeAE3gXeAuwtOhZxCnwLzAMn7RAYAL4Erl/QsYg/gA+B+60QeBn4GvCIClmWTyKRyOHo6OhRIBA49vv9OoCqqvZcLufMZrO9qVTKXSgUHHX23QU+AP5uRmAAWBKdy7Jcjsfju7FY7ECSpIbHBDAMg8XFxb54PP6MqqoikSLwNpabsBLoAr7BzPAawuHwfiKR0Nxut9HUs4C9vT17NBr1ra2tXRNUd4B3OMsJa3K9D7xutZydnS2trKxo3d3dlXacA7hcrsrMzMyBoij2jY0Nl0X1LGAAv8N/NzAAJK2EwuHw/urqqnrelZ8HwzAIhULPCTfxEIgA96u737I6l2W5nEgktCd1DiBJEslkcqe/v//UIu4BbgNImD9cyLooHo/vthvzZvB4PPrc3Nw9QXwT6LEBbwCfVaWyLJ8oinK3E6e3olwu2wYHB68LL+NjCfNvryESiRx22jmAw+GojI+PHwjiGxLCswsGg0cd936GUCgk7v2iBPitkuHh4ePLIhAIBMR6IFeTsAav16tfFgGv13sqiK52PthtQgIei4umaRctvedC07QrguiBBKhWSS6Xc14WgVwu1yWIChJmG1VDNpvt5ZKQyWSuCqK/JMweroZUKuXWdb2VVq0t6LpuS6fTYmX8RUJoIAuFgmNpacndaQILCwtuTdOsv+Aj4OfqST8B3qxq/H5/eWtrK+/xeDryJEulkn1oaOj5YrFoJfAd8Hn1GSYwG0gAVFV1RKNRn2E8eT0yDIOpqSm/4Lx85rNWgvcxS+Rw1SKfzzsVRbFPTEwc2WwXSwnDMIjFYt50Ot0nqFaANfh/S7YAvGK1HBsbO0wmkzvthqNUKtknJyf96+vrYuY3bMl0zIQMAbVF+Xzeuby83CdJkjEyMnJstzf/p3Rdt83Pz/dNT0/L29vbLkF9D3gPc5IC6rflLwBfAf2iwuv1liORyEEwGDwKBAInPp/vtFKpoKrqlc3Nza5MJtObTqfFbK+iiNmW37UKGwX3KeAL4NVGJ20Td4CPqDOYNLrP6mxnAENAvRO1gjJmwn0KPKhn0Ep6P43ZQN4ExJg2wiPge8w5Q21m2M776sEcz29gdlF+Hh/PVcy68hvwEy2O5/8CzKw/sVG0Ap4AAAAASUVORK5CYII="},function(e,t,i){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=s(i(622)),n=s(i(623)),a=i(277),o=s(i(627));function l(e,t){var i=!0;return a.flattenEach(e,(function(e){a.flattenEach(t,(function(t){if(!1===i)return!1;i=c(e.geometry,t.geometry)}))})),i}function c(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return!p(e.coordinates,t.coordinates);case"LineString":return!u(t,e);case"Polygon":return!r.default(e,t)}break;case"LineString":switch(t.type){case"Point":return!u(e,t);case"LineString":return!h(e,t);case"Polygon":return!d(t,e)}break;case"Polygon":switch(t.type){case"Point":return!r.default(t,e);case"LineString":return!d(e,t);case"Polygon":return!m(t,e)}}return!1}function u(e,t){for(var i=0;i<e.coordinates.length-1;i++)if(g(e.coordinates[i],e.coordinates[i+1],t.coordinates))return!0;return!1}function h(e,t){var i=n.default(e,t);return i.features.length>0}function d(e,t){for(var i=0,s=t.coordinates;i<s.length;i++){var a=s[i];if(r.default(a,e))return!0}var l=n.default(t,o.default(e));return l.features.length>0}function m(e,t){for(var i=0,s=e.coordinates[0];i<s.length;i++){var a=s[i];if(r.default(a,t))return!0}for(var l=0,c=t.coordinates[0];l<c.length;l++){var u=c[l];if(r.default(u,e))return!0}var h=n.default(o.default(e),o.default(t));return h.features.length>0}function g(e,t,i){var s=i[0]-e[0],r=i[1]-e[1],n=t[0]-e[0],a=t[1]-e[1],o=s*a-r*n;return 0===o&&(Math.abs(n)>=Math.abs(a)?n>0?e[0]<=i[0]&&i[0]<=t[0]:t[0]<=i[0]&&i[0]<=e[0]:a>0?e[1]<=i[1]&&i[1]<=t[1]:t[1]<=i[1]&&i[1]<=e[1])}function p(e,t){return e[0]===t[0]&&e[1]===t[1]}t.default=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(628),r=i(35);function n(e,t,i){void 0===i&&(i={});for(var n=i.steps||64,a=i.properties?i.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},o=[],l=0;l<n;l++)o.push(s.default(e,t,-360*l/n,i).geometry.coordinates);return o.push(o[0]),r.polygon([o],a)}t.default=n},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAABDCAYAAADHyrhzAAAL9UlEQVR4Xs1bfVRU1RY/5zLO4KxRTDEx/EzRhFTmzuAiwq+MUktLW1jqk3LBCpHUQFEqLc0n8RRZIGJi44NXmolpJj5NS40kBBlmBAN8wnsaysPvEHB883HPeevwGtYIM3PPvXOn9e5fwPnt3973x7n3nn32PhD8QVdVVdUgAMDjVqvVn2GYfhjjXgzD9OQ4TgkhVDAM8wAh9BAA8AAA0AIAuIMxvm2xWG5FRETc+yPChN5yotfrB0IIx0AIh2OMB3viB0LYBiFsRAj9SyaTXRo/fjwRTPJLUjHIf99ms4UwDDMGIdRH8mj/R4gZhvnVZrPVyuXyGimFkUQMvV5PpvpEAIAWANDDSyJ0o4UQ3kUI/ajRaH6BEGJP/XosRmVlpQZCGIUx9hUbzPXr11WDBg1qF2sPAPi3TCY7PH78+FsecADRYpSWlvZVKBSvAACGehLAjRs3lDk5ObM3bdr0lSc8EELOZrOVhoWF/Uh+FsMlSgyDwfAMAGAaxlgmxqmjTV5e3rMlJSXPb9myZUtAQIDJUz6GYW5brdaDEyZMuCGUS5AYer3eD0I4BwAwTKgjV/j4+PgVJpOpT2Rk5A/x8fE/S8FLZgbG+EeWZX+GECJaTmoxyEsSAPAmhHAALTkfrri4eIhOp1tMcEqlsiUvLy+bz0bIOEKoJCws7AdaGyox6uvre7e1tb2JMe5HS0yD27hx4yuXL18OtWPffvvt/IkTJzbS2NJiMMYVWq327zR4XjFqampUFoslFiH0GA0hLeb+/fvy5cuXpyCEOt87o0aNurBu3bpvaTkE4PQajeYoH96tGFeuXPFtaWkhQvTnIxI6vmfPHvbEiROzHO0YhrFt27Zti5+fn0UoHx8eQljCsqzbR8atGAaDYRHGeASfIzHjSUlJsXfu3CH5yiNXVFTU0ZiYmEoxnHw2CKGvw8LCfnGFcylGZWVlOABgOp8DMeO1tbX9Pvnkk3ec2fbt27cpOztbJ4aXzwZC+FChUOSGhIQ4XeA5FaOqqupxjuPiMcY+fA7EjGdkZLxQVVVF1ipOr/fee297cHDwXTHcFDYNGo1mjzOcUzGMRuObCKHhFMSiILGxsSkWi4V8qp1eY8eOLVu9evUJUeQURgzDHFar1Re6QruJYTQaQxFCr1JwioIcPnw4+ODBg9HujGUymTk/Pz9dlAM6I5Ovr29WSEjIIy/qR8S4du1az1u3bi0jayA6TuGo1NTUhU1NTSP5LOfMmXNg7ty5tXw4D8bLNBrNd472j4hRUVExhWGYKR44cGva2NjY64MPPkim4Q8MDGxIT0/fS4MVg8EYI7lcnjNu3Ljf7PadYtTX1yva2tqSPEnF+YLKzc2dVFZWNpUPZx/ftGlT5pAhQ9po8UJxDMNcUKvVh7uJ4e1ZQRzakzLaoMPDw88kJib+RIsXius6OzpnhsFgWIIxDhBKSIs/derU8IKCghhaPMF5I3lz4v87jUZTRv7eIYZer/eHEDpdBAkJ3h12w4YNcxsaGsYK5YuJifk8KirqilA7WjzDMNfVanXHIq9DDG8/Infv3vVNTk5e6ZiU0QY7YsSIi+vXrz9EixeKYxiGbDBnkI3lDjGMRmMcQqhbniCU2BU+Pz8/7PTp0zPF8mVlZf2lX79+/xFrz2dnX4RB8hVpb29PRQjxpvN8pK7Gly1btqSlpUX0ptBzzz13fPHixefF+uezgxD+wrLs17C8vHyUTCZbwGcgdryysjIgKysrXqw9sevTp8/NnJycnZ5w8NiaNBrNZqjX6yMhhM97y1F6evqMmpqaCZ7yL1++fFdYWFizpzyu7FtbW/8MjUbjqwihzq03KZ2ZTCZZYmLiKpvNpvCUNyQkpCI1NfWYpzyu7E0mUzYR4y2EkGS73Y7OCgsLxxYVFc2V4gZI8pabm5uhVCptUvB15ZDL5bthZWUlWV/4e8PB6tWrY5qbmyXbCpg1a9ahefPmXfRGrFardS+ZGasQQiqpHdTX1/f5+OOPV0jJO3DgwCubN2/+XEpOB6790GAwrJWiMtY1wOzs7Kl6vX6S1IF/+OGH2UFBQaR/Q+rrEHlM1kvNSvji4uJWms1myWecVqv9acWKFWe8EHMRmRmpUqftx48fH/nll18u9ELAQKFQtOt0uq1e4N7vlXfGunXroq9evRrshYA7KBcsWLB3xowZDVLyI4T2kcckEQAgWZGItBikpKSkSBloV65hw4bVbty48YCUPjDGXxAx/gQA4N2TpHWs0+nCi4uLX6TFi8VJ1cJg989x3E4iBikUkYKRJFdCQsI77e3tkhaonQU2efLkk3FxceckCRoA0NramkFeoFqM8ctSkJ47dy5wx44dcVJw8XGoVKq7n3766XY+HOU41mg0G+D58+cDfHx8llAauYWlpaW9XFdXp5GCi4YjISFhd0RExHUarDsMhPAGy7I7O/YwDAbDGoxxT09ISVK2dOnSFI7j5EJ4fHx8bAEBAVeampqChNgR7OjRow1r164tEmrnBN9RQ7GL8QbG+ClPSPft2xd67Ngx0vBGfZF9iqVLlxaOGTPm3t69e0O///77mRzHUbdO+vj4WHfs2LHZ0+QNY/yVVqu9ZBfD4/dGcnLy4tu3bw+hVeLpp58+v2bNmuOO+IsXL/rv3LlzXmtrK/Wnfvr06d8uXLiwW92UNg6GYSwqlWprUFCQ2b47rmQYZqXYqruQpIyk4tHR0Ydmzpx52VXAaWlpL9XV1ZEGW96rf//+jZmZmfm8QBcAx0KSY91E9KOSmZn5vNFofJYvIH9//+uJiYlfjxw58j4f9siRI0998803r9JsDHnSwsAwTIFarb5K4nEUYyjGuKPzTujF12JA+FiWPZuUlHRaCHdDQ4NfTk7O6/fu3Rvozi40NPTnlStXUnf12bkghPdYlt3W+bujEzG7XkVFRaMLCwvfcBWsQqF4MH/+/IPTpk0TXQjKyMiIqqqqinDlQy6Xm3bv3r1FiNAE27VP45HygNFoHIYQeksI6fvvv//GtWvXRjuzGTBgwNVVq1YdkKLz9+TJkyP2798/11WTS3R09P7Zs2dfoo2drC3UanWeYwN+t1qJwWCgfne4S8oiIiJOJSQklNAGR4MjDfeZmZnRzr5agwcPvpyWlraPhodg7J9TR3w3McrKynorFIpEhBDvjra979uRUKlUti5atOhAZGSkxytDVze2ffv2yeXl5d36SGiTNwjhJZZluzXuO62ikUZ5jDFv5tm1xSAwMLA+JSXlkDdLgXaBSkpKBhUUFLzuuJtGORutvXv3zgkKCmrtKrbLkqLBYIh1d5zq7NmzQ3bt2tX59fF2CdDZLLl582bPrVu3vtbc3NzRq0rTwgAhPMqyrN4Zn0sxqqurH+M4LgEh5DTXsPd9q1Sq35YsWfKVpwdfaJ91ZzidTvdMcXHxC2QsNja2YMqUKb86vVkI/8my7BeufLktNldXV4+1Wq2vdTW2930PHTr0HykpKd/26tXL6snNSGGr1+sDPvvss9efeOKJXz/66KPO1iQ7N8MwLXK5XOeqIZbgeCvvFRUVzzIME+UYcGFh4TiO45j58+eLzgmkEMDZPykrK2vmu+++e8yx//z304+71Wq12xIDrxjE4YULFyI5jvNacVpqYcjMdRDDhDH+q1arvcPnh0oMQkJyD4TQIzOEj/z/YPyB2WwmG0BUh4SpxSA3RrYIIYQvebOxRUIB75vN5r/RCkH1zugaXHl5+fAePXrMwRj3ljBwqalqMcZHtVqtoAOAgmaGPeIzZ874qlSqFxmGUUt9F57wQQhJ39cRlmVFtVmLEsMecHV19ZMcx8324lFvIdpU+/r6nnT36eQj80gMQq7X63sghCbJZDKyhPf4nCtfwF3HyTlWAMBJtVpdL9S2K95jMeyE5GCfyWSa5OPjoxG7fSjkZsjGzO9nVy9KcQ5e1AuUL2DSStnS0hIsk8mCMcZPSikMhJAkV3UAgFq1Wt0olQj2e5JsZjgTqaamRm42m0kddwwAIEhk68MdknJbLJZL4eHhXtsW8MrMcDdzSktLe/r5+fW02WxKUnRyhlUoFNhms5kRQqaHDx+apk6d6pWGNme+/wtn7dJLR+980QAAAABJRU5ErkJggg=="},function(e,t,i){e.exports=i.p+"img/dirt_0.eb1569b0.png"},,,,,function(e,t,i){"use strict";var s=i(40),r=i(71).f,n=i(31),a=i(138),o=i(28),l=i(139),c=i(56),u="".endsWith,h=Math.min,d=l("endsWith"),m=!c&&!d&&!!function(){var e=r(String.prototype,"endsWith");return e&&!e.writable}();s({target:"String",proto:!0,forced:!m&&!d},{endsWith:function(e){var t=String(o(this));a(e);var i=arguments.length>1?arguments[1]:void 0,s=n(t.length),r=void 0===i?s:h(n(i),s),l=String(e);return u?u.call(t,l,r):t.slice(r-l.length,r)===l}})},function(e,t,i){"use strict";function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){while(s>i){if(s-i>600){var o=s-i+1,l=t-i+1,c=Math.log(o),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(o-u)/o)*(l-o/2<0?-1:1),d=Math.max(i,Math.floor(t-l*u/o+h)),m=Math.min(s,Math.floor(t+(o-l)*u/o+h));r(e,t,d,m,a)}var g=e[t],p=i,f=s;n(e,i,t),a(e[s],g)>0&&n(e,i,s);while(p<f){n(e,p,f),p++,f--;while(a(e[p],g)<0)p++;while(a(e[f],g)>0)f--}0===a(e[i],g)?n(e,i,f):(f++,n(e,f,s)),f<=t&&(i=f+1),t<=f&&(s=f-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}e.exports=s,e.exports.default=s},function(e,t,i){"use strict";function s(e,t){if(!(this instanceof s))return new s(e,t);if(this.data=e||[],this.length=this.data.length,this.compare=t||r,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)}function r(e,t){return e<t?-1:e>t?1:0}e.exports=s,e.exports.default=s,s.prototype={push:function(e){this.data.push(e),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},_up:function(e){var t=this.data,i=this.compare,s=t[e];while(e>0){var r=e-1>>1,n=t[r];if(i(s,n)>=0)break;t[e]=n,e=r}t[e]=s},_down:function(e){var t=this.data,i=this.compare,s=this.length>>1,r=t[e];while(e<s){var n=1+(e<<1),a=n+1,o=t[n];if(a<this.length&&i(t[a],o)<0&&(n=a,o=t[a]),i(o,r)>=0)break;t[e]=o,e=n}t[e]=r}}},function(e,t,i){var s=i(597);s("Uint8",(function(e){return function(t,i,s){return e(this,t,i,s)}}))},function(e,t,i){"use strict";var s=i(40),r=i(8),n=i(24),a=i(598),o=i(148),l=i(601),c=i(291),u=i(55),h=i(29),d=i(31),m=i(574),g=i(604),p=i(76),f=i(21),y=i(290),_=i(27),v=i(91),L=i(92),M=i(87).f,b=i(606),w=i(607).forEach,T=i(289),S=i(25),C=i(71),E=i(50),I=i(288),k=E.get,D=E.set,O=S.f,P=C.f,A=Math.round,x=r.RangeError,Y=l.ArrayBuffer,j=l.DataView,N=o.NATIVE_ARRAY_BUFFER_VIEWS,F=o.TYPED_ARRAY_TAG,R=o.TypedArray,H=o.TypedArrayPrototype,G=o.aTypedArrayConstructor,z=o.isTypedArray,B="BYTES_PER_ELEMENT",V="Wrong length",U=function(e,t){var i=0,s=t.length,r=new(G(e))(s);while(s>i)r[i]=t[i++];return r},W=function(e,t){O(e,t,{get:function(){return k(this)[t]}})},q=function(e){var t;return e instanceof Y||"ArrayBuffer"==(t=y(e))||"SharedArrayBuffer"==t},J=function(e,t){return z(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},K=function(e,t){return J(e,t=p(t,!0))?u(2,e[t]):P(e,t)},Z=function(e,t,i){return!(J(e,t=p(t,!0))&&_(i)&&f(i,"value"))||f(i,"get")||f(i,"set")||i.configurable||f(i,"writable")&&!i.writable||f(i,"enumerable")&&!i.enumerable?O(e,t,i):(e[t]=i.value,e)};n?(N||(C.f=K,S.f=Z,W(H,"buffer"),W(H,"byteOffset"),W(H,"byteLength"),W(H,"length")),s({target:"Object",stat:!0,forced:!N},{getOwnPropertyDescriptor:K,defineProperty:Z}),e.exports=function(e,t,i){var n=e.match(/\d+$/)[0]/8,o=e+(i?"Clamped":"")+"Array",l="get"+e,u="set"+e,p=r[o],f=p,y=f&&f.prototype,S={},C=function(e,t){var i=k(e);return i.view[l](t*n+i.byteOffset,!0)},E=function(e,t,s){var r=k(e);i&&(s=(s=A(s))<0?0:s>255?255:255&s),r.view[u](t*n+r.byteOffset,s,!0)},P=function(e,t){O(e,t,{get:function(){return C(this,t)},set:function(e){return E(this,t,e)},enumerable:!0})};N?a&&(f=t((function(e,t,i,s){return c(e,f,o),I(function(){return _(t)?q(t)?void 0!==s?new p(t,g(i,n),s):void 0!==i?new p(t,g(i,n)):new p(t):z(t)?U(f,t):b.call(f,t):new p(m(t))}(),e,f)})),L&&L(f,R),w(M(p),(function(e){e in f||h(f,e,p[e])})),f.prototype=y):(f=t((function(e,t,i,s){c(e,f,o);var r,a,l,u=0,h=0;if(_(t)){if(!q(t))return z(t)?U(f,t):b.call(f,t);r=t,h=g(i,n);var p=t.byteLength;if(void 0===s){if(p%n)throw x(V);if(a=p-h,a<0)throw x(V)}else if(a=d(s)*n,a+h>p)throw x(V);l=a/n}else l=m(t),a=l*n,r=new Y(a);D(e,{buffer:r,byteOffset:h,byteLength:a,length:l,view:new j(r)});while(u<l)P(e,u++)})),L&&L(f,R),y=f.prototype=v(H)),y.constructor!==f&&h(y,"constructor",f),F&&h(y,F,o),S[o]=f,s({global:!0,forced:f!=p,sham:!N},S),B in f||h(f,B,n),B in y||h(y,B,n),T(o)}):e.exports=function(){}},function(e,t,i){var s=i(8),r=i(13),n=i(599),a=i(148).NATIVE_ARRAY_BUFFER_VIEWS,o=s.ArrayBuffer,l=s.Int8Array;e.exports=!a||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!n((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new o(2),1,void 0).length}))},function(e,t,i){var s=i(11),r=s("iterator"),n=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){n=!0}};o[r]=function(){return this},Array.from(o,(function(){throw 2}))}catch(l){}e.exports=function(e,t){if(!t&&!n)return!1;var i=!1;try{var s={};s[r]=function(){return{next:function(){return{done:i=!0}}}},e(s)}catch(l){}return i}},function(e,t,i){var s=i(11),r=s("toStringTag"),n={};n[r]="z",e.exports="[object z]"===String(n)},function(e,t,i){"use strict";var s=i(8),r=i(24),n=i(148).NATIVE_ARRAY_BUFFER,a=i(29),o=i(573),l=i(13),c=i(291),u=i(34),h=i(31),d=i(574),m=i(602),g=i(87).f,p=i(25).f,f=i(603),y=i(73),_=i(50),v=_.get,L=_.set,M="ArrayBuffer",b="DataView",w="prototype",T="Wrong length",S="Wrong index",C=s[M],E=C,I=s[b],k=s.RangeError,D=m.pack,O=m.unpack,P=function(e){return[255&e]},A=function(e){return[255&e,e>>8&255]},x=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Y=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},j=function(e){return D(e,23,4)},N=function(e){return D(e,52,8)},F=function(e,t){p(e[w],t,{get:function(){return v(this)[t]}})},R=function(e,t,i,s){var r=d(i),n=v(e);if(r+t>n.byteLength)throw k(S);var a=v(n.buffer).bytes,o=r+n.byteOffset,l=a.slice(o,o+t);return s?l:l.reverse()},H=function(e,t,i,s,r,n){var a=d(i),o=v(e);if(a+t>o.byteLength)throw k(S);for(var l=v(o.buffer).bytes,c=a+o.byteOffset,u=s(+r),h=0;h<t;h++)l[c+h]=u[n?h:t-h-1]};if(n){if(!l((function(){C(1)}))||!l((function(){new C(-1)}))||l((function(){return new C,new C(1.5),new C(NaN),C.name!=M}))){E=function(e){return c(this,E),new C(d(e))};for(var G,z=E[w]=C[w],B=g(C),V=0;B.length>V;)(G=B[V++])in E||a(E,G,C[G]);z.constructor=E}var U=new I(new E(2)),W=I[w].setInt8;U.setInt8(0,2147483648),U.setInt8(1,2147483649),!U.getInt8(0)&&U.getInt8(1)||o(I[w],{setInt8:function(e,t){W.call(this,e,t<<24>>24)},setUint8:function(e,t){W.call(this,e,t<<24>>24)}},{unsafe:!0})}else E=function(e){c(this,E,M);var t=d(e);L(this,{bytes:f.call(new Array(t),0),byteLength:t}),r||(this.byteLength=t)},I=function(e,t,i){c(this,I,b),c(e,E,b);var s=v(e).byteLength,n=u(t);if(n<0||n>s)throw k("Wrong offset");if(i=void 0===i?s-n:h(i),n+i>s)throw k(T);L(this,{buffer:e,byteLength:i,byteOffset:n}),r||(this.buffer=e,this.byteLength=i,this.byteOffset=n)},r&&(F(E,"byteLength"),F(I,"buffer"),F(I,"byteLength"),F(I,"byteOffset")),o(I[w],{getInt8:function(e){return R(this,1,e)[0]<<24>>24},getUint8:function(e){return R(this,1,e)[0]},getInt16:function(e){var t=R(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=R(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Y(R(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Y(R(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return O(R(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return O(R(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){H(this,1,e,P,t)},setUint8:function(e,t){H(this,1,e,P,t)},setInt16:function(e,t){H(this,2,e,A,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){H(this,2,e,A,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){H(this,4,e,x,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){H(this,4,e,x,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){H(this,4,e,j,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){H(this,8,e,N,t,arguments.length>2?arguments[2]:void 0)}});y(E,M),y(I,b),e.exports={ArrayBuffer:E,DataView:I}},function(e,t){var i=1/0,s=Math.abs,r=Math.pow,n=Math.floor,a=Math.log,o=Math.LN2,l=function(e,t,l){var c,u,h,d=new Array(l),m=8*l-t-1,g=(1<<m)-1,p=g>>1,f=23===t?r(2,-24)-r(2,-77):0,y=e<0||0===e&&1/e<0?1:0,_=0;for(e=s(e),e!=e||e===i?(u=e!=e?1:0,c=g):(c=n(a(e)/o),e*(h=r(2,-c))<1&&(c--,h*=2),e+=c+p>=1?f/h:f*r(2,1-p),e*h>=2&&(c++,h/=2),c+p>=g?(u=0,c=g):c+p>=1?(u=(e*h-1)*r(2,t),c+=p):(u=e*r(2,p-1)*r(2,t),c=0));t>=8;d[_++]=255&u,u/=256,t-=8);for(c=c<<t|u,m+=t;m>0;d[_++]=255&c,c/=256,m-=8);return d[--_]|=128*y,d},c=function(e,t){var s,n=e.length,a=8*n-t-1,o=(1<<a)-1,l=o>>1,c=a-7,u=n-1,h=e[u--],d=127&h;for(h>>=7;c>0;d=256*d+e[u],u--,c-=8);for(s=d&(1<<-c)-1,d>>=-c,c+=t;c>0;s=256*s+e[u],u--,c-=8);if(0===d)d=1-l;else{if(d===o)return s?NaN:h?-i:i;s+=r(2,t),d-=l}return(h?-1:1)*s*r(2,d-t)};e.exports={pack:l,unpack:c}},function(e,t,i){"use strict";var s=i(57),r=i(280),n=i(31);e.exports=function(e){var t=s(this),i=n(t.length),a=arguments.length,o=r(a>1?arguments[1]:void 0,i),l=a>2?arguments[2]:void 0,c=void 0===l?i:r(l,i);while(c>o)t[o++]=e;return t}},function(e,t,i){var s=i(605);e.exports=function(e,t){var i=s(e);if(i%t)throw RangeError("Wrong offset");return i}},function(e,t,i){var s=i(34);e.exports=function(e){var t=s(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,i){var s=i(57),r=i(31),n=i(292),a=i(575),o=i(293),l=i(148).aTypedArrayConstructor;e.exports=function(e){var t,i,c,u,h,d,m=s(e),g=arguments.length,p=g>1?arguments[1]:void 0,f=void 0!==p,y=n(m);if(void 0!=y&&!a(y)){h=y.call(m),d=h.next,m=[];while(!(u=d.call(h)).done)m.push(u.value)}for(f&&g>2&&(p=o(p,arguments[2],2)),i=r(m.length),c=new(l(this))(i),t=0;i>t;t++)c[t]=f?p(m[t],t):m[t];return c}},function(e,t,i){var s=i(293),r=i(134),n=i(57),a=i(31),o=i(608),l=[].push,c=function(e){var t=1==e,i=2==e,c=3==e,u=4==e,h=6==e,d=5==e||h;return function(m,g,p,f){for(var y,_,v=n(m),L=r(v),M=s(g,p,3),b=a(L.length),w=0,T=f||o,S=t?T(m,b):i?T(m,0):void 0;b>w;w++)if((d||w in L)&&(y=L[w],_=M(y,w,v),e))if(t)S[w]=_;else if(_)switch(e){case 3:return!0;case 5:return y;case 6:return w;case 2:l.call(S,y)}else if(u)return!1;return h?-1:c||u?u:S}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(e,t,i){var s=i(27),r=i(609),n=i(11),a=n("species");e.exports=function(e,t){var i;return r(e)&&(i=e.constructor,"function"!=typeof i||i!==Array&&!r(i.prototype)?s(i)&&(i=i[a],null===i&&(i=void 0)):i=void 0),new(void 0===i?Array:i)(0===t?0:t)}},function(e,t,i){var s=i(52);e.exports=Array.isArray||function(e){return"Array"==s(e)}},function(e,t,i){"use strict";var s=i(8),r=i(148),n=i(13),a=s.Int8Array,o=r.aTypedArray,l=r.exportTypedArrayMethod,c=[].toLocaleString,u=[].slice,h=!!a&&n((function(){c.call(new a(1))})),d=n((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!n((function(){a.prototype.toLocaleString.call([1,2])}));l("toLocaleString",(function(){return c.apply(h?u.call(o(this)):o(this),arguments)}),d)},function(e,t,i){"use strict";var s={},r=Array.prototype,n=Object.prototype,a=r.slice,o=n.toString,l=n.hasOwnProperty,c=r.forEach,u=Object.keys,h=Array.isArray,d=function(){},m=d.each=d.forEach=function(e,t,i){if(null!=e)if(c&&e.forEach===c)e.forEach(t,i);else if(e.length===+e.length){for(var r=0,n=e.length;r<n;r++)if(t.call(i,e[r],r,e)===s)return}else{var a=d.keys(e);for(r=0,n=a.length;r<n;r++)if(t.call(i,e[a[r]],a[r],e)===s)return}};d.keys=u||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var i in e)d.has(e,i)&&t.push(i);return t},d.defaults=function(e){return m(a.call(arguments,1),(function(t){if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])})),e},d.isArray=h||function(e){return"[object Array]"===o.call(e)},d.has=function(e,t){if(!d.isArray(t))return null!=e&&l.call(e,t);for(var i=t.length,s=0;s<i;s++){var r=t[s];if(null==e||!l.call(e,r))return!1;e=e[r]}return!!i};var g={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}},p={escape:new RegExp("["+d.keys(g.escape).join("")+"]","g")};d.each(["escape"],(function(e){d[e]=function(t){return null==t?"":(""+t).replace(p[e],(function(t){return g[e][t]}))}})),d.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var f=/(.)^/,y={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},_=/\\|'|\r|\n|\t|\u2028|\u2029/g;d.template=function(e,t,i){var s;i=d.defaults({},i,d.templateSettings);var r=new RegExp([(i.escape||f).source,(i.interpolate||f).source,(i.evaluate||f).source].join("|")+"|$","g"),n=0,a="__p+='";e.replace(r,(function(t,i,s,r,o){return a+=e.slice(n,o).replace(_,(function(e){return"\\"+y[e]})),i&&(a+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'"),s&&(a+="'+\n((__t=("+s+"))==null?'':__t)+\n'"),r&&(a+="';\n"+r+"\n__p+='"),n=o+t.length,t})),a+="';\n",i.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{s=new Function(i.variable||"obj","_",a)}catch(l){throw l.source=a,l}if(t)return s(t,d);var o=function(e){return s.call(this,e,d)};return o.source="function("+(i.variable||"obj")+"){\n"+a+"}",o},e.exports=d},function(e,t,i){var s=i(613);e.exports=s},function(e,t,i){i(576),i(621),i(578);var s=i(279);e.exports=s.URL},function(e,t,i){"use strict";var s=i(140).charAt,r=i(50),n=i(286),a="String Iterator",o=r.set,l=r.getterFor(a);n(String,"String",(function(e){o(this,{type:a,string:String(e),index:0})}),(function(){var e,t=l(this),i=t.string,r=t.index;return r>=i.length?{value:void 0,done:!0}:(e=s(i,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,i){"use strict";var s=i(24),r=i(13),n=i(285),a=i(281),o=i(278),l=i(57),c=i(134),u=Object.assign,h=Object.defineProperty;e.exports=!u||r((function(){if(s&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol(),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[i]||n(u({},t)).join("")!=r}))?function(e,t){var i=l(e),r=arguments.length,u=1,h=a.f,d=o.f;while(r>u){var m,g=c(arguments[u++]),p=h?n(g).concat(h(g)):n(g),f=p.length,y=0;while(f>y)m=p[y++],s&&!d.call(g,m)||(i[m]=g[m])}return i}:u},function(e,t,i){"use strict";var s=i(293),r=i(57),n=i(617),a=i(575),o=i(31),l=i(618),c=i(292);e.exports=function(e){var t,i,u,h,d,m=r(e),g="function"==typeof this?this:Array,p=arguments.length,f=p>1?arguments[1]:void 0,y=void 0!==f,_=0,v=c(m);if(y&&(f=s(f,p>2?arguments[2]:void 0,2)),void 0==v||g==Array&&a(v))for(t=o(m.length),i=new g(t);t>_;_++)l(i,_,y?f(m[_],_):m[_]);else for(h=v.call(m),d=h.next,i=new g;!(u=d.call(h)).done;_++)l(i,_,y?n(h,f,[u.value,_],!0):u.value);return i.length=_,i}},function(e,t,i){var s=i(18);e.exports=function(e,t,i,r){try{return r?t(s(i)[0],i[1]):t(i)}catch(a){var n=e["return"];throw void 0!==n&&s(n.call(e)),a}}},function(e,t,i){"use strict";var s=i(76),r=i(25),n=i(55);e.exports=function(e,t,i){var a=s(t);a in e?r.f(e,a,n(0,i)):e[a]=i}},function(e,t,i){"use strict";var s=2147483647,r=36,n=1,a=26,o=38,l=700,c=72,u=128,h="-",d=/[^\0-\u007E]/,m=/[.\u3002\uFF0E\uFF61]/g,g="Overflow: input needs wider integers to process",p=r-n,f=Math.floor,y=String.fromCharCode,_=function(e){var t=[],i=0,s=e.length;while(i<s){var r=e.charCodeAt(i++);if(r>=55296&&r<=56319&&i<s){var n=e.charCodeAt(i++);56320==(64512&n)?t.push(((1023&r)<<10)+(1023&n)+65536):(t.push(r),i--)}else t.push(r)}return t},v=function(e){return e+22+75*(e<26)},L=function(e,t,i){var s=0;for(e=i?f(e/l):e>>1,e+=f(e/t);e>p*a>>1;s+=r)e=f(e/p);return f(s+(p+1)*e/(e+o))},M=function(e){var t=[];e=_(e);var i,o,l=e.length,d=u,m=0,p=c;for(i=0;i<e.length;i++)o=e[i],o<128&&t.push(y(o));var M=t.length,b=M;M&&t.push(h);while(b<l){var w=s;for(i=0;i<e.length;i++)o=e[i],o>=d&&o<w&&(w=o);var T=b+1;if(w-d>f((s-m)/T))throw RangeError(g);for(m+=(w-d)*T,d=w,i=0;i<e.length;i++){if(o=e[i],o<d&&++m>s)throw RangeError(g);if(o==d){for(var S=m,C=r;;C+=r){var E=C<=p?n:C>=p+a?a:C-p;if(S<E)break;var I=S-E,k=r-E;t.push(y(v(E+I%k))),S=f(I/k)}t.push(y(v(S))),p=L(m,T,b==M),m=0,++b}}++m,++d}return t.join("")};e.exports=function(e){var t,i,s=[],r=e.toLowerCase().replace(m,".").split(".");for(t=0;t<r.length;t++)i=r[t],s.push(d.test(i)?"xn--"+M(i):i);return s.join(".")}},function(e,t,i){var s=i(18),r=i(292);e.exports=function(e){var t=r(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return s(t.call(e))}},function(e,t,i){"use strict";var s=i(40);s({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(276);function r(e,t,i){if(void 0===i&&(i={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=s.getCoord(e),o=s.getGeom(t),l=o.type,c=t.bbox,u=o.coordinates;if(c&&!1===a(r,c))return!1;"Polygon"===l&&(u=[u]);for(var h=!1,d=0;d<u.length&&!h;d++)if(n(r,u[d][0],i.ignoreBoundary)){var m=!1,g=1;while(g<u[d].length&&!m)n(r,u[d][g],!i.ignoreBoundary)&&(m=!0),g++;m||(h=!0)}return h}function n(e,t,i){var s=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var r=0,n=t.length-1;r<t.length;n=r++){var a=t[r][0],o=t[r][1],l=t[n][0],c=t[n][1],u=e[1]*(a-l)+o*(l-e[0])+c*(e[0]-a)===0&&(a-e[0])*(l-e[0])<=0&&(o-e[1])*(c-e[1])<=0;if(u)return!i;var h=o>e[1]!==c>e[1]&&e[0]<(l-a)*(e[1]-o)/(c-o)+a;h&&(s=!s)}return s}function a(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}t.default=r},function(e,t,i){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=i(35),n=i(276),a=s(i(624)),o=i(277),l=s(i(625));function c(e,t){var i={},s=[];if("LineString"===e.type&&(e=r.feature(e)),"LineString"===t.type&&(t=r.feature(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var c=u(e,t);return c&&s.push(c),r.featureCollection(s)}var h=l.default();return h.load(a.default(t)),o.featureEach(a.default(e),(function(e){o.featureEach(h.search(e),(function(t){var r=u(e,t);if(r){var a=n.getCoords(r).join(",");i[a]||(i[a]=!0,s.push(r))}}))})),r.featureCollection(s)}function u(e,t){var i=n.getCoords(e),s=n.getCoords(t);if(2!==i.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==s.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var a=i[0][0],o=i[0][1],l=i[1][0],c=i[1][1],u=s[0][0],h=s[0][1],d=s[1][0],m=s[1][1],g=(m-h)*(l-a)-(d-u)*(c-o),p=(d-u)*(o-h)-(m-h)*(a-u),f=(l-a)*(o-h)-(c-o)*(a-u);if(0===g)return null;var y=p/g,_=f/g;if(y>=0&&y<=1&&_>=0&&_<=1){var v=a+y*(l-a),L=o+y*(c-o);return r.point([v,L])}return null}t.default=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(35),r=i(276),n=i(277);function a(e){if(!e)throw new Error("geojson is required");var t=[];return n.flattenEach(e,(function(e){o(e,t)})),s.featureCollection(t)}function o(e,t){var i=[],s=e.geometry;if(null!==s){switch(s.type){case"Polygon":i=r.getCoords(s);break;case"LineString":i=[r.getCoords(s)]}i.forEach((function(i){var s=l(i,e.properties);s.forEach((function(e){e.id=t.length,t.push(e)}))}))}}function l(e,t){var i=[];return e.reduce((function(e,r){var n=s.lineString([e,r],t);return n.bbox=c(e,r),i.push(n),r})),i}function c(e,t){var i=e[0],s=e[1],r=t[0],n=t[1],a=i<r?i:r,o=s<n?s:n,l=i>r?i:r,c=s>n?s:n;return[a,o,l,c]}t.default=a},function(e,t,i){var s=i(563),r=i(35),n=i(277),a=i(626).default,o=n.featureEach,l=(n.coordEach,r.polygon,r.featureCollection);function c(e){var t=s(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),s.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)})):o(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)})),s.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),s.prototype.remove.call(this,e,t)},t.clear=function(){return s.prototype.clear.call(this)},t.search=function(e){var t=s.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return s.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=s.prototype.all.call(this);return l(e)},t.toJSON=function(){return s.prototype.toJSON.call(this)},t.fromJSON=function(e){return s.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=a(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=a(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}e.exports=c,e.exports.default=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(277);function r(e){var t=[1/0,1/0,-1/0,-1/0];return s.coordEach(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(35),r=i(276);function n(e,t){void 0===t&&(t={});var i=r.getGeom(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),i.type){case"Polygon":return a(i,t);case"MultiPolygon":return o(i,t);default:throw new Error("invalid poly")}}function a(e,t){void 0===t&&(t={});var i=r.getGeom(e),s=(i.type,i.coordinates),n=t.properties?t.properties:"Feature"===e.type?e.properties:{};return l(s,n)}function o(e,t){void 0===t&&(t={});var i=r.getGeom(e),n=(i.type,i.coordinates),a=t.properties?t.properties:"Feature"===e.type?e.properties:{},o=[];return n.forEach((function(e){o.push(l(e,a))})),s.featureCollection(o)}function l(e,t){return e.length>1?s.multiLineString(e,t):s.lineString(e[0],t)}t.default=n,t.polygonToLine=a,t.multiPolygonToLine=o,t.coordsToLine=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(35),r=i(276);function n(e,t,i,n){void 0===n&&(n={});var a=r.getCoord(e),o=s.degreesToRadians(a[0]),l=s.degreesToRadians(a[1]),c=s.degreesToRadians(i),u=s.lengthToRadians(t,n.units),h=Math.asin(Math.sin(l)*Math.cos(u)+Math.cos(l)*Math.sin(u)*Math.cos(c)),d=o+Math.atan2(Math.sin(c)*Math.sin(u)*Math.cos(l),Math.cos(u)-Math.sin(l)*Math.sin(h)),m=s.radiansToDegrees(d),g=s.radiansToDegrees(h);return s.point([m,g],n.properties)}t.default=n},function(e,t,i){var s,r,n=i(571),a=i(572),o=0,l=0;function c(e,t,i){var c=t&&i||0,u=t||[];e=e||{};var h=e.node||s,d=void 0!==e.clockseq?e.clockseq:r;if(null==h||null==d){var m=n();null==h&&(h=s=[1|m[0],m[1],m[2],m[3],m[4],m[5]]),null==d&&(d=r=16383&(m[6]<<8|m[7]))}var g=void 0!==e.msecs?e.msecs:(new Date).getTime(),p=void 0!==e.nsecs?e.nsecs:l+1,f=g-o+(p-l)/1e4;if(f<0&&void 0===e.clockseq&&(d=d+1&16383),(f<0||g>o)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=g,l=p,r=d,g+=122192928e5;var y=(1e4*(268435455&g)+p)%4294967296;u[c++]=y>>>24&255,u[c++]=y>>>16&255,u[c++]=y>>>8&255,u[c++]=255&y;var _=g/4294967296*1e4&268435455;u[c++]=_>>>8&255,u[c++]=255&_,u[c++]=_>>>24&15|16,u[c++]=_>>>16&255,u[c++]=d>>>8|128,u[c++]=255&d;for(var v=0;v<6;++v)u[c+v]=h[v];return t||a(u)}e.exports=c},function(e,t){ol.Feature.prototype.getProperty=function(e){if("attributes"===e){const e=this.getProperties();return this.getGeometryName()&&delete e[this.getGeometryName()],e}if("olcs_geometryType"===e){const e=this.getGeometry().getType();return"Polygon"===e?1:"LineString"===e?2:"Point"===e?3:"Circle"===e||"MultiPolygon"===e?1:"MultiLineString"===e?2:"MultiPoint"===e?3:void 0}return this.get(e)}},function(e,t){Cesium.Material._materialCache.addMaterial("Wallpaper",{fabric:{type:"Wallpaper",uniforms:{image:Cesium.Material.DefaultImageId,anchor:new Cesium.Cartesian2(0,0)},components:{diffuse:"texture2D(image, fract((gl_FragCoord.xy - anchor.xy) / vec2(imageDimensions.xy))).rgb",alpha:"texture2D(image, fract((gl_FragCoord.xy - anchor.xy) / vec2(imageDimensions.xy))).a"}},translucent:!1})},function(e,t){Cesium.Cesium3DTilePointFeature.prototype.getId=function(){return this.getProperty("id")||`${this.content.url}${this._batchId}`}},function(e,t){Cesium.Cesium3DTileFeature.prototype.getId=function(){return this.getProperty("id")||`${this.content.url}${this._batchId}`}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){"use strict";i.r(t),i.d(t,"vcs",(function(){return Hy}));var s={};i.r(s),i.d(s,"Buildings",(function(){return Dn})),i.d(s,"CesiumTilesetLayer",(function(){return In})),i.d(s,"Czml",(function(){return xn})),i.d(s,"Gltf",(function(){return jn})),i.d(s,"PointCloud",(function(){return Rn})),i.d(s,"Terrain",(function(){return Gn})),i.d(s,"ObliqueLayer",(function(){return bi})),i.d(s,"GeoJSON",(function(){return Bn})),i.d(s,"SingleImage",(function(){return qn})),i.d(s,"OpenStreetMap",(function(){return Kn})),i.d(s,"TMSBase",(function(){return Qn})),i.d(s,"Vector",(function(){return ss})),i.d(s,"TiledLayer",(function(){return Us})),i.d(s,"VectorCluster",(function(){return $n})),i.d(s,"WFS",(function(){return ta})),i.d(s,"WMS",(function(){return ra})),i.d(s,"WMTS",(function(){return aa})),i.d(s,"Wsv",(function(){return ha})),i.d(s,"FeatureStore",(function(){return fa}));var r={};i.r(r),i.d(r,"Legend",(function(){return ro})),i.d(r,"Planning",(function(){return sc})),i.d(r,"Query",(function(){return Th})),i.d(r,"Search",(function(){return ed})),i.d(r,"AdvancedWalkMode",(function(){return od})),i.d(r,"BalloonInfo",(function(){return cd})),i.d(r,"Copyright",(function(){return hd})),i.d(r,"CreateLink",(function(){return md})),i.d(r,"DisplayQuality",(function(){return Fd})),i.d(r,"Drawing",(function(){return zd})),i.d(r,"Export",(function(){return Cm})),i.d(r,"FeatureList",(function(){return Im})),i.d(r,"Locator",(function(){return Ah})),i.d(r,"Measurement",(function(){return sg})),i.d(r,"SingleMeasurement",(function(){return ng})),i.d(r,"NavigationControls",(function(){return lg})),i.d(r,"OverviewMap",(function(){return ug})),i.d(r,"PDFCreator",(function(){return Tg})),i.d(r,"PositionDisplay",(function(){return Ig})),i.d(r,"Shadow",(function(){return Dg})),i.d(r,"TransparentTerrainMode",(function(){return Ng})),i.d(r,"SwipeTool",(function(){return zg})),i.d(r,"Flight",(function(){return Vg})),i.d(r,"HeightProfile",(function(){return ip})),i.d(r,"ClippingTool",(function(){return up})),i.d(r,"MultiView",(function(){return dp})),i.d(r,"AttributeEditor",(function(){return Gp})),i.d(r,"Viewshed",(function(){return nf}));i(45),i(502),i(528),i(532);var n=i(16);i(7),i(43),i(10);function a(e,t,i){const s=function(e,t){if(null==t)return e!==t&&`Expected ${l.getErrorValue(e)} to be ${t}`;const s=l.atomic(e,t);if(null!==s)return s;const r=l.value(e,t);if(null!==r)return r;if(Array.isArray(t))return l.array(e,t,i);if(t instanceof Function)return!(e instanceof t)&&`Expected ${l.getErrorValue(e,!0)} to be of Type ${l.getConstructorString(t)}`;if(t===Object)return l.object(e,{});if("object"!==typeof t)throw new Error("Cannot handler pattern "+t);const n=l.object(e,t);return n||!!i&&l.requireKeys(e,t)};let r;if(Array.isArray(t)&&t.length>1){const i=t.every(t=>{const i=s(e,t);return i});i&&(r=`Expected ${l.getErrorValue(e)} to be a ${t.map(e=>l.getConstructorString(e)).join(" or ")}`)}else r=s(e,t);if(r)throw new Error("Match failed: "+r);return!1}function o(e,t,i){const s=[null,void 0];return Array.isArray(t)&&t.length>1?t.forEach(e=>{s.push(e)}):s.push(t),a(e,s.reverse(),i)}const l={};l.patterns=[[String,"string"],[Number,"number"],[Boolean,"boolean"],[Function,"function"],[void 0,"undefined"]],l.getErrorValue=function(e,t){if(null===e)return"null";if("undefined"===typeof e)return"undefined";if(t)return typeof e;let i;if(Array.isArray(e)){const s=e.map(e=>l.getErrorValue(e,t));i=`[${s.join(",")}]`}else try{i=JSON.stringify(e)}catch(s){i=typeof e}return i.length>20?i.substr(0,20)+"...":i},l.getConstructorString=function(e){if(null===e)return"null";const t=l.patterns.find(t=>t[0]===e);if(t)return t[1];let i=e.toString();if(e.className)return e.className;const s=i.match(/function (.*)\(/);if(s&&s.length>1)return s[1];if(l.isPlainObject(e)){const t={};Object.keys(e).forEach(i=>{t[i]=l.getConstructorString(e[i])});try{i="Object of "+JSON.stringify(t)}catch(r){i="Object"}}return i},l.atomic=function(e,t){if(t===Number)return!Number.isFinite(e)&&`expected ${l.getErrorValue(e)} to be a number, excluding NaN`;for(let i=l.patterns.length;i--;)if(t===l.patterns[i][0])return typeof e!==l.patterns[i][1]&&`expected ${l.getErrorValue(e)} to be a ${l.patterns[i][1]}`;return null},l.value=function(e,t){return"string"===typeof t||"number"===typeof t||"boolean"===typeof t?e!==t&&`Expected ${l.getErrorValue(e)} to equal ${t}`:null},l.array=function(e,t,i){if(Array.isArray(t)){if(1!==t.length)throw new Error("Array patterns may only have on type");if(Array.isArray(e)){let s=!1;const r=e.findIndex(e=>{try{a(e,t[0],i)}catch(r){s=r.message.replace(/Match failed:\s/,"")}return s});return r>-1&&`${s} in ${l.getErrorValue(e)}`}return`Expected ${l.getErrorValue(e)} to be an Array`}return null},l.object=function(e,t,i){const s=i?i+".":"",r=l.isPlainObject(e);if(!r)return`Expected ${l.getErrorValue(e)} to be a plain Object`;let n=!1;const o=Object.keys(t).find(i=>{const r=e[i];if(l.isPlainObject(t[i]))n=l.object(r,t[i],s+i);else try{a(r,t[i])}catch(o){n=o.message.replace(/Match failed:\s/,"")}return n});return!!o&&`${n} in object.${s}${o}`},l.isPlainObject=function(e){const t={};if(!e||"[object Object]"!==t.toString(e))return!1;const i=Object.getPrototypeOf(e);if(!i)return!0;const s=t.hasOwnProperty,r=s.call(i,"constructor")&&i.constructor;return"function"===typeof r&&s.toString.call(r)===s.toString.call(Object)},l.requireKeys=function(e,t,i){const s=i?i+".":"";let r=!1;const n=Object.keys(e).find(i=>{if(l.isPlainObject(t[i])){const n=e[i];r=l.requireKeys(n,t[i],s+i)}else t[i]||(r=`Found additional key ${s}${i}`);return r=!!r&&r.replace(/\sin.*/,""),r});return!!n&&`${r} in ${l.getErrorValue(e)}`};var c=i(2),u=i(15);i(4),i(14),i(20);const h={OFF:1,ERROR:2,WARN:4,INFO:8,DEBUG:16},d={ERROR:0,WARN:0,INFO:0,DEBUG:0};d.ERROR=h.ERROR|h.WARN|h.INFO|h.DEBUG,d.WARN=h.WARN|h.INFO|h.DEBUG,d.INFO=h.INFO|h.DEBUG,d.DEBUG=h.DEBUG;let m=h.INFO,g=!1;const p={};let f;const y=new Map;y.set(h.ERROR,"error"),y.set(h.WARN,"warn"),y.set(h.INFO,"info"),y.set(h.DEBUG,"log");class _{static get loggers(){return p}static get enabled(){return Object.keys(h).find(e=>h[e]===m)||"OFF"}static set enabled(e){if(e){const t="string"===typeof e?e.toUpperCase():"INFO";m=h[t]||h.INFO}else m=h.OFF}static get timestamp(){return g}static set timestamp(e){g=e}constructor(e){this.className=e,this.deprecations=new Map}static getLogger(e){return e?_.loggers[e]||_.createLogger(e):f}static createLogger(e){const t=new _(e);return _.loggers[e]=t,t}error(e,...t){a(e,String),m&d.ERROR&&this._log(e,h.ERROR,t)}warning(e,...t){a(e,String),m&d.WARN&&this._log(e,h.WARN,t)}deprecate(e,t){if(a(e,String),o(t,String),!this.deprecations.has(e)){this.deprecations.set(e,t||null);let i=e+" has been deprecated and will be removed";t&&(i=`${i}. ${t}`),this.warning(i)}}info(e,...t){a(e,String),m&d.INFO&&this._log(e,h.INFO,t)}debug(e,...t){a(e,String),m&d.DEBUG&&this._log(e,h.DEBUG,t)}log(e,...t){a(e,String),m&d.DEBUG&&this._log(e,h.DEBUG,t)}_log(e,t,i){let s=e;if(this.className&&(s=`[${this.className}] ${s}`),g){const e=new Date(Date.now());s=`${e.toLocaleDateString()} ${e.toLocaleTimeString()} ${s}`}console[y.get(t)](s,...i),t&h.ERROR&&(console.group(),console.trace(),console.groupEnd())}}f=new _;var v=_;i(58);const L={LOCALE_CHANGED:"LOCALE_CHANGED"};let M=null;class b{constructor(){this.languages=[{token:"de",language:"Deutsch",data:{}},{token:"en",language:"English",data:{}}],this.currentlocale="",this.defaultLocale="de",this.availableLocales=[],this.logger=v.getLogger("vcs.vcm.i18n"),this.i18nNumber=0}static getInstance(){return M||(M=new b),M}static registerLanguage(e,t,i){b.getInstance().registerLanguage(e,t,i)}detectBrowserLocale(){if(navigator.language){const e=navigator.language;return e.substring(0,2)}return null}static getNextI18nNumber(){const e=b.getInstance();return e.i18nNumber++,e.i18nNumber}initialize(e){e.i18n&&this.setConfig(e.i18n);const t=e.availableLocales;if(Array.isArray(t))for(let s=0;s<t.length;s++){const e=t[s];if(null!==e&&"object"===typeof e){const t=e.locale;t&&(this.isLanguageAvailable(t)||this.registerLanguage(t,t,{}),this.availableLocales.push(t))}else this.isLanguageAvailable(t[s])&&this.availableLocales.push(t[s])}this.setDefaultLocale(e.locale),e.locale&&(this.defaultLocale=e.locale);const i=this.detectBrowserLocale();i&&this.availableLocales.indexOf(i)>=0&&(this.defaultLocale=i)}setDefaultLocale(e){this.defaultLocale=this.availableLocales[0],e&&this.isLanguageAvailable(e)&&(this.defaultLocale=e);const t=this.detectBrowserLocale();t&&this.isLanguageAvailable(t)&&(this.defaultLocale=t)}setConfig(e){for(const t in e)if(this.isLanguageAvailable(t)){for(let i=0;i<this.languages.length;i++)if(this.languages[i].token===t)for(const s in e[t])this.languages[i].data[s]=e[t][s]}else this.registerLanguage(t,t,e[t])}getLocaleAwareString(e){return"string"===typeof e?e.replace("$locale$",this.currentlocale):e}registerLanguage(e,t,i){const s={token:e,language:t,data:i};for(let r=0;r<this.languages.length;r++)if(this.languages[r].token==e)return void this.logger.info(`Language ${t} already registered`);this.languages.push(s)}isLanguageAvailable(e){for(let t=0;t<this.languages.length;t++)if(this.languages[t].token==e)return!0;return!1}handleURLParameter(e){e.lang&&this.isLanguageAvailable(e.lang)&&(this.defaultLocale=e.lang)}static getMessage(e){return b.getInstance().getSingleMessage(e)}static setMessage(e,t,i){const s={};s[t]=i;const r=b.getInstance(),n=r.getLanguageData(e);n&&(n[t]=i)}getSingleMessage(e){const t=this.getLanguageData(this.currentlocale),i=this.getLanguageData("en"),s=Object.assign({},i,t);return s&&s.hasOwnProperty(e)?s[e]:e}getLanguageData(e){for(let t=0;t<this.languages.length;t++)if(this.languages[t].token==e)return this.languages[t].data;return this.languages.length>0?this.languages[0].data:null}getLocale(){return this.currentlocale?this.currentlocale:this.defaultLocale}setLocale(e){e||(e=this.defaultLocale),this.currentlocale!=e&&(this.currentlocale=e,this.translateAll(),j.getInstance().publish(L.LOCALE_CHANGED,this.currentlocale))}getRegisteredLanguages(){const e=[];for(let t=0;t<this.languages.length;t++)e.push(this.languages[t].token);return e}static setDataForElement(e,t){const i={};Array.isArray(t)||(t=[t]);for(let s=0;s<t.length;s++)i["data-"+String(s)]=t[s];if(e)for(const s in i)e.setAttribute(s,i[s]);b.updateElement(e)}static updateElement(e){const t=b.getInstance(),i=e.classList;for(let s=0;s<i.length;s++){const r=i[s];if(-1!==r.indexOf("i18n")){let i=t.getSingleMessage(r);i=t.setParamValuesInTranslation(i,e),e.textContent=i}}}translateAll(e){const t=this.getLanguageData(this.currentlocale),i=this.getLanguageData("en"),s=Object.assign({},i,t);let r=[];const n=e||document.getElementById("balloonContainer")||document;for(const a in s){r=n.querySelectorAll("."+a);let e=s[a];for(let t=0;t<r.length;t++){const i=r[t];e=this.setParamValuesInTranslation(e,i),a.indexOf("tooltip")===a.length-"tooltip".length?i.title=e:"input"==i.nodeName.toLowerCase()?"submit"===i.attributes.type.value||"button"===i.attributes.type.value?i.value=e:i.placeholder=e:i.innerHTML=e}}}setParamValuesInTranslation(e,t){const i=new RegExp("{[0-9]}","g"),s=e.match(i);if(s)for(let r=0;r<s.length;r++){const i=s[r].match(/{(.*)}/)[1],n=new RegExp(`{[${r}]}`,"g"),a=t.getAttribute("data-"+i);a?e=e.replace(n,a):(e=e.replace(n,""),this.logger.warning("No attribute found to replace the placeholder at element: "+t))}return e}replaceParamsInTranslation(e,t){const i=new RegExp("{[0-9]}","g"),s=e.match(i);if(s)for(let r=0;r<s.length;r++){s[r].match(/{(.*)}/)[1];const i=new RegExp(`{[${r}]}`,"g"),n=t[r];e=n?e.replace(i,n):e.replace(i,"")}return e}}var w=b;L.SELECTED_ITEM_CHANGED="SELECTED_ITEM_CHANGED",L.SELECTIONSET_CHANGED="SELECTIONSET_CHANGED";let T=null;const S=["vcs.vcm.layer.cesium.Buildings","vcs.vcm.layer.cesium.CesiumTilesetLayer","vcs.vcm.layer.TiledLayer","vcs.vcm.layer.FeatureStore","vcs.vcm.layer.Vector","vcs.vcm.layer.GeoJSON","vcs.vcm.layer.WFS"];class C{constructor(e){this.className="vcs.vcm.SelectBehavior",this.logger=v.getLogger(this.className);const t={invertClickBehaviorForCesiumMap:!(!e||!e.invertClickBehaviorForCesiumMap)&&e.invertClickBehaviorForCesiumMap,highlightStyle:{selectionset:{color:e&&e.highlightStyle&&e.highlightStyle.selectionset&&e.highlightStyle.selectionset.color?e.highlightStyle.selectionset.color:"#3F51B5"},currentItem:{color:e&&e.highlightStyle&&e.highlightStyle.currentItem&&e.highlightStyle.currentItem.color?e.highlightStyle.currentItem.color:"#F44336",pointStyle:{},lineStyle:e&&e.highlightStyle&&e.highlightStyle.currentItem&&e.highlightStyle.currentItem.lineStyle?e.highlightStyle.currentItem.lineStyle:{color:"#83f52c",width:1.25},polygonStyle:{fill:e&&e.highlightStyle&&e.highlightStyle.currentItem&&e.highlightStyle.currentItem.polygonStyle&&e.highlightStyle.currentItem.polygonStyle.fill?e.highlightStyle.currentItem.polygonStyle.fill:{color:"rgba(255,255,255,0.4)"},stroke:e&&e.highlightStyle&&e.highlightStyle.currentItem&&e.highlightStyle.currentItem.polygonStyle&&e.highlightStyle.currentItem.polygonStyle.stroke?e.highlightStyle.currentItem.polygonStyle.stroke:{color:"#83f52c",width:1}}}}};let i,s;if(e&&e.highlightStyle&&e.highlightStyle.currentItem?e.highlightStyle.currentItem.pointStyle.icon?t.highlightStyle.currentItem.pointStyle.icon=e.highlightStyle.currentItem.pointStyle.icon:e.highlightStyle.currentItem.pointStyle.circle?t.highlightStyle.currentItem.pointStyle.circle=e.highlightStyle.currentItem.pointStyle.circle:t.highlightStyle.currentItem.pointStyle={icon:{scale:1,src:"{layerIcon}"}}:t.highlightStyle.currentItem.pointStyle={icon:{scale:1,src:"{layerIcon}"}},s=t.highlightStyle.selectionset.color,i=olcs.core.convertColorToCesium(s),this._selectionsetHighlightColor=i,s=t.highlightStyle.currentItem.color,i=olcs.core.convertColorToCesium(s),this._currentItemHighlightColor=i,t.highlightStyle.currentItem.pointStyle.icon)this._currentItemHighlightPointStyle=new ol.style.Style({image:new ol.style.Icon(t.highlightStyle.currentItem.pointStyle.icon)});else{const e=t.highlightStyle.currentItem.pointStyle.circle.stroke?new ol.style.Stroke(t.highlightStyle.currentItem.pointStyle.circle.stroke):void 0,i=new ol.style.Fill(t.highlightStyle.currentItem.pointStyle.circle.fill),s=t.highlightStyle.currentItem.pointStyle.circle.radius?t.highlightStyle.currentItem.pointStyle.circle.radius:5,r=new ol.style.Circle({fill:i,radius:s,stroke:e});this._currentItemHighlightPointStyle=new ol.style.Style({image:r})}this._currentItemHighlightLineStyle=new ol.style.Style({stroke:new ol.style.Stroke(t.highlightStyle.currentItem.lineStyle)});const r={};r.stroke=new ol.style.Stroke(t.highlightStyle.currentItem.polygonStyle.stroke),r.fill=new ol.style.Fill(t.highlightStyle.currentItem.polygonStyle.fill),this._currentItemHighlightPolygonStyle=new ol.style.Style(r),this._invertClickBehaviorForCesiumMap=!!t.invertClickBehaviorForCesiumMap,this._selectionset=[],this.selectMode="toplevelfeature",this._currentItem={},this._currentItemHighlightedUnderneath=!1,this.framework=j.getInstance(),this.active=!1,this.options=t,this.activateClickBehavior(),this.framework.subscribe(L.LAYER_DEACTIVATED,this.layerDeactivatedListener.bind(this)),this.framework.subscribe(L.FEATURE_REMOVED,this.featureRemovedListener.bind(this)),this.framework.subscribe(L.MAP_ACTIVATED,this.mapActivatedListener.bind(this)),this.selectionSetLayers=this.framework.getLayers().filter(e=>S.includes(e.className)),this.framework.subscribe(L.LAYER_ACTIVATED,this.synchronizeSelectionSet.bind(this)),this.transformGeometryOnMove=!this.framework.isIE11}static getInstance(e){return T||(T=new C(e)),T}static dispose(){T=null}activateClickBehavior(){this.active||(this.active=!0,this._invertClickBehaviorForCesiumMap?(this.featureClickedKey=this.framework.subscribe(L.FEATURE_CLICKED,this.handleFeatureCTRLClickedEvent.bind(this)),this.featureCtrlClickedKey=this.framework.subscribe(L.FEATURE_CTRL_CLICKED,this.handleFeatureClickedEvent.bind(this))):(this.featureClickedKey=this.framework.subscribe(L.FEATURE_CLICKED,this.handleFeatureClickedEvent.bind(this)),this.featureCtrlClickedKey=this.framework.subscribe(L.FEATURE_CTRL_CLICKED,this.handleFeatureCTRLClickedEvent.bind(this))),this.mapClickedKey=this.framework.subscribe(L.MAP_CLICKED,this.handleMapClickedEvent.bind(this)))}deactivateClickBehavior(){this.active&&(this.active=!1,this.framework.unsubscribeByKey(this.featureClickedKey),this.framework.unsubscribeByKey(this.featureCtrlClickedKey),this.framework.unsubscribeByKey(this.mapClickedKey),this.clearCurrentItem())}isClickBehaviorActivated(){return this.logger.deprecate("isClickBehaviorActivated","check the .active property"),this.active}getInvertClickBehaviorForCesiumMap(){return this._invertClickBehaviorForCesiumMap}setInvertClickBehaviorForCesiumMap(e){this._invertClickBehaviorForCesiumMap=e,this.deactivateClickBehavior(),this.activateClickBehavior()}addToSelectionSet(e){let t=!1;const i={};e.forEach(e=>{-1===this._selectionset.indexOf(e)&&(t=!0,this._selectionset.push(e),this._currentItem&&this._currentItem.id===e?this._currentItemHighlightedUnderneath=!0:i[e]=this._selectionsetHighlightColor)}),this.selectionSetLayers.forEach(e=>{e.initialized&&e.highlight(i)}),t&&this.framework.publish(L.SELECTIONSET_CHANGED)}removeFromSelectionSet(e){let t=!1;e.forEach((function(e){const i=this._selectionset.indexOf(e);-1!==i&&(t=!0,this._currentItem&&this._currentItem.id&&this._currentItem.object?this._currentItem.id!==this._selectionset[i]?this.selectionSetLayers.forEach((function(e){e.initialized&&e.unHighlight([this._selectionset[i]])}),this):this._currentItemHighlightedUnderneath=null:this.selectionSetLayers.forEach((function(e){e.initialized&&e.unHighlight([this._selectionset[i]])}),this),this._selectionset.splice(i,1))}),this),t&&this.framework.publish(L.SELECTIONSET_CHANGED)}synchronizeSelectionSet(){const e=this._selectionset.splice(0);this.clearSelectionSet(),this.addToSelectionSet(e)}getSizeOfSelectionSet(){return this.logger.deprecate("getSizeOfSelectionSet","use getSelectionSet().length instead"),this._selectionset.length}getSelectionSet(){return this._selectionset}clearSelectionSet(){this.removeFromSelectionSet(this._selectionset.slice(0))}setCurrentItem(e,t,i){if(a(e,String),o(t,Object),i&&!/^vcs\.vcm\.layer/.test(i.className))throw new Error(`Match failed: expected ${i} to be an instanceof vcs.vcm.layer.Layer`);this.framework.publish(L.SELECTED_ITEM_CHANGED,e,t,i),this.clearCurrentItem();for(var s=0;s<this._selectionset.length;s++)this._selectionset[s]===e&&(this.selectionSetLayers.forEach((function(e){e.initialized&&e.unHighlight([this._selectionset[s]])}),this),this._currentItemHighlightedUnderneath=!0);if(i){const s={};s[e]=i.determineHighlightStyle(e,t),i.highlight(s),this._currentItem={id:e,object:t,layer:i}}else this.selectionSetLayers.forEach(i=>{const s={};s[e]=i.determineHighlightStyle(e,t),i.highlight(s)}),this._currentItem={id:e,object:t,layer:this.selectionSetLayers};t&&i&&this.passToBalloonInfo(t,i)}determineDefaultVectorHighlightStyle(e,t,i){const s=t.getGeometry(),r=t.get("olcs_extrudedHeight")||t.get("olcs_storeyNumber")&&t.get("olcs_storeyHeight");if(s instanceof ol.geom.Point||s instanceof ol.geom.MultiPoint){let s,n=t.getStyle()?t.getStyle():i.style.style,a=!1;if(n instanceof Function&&(n=n(t),a=!0),n.getImage())if(this._currentItemHighlightPointStyle.getImage()instanceof ol.style.Icon)if(n.getImage()instanceof ol.style.Icon){if(!a)if("{layerIcon}"===this._currentItemHighlightPointStyle.getImage().getSrc())n=i.style.style;else if("{featureIcon}"===this._currentItemHighlightPointStyle.getImage().getSrc()){const t=i.getFeatureById(e);n=t.getStyle()}const t=n.getImage().getImage();let r;if("canvas"===t.nodeName.toLowerCase()){const e=n.getImage().getSize();r={img:t,imgSize:[e[0],e[1]],scale:this.options.highlightStyle.currentItem.pointStyle.icon.scale?this.options.highlightStyle.currentItem.pointStyle.icon.scale:1}}else{const e=n.getImage().getSrc();r=Object.assign({},this.options.highlightStyle.currentItem.pointStyle.icon,{src:e})}s=new ol.style.Style({image:new ol.style.Icon(r)})}else{const e=n.getImage().clone(),t=this.options.highlightStyle.currentItem.pointStyle.icon.scale?e.getScale()*this.options.highlightStyle.currentItem.pointStyle.icon.scale:2*e.getScale();e.setScale(t),s=new ol.style.Style({image:e})}else this._currentItemHighlightPointStyle.getImage()instanceof ol.style.Circle&&(s=new ol.style.Style({image:this._currentItemHighlightPointStyle.getImage()}));else s=new ol.style.Style({});if(n.getText()){const e=n.getText().clone(),t=e.getScale()||1,i=this.options.highlightStyle.currentItem.pointStyle.icon.scale?t*this.options.highlightStyle.currentItem.pointStyle.icon.scale:2*t;e.setScale(i),e.setFill(this._currentItemHighlightPolygonStyle.getFill()),s.setText(e)}return r&&s.setStroke(this._currentItemHighlightLineStyle.getStroke()),s}return s instanceof ol.geom.LineString||s instanceof ol.geom.MultiLineString?r?this._currentItemHighlightPolygonStyle:this._currentItemHighlightLineStyle:this._currentItemHighlightPolygonStyle}passToBalloonInfo(e,t){const i=this.getBalloonInfoWidget();if(i){const s=t.getGenericFeatureFromClickedObject(e);s?i.createBalloonForGenericFeature(s):this.logger.warning("Could not create generic feature to pass to balloonInfo")}}getBalloonInfoWidget(){return this.balloonWidget||(this.balloonWidget=this.framework.getWidgetByType("vcs.vcm.widgets.BalloonInfo")),this.balloonWidget}clearCurrentItem(e){function t(e,t,s){e.unHighlight([t]),s&&(i={},i[t]=s,e.highlight(i))}let i;if(this._currentItem&&this._currentItem.id&&this._currentItem.layer){const e=this._currentItem.layer,i=this._currentItem.id;if(this._currentItem={},Array.isArray(e))e.forEach((function(e){const s=!!this._currentItemHighlightedUnderneath&&this._selectionsetHighlightColor;t(e,i,s)}),this);else{const s=!!this._currentItemHighlightedUnderneath&&this._selectionsetHighlightColor;t(e,i,s)}}this._currentItemHighlightedUnderneath=!1;const s=this.getBalloonInfoWidget();s&&s.clearBalloon(),e||this.framework.publish(L.SELECTED_ITEM_CHANGED,null)}getCurrentItem(){return this._currentItem}handleFeatureClickedEvent(e,t,i){this.setCurrentItem(e,t,i)}handleFeatureCTRLClickedEvent(e,t,i){-1!==this._selectionset.indexOf(e)?this.removeFromSelectionSet([e]):this.addToSelectionSet([e])}getLink(e){if(null!=this._currentItem.id&&null!=this._currentItem.layer){const t={};if(t.slLayer=this._currentItem.layer.name,t.slId=this._currentItem.id,this._currentItem.object instanceof ol.Feature){const e=this._currentItem.object.getGeometry();t.slOlT=e.getType()}e.addQueryParams(t)}}handleMapClickedEvent(){this.clearCurrentItem()}layerDeactivatedListener(e){this._currentItem.layer===e&&this.clearCurrentItem()}featureRemovedListener(e){this.removeFromSelectionSet([e.id]),this._currentItem.id===e.id&&this.clearCurrentItem()}mapActivatedListener(e){this._currentItem.layer&&this._currentItem.object&&(this._currentItem.layer.isSupported(e)?this.passToBalloonInfo(this._currentItem.object,this._currentItem.layer):this.clearCurrentItem())}}var E=C;class I{constructor(){this.key_=1,this.pendingKeys_=[],this.publishDepth_=0,this.subscriptions_=[],this.topics_={}}subscribe(e,t,i){a(e,String),a(t,Function);let s=this.topics_[e];s||(s=this.topics_[e]=[]);const r=this.key_;return this.subscriptions_[r]=e,this.subscriptions_[r+1]=t,this.subscriptions_[r+2]=i,this.key_=r+3,s.push(r),r}subscribeOnce(e,t,i){let s=!1;var r=this.subscribe(e,(function(e){s||(s=!0,this.unsubscribeByKey(r),t.apply(i,arguments))}),this);return r}unsubscribe(e,t,i){const s=this.topics_[e];if(s){const e=this.subscriptions_,r=s.find(s=>e[s+1]==t&&e[s+2]==i);if(r)return this.unsubscribeByKey(r)}return!1}unsubscribeByKey(e){const t=this.subscriptions_[e];if(t){const i=this.topics_[t];if(0!=this.publishDepth_)this.pendingKeys_.push(e),this.subscriptions_[e+1]=function(){};else{if(i){const t=i.indexOf(e);i.splice(t,1)}delete this.subscriptions_[e],delete this.subscriptions_[e+1],delete this.subscriptions_[e+2]}}return!!t}publish(e,t){const i=this.topics_[e];if(i){const e=new Array(arguments.length-1);for(var s=1,r=arguments.length;s<r;s++)e[s-1]=arguments[s];if(this.async_)for(s=0;s<i.length;s++){var n=i[s];I.runAsync_(this.subscriptions_[n+1],this.subscriptions_[n+2],e)}else{this.publishDepth_++;try{for(s=0,r=i.length;s<r;s++){n=i[s];this.subscriptions_[n+1].apply(this.subscriptions_[n+2],e)}}finally{if(this.publishDepth_--,this.pendingKeys_.length>0&&0==this.publishDepth_){let e;while(e=this.pendingKeys_.pop())this.unsubscribeByKey(e)}}}return 0!=s}return!1}clear(e){if(e){const t=this.topics_[e];t&&(t.forEach(this.unsubscribeByKey,this),delete this.topics_[e])}else this.subscriptions_.length=0,this.topics_={}}getCount(e){if(e){const t=this.topics_[e];return t?t.length:0}let t=0;for(const i in this.topics_)t+=this.getCount(i);return t}disposeInternal(){this.clear(),this.pendingKeys_.length=0}}var k=I;class D{constructor(){this.projection=null}}var O=new D;let P,A=0;const x=Symbol("VcsConfigStyle");class Y{constructor(){this.widgets={},this.maps={},this.layers={},this.viewpoints={},this.styles={},this.flights={},this.activemap=null,this.lastactivemap=null,this.startingmap="",this.startViewPoint=null,this.mapcontainer=null,this.urlParameter=null,this.pubsub=new k,this.logger=v.getLogger("vcs.vcm.Framework"),this.layerIndexCounter=0,this.numberOfLocales=0,this.initialized=!1,this.exclusiveListener={id:null,listeners:[],removedCallback:null},this.config={},this.currentLocale=null,this.libraryBasePath="",this.baseUrl="",this.isIE11=!!window.MSInputMethodContext&&!!document.documentMode}get projection(){return O.projection}static activateLogging(){Y.getInstance().logger.deprecate("Framework.activateLogging","use vcs.vcm.util.Logger.enabled instead"),v.enabled="info"}static get VCM_VERSION(){return"3.7.203-stable #c6bc47c"}static get configContentSymbol(){return x}setInitialized(e){this.initialized=e}isInitialized(){return this.initialized}static getVersion(){return/VCM_VERSION/.test(Y.VCM_VERSION)?"3.6.000-devel #12345":Y.VCM_VERSION}loadLibraries(e,t,i){this.libs||(this.libs={});const s=[];for(let n=0;n<e.length;n++){var r=e[n];""===this.libraryBasePath||t||(r=this.libraryBasePath+r),this.libs[r]||(this.libs[r]=new Promise((e,t)=>{const s=document.createElement("script");s.type="text/javascript",s.src=r,s.defer=!1,s.async=!1,s.onload=e,s.onerror=t,i&&(/\.es6\.js$/.test(r)?s.type="module":s.noModule=!0),document.head.appendChild(s)})),s.push(this.libs[r])}return Promise.all(s)}addElementsToMapContainer(){const e=document.createElement("div");e.setAttribute("id","balloonContainer"),e.classList.add("mapElement"),e.classList.add("vcm-map-top");const t=document.createElement("div");t.setAttribute("id","vcmui"),this.mapcontainer.appendChild(e),this.mapcontainer.appendChild(t),this.mapcontainer.classList.add("vcs_map_container"),this.mapcontainer.classList.add("vcm-font-default")}getConfig(e){let t=this.config;if(e){const i=e.split(".");for(let e=0;e<i.length;e+=1){const s=i[e];if("undefined"===typeof t[s])return{};t=t[s]}}return t}handleUiPlugins(e){e&&e.plugins&&Object.keys(e.plugins).forEach((function(t){const i=e.plugins[t],s=i._entry||`plugins/${t}/${t}.js`;if("_dev"!==s){const r=[s],n=i._esmodule;n&&r.unshift(s.replace(/\.js$/,".es6.js")),this.loadLibraries(r,null,n).then(()=>{this.logger.info("Loaded Plugin: "+t)}).catch(()=>{this.logger.warning("Could not find JS file for ui plugin "+t),delete e.plugins[t]})}}),this)}getI18nConfig(){return{availableLocales:this.config.availableLocales,locale:this.config.locale,i18n:this.config.i18n}}addStyle(e){this.styles[e.name]=e}getStyleByName(e){return a(e,String),this.styles[e]}getStyles(){return this.styles}addFlight(e){a(e.name,String),this.flights[e.name]=e}getFlightByName(e){return a(e,String),this.flights[e]}getFlights(){return Object.values(this.flights)}getLogger(){return this.logger}getActiveMap(){return this.activemap}addMap(e){return this.maps[e.name]?(this.logger.warning(`The map ${e.name} already exist.`),!1):(this.maps[e.name]=e,!0)}getMapByName(e){return this.maps[e]||null}getMapByType(e){return Object.values(this.maps).find(t=>t.className===e)}activateMap(e,t){let i=this.getMapByType(e);i||(i=this.getMapByName(e));const s=this.activemap?this.activemap.className:null,r=i?i.className:null;if("vcs.vcm.maps.Cesium"!==s||"vcs.vcm.maps.Openlayers"!==r)return this._activateMapHandler(i,t);{const e=this.activemap.getViewPoint();if(e)return i.fixedNorthOrientation&&(e.heading=0),e.pitch=-90,e.animate=!0,e.groundPosition&&(e.cameraPosition=null),new Promise(s=>{this.activemap.gotoViewPoint(e,1,null,()=>{const e={listener:null};e.listener=this.activemap.getScene().postRender.addEventListener(()=>{e.listener&&e.listener(),s(this._activateMapHandler(i,t))})})})}return Promise.reject()}_synchronizeLayers(){const e=Object.values(this.layers).map(e=>{if(e.isSupported()){if(e.isCommonLayer())return e.synchronize(this.activemap,this.lastactivemap);if(!e.initialized&&e.activeOnStartup&&"vcs.vcm.layer.oblique.ObliqueLayer"!==e.className)return e.activate()}return Promise.resolve()});return Promise.all(e.map(e=>e.catch(e=>e)))}async _activateMapHandler(e,t){if(e){let i=t;if(this.activemap){if(this.activemap.name===e.name)return i?this.activemap.gotoViewPoint(i):void 0;i||(i=await this.activemap.getViewPoint(!0,!0));const s=await e.canShowViewpoint(i);if(!s){const{fallbackMap:i}=e;if(i)return this.publish(L.MAP_FALLBACK_ACTIVATED,e),await this._activateMapHandler(i,t)}await this.activemap.deactivate(),this.lastactivemap=this.activemap}this.activemap=e,await this.activemap.activate(),e.active&&(await this._synchronizeLayers(),i&&await this.activemap.gotoViewPoint(i),this.publish(L.MAP_ACTIVATED,e))}}getMaps(){return Object.values(this.maps)}addViewPoint(e){this.viewpoints[e.name]=e}getViewPointByName(e){for(const t in this.viewpoints)if(this.viewpoints.hasOwnProperty(t)&&this.viewpoints[t].name==e)return this.viewpoints[t];return null}getViewPoints(){const e=[];for(const t in this.viewpoints)this.viewpoints.hasOwnProperty(t)&&e.push(this.viewpoints[t]);return e}getStartViewPoint(){return this.startViewPoint}addLayer(e){return this.layers[e.name]?(this.logger.warning("Could not add Layer with same name twice, make sure the LayerName is unique"),!1):(this.layers[e.name]=e,e.index=this.layerIndexCounter,this.layerIndexCounter+=1,this.getActiveMap()&&!e.initialized&&e.activeOnStartup&&e.activate(),!0)}removeLayerByName(e){const t=this.getLayerByName(e);t&&(t.dispose(),this.removeLayer(t))}removeLayer(e){this.layers[e.name]&&delete this.layers[e.name]}getLayerByName(e){return this.layers[e]||null}getLayers(){return Object.values(this.layers)}addWidget(e){return this.widgets[e.name]?(this.logger.warning("Could not add Widget with same name twice, make sure the widgetname is unique"),!1):(this.widgets[e.name]=e,!0)}getWidgetByName(e){return this.logger.deprecate("getWidgetByName","use getWidgetByType instead"),this.widgets[e]||null}getWidgetsByType(e){return Object.values(this.widgets).filter(t=>t.className===e)}getWidgets(){return Object.values(this.widgets)}setStartViewPoint(e){this.startViewPoint=e}getMapContainer(){return this.mapcontainer}getWidgetByType(e){return Object.values(this.widgets).find(t=>t.className===e)}subscribe(e,t,i){return this.pubsub.subscribe(e,t,i)}subscribeOnce(e,t,i){return e?this.pubsub.subscribeOnce(e,t,i):null}subscribeExclusive(e,t,i,s,r){a(e,[String,L]),a(t,Function),a(i,String),o(s,Function),this.setExclusive(i,s);const n=this.pubsub.subscribe(e,t,r);return this.exclusiveListener.listeners.push(n),n}subscribeOnceExclusive(e,t,i,s,r){let n;a(e,[String,L]),a(t,Function),a(i,String),o(s,Function),this.setExclusive(i,s);const l=function(){this.exclusiveListener.listeners=this.exclusiveListener.listeners.filter(e=>e!==n),0===this.exclusiveListener.listeners.length&&this.clearExclusive(),t.call(r,...arguments)};return n=this.pubsub.subscribeOnce(e,l,this),this.exclusiveListener.listeners.push(n),n}setExclusive(e,t){if(null!==this.exclusiveListener.id&&this.exclusiveListener.id!==e){this.exclusiveListener.removedCallback&&this.exclusiveListener.removedCallback();while(this.exclusiveListener.listeners.length>0)this.unsubscribeByKey(this.exclusiveListener.listeners.shift())}E.getInstance().deactivateClickBehavior(),this.exclusiveListener.id=e,this.exclusiveListener.removedCallback=t}clearExclusive(){E.getInstance().activateClickBehavior(),this.exclusiveListener.id=null,this.exclusiveListener.removedCallback=null}unsubscribe(e,t,i){this.logger.deprecate("unsubscribe","use the unsubscribeByKey mechanic"),this.pubsub.unsubscribe(e,t,i)}unsubscribeByKey(e){const t=this.exclusiveListener.listeners.indexOf(e);t>-1&&(this.exclusiveListener.listeners.splice(t,1),0===this.exclusiveListener.listeners.length&&this.clearExclusive()),this.pubsub.unsubscribeByKey(e)}publish(e,...t){this.logger.debug("Published: "+e,...t),this.pubsub.publish.apply(this.pubsub,arguments)}static getInstance(){return P||(P=new Y),P}getLocale(){return this.currentLocale}getLocales(){return w.getInstance().getRegisteredLanguages()}setLocale(e){this.currentLocale!==e&&(this.currentLocale=e,w.getInstance().setLocale(this.currentLocale))}setProjection(e){this.logger.deprecate("setProjection","Framework Projection is not settable, change Config"),O.projection=e}getProjection(){return this.logger.deprecate("getProjection","Access the property projection directly"),this.projection}getSelectBehavior(){return E.getInstance()}getNextUniqueId(){return":"+(A++).toString(36)}isMobile(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}dispose(){if(P){const e=Y.getInstance();e.isInitialized()&&(Object.values(this.layers).forEach(e=>e.dispose()),Object.values(this.maps).forEach(e=>e.dispose()),Object.values(this.widgets).forEach(e=>e.dispose()),this.widgets={},this.maps={},this.layers={},this.viewpoints={},this.startViewPoint=null,this.activemap=null,this.startingmap="",this.pubsub=new k,this.mapcontainer=null),P=void 0}}}var j=Y;let N=null;class F{constructor(){this.layers=new Map,this._listeners=[];const e=j.getInstance();this._listeners.push(e.subscribe(L.LAYER_ACTIVATED,this.handleLayerActivated,this)),this._listeners.push(e.subscribe(L.SPLIT_DIRECTION_CHANGED,this.handleSplitDirectionChanged,this))}registerLayer(e){const t=e.exclusiveGroup;if(t){this.layers.has(t)||this.layers.set(t,new Set);const i=this.layers.get(t);i.add(e),j.getInstance().initialized&&e.active&&this.handleLayerActivated(e)}}unregisterLayer(e){const t=e.exclusiveGroup;t&&this.layers.has(t)&&this.layers.get(t).delete(e)}handleSplitDirectionChanged(e){e.active&&this.handleLayerActivated(e)}handleLayerActivated(e){if(e.exclusiveGroup&&this.layers.has(e.exclusiveGroup)){const t=e.splitDirection||0;this.layers.get(e.exclusiveGroup).forEach(i=>{i===e||t&&i.splitDirection&&i.splitDirection!==t||i.deactivate()})}}getActiveLayersForGroup(e){const t=this.layers.get(e);if(t){const e=[];return t.forEach(t=>{t.active&&e.push(t)}),e}return[]}destroy(){N=null;const e=j.getInstance();this._listeners.forEach(t=>{e.unsubscribeByKey(t)}),this._listeners=[],this.layers.clear()}}function R(){return N||(N=new F),N}i(12);var H=i(6),G=i.n(H);const z=ol.proj.getTransform("EPSG:4326","EPSG:3857"),B=ol.proj.getTransform("EPSG:3857","EPSG:4326"),V=v.getLogger("vcs.vcm.util.Projection");class U{constructor(e={}){this._proj4=null;let t="";if(e.epsg&&(t=U.parseEPSGCode(e.epsg),t&&(e.proj4&&(this._proj4=e.proj4,proj4.defs(t,e.proj4)),e.alias&&Array.isArray(e.alias)))){const i=e.alias;i.forEach(e=>{proj4.defs(e,proj4.defs(t))},this)}this._epsg=t,this.proj||(this._epsg=O.projection?O.projection.epsg:"EPSG:4326")}get epsg(){return this._epsg}get proj4(){return this._proj4}get proj(){return ol.proj.get(this.epsg)}getProjection(){return V.deprecate("getProjection","Access the property proj directly"),this.proj}getEPSG(){return V.deprecate("getEPSG","Access the property epsg directly"),this.epsg}getPROJ4(){return V.deprecate("getPROJ4","Access the property proj4 directly"),this.proj4}static transform(e,t,i){const s=ol.proj.getTransform(t.proj,e.proj),r=new Array(2);return s([i[0],i[1]],r,2),i.length>2&&r.push(i[2]),r}transformTo(e,t){return U.transform(e,this,t)}static transformCoordinates(e,t,i){const s=[];for(let r=0;r<i.length;r++)s.push(U.transform(e,t,i[r]));return s}static getTransformer(e,t){return ol.proj.getTransform(t.proj,e.proj)}transformFrom(e,t){return U.transform(this,e,t)}getConfigObject(){const e={epsg:this.epsg};return this.proj4&&(e.proj4=this.proj4),e}static createGeographicProjection(){return V.deprecate("createGeographicProjection","use vcs.vcm.util.wgs84Projection"),new U({epsg:4326})}static createMercatorProjection(){return V.deprecate("createMercatorProjection","use vcs.vcm.util.mercatorProjection"),new U({epsg:3857})}static parseUrlParameter(e){const{epsg:t,proj4:i}=e;return new U({epsg:t,proj4:i})}static mercatorToWgs84(e,t){return B(e,t?e:void 0,e.length)}static wgs84ToMercator(e,t){return z(e,t?e:void 0,e.length)}static validateOptions(e){let t=null;if(e.epsg)try{t=proj4(U.parseEPSGCode(e.epsg))}catch(i){t=null}if(e.proj4)try{t=proj4(e.proj4)}catch(i){t=null}return null!=t}static parseEPSGCode(e,t="EPSG:"){const i=(""+e).match(/^(?:epsg:)?(\d+)/i);return i&&i[1]?`${t}${i[1]}`:""}}var W=U;const q=new U({epsg:4326}),J=new U({epsg:3857});let K=1;class Z{static get interactionTypeCounter(){return K}static getNextBit(e){return e<<1}}const Q={NONE:K=Z.getNextBit(K),ALT:K=Z.getNextBit(K),CTRL:K=Z.getNextBit(K),SHIFT:K=Z.getNextBit(K),ALL:0};Q.ALL=Q.NONE|Q.ALT|Q.CTRL|Q.SHIFT;const X={NONE:0,CLICK:K=Z.getNextBit(K),DBLCLICK:K=Z.getNextBit(K),DRAG:K=Z.getNextBit(K),DRAGSTART:K=Z.getNextBit(K),DRAGEND:K=Z.getNextBit(K),MOVE:K=Z.getNextBit(K),DRAGEVENTS:0,CLICKMOVE:0,ALL:0};X.DRAGEVENTS=X.DRAG|X.DRAGEND|X.DRAGSTART,X.CLICKMOVE=X.CLICK|X.MOVE,X.ALL=Object.values(X).reduce((e,t)=>e|t,0);const $={LEFT:K=Z.getNextBit(K),RIGHT:K=Z.getNextBit(K),MIDDLE:K=Z.getNextBit(K),ALL:0};$.ALL=$.LEFT|$.RIGHT|$.CENTER;let ee=0;function te(){return ee+=1,ee}class ie{constructor(){this.id=te(),this._defaultActive=X.NONE,this.active=this._defaultActive,this._defaultModificationKey=Q.NONE,this.modificationKey=this._defaultModificationKey,this._defaultPointerKey=$.LEFT,this.pointerKey=this._defaultPointerKey}initialize(){this.handleMapChange(j.getInstance().getActiveMap())}handleMapChange(e){}pipe(e){return this.pipeThrough(e)}pipeThrough(e){return Promise.resolve(e)}setActive(e){"undefined"===typeof e?(this.active=this._defaultActive,this.modificationKey=this._defaultModificationKey,this.pointerKey=this._defaultPointerKey):this.active="boolean"===typeof e?e?this._defaultActive:X.NONE:e}setModification(e){this.modificationKey=e||this._defaultModificationKey}setPointer(e){this.pointerKey=e||this._defaultPointerKey}}var se=ie;class re extends se{constructor(e){super(),this.chain=e||[],this._defaultActive=X.ALL,this._defaultModificationKey=Q.ALL,this._defaultPointerKey=$.ALL,this.setActive()}addInteraction(e,t){null!=t?this.chain.splice(t,0,e):this.chain.push(e)}removeInteraction(e){const t=this.chain.findIndex(t=>t.id===e.id);return t>-1&&this.chain.splice(t,1),t}initialize(){this.chain.forEach(e=>{e.initialize()})}handleMapChange(e){this.chain.forEach(t=>{t.handleMapChange(e)})}pipe(e){let t=Promise.resolve(e);const i=this.chain.length;for(let s=0;s<i;s++){const i=this.chain[s];i.active&e.type&&i.modificationKey&e.key&&i.pointerKey&e.pointer&&(t=t.then(function(e){return e.stopPropagation?Promise.resolve(e):this.pipe(e)}.bind(i)))}return t}setModification(){this.modificationKey=this._defaultModificationKey}setPointer(){this.pointerKey=this._defaultPointerKey}}var ne=re;class ae{constructor(e){this.className=e.className?e.className:"vcs.vcm.Framework",this.id=Object(c["c"])(),this.framework=j.getInstance(),this.options=e,this.logger=v.getLogger(this.className),this.name=e.name||Object(c["c"])()}getClassName(){return this.logger.deprecate("getClassName","Access the property className directly"),this.className}getName(){return this.logger.deprecate("getName","Access the property name directly"),this.name}getId(){return this.logger.deprecate("getId","Use name property as a unique identifier"),this.id}getConfigObject(){return{type:this.className,name:this.name}}}var oe=ae;L.MAP_ACTIVATED="MAP_ACTIVATED",L.MAP_CLICKED="MAP_CLICKED",L.CLICKED="CLICKED",L.CLICKED_FIRST_HIT="CLICKED_FIRST_HIT",L.FEATURE_CLICKED="FEATURE_CLICKED",L.FEATURE_CTRL_CLICKED="FEATURE_CTRL_CLICKED",L.CLUSTER_CLICKED="CLUSTER_CLICKED",L.MAP_FALLBACK_ACTIVATED="MAP_FALLBACK_ACTIVATED";const le={};class ce extends oe{static get specificLayerImpl(){return le}constructor(e){super(e),this.mapElement=document.createElement("div"),this.mapElement.setAttribute("id",Object(c["c"])()),this.framework.getMapContainer().appendChild(this.mapElement),this.mapElement.classList.add("mapElement"),this.mapElement.classList.add("vcm-map-top"),this.hide(),this.supportedlayers=[],this.active=!1,this.initialized=!1,this.layerState={},this.layerStateObject={state:!1},this.movementDisabled=!1,this._fallbackMap=e.fallbackMap||null}get fallbackMap(){if(this._fallbackMap){const e=this.framework.getMapByName(this._fallbackMap);if(e&&e!==this)return e;this.logger.warning(`the fallback map with the name: ${this._fallbackMap} is missconfigured`),this._fallbackMap=null}return null}set fallbackMap(e){o(e,ce),this._fallbackMap=e?e.name:null}isSupported(){return this.logger.deprecate("isSupported","all maps are always supported, there is no need for this check"),!0}isInitialized(){return this.logger.deprecate("isInitialized","access the initialized property directly"),this.initialized}static registerSpecificLayerImpl(e,t,i){ce.specificLayerImpl[e]||(ce.specificLayerImpl[e]={}),ce.specificLayerImpl[e][t]=i}static createSpecificLayerImpl(e,t){return ce.specificLayerImpl[e.className][t.className]?new ce.specificLayerImpl[e.className][t.className](t.options):null}raiseClickEvent(e,t,i,s,r){if(t&&i&&null!=s){const n={longitude:t,latitude:i,height:s};r&&(n.obliqueParameters=r),this.framework.publish(e,n)}}raiseClickedFirstHitEvent(e){e.latitude&&e.longitude&&e.height&&this.framework.publish(L.CLICKED_FIRST_HIT,e)}isActive(){return this.logger.deprecate("isActive","access the active property instead."),this.active}setLayerLoading(e,t){this.layerState[e.name]=t,this.layerStateObject.state=Object.values(this.layerState).some(e=>e)}canShowViewpoint(e){return Promise.resolve(!0)}activate(e){return Promise.resolve()}deactivate(){this.active=!1;const e=this.getViewPoint();return this.hide(),Promise.resolve(e)}show(){if(null!==this.mapElement){this.mapElement.style.display="";const e=this.className.substr(this.className.lastIndexOf(".")+1,this.className.length);this.framework.getMapContainer().classList.add(e)}}hide(){if(null!==this.mapElement){this.mapElement.style.display="none";const e=this.className.substr(this.className.lastIndexOf(".")+1,this.className.length);this.framework.getMapContainer().classList.remove(e)}}supportsLayer(e){return null!=e&&this.supportedlayers.includes(e.type)}disableMovement(e){this.movementDisabled=e}gotoViewPoint(e,t,i,s){return Promise.resolve()}getViewPoint(e,t){throw new Error}dispose(){this.mapElement.parentElement.removeChild(this.mapElement),this.mapElement=null}pointIsVisible(e){return!1}getLink(e){return e.addQueryParams({startingmap:this.name}),this.getViewPoint(!0,!0).then(t=>(t.getLink(e),e))}handleURLParameter(e){}requestRender(){}}var ue=ce;i(41);const he=v.getLogger("vcs.vcm.util.ViewPoint");class de{constructor(e){this.name=e.name?e.name:Object(c["c"])(),this.cameraPosition=null,Array.isArray(e.cameraPosition)&&3===e.cameraPosition.length&&(this.cameraPosition=e.cameraPosition.map(e=>Number(e))),this.groundPosition=null,Array.isArray(e.groundPosition)&&(this.groundPosition=e.groundPosition.map(e=>Number(e))),this.distance=null!=e.distance?e.distance:null,"string"===typeof this.distance&&(this.distance=Number(this.distance)),this.heading=Object(c["g"])(e.heading,0),this.pitch=Object(c["g"])(e.pitch,-90),this.roll=Object(c["g"])(e.roll,0),this.animate=Object(c["e"])(e.animate,!1),this.duration=e.duration||null,this.easingFunctionName=e.easingFunctionName||null}get easingFunction(){return this.easingFunctionName?Cesium.EasingFunction[this.easingFunctionName]:null}getConfigObject(){return{name:this.name,distance:this.distance,cameraPosition:this.cameraPosition?this.cameraPosition.slice():null,groundPosition:this.groundPosition?this.groundPosition.slice():null,heading:this.heading,pitch:this.pitch,roll:this.roll,animate:this.animate,duration:this.duration,easingFunctionName:this.easingFunctionName}}clone(){return new de(this.getConfigObject())}getName(){return he.deprecate("getName","Access the property name directly"),this.name}getCameraPosition(){return he.deprecate("getCameraPosition","Access the property cameraPosition directly"),this.cameraPosition}setCameraPosition(e){he.deprecate("setCameraPosition","Access the property cameraPosition directly"),this.cameraPosition=e}getAnimate(){return he.deprecate("getAnimate","Access the property animate directly"),this.animate}setAnimate(e){he.deprecate("setAnimate","Access the property animate directly"),this.animate=e}getGroundPosition(){return he.deprecate("getGroundPosition","Access the property groundPosition directly"),this.groundPosition}setGroundPosition(e){he.deprecate("setGroundPosition","Access the property groundPosition directly"),this.groundPosition=e}getDistance(){return he.deprecate("getDistance","Access the property distance directly"),this.distance}setDistance(e){he.deprecate("setDistance","Access the property distance directly"),this.distance=e}getHeading(){return he.deprecate("getHeading","Access the property heading directly"),this.heading}setHeading(e){he.deprecate("setHeading","Access the property heading directly"),this.heading=e}getPitch(){return he.deprecate("getPitch","Access the property pitch directly"),this.pitch}setPitch(e){he.deprecate("setPitch","Access the property pitch directly"),this.pitch=e}getRoll(){return he.deprecate("getRoll","Access the property roll directly"),this.roll}setRoll(e){he.deprecate("setRoll","Access the property roll directly"),this.roll=e}toString(){const e=`ViewPoint: [Ground:${String(this.groundPosition?this.groundPosition:null)}][Camera:${String(this.cameraPosition?this.cameraPosition:null)}][Distance:${this.distance}][heading:${this.distance}][pitch:${this.distance}][roll:${this.distance}]`;return e}static createViewPointFromExtent(e){if(e&&4===e.length){const t=e[0],i=e[1],s=e[2],r=e[3],n=[(s-t)/2+t,(r-i)/2+i];let a=0;const o=Math.max(s-t,r-i);return a=o<.001?400:3e5*o,new de({name:"viewpointFromExtend",distance:a,groundPosition:n,heading:360,pitch:-90,roll:0,animate:!0})}return null}static parseURLparameter(e){let{cameraPosition:t,groundPosition:i}=e;if(null!=t&&(t=t.split(",").map(e=>Number(e))),null!=i&&(i=i.split(",").map(e=>Number(e))),null!=e.epsg){const s=W.parseUrlParameter(e),r=q;i&&(i=W.transform(r,s,i)),t&&(t=W.transform(r,s,t))}const s={cameraPosition:t,groundPosition:i,distance:Number(e.distance),pitch:Number(e.pitch),heading:Number(e.heading),roll:Number(e.roll)};return new de(s)}getLink(e){const t={};let i="",s=this.groundPosition,r=this.cameraPosition;if(null!=e.queryParams.epsg){const t=q,i=new W({epsg:e.queryParams.epsg});s&&(s=W.transform(i,t,this.groundPosition)),r&&(r=W.transform(i,t,this.cameraPosition))}r&&(r.forEach(e=>{i+=e.toFixed(5)+","}),i=i.slice(0,-1),t.cameraPosition=i),i="",s&&(s.forEach(e=>{i+=e.toFixed(5)+","}),i=i.slice(0,-1),t.groundPosition=i),null!=this.distance&&(t.distance=this.distance.toFixed(2)),null!=this.pitch&&(t.pitch=this.pitch.toFixed(2)),null!=this.heading&&(t.heading=this.heading.toFixed(2)),null!=this.roll&&(t.roll=this.roll.toFixed(2)),e.addQueryParams(t)}isValid(){try{let t=!1,i=!1;try{t=!a(this.cameraPosition,[Number])&&3===this.cameraPosition.length}catch(e){i=!a(this.groundPosition,[Number])&&this.groundPosition.length>1&&this.groundPosition.length<4}if(!t&&!i)throw new Error("Viewpoint is missing position");return i&&a(this.distance,Number),a(this.heading,Number),a(this.pitch,Number),a(this.roll,Number),!0}catch(e){return!1}}}var me=de;i(569);let ge=null;class pe{constructor(){this.className="vcs.vcm.NavigationMode",this.logger=v.getLogger(this.className),this.timeLastTick=null,this.lookFactor=.05,this.moveFactor=1,this.framework=j.getInstance(),this.allowHeightChanges=!1,this.useAbsoluteHeight=!1,this.referenceHeight=1.6,this.navActive=!1,this.initialized=!1,this.clockListenerRemover=null,this.boundClockTickHandler=this.clockOnTickHandler.bind(this),this.values={referenceHeight:this.referenceHeight,active:!1,walkmode:!1},this.flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,increaseFOV:!1,decreaseFOV:!1,rotation:!1,tiltUp:!1,tiltDown:!1,rotateEast:!1,rotateWest:!1},this.heading=null,this.defaultFOV=null}setOptions(e){this.referenceHeight=e.referenceHeight||this.referenceHeight,this.moveFactor=e.moveFactor||this.moveFactor}static getInstance(){return ge||(ge=new pe),ge}static dispose(){ge=null}getLink(e){const t=this.framework.getActiveMap();this.navActive&&"vcs.vcm.maps.Cesium"===t.className&&e.addQueryParams({nav_uah:this.useAbsoluteHeight,nav_ahc:this.allowHeightChanges,nav_rh:this.referenceHeight})}handleURLParameter(e){e.nav_rh&&(this.referenceHeight=e.nav_rh,this.values.referenceHeight=this.referenceHeight,this.activateFirstPersonMode(null,null,null,e.nav_ahc,e.nav_uah))}isActive(){return this.logger.deprecate("isActive","access the navActive property directly"),this.navActive}setFlags(e){Object.entries(e).forEach(([e,t])=>{null!=this.flags[e]&&(this.flags[e]=t)})}setFlag(e,t){this.logger.deprecate("setFlag","access the flags property directly."),this.flags[e]=t}activateFirstPersonMode(e,t,i,s,r){const n=this.framework.getActiveMap();if("vcs.vcm.maps.Cesium"===n.className){if(this.activateOverviewControls(!1),this.useAbsoluteHeight=r||!1,this.allowHeightChanges="boolean"===typeof s?s:this.allowHeightChanges,e){e.animate=!0,e.duration=t||e.duration;const s=i||null;this.navActive=!1,n.gotoViewPoint(e,null,s).then(()=>{this.navActive=!0,this.activateFirstPersonControls(!0)})}else this.navActive=!0,this.activateFirstPersonControls(!0);Object.keys(this.flags).forEach(e=>{this.flags[e]=!1}),this.values.walkmode=!0}else this.logger.warning("First person mode only available on Cesium (3D) map")}activateOverviewMode(e,t,i){const s=this.framework.getActiveMap();if("vcs.vcm.maps.Cesium"===s.className)if(this.useAbsoluteHeight=!1,this.values.referenceHeight=1.6,this.navActive=!1,this.values.walkmode=!1,this.activateFirstPersonControls(!1),e){e.animate=!0,e.duration=t||e.duration;const r=i||null;s.gotoViewPoint(e,null,r).then(()=>{this.activateOverviewControls(!0)})}else this.activateOverviewControls(!0);else this.logger.warning("First person mode only available on Cesium (3D) map")}activateFirstPersonControls(e){if(e&&this.navActive)if(this.initializeCesium()){const e=this.cesiumMap.getViewPoint(!1),t=this.cesiumScene.globe.getHeight(Cesium.Cartographic.fromDegrees(e.cameraPosition[0],e.cameraPosition[1]));this.useAbsoluteHeight&&(this.values.referenceHeight=e.cameraPosition[2]-t),this.correctCurrentHeight(t),this.cesiumHandler.setInputAction(e=>{this.flags.looking=!0,this.startMousePosition=Cesium.Cartesian3.clone(e.position),this.mousePosition=this.startMousePosition},Cesium.ScreenSpaceEventType.LEFT_DOWN),this.cesiumHandler.setInputAction(e=>{this.mousePosition=e.endPosition},Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.cesiumHandler.setInputAction(()=>{this.flags.looking=!1},Cesium.ScreenSpaceEventType.LEFT_UP),this.clockListenerRemover&&this.clockListenerRemover(),this.clockListenerRemover=this.cesiumViewer.clock.onTick.addEventListener(this.boundClockTickHandler)}else this.logger.warning("Could not initialize, is Cesium active");else this.initialized&&(null!==this.defaultFOV&&(this.cesiumViewer.camera.frustum.fov=this.defaultFOV),this.clockListenerRemover&&this.clockListenerRemover(),this.cesiumHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOWN),this.cesiumHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_UP),this.cesiumHandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE))}initializeCesium(){return this.initialized||(this.cesiumMap=this.framework.getMapByType("vcs.vcm.maps.Cesium"),this.cesiumMap&&(this.cesiumViewer=this.cesiumMap.getCesiumWidget(),this.defaultFOV=this.cesiumViewer.camera.frustum.fov,this.cesiumScene=this.cesiumMap.getScene(),this.cesiumCanvas=this.cesiumScene.canvas,this.cesiumCanvas.setAttribute("tabindex","0"),this.cesiumCanvas.onclick=function(){this.cesiumCanvas.focus()}.bind(this),this.cesiumHandler=new Cesium.ScreenSpaceEventHandler(this.cesiumCanvas),this.cesiumEllipsoid=this.cesiumScene.globe.ellipsoid,this.initialized=!0)),!0}activateOverviewControls(e){this.initializeCesium()?(this.cesiumScene.screenSpaceCameraController.enableRotate=e,this.cesiumScene.screenSpaceCameraController.enableTranslate=e,this.cesiumScene.screenSpaceCameraController.enableZoom=e,this.cesiumScene.screenSpaceCameraController.enableTilt=e,this.cesiumScene.screenSpaceCameraController.enableLook=e):this.logger.warning("Could not initialize, is Cesium active")}clockOnTickHandler(e){if(this.cesiumMap.movementDisabled)return;let t=this.timeLastTick?e.currentTime.secondsOfDay-this.timeLastTick.secondsOfDay:1/60;(t<=0||t>1)&&(t=1/60);const i=t/(1/60);this.timeLastTick=e.currentTime;const{camera:s}=this.cesiumViewer,r=this.lookFactor*i;if(this.flags.increaseFOV&&(s.frustum.fov=s.frustum.fov+.01>=5*Math.PI/8?s.frustum.fov:s.frustum.fov+.01),this.flags.decreaseFOV&&(s.frustum.fov=s.frustum.fov-.01<=Math.PI/10?Math.PI/10:s.frustum.fov-.01),this.flags.looking){const e=this.cesiumCanvas.clientWidth,t=this.cesiumCanvas.clientHeight,i=(this.mousePosition.x-this.startMousePosition.x)/e,n=-(this.mousePosition.y-this.startMousePosition.y)/t;s.look(s.position,r*i),s.lookUp(n*r)}if(this.flags.rotation&&s.look(s.position,r/10),this.flags.tiltUp&&s.lookUp(r/10),this.flags.tiltDown&&s.lookUp(-r/10),this.flags.rotateEast&&s.look(s.position,r/10),this.flags.rotateWest&&s.look(s.position,-r/10),null!==this.heading){const e=Cesium.Math.toRadians(this.heading)-s.heading;s.look(s.position,e),this.heading=null}const n=this.cesiumEllipsoid.cartesianToCartographic(s.position).height;let a=this.cesiumScene.globe.getHeight(this.cesiumEllipsoid.cartesianToCartographic(s.position));a&&!this.useAbsoluteHeight||(a=n-this.referenceHeight);const o=(n-a)/30*i*this.moveFactor,l={heading:s.heading,pitch:s.pitch,roll:0},c=Cesium.Math.PI/2-.1;l.pitch>c&&(l.pitch=c),s.setView({orientation:{heading:s.heading,pitch:0,roll:0}}),this.flags.moveForward&&s.moveForward(o),this.flags.moveBackward&&s.moveBackward(o),this.flags.moveUp&&(this.referenceHeight+=o/2,this.values.referenceHeight=Number(this.referenceHeight.toFixed(2))),this.flags.moveDown&&(this.referenceHeight-=o/2,this.referenceHeight<1&&(this.referenceHeight=1),this.values.referenceHeight=Number(this.referenceHeight.toFixed(2))),this.flags.moveLeft&&s.moveLeft(o),this.flags.moveRight&&s.moveRight(o),this.correctCurrentHeight(a,l)}correctCurrentHeight(e,t){const{camera:i}=this.cesiumViewer,s=t||{heading:i.heading,pitch:i.pitch,roll:0};let r;if(null==e||this.allowHeightChanges)i.setView({orientation:s});else{const{positionCartographic:t}=i,n=Number.parseFloat(this.values.referenceHeight.toString());Number.isNaN(n)||n.toFixed(2)===this.referenceHeight.toFixed(2)||(this.referenceHeight=n),this.values.referenceHeight=Number(this.referenceHeight.toFixed(2)),t.height=e+this.referenceHeight,r=Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),i.setView({destination:r,orientation:s})}}setValues(e){a(e,{referenceHeight:Number,active:Boolean,walkmode:Boolean},!1),this.values=e}setHeading(e){this.logger.deprecate("setHeading","set the heading property instead"),this.heading=e}}var fe=pe;const ye=v.getLogger("vcs.vcm.util.Extent");function _e(e){return!(!e||!Array.isArray(e)||4!==e.length)&&(!!(Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2])&&Number.isFinite(e[3]))&&(e[0]<=e[2]&&e[1]<=e[3]))}class ve{constructor(e={}){this.projection=new W({epsg:e.epsg,proj4:e.proj4,alias:e.alias}),this.extent=e.coordinates||this.projection.proj.getExtent()}get inputCoordinates(){return ye.deprecate("inputCoordinates","use .extent instead"),this.extent}set inputCoordinates(e){ye.deprecate("inputCoordinates","use .extent instead"),this.extent=e}getProjection(){return ye.deprecate("getProjection","access the .projection property directly"),this.projection}getCoordinatesInProjection(e,t){if(e.epsg===this.projection.epsg){const e=t?t.splice(0,4,...this.extent):this.extent.slice();return e}const i=W.getTransformer(e,this.projection),s=t||[];return i(this.extent,s,2),s}isValid(){return _e(this.extent)}getConfigObject(){return Object.assign({coordinates:this.extent.slice()},this.projection.getConfigObject())}clone(){return new ve(this.getConfigObject())}static validateOptions(e){return W.validateOptions(e)&&_e(e.coordinates)}static get WGS_84_EXTENT(){return[-180,-90,180,90]}}var Le=ve;const Me={VECTOR:"vector",DECLARATIVE:"declarative",REFERENCE:"reference"};class be{constructor(e){this.className=e.className||"vcs.vcm.util.style.StyleItem",this.name=e.name||e.id||Object(c["c"])(),this.title=e.title||this.name.toString(),this.legend=e.legend||[],this.supportedLayers=[],this.cesiumStyle=new Cesium.Cesium3DTileStyle({show:!0}),this.styleChanged=new Cesium.Event,this.colorBlendMode=Object(c["f"])(e.colorBlendMode,Cesium.Cesium3DTileColorBlendMode,Cesium.Cesium3DTileColorBlendMode.HIGHLIGHT),this.style=null}isSupported(e){return 0===this.supportedLayers.length||this.supportedLayers.indexOf(e)>-1}getOptions(e){return e&&e.meta?{name:this.name.toString(),title:this.title,legend:this.legend.length?this.legend:void 0}:{}}clone(e){return e}assign(e){return e}getReference(){return{type:Me.REFERENCE,name:this.name.toString()}}_styleChanged(){this.styleChanged.raiseEvent()}}var we=be;const Te=v.getLogger("vcs.vcm.util.style.StyleHelpers"),Se={NWSE:1,SWNE:2,DIAGONALCROSS:3,NS:4,WE:5,CROSS:6};function Ce(e,t){let i=e.substring(1);return 3===i.length&&(i=i.replace(/([\w\d])/g,"$1$1")),[parseInt(i.substring(0,2),16),parseInt(i.substring(2,4),16),parseInt(i.substring(4,6),16),null!=t?t:1]}function Ee(e){const t=e.toBytes();return t[3]/=255,t}function Ie(e){if(Array.isArray(e))return 3===e.length&&e.push(1),e;if("string"===typeof e){if(/^#/.test(e))return Ce(e);if(/^rgba?\((\d+(,\s?)?){3}((0|1)(\.\d+)?)?\)/.test(e)){const t=e.replace(/^rgba?\(([\s\S]+?)\)/,"$1").replace(/\s/,"").split(",").map(e=>Number(e));return 3===t.length&&t.push(1),t}}if(e instanceof CanvasPattern)return[255,255,255,.4];throw new Error("Cannot parse color "+e)}function ke(e){return`rgba(${Ie(e).join(",")})`}function De(e,t){const i=ol.has.DEVICE_PIXEL_RATIO,s=t||document.createElement("canvas");t&&s.width||(s.width=(e.pattern.size||10)*i,s.height=(e.pattern.size||10)*i);const r=s.getContext("2d"),n=s.width;function a(t,i){r.strokeStyle=ke(e.pattern.color),r.lineWidth=e.pattern.width,r.lineCap="square",r.beginPath(),r.moveTo(t[0],t[1]),r.lineTo(i[0],i[1]),r.stroke()}switch(r.fillStyle=ke(e.color),r.fillRect(0,0,n,n),e.pattern.type){case 1:a([n/2,n],[n,n/2]),a([0,n/2],[n/2,0]);break;case 2:a([n/2,n],[0,n/2]),a([n,n/2],[n/2,0]);break;case 3:a([n/2,n],[n,n/2]),a([0,n/2],[n/2,0]),a([n/2,n],[0,n/2]),a([n,n/2],[n/2,0]);break;case 4:a([n/2,0],[n/2,n]);break;case 5:a([0,n/2],[n,n/2]);break;case 6:a([n/2,0],[n/2,n]),a([0,n/2],[n,n/2]);break;default:return null}return r.createPattern(s,"repeat")}function Oe(e){function t(e){const t=e.toString(16);return 1===t.length?"0"+t:t}return e.slice(0,3).reduce((e,i)=>`${e}${t(i)}`,"#")}function Pe(e){return/^#[0-9a-f]{6}$/.test(e)}function Ae(e){if("string"!==typeof e)return e;let t=null,i=null,s="normal",r="normal",n="normal",a="normal";return e.split(/\s+/).forEach(e=>{switch(e){case"normal":break;case"italic":case"oblique":s=e;break;case"small-caps":n=e;break;case"bold":case"bolder":case"lighter":case"100":case"200":case"300":case"400":case"500":case"600":case"700":case"800":case"900":r=e;break;default:if(!i){const t=e.split("/");i=t[0],t.length>1&&(a=t[1]);break}t=t?`${t} ${e}`:e;break}}),{fontStyle:s,fontVariant:n,fontWeight:r,fontSize:i,lineHeight:a,fontFamily:t}}function xe(e){const t=["fontStyle","fontVariant","fontWeight","fontSize","fontFamily"];let i=null;return Object.entries(e).filter(e=>"normal"!==e[1]&&"lineWeight"!==e[0]).sort((e,i)=>{const s=t.indexOf(e[0]),r=t.indexOf(i[0]);return s<r?-1:s>r?1:0}).forEach(e=>{i=i?`${i} ${e[1]}`:e[1]}),i||""}function Ye(e,t,i,s){const r=s||[0,0],n=e.getImageData(r[0],r[1],i[0],i[1]),{data:a}=n,[o,l,c]=t,u=a.length;for(let h=0;h<u;h+=4)a[h]=o,a[h+1]=l,a[h+2]=c;e.putImageData(n,r[0],r[1])}function je(e){if(e.getFill()){let i=e.getFill().getColor();try{i=Ie(i).slice()}catch(t){Te.warning(t.message)}return{color:i}}}function Ne(e){let t=e.getColor();if(t)try{t=Ie(t).slice()}catch(i){Te.warning(i.message)}return{color:t,width:e.getWidth(),lineDash:e.getLineDash()}}function Fe(e){return{font:e.getFont(),fill:je(e),stroke:e.getStroke()?Ne(e.getStroke()):void 0,textBaseline:e.getTextBaseline(),offsetY:e.getOffsetY(),offsetX:e.getOffsetX()}}function Re(e){const t=Object.assign({},e);return!t.fill||t.fill instanceof ol.style.Fill||(t.fill=new ol.style.Fill(t.fill)),!t.stroke||t.stroke instanceof ol.style.Stroke||(t.stroke=new ol.style.Stroke(t.stroke)),t.font&&"string"!==typeof t.font&&(t.font=xe(t.font)),new ol.style.Text(t)}const He=new ol.style.Style({}),Ge=[255,255,255,1],ze=[0,0,0,1];function Be(){return{image:{fill:{color:[255,255,255,.4]},stroke:{color:ze,width:1},radius:5},stroke:{color:[51,153,204,1],width:1.25},fill:{color:[255,255,255,.4]},text:{font:"bold 18px sans-serif",textBaseline:"bottom",offsetY:-15,offsetX:0}}}const Ve={olcs_color:ke(Ge),olcs_scale:"1.0",olcs_outlineWidth:"0.0",olcs_outlineColor:ke(ze),olcs_pointSize:"8.0",olcs_image:void 0,olcs_font:`'${Be().text.font}'`,olcs_fontColor:ke(ze),olcs_fontOutlineWidth:"1.0",olcs_fontOutlineColor:ke(Ge),olcs_labelText:void 0,olcs_anchorLineColor:ke(Ge)};function Ue(e,t){const i=`Boolean(\${${e}})===true`,s=t?`color(\${${e}})`:`\${${e}}`;return[[i,s],["true",Ve[e]]]}function We(e){return!e.fill||e.fill instanceof ol.style.Fill||(e.fill=new ol.style.Fill(e.fill)),!e.stroke||e.stroke instanceof ol.style.Stroke||(e.stroke=new ol.style.Stroke(e.stroke)),e.points?new ol.style.RegularShape(e):new ol.style.Circle(e)}class qe{constructor(){this.shapes=[]}addImage(e){const t=We(Object.assign({},e)),i=t.getImage(1);e.src=i.toDataURL(),this.shapes.push(e)}}const Je=new qe,Ke={fill:new ol.style.Fill({color:[255,255,255,1]}),stroke:new ol.style.Stroke({color:[0,0,0,1],width:1}),radius:16};[null,{points:3},{points:3,angle:Math.PI},{points:4,angle:Math.PI/4},{points:6}].forEach(e=>{const t=e?Object.assign(e,Ke):Ke;Je.addImage(t)});const Ze={POLYGON:1,POLYLINE:2,POINT:3},Qe=v.getLogger("vcs.vcm.util.style.StyleItem"),Xe=Symbol("VcsVectorStyleItem");class $e extends we{constructor(e){super(e),$e.validateOptions(e),this.exclude={fill:!1===e.fill,stroke:!1===e.stroke,image:!1===e.image},this._fillOptions=null,this._fill=void 0,this._stroke=e.stroke?new ol.style.Stroke(e.stroke):void 0,this._text=void 0,e.text&&(this._text=Re(e.text)),this._label=e.label,this._cesiumColor=new Cesium.Color,this._image=void 0,e.image&&(this._image=e.image.radius?We(Object.assign({},e.image)):new ol.style.Icon(e.image)),this._style=new ol.style.Style({image:this._image,stroke:this._stroke,text:this._text}),e.fill?(this._fillOptions=e.fill,this._setFill()):this.updateCesiumStyle()}static validateOptions(e){function t(e){try{e.color=Ie(e.color),a(e.color,[Number]),a(e.color.length,[3,4])}catch(t){Qe.error(t.message),e.color=[255,255,255,.4]}}function i(e){t(e),e.width||(Qe.error("missing width for stroke, setting to 1.5"),e.width=1.5)}e.fill&&(t(e.fill),e.fill.pattern&&(i(e.fill.pattern),e.fill.pattern.type&&Object.values(Se).includes(e.fill.pattern.type)||(Qe.error("Cannot find pattern "+e.fill.pattern.type),e.fill.pattern.type=Se.NWSE))),e.stroke&&i(e.stroke),e.image&&(e.image.icon?e.image=e.image.icon:e.image.circle&&(e.image=e.image.circle),e.image.src||e.image.radius||(Qe.error("missing source or label in style, setting default circle"),e.image={fill:{color:"rgba(255,255,255,0.4)"},stroke:{color:"#3399CC",width:1},radius:5}),e.image.radius&&(e.image.radius=Number(e.image.radius),Number.isFinite(e.image.radius)||(Qe.error("radius must be a number"),e.image.radius=5),e.image.fill&&t(e.image.fill),e.image.stroke&&i(e.image.stroke)))}get fillColor(){return this._fillOptions?this._fillOptions.color:null}get cesiumFillColor(){const e=this.fillColor?this.fillColor.slice():null;return e?(e[3]=e[3]||1,e[3]*=255,Cesium.Color.fromBytes(...e,this._cesiumColor)):Cesium.Color.RED.clone(this._cesiumColor)}set fillColor(e){this.exclude.fill=!1,this._style instanceof ol.style.Style?e?(this._fillOptions?this._fillOptions.color=Ie(e):this._fillOptions={color:Ie(e)},this._setFill()):(this._fillOptions=null,this._fill=void 0,this._style.setFill(this._fill),this.updateCesiumStyleColor(!0)):Qe.info("trying to set fill on a style function")}get pattern(){return this._fillOptions&&this._fillOptions.pattern?this._fillOptions.pattern:null}set pattern(e){this._fillOptions?(e?(o(e,{color:[String,[Number]],width:Number,type:Number,size:[Number,void 0,null]},!0),this._fillOptions.pattern=e):this._fillOptions.pattern=void 0,this._setFill()):Qe.error("Missing fill color")}get stroke(){return this._stroke}set stroke(e){this.exclude.stroke=!1,this._style instanceof ol.style.Style?(o(e,ol.style.Stroke),this._style.setStroke(e),this._stroke=e,this.updateCesiumStyleColor(!0)):Qe.info("trying to set stroke on a style function")}get label(){return this._label}set label(e){o(e,String),e.length?this._label=e:this._label=void 0,this._text&&this._text.setText(e)}get text(){return this._text}set text(e){this._style instanceof ol.style.Style?(o(e,ol.style.Text),this._text=e,this._text.setText(this._label),this._style.setText(this._text)):Qe.info("trying to set text on a style function")}get image(){return this._image}set image(e){this.exclude.image=!1,this._style instanceof ol.style.Style?(o(e,ol.style.Image),this._image=e,this._style.setImage(this._image),this.updateCesiumStyle()):Qe.info("trying to set text on a style function")}get style(){return this._style}set style(e){o(e,[ol.style.Style,Function]),e instanceof ol.style.Style?(this._stroke=e.getStroke(),this._fill=e.getFill(),this._text=e.getText(),this._image=e.getImage()):(this._stroke=void 0,this._fill=void 0,this._text=void 0,this._image=void 0),this._style=e,this._fill&&this._fill.getColor()&&(this._fillOptions={color:Ie(this._fill.getColor())}),this._text&&this._text.setText(this._label),this.updateCesiumStyle()}_setFill(){if(this._style instanceof ol.style.Style){const e=this._fillOptions.pattern?De(this._fillOptions):this._fillOptions.color;this._fill?this._fill.setColor(e):(this._fill=new ol.style.Fill({color:e}),this._style.setFill(this._fill)),this._fillOptions.pattern&&(this._fill.fallBackColor=this._fillOptions.color),this.updateCesiumStyle()}}updateCesiumStyle(){this.updateCesiumStyleColor(!0),this.updateCesiumStyleImage(!0),this.updateCesiumStyleText(!0),this._styleChanged()}updateCesiumStyleColor(e){const t=Ue("olcs_color",!0);this.stroke&&this.stroke.getColor()&&t.splice(1,0,["${olcs_geometryType}==="+Ze.POLYLINE,ke(this.stroke.getColor())]),this._image instanceof ol.style.Circle&&this._image.getFill()&&t.splice(1,0,["${olcs_geometryType}==="+Ze.POINT,ke(this._image.getFill().getColor())]),this.fillColor&&t.splice(-1,1,["true",ke(this.fillColor)]),this.cesiumStyle.color={conditions:t},e||this._styleChanged()}updateCesiumStyleImage(e){const t=Ue("olcs_scale"),i=Ue("olcs_outlineWidth"),s=Ue("olcs_outlineColor",!0),r=Ue("olcs_pointSize"),n=Ue("olcs_image");if(this._image)if(null!=this._image.getScale()&&t.splice(1,1,["true",""+this._image.getScale()]),this._image instanceof ol.style.Circle){const e=this._image.getStroke();let t=2*this._image.getRadius();if(e){this._image.getStroke().getColor()&&s.splice(1,1,["true",ke(this._image.getStroke().getColor())]);const e=this._image.getStroke().getWidth();i.splice(1,1,["true",""+e]),t-=e}r.splice(1,1,["true",""+t])}else if(this._image instanceof ol.style.RegularShape){const e=this._image.getImage(1).toDataURL();n.splice(1,1,["true",`"${e}"`])}else this._image instanceof ol.style.Icon&&n.splice(1,1,["true",`"${this._image.getSrc()}"`]);this.cesiumStyle.scale={conditions:t},this.cesiumStyle.pointOutlineWidth={conditions:i},this.cesiumStyle.pointOutlineColor={conditions:s},this.cesiumStyle.pointSize={conditions:r},this.cesiumStyle.image={conditions:n},this.cesiumStyle.verticalOrigin="1",this.cesiumStyle.horizontalOrigin="0",e||this._styleChanged()}updateCesiumStyleText(e){const t=Ue("olcs_font"),i=Ue("olcs_labelText"),s=Ue("olcs_fontColor",!0),r=Ue("olcs_fontOutlineWidth"),n=Ue("olcs_fontOutlineColor",!0);this._text&&(this._text.getFont()&&t.splice(1,1,["true",`'${this._text.getFont()}'`]),this._text.getText()&&i.splice(1,1,["true",`'${this._text.getText()}'`]),this._text.getFill()&&this._text.getFill().getColor()&&s.splice(1,1,["true",ke(this._text.getFill().getColor())]),this._text.getStroke()&&this._text.getStroke().getColor()&&(n.splice(1,1,["true",ke(this._text.getStroke().getColor())]),r.splice(1,1,["true",""+(this._text.getStroke().getWidth()||1.25)]))),this.cesiumStyle.font={conditions:t},this.cesiumStyle.labelText={conditions:i},this.cesiumStyle.labelColor={conditions:s},this.cesiumStyle.labelOutlineWidth={conditions:r},this.cesiumStyle.labelOutlineColor={conditions:n},this.cesiumStyle.labelStyle="Boolean(${olcs_fontOutlineWidth}) === true ? 2 : 0",this.cesiumStyle.labelHorizontalOrigin="0";let a=Cesium.VerticalOrigin.CENTER;if(this._text)switch(this._text.getTextBaseline()){case"top":a=Cesium.VerticalOrigin.TOP;break;case"middle":a=Cesium.VerticalOrigin.CENTER;break;case"bottom":a=Cesium.VerticalOrigin.BOTTOM;break;case"alphabetic":a=Cesium.VerticalOrigin.TOP;break;case"hanging":a=Cesium.VerticalOrigin.BOTTOM;break;default:break}this.cesiumStyle.labelVerticalOrigin=a,e||this._styleChanged()}clone(e){return e?(e.style=this._style instanceof ol.style.Style?this._style.clone():this._style,this._fillOptions&&this._fillOptions.color&&(e.fillColor=this._fillOptions.color.slice(),this._fillOptions.pattern&&(e.pattern=Object.assign({},this._fillOptions.pattern))),Object.keys(this.exclude).forEach(t=>{this.exclude[t]&&e.unset(t)}),e):new $e(this.getOptions())}assign(e){return e.fillColor&&(this.fillColor=e.fillColor.slice()),e.pattern?this.pattern=Object.assign({},e.pattern):this.pattern=void 0,e.stroke&&(this.stroke=e.stroke.clone()),e.image&&(this.image=e.image.clone()),e.text&&(this.text=e.text.clone()),e.label&&(this.label=e.label),Object.keys(e.exclude).forEach(t=>{e.exclude[t]&&this.unset(t)}),this}getOptions(e){const t=super.getOptions(e);t.type=Me.VECTOR;const i=e||{fill:!0,stroke:!0,text:!0,image:!0};return i.fill&&(this._fillOptions?(t.fill={color:Ie(this._fillOptions.color).slice()},this._fillOptions.pattern&&(t.fill.pattern=Object.assign({},this._fillOptions.pattern))):this.exclude.fill&&(t.fill=!1)),i.stroke&&(this._stroke?t.stroke=Ne(this._stroke):this.exclude.stroke&&(t.stroke=!1)),i.text&&this._text&&(t.text=Fe(this._text)),i.label&&(t.label=this._label),i.image&&(this._image instanceof ol.style.Icon?t.image={src:this._image.getSrc(),scale:this._image.getScale(),opacity:this._image.getOpacity()}:this._image instanceof ol.style.Circle?t.image={scale:this._image.getScale(),fill:je(this._image),radius:this._image.getRadius(),stroke:this._image.getStroke()?Ne(this._image.getStroke()):void 0}:this._image instanceof ol.style.RegularShape?t.image={scale:this._image.getScale(),fill:je(this._image),points:this._image.getPoints(),angle:this._image.getAngle(),radius:this._image.getRadius(),stroke:this._image.getStroke()?Ne(this._image.getStroke()):void 0}:this.exclude.image&&(t.image=!1)),t}getOptionsForFeature(e){const t=e.getGeometry().getType(),i=e.get("olcs_extrudedHeight")||e.get("olcs_storeyHeight")&&e.get("olcs_storeyNumber"),s={};return"Point"===t||"MultiPoint"===t?(null!=e[Xe].label&&(s.text=!0,s.label=!0),s.image=!0,i&&(s.stroke=!0)):"LineString"===t||"MultiLineString"===t?(s.stroke=!0,i&&(s.fill=!0)):"Polygon"===t||"MultiPolygon"===t||"Circle"===t?(s.stroke=!0,s.fill=!0):"GeometryCollection"===t&&(s.stroke=!0,s.fill=!0,s.image=!0,s.text=!0),this.getOptions(s)}unset(e){a(e,Object.keys(this.exclude)),"fill"===e?this.fillColor=void 0:this[e]=void 0,this.exclude[e]=!0}}var et=$e;const tt=new $e(Be());function it(e){const t=e.toBytes();return t[3]/=255,new $e({fill:{color:t},stroke:{color:t,width:tt.stroke.getWidth()}})}const st=Symbol("alreadyTransformedToMercator"),rt=Symbol("alreadyTransformedToImage"),nt=Symbol("imageGeometryChanged"),at=Symbol("obliqueGeometry"),ot=Symbol("doNotTransform"),lt=Symbol("OriginalFeature"),ct=new Cesium.Color,ut=v.getLogger("vcs.vcm.util.style.DeclarativeStyleItem"),ht=new ol.style.Text({font:"30px sans-serif",fill:new ol.style.Fill({color:Ge}),textAlign:"left",offsetY:-15});function dt(e,t,i){i[t].conditions?e[t]=new Cesium.ConditionsExpression(i[t],i.defines):e[t]=new Cesium.Expression(i[t],i.defines)}class mt extends we{static get className(){return"vcs.vcm.util.style.DeclarativeStyleItem"}constructor(e){e.className=mt.className,super(e);const t=e.declarativeStyle||{};t.show=null==t.show||t.show,this.cesiumStyle=new Cesium.Cesium3DTileStyle(t),this.style=this._styleFunction.bind(this),t.strokeColor&&dt(this.cesiumStyle,"strokeColor",t),t.strokeWidth&&dt(this.cesiumStyle,"strokeWidth",t),this._styleOptions=t}getOptions(e){const t=super.getOptions(e);t.type=Me.DECLARATIVE;const i=e||{declarativeStyle:!0,defaults:!0};return i.declarativeStyle&&(t.declarativeStyle=this.cesiumStyle.style),t}clone(e){return e?e.assign(this):new mt(this.getOptions())}assign(e){return this.cesiumStyle=e.cesiumStyle,this._styleOptions=this.cesiumStyle.style,this}_styleFunction(e){const t=e[lt]||e;if(!this.cesiumStyle.show.evaluate(t))return He;const i=t.getGeometry().getType();return"Point"===i?this._stylePoint(t):"Polygon"===i?this._stylePolygon(t):"LineString"===i?this._styleLineString(t):"Circle"===i?this._stylePolygon(t):"MultiPoint"===i?this._stylePoint(t):"MultiPolygon"===i?this._stylePolygon(t):"MultiLineString"===i?this._styleLineString(t):(ut.warning("could not style geometry type: "+i),He)}_stylePolygon(e){const t=new ol.style.Style({}),i=this.cesiumStyle.color?this.cesiumStyle.color.evaluate(e,ct):Cesium.Color.WHITE;return i&&t.setFill(new ol.style.Fill({color:Ee(i)})),this._evaluateStroke(e,t),t}_styleLineString(e){const t=new ol.style.Style({}),i=e.get("olcs_extrudedHeight")||e.get("olcs_storeyHeight")&&e.get("olcs_storeyNumber"),s=this.cesiumStyle.color?this.cesiumStyle.color.evaluate(e,ct):Cesium.Color.WHITE;if(s)if(i)t.setFill(new ol.style.Fill({color:Ee(s)}));else{const i=this.cesiumStyle.strokeWidth?this.cesiumStyle.strokeWidth.evaluate(e):1;t.setStroke(new ol.style.Stroke({width:Number.isFinite(i)?i:1,color:Ee(s)}))}return i&&this._evaluateStroke(e,t),t}_stylePoint(e){const t=new ol.style.Style({});if(this.cesiumStyle.labelText){const i=this.cesiumStyle.labelText.evaluate(e);if(i){const s=ht.clone();if(s.setText(i.toString()),this.cesiumStyle.font){const t=this.cesiumStyle.font.evaluate(e);t&&s.setFont(t)}if(this.cesiumStyle.labelColor){const t=this.cesiumStyle.labelColor.evaluateColor(e,ct);t&&s.getFill().setColor(Ee(t))}if(this.cesiumStyle.labelOutlineColor){const t=this.cesiumStyle.labelOutlineColor.evaluate(e,ct);if(t){const i=this.cesiumStyle.labelOutlineWidth?this.cesiumStyle.labelOutlineWidth.evaluate(e):1;s.setStroke(new ol.style.Stroke({color:Ee(t),width:i}))}}t.setText(s)}}if(this.cesiumStyle.image){const i=this.cesiumStyle.image.evaluate(e);i&&t.setImage(new ol.style.Icon({src:i}))}else{const i={radius:4},s=this.cesiumStyle.color?this.cesiumStyle.color.evaluate(e,ct):Cesium.Color.WHITE;if(i.fill=new ol.style.Fill({color:Ee(s)}),this.cesiumStyle.pointSize){const t=this.cesiumStyle.pointSize.evaluate(e);i.radius=t/2}const r=this.cesiumStyle.pointOutlineWidth?this.cesiumStyle.pointOutlineWidth.evaluate(e):0;if(r){const t=this.cesiumStyle.pointOutlineColor?this.cesiumStyle.pointOutlineColor.evaluateColor(e,ct):Cesium.Color.BLACK;i.stroke=new ol.style.Stroke({color:Ee(t),width:r}),i.radius+=r/2}t.setImage(new ol.style.Circle(i))}if(this.cesiumStyle.scale&&t.getImage()){const i=this.cesiumStyle.scale.evaluate(e);Number.isFinite(i)&&t.getImage().setScale(i)}return this._evaluateStroke(e,t),t}_evaluateStroke(e,t){if(this.cesiumStyle.strokeColor){const i=this.cesiumStyle.strokeColor.evaluateColor(e,ct);if(i){const s=this.cesiumStyle.strokeWidth?this.cesiumStyle.strokeWidth.evaluate(e):1;t.setStroke(new ol.style.Stroke({width:Number.isFinite(s)?s:1,color:Ee(i)}))}}}get show(){return this._styleOptions.show}set show(e){this._styleOptions.show=e,this.cesiumStyle.show=e,this._styleChanged()}get color(){return this._styleOptions.color}set color(e){this._styleOptions.color=e,this.cesiumStyle.color=e,this._styleChanged()}get strokeColor(){return this._styleOptions.strokeColor}set strokeColor(e){this._styleOptions.strokeColor=e,this.cesiumStyle.strokeColor=e,this._styleChanged()}get strokeWidth(){return this._styleOptions.strokeWidth}set strokeWidth(e){this._styleOptions.strokeWidth=e,this.cesiumStyle.strokeWidth=e,this._styleChanged()}get image(){return this._styleOptions.image}set image(e){this._styleOptions.image=e,this.cesiumStyle.image=e,this._styleChanged()}get labelText(){return this._styleOptions.labelText}set labelText(e){this._styleOptions.labelText=e,this.cesiumStyle.labelText=e,this._styleChanged()}get labelColor(){return this._styleOptions.labelColor}set labelColor(e){this._styleOptions.labelColor=e,this.cesiumStyle.labelColor=e,this._styleChanged()}get font(){return this._styleOptions.font}set font(e){this._styleOptions.font=e,this.cesiumStyle.font=e,this._styleChanged()}get pointSize(){return this._styleOptions.pointSize}set pointSize(e){this._styleOptions.pointSize=e,this.cesiumStyle.pointSize=e,this._styleChanged()}}var gt=mt;const pt=new mt({declarativeStyle:{show:!0,color:{conditions:Ue("olcs_color",!0)},scale:{conditions:Ue("olcs_scale")},pointOutlineWidth:{conditions:Ue("olcs_outlineWidth")},pointOutlineColor:{conditions:Ue("olcs_outlineColor",!0)},pointSize:{conditions:Ue("olcs_pointSize")},image:{conditions:Ue("olcs_image")},font:{conditions:Ue("olcs_font")},labelStyle:"2",labelText:{conditions:Ue("olcs_labelText")},labelColor:{conditions:Ue("olcs_fontColor",!0)},labelOutlineWidth:{conditions:Ue("olcs_fontOutlineWidth")},labelOutlineColor:{conditions:Ue("olcs_fontOutlineColor",!0)},verticalOrigin:"1",horizontalOrigin:"0",labelHorizontalOrigin:"0",labelVerticalOrigin:"1"}});class ft{constructor(){this.hiddenObjects={},this.highlightedObjects={},this.lastUpdated=Date.now()}static featureExists(e){return e&&e.content&&!e.content.isDestroyed()&&!e.content.batchTable.isDestroyed()}highlight(e){let t=!1;Object.entries(e).forEach(([e,i])=>{let s=i;i instanceof Cesium.Color?s=it(i):i instanceof ol.style.Style&&(s=new et({}),i.getText()&&i.getText().getText()&&(s.label=i.getText().getText()),s.style=i),s=s,this.highlightedObjects[e]?this.highlightedObjects[e].style.fillColor.some((e,t)=>e!==s.fillColor[t])&&(this.highlightedObjects[e].style=s,t=!0):(this.highlightedObjects[e]={style:s,features:new Map},t=!0)}),t&&this._update()}unHighlight(e){e.forEach(e=>{this.highlightedObjects[e]&&(this.highlightedObjects[e].features.forEach((t,i)=>{i instanceof Cesium.Cesium3DTileFeature||i instanceof Cesium.Cesium3DTilePointFeature?ft.featureExists(i)&&(i.color=t):i instanceof ol.Feature&&(this.hiddenObjects[e]||i.setStyle(t))}),delete this.highlightedObjects[e])})}clearHighlighting(){this.unHighlight(Object.keys(this.highlightedObjects))}hideObjects(e){let t=!1;e.forEach(e=>{this.hiddenObjects[e]||(this.hiddenObjects[e]=new Set,t=!0)}),t&&this._update()}showObjects(e){let t=!1;e.forEach(e=>{this.hiddenObjects[e]&&(t=!0,this.hiddenObjects[e].forEach(t=>{if(t instanceof Cesium.Cesium3DTileFeature||t instanceof Cesium.Cesium3DTilePointFeature)ft.featureExists(t)&&(t.show=!0);else if(t instanceof ol.Feature)if(this.highlightedObjects[e]){if(!this.highlightedObjects[e].features.has(t)){const i=t[Xe]?t[Xe].style:void 0;this.highlightedObjects[e].features.set(t,i)}t.setStyle(this.highlightedObjects[e].style.style)}else t.setStyle(t[Xe]?t[Xe].style:void 0)}),delete this.hiddenObjects[e])}),t&&this._update()}clearHiddenObjects(){this.showObjects(Object.keys(this.hiddenObjects))}_update(){this.lastUpdated=Date.now();const e=j.getInstance().getActiveMap();e&&e.requestRender()}}var yt=ft;class _t{constructor(){this.hiddenObjects={},this._hiddenObjectFeatures={},this.lastUpdated=Date.now()}hideObjects(e){a(e,[String]);let t=!1;e.forEach(e=>{this.hiddenObjects[e]||(t=!0,this.hiddenObjects[e]=0),this.hiddenObjects[e]+=1}),t&&this._update()}showObjects(e){a(e,[String]);let t=!1;e.forEach(e=>{this.hiddenObjects[e]&&(this.hiddenObjects[e]-=1,0===this.hiddenObjects[e]&&(t=!0,this._hiddenObjectFeatures[e]&&(this._hiddenObjectFeatures[e].forEach(e=>{e instanceof Cesium.Cesium3DTileFeature||e instanceof Cesium.Cesium3DTilePointFeature?yt.featureExists(e)&&(e.show=!0):e instanceof ol.Feature&&e.setStyle(e[Xe]?e[Xe].style:void 0)}),this._hiddenObjectFeatures[e].clear()),delete this.hiddenObjects[e]))}),t&&this._update()}addFeature(e,t){this._hiddenObjectFeatures[e]||(this._hiddenObjectFeatures[e]=new Set),this._hiddenObjectFeatures[e].add(t)}hasFeature(e,t){return!!this._hiddenObjectFeatures[e]&&this._hiddenObjectFeatures[e].has(t)}_update(){this.lastUpdated=Date.now();const e=j.getInstance().getActiveMap();e&&e.requestRender()}}let vt;function Lt(){return vt||(vt=new _t),vt}L.LAYER_CHANGED="LAYER_CHANGED",L.LAYER_ACTIVATED="LAYER_ACTIVATED",L.LAYER_DEACTIVATED="LAYER_DEACTIVATED";const Mt={lastLayerId:0},bt=Mt.lastLayerId;Mt.lastLayerId+=1;const wt={INACTIVE:1,ACTIVE:2,LOADING:4,SYNCING:8,CANCELED:16},Tt=Symbol("vcsLayerName"),St="1.0";class Ct extends oe{static get UNDEFINED(){return bt}static get className(){return"vcs.vcm.layer.Layer"}static get vcsLayerNameSymbol(){return Tt}constructor(e){super(e),this.extent=new Le(e.extent),this.activeOnStartup=Object(c["e"])(e.activeOnStartup,!1),this._state=wt.INACTIVE,this._loadingPromise=null,this.initialized=!1,this.type=null!=e.layertype?e.layertype:Mt.UNDEFINED,this.mapNames=e.mapNames||[],this._url=e.url,this.index=null,this.hiddenObjectIds=Array.isArray(e.hiddenObjectIds)?e.hiddenObjectIds:[],this._exclusiveGroup=null,null!=e.exclusive&&("string"===typeof e.exclusive?"true"===e.exclusive.toLowerCase()?this.exclusiveGroup="default":"false"!==e.exclusive.toLowerCase()&&(this.exclusiveGroup=e.exclusive):"boolean"===typeof e.exclusive?this.exclusiveGroup=e.exclusive?"default":null:this.exclusiveGroup=String(e.exclusive)),this.allowPicking=Object(c["e"])(e.allowPicking,!0),this._style=this.getStyleOrDefaultStyle(e.activeStyleName||e.style),this.defaultStyle=this._style,this.styleChanged=new Cesium.Event,this.featureVisibility=null,this.globalHider=Lt(),this._genericFeatureProperties=e.genericFeatureProperties||{}}get active(){return this._state===wt.ACTIVE}get style(){return this._style}get loading(){return!!(this._state&wt.LOADING)}get url(){if(this._url){if("string"===typeof this._url||Array.isArray(this._url))return this._url;const e=this.framework.getLocale();return this._url[e]?this._url[e]:Object.values(this._url)[0]}return""}set url(e){a(e,[String,Object]),this._url=e}get exclusive(){return!!this.exclusiveGroup}get exclusiveGroup(){return this._exclusiveGroup}set exclusiveGroup(e){o(e,String),this._exclusiveGroup!==e&&(this._exclusiveGroup&&R().unregisterLayer(this),this._exclusiveGroup=e,this._exclusiveGroup&&R().registerLayer(this))}raiseFeatureEvent(e,t,i,s){this.framework.publish(e,t,i,s)}objectClickedHandler(e,t,i){return!1}getExtent(){return this.extent}initialize(){return Promise.reject(new Error)}isExclusive(){return this.logger.deprecate("isExclusive","access the exclusive property"),this.exclusive}getExclusiveGroup(){return this.logger.deprecate("getExclusiveGroup","access the exclusiveGroup property"),this.exclusiveGroup}isInitialized(){return this.logger.deprecate("isInitialized","access the initialized property"),this.initialized}getType(){return this.logger.deprecate("getType","access the type property"),this.type}isActiveOnStartup(){return this.logger.deprecate("isActiveOnStartup","access the activeOnStartup property"),this.activeOnStartup}isSupported(e){const t=e||this.framework.getActiveMap();return!(!t||!(0===this.mapNames.length||this.mapNames.indexOf(t.name)>=0))&&t.supportsLayer(this)}isActive(){return this.logger.deprecate("isActive","access the active property"),this.active}activate(e){return null!=e&&this.logger.deprecate("activate","activate no longer accepts an argument, use deactivate to deactivate the layer"),!1===e?(this.deactivate(),Promise.resolve()):this.isSupported()?(this._state&wt.CANCELED&&this.setStateLoading(),this._loadingPromise?this._loadingPromise:this._state&(wt.INACTIVE|wt.SYNCING)?(this.setStateLoading(),this.framework.publish(L.LAYER_CHANGED,this),this._loadingPromise=this.initialize().then(()=>{if(this._state&wt.LOADING){const e=!(this._state&wt.SYNCING);this._state=wt.ACTIVE,this.show(),this.globalHider.hideObjects(this.hiddenObjectIds),e&&this.framework.publish(L.LAYER_ACTIVATED,this)}else{const e=this._state&wt.SYNCING;this._state=wt.INACTIVE,e&&(this.framework.publish(L.LAYER_DEACTIVATED,this),this.globalHider.showObjects(this.hiddenObjectIds))}this.framework.publish(L.LAYER_CHANGED,this),this._loadingPromise=null}).catch(e=>(this._state=wt.INACTIVE,this._loadingPromise=null,Promise.reject(e))),this._loadingPromise):Promise.resolve()):Promise.resolve()}deactivate(){this.active&&this.initialized?(this.hide(),this._state=wt.INACTIVE,this.framework.publish(L.LAYER_DEACTIVATED,this),this.framework.publish(L.LAYER_CHANGED,this),this.globalHider.showObjects(this.hiddenObjectIds)):this._state&wt.LOADING&&this._setStateCanceled()}setStateLoading(){this._state|=wt.LOADING,this._state&wt.CANCELED&&(this._state^=wt.CANCELED)}_setStateCanceled(){this._state|=wt.CANCELED,this._state&wt.LOADING&&(this._state^=wt.LOADING)}dispose(){this.framework.removeLayer(this)}show(){}hide(){}getGenericFeatureFromClickedObject(e){return this.logger.warning("This method should be implemented by any specific layers"),null}addGenericFeatureProperties(e){a(e,Object),Object.assign(this._genericFeatureProperties,e)}isCommonLayer(){return!1}handleURLParameter(e){}highlight(e){this.featureVisibility&&this.featureVisibility.highlight(e)}unHighlight(e){this.featureVisibility&&this.featureVisibility.unHighlight(e)}clearHighlighting(){this.featureVisibility&&this.featureVisibility.clearHighlighting()}hideObjects(e){this.featureVisibility&&this.featureVisibility.hideObjects(e)}showObjects(e){this.featureVisibility&&this.featureVisibility.showObjects(e)}clearHiddenObjects(){this.featureVisibility&&this.featureVisibility.clearHiddenObjects()}determineHighlightStyle(e,t){return null}getStyleOrDefaultStyle(e,t){if("string"===typeof e){const t=this.framework.getStyleByName(e);if(t)return t;this.logger.warning("could not find style with name "+e)}else{if(e&&e instanceof we)return e;if(e){if(e.type===Me.DECLARATIVE||e.declarativeStyle)return new gt(e);if(e.type!==Me.REFERENCE){const i=new et(e);return t?t.assign(i):i}{const{name:t}=e,i=this.framework.getStyleByName(t);if(i)return i;this.logger.warning("could not find style with name "+t)}}}return t||pt.clone()}setStyle(e,t){a(e,[ol.style.Style,we,Function,String]);const i=this._style;if("string"===typeof e){const t=this.framework.getStyleByName(e);if(!t)return void this.logger.warning("could not find style with name "+e);this._style=t}else e instanceof we?this._style=e:(this._style=new et({}),this._style.style=e);this.styleChanged.raiseEvent(this._style,i)}clearStyle(){this.setStyle(this.defaultStyle)}}var Et=Ct;const It={};function kt(e){if(!It[e.url])return It[e.url]=new Cesium.CesiumTerrainProvider(e),It[e.url];let t=It[e.url];return!t.requestVertexNormals&&e.requestVertexNormals&&(It[e.url]=new Cesium.CesiumTerrainProvider(e),t=It[e.url]),t}function Dt(e,t,i){const s=i?W.getTransformer(q,i):null,r=t.map(e=>{const t=s?s(e,e.slice(),e.length):e;return Cesium.Cartographic.fromDegrees(t[0],t[1])});return new Promise((i,s)=>{Cesium.sampleTerrainMostDetailed(e,r).then(e=>{e.forEach((e,i)=>{t[i][2]=e.height||0}),i(t)},s)})}class Ot extends ue{static get className(){return"vcs.vcm.maps.Cesium"}constructor(e){e.className=Ot.className,super(e),this._cesiumWidget=null,this.debugMode=!1,this.enableLightning=Object(c["e"])(e.enableLightning,!0),this.tileCacheSize=Object(c["h"])(e.tileCacheSize,1),this.eventHandler=null,this.invertClickBehavior=!1,this.defaultJDate=Cesium.JulianDate.fromDate(new Date(2014,6,20,13,0,0,0)),this.supportedlayers=[Mt.CESIUM_BUILDINGSLAYER,Mt.CESIUM_TERRAIN,Mt.CESIUM_POINTCLOUDLAYER,Mt.CESIUM_GLTFLAYER,Mt.CESIUM_ENTITIESLAYER,Mt.CESIUM_CZMLLAYER,Mt.CESIUM_TILESET_LAYER,Mt.TMSBase,Mt.VECTOR,Mt.FEATURESTORE,Mt.CLUSTER,Mt.WMS,Mt.WMTS,Mt.WSV,Mt.GEOJSON,Mt.IMAGE,Mt.OPENSTREETMAP,Mt.TILED_LAYER],this.urlParameter=null,this.webGLaa=Object(c["e"])(e.webGLaa,!1),this.enableTerrainAdjustmentWhenLoading=Object(c["e"])(e.enableTerrainAdjustmentWhenLoading,!0),this.limitCameraHeight=null!=e.limitCameraHeight?Object(c["g"])(e.limitCameraHeight,0):null,this.globeColor=e.globeColor?Cesium.Color.fromCssColorString(e.globeColor):Cesium.Color.fromBytes(63,71,204),this._clusterDataSourceDisplay=null}initialize(){if(!this.initialized){try{this._cesiumWidget=new Cesium.CesiumWidget(this.mapElement.getAttribute("id"),{requestRenderMode:!1,scene3DOnly:!0,imageryProvider:!1,shadows:!1,terrainShadows:Cesium.ShadowMode.ENABLED,contextOptions:{webgl:{failIfMajorPerformanceCaveat:!1,antialias:this.webGLaa}}})}catch(e){return this.hide(),document.getElementById("error-message").classList.remove("vcm_ui_hidden"),this.initialized=!1,!1}this._cesiumWidget.scene.globe.tileCacheSize=this.tileCacheSize,this._cesiumWidget.scene.globe.baseColor=this.globeColor,this.dataSourceDisplay=new Cesium.DataSourceDisplay({scene:this._cesiumWidget.scene,dataSourceCollection:new Cesium.DataSourceCollection}),this._cesiumWidget.scene.frameState.creditDisplay.update=()=>{},this._cesiumWidget.scene.frameState.creditDisplay.beginFrame=()=>{},this._cesiumWidget.scene.frameState.creditDisplay.endFrame=()=>{};const{clock:t}=this._cesiumWidget;t.shouldAnimate=!0,t.onTick.addEventListener(()=>{const e=t.currentTime;this.dataSourceDisplay.update(e)}),Cesium.RequestScheduler.maximumRequestsPerServer=12,this._cesiumWidget.scene.shadowMap.maximumDistance=5e3,this._cesiumWidget.scene.shadowMap.darkness=.6,this._cesiumWidget.scene.globe.depthTestAgainstTerrain=!0,this._cesiumWidget.scene.highDynamicRange=!1,this._cesiumWidget.scene.imagerySplitPosition=.5,this._cesiumWidget.scene.globe.enableLighting=this.enableLightning,this._cesiumWidget.scene.camera.enableTerrainAdjustmentWhenLoading=this.enableTerrainAdjustmentWhenLoading,this.setDay(this.defaultJDate);const i=document.getElementsByClassName("cesium-widget-credits");if(i)for(let e=0;e<i.length;e++){const t=i[e];t.style.display="none"}const s=new Cesium.Cartographic;this._cesiumWidget.scene.preUpdate.addEventListener(()=>{null!==this.limitCameraHeight&&(Cesium.Cartographic.fromCartesian(this._cesiumWidget.scene.camera.position,Cesium.Ellipsoid.WGS84,s),s&&s.height<this.limitCameraHeight&&(s.height=this.limitCameraHeight,Cesium.Cartographic.toCartesian(s,Cesium.Ellipsoid.WGS84,this._cesiumWidget.scene.camera.position)))}),this.eventHandler=new Cesium.ScreenSpaceEventHandler(this._cesiumWidget.scene.canvas),this.olMap=new ol.Map({view:new ol.View({resolutions:[1],resolution:1})}),this.clusterConverter=new olcs.ClusterConverter(this._cesiumWidget.scene),this.synchronizer=new olcs.VectorSynchronizer(this.olMap,this._cesiumWidget.scene),this.clusterSynchronizer=new olcs.VectorSynchronizer(this.olMap,this._cesiumWidget.scene,this.clusterConverter),this.initialized=!0,this.urlParameter&&this.handleURLParameter(this.urlParameter)}return!0}activate(e){return this.active=!0,this.show(),this.initialize()?(this._cesiumWidget.resize(),e&&this.gotoViewPoint(e),Promise.resolve()):Promise.resolve()}show(){this._cesiumWidget&&(this._cesiumWidget.container.style.display="",this._cesiumWidget.useDefaultRenderLoop=!0,this.cesiumInspectorContainer&&(this.cesiumInspectorContainer.style.display="")),super.show()}hide(){this._cesiumWidget&&(this._cesiumWidget.useDefaultRenderLoop=!1,this._cesiumWidget.container.style.display="none",this.cesiumInspectorContainer&&(this.cesiumInspectorContainer.style.display="none")),super.hide()}getOL3Map(){return this.logger.deprecate("getOL3Map","is deprecated in v3.6, use the property olMap directly"),this.olMap}getSynchronizer(e){return"vcs.vcm.layer.cesium.VectorCluster"===e.className?this.clusterSynchronizer:this.synchronizer}getHeightFromTerrain(e){const{terrainProvider:t}=this._cesiumWidget.scene;return t.readyPromise.then(()=>t.availability?Dt(t,e,J):Promise.resolve(e))}getPositionOnGround(e,t){const i=Cesium.Cartesian3.fromDegreesArrayHeights(e)[0],s=Cesium.Cartesian3.fromDegreesArrayHeights(t)[0],r=new Cesium.Ray(i,s),n=this._cesiumWidget.scene.globe.pick(r,this._cesiumWidget.scene);if(n){const e=Cesium.Ellipsoid.WGS84.cartesianToCartographic(n),t=[Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude),e.height];return t}return null}getViewPoint(e,t){if(!this._cesiumWidget||!this._cesiumWidget.scene)return null;const i=null==e||e,s=this._cesiumWidget.scene.camera,r=s.position;let n=null,a=null;if(i){const e=new Cesium.Ray(s.position,s.direction),t=this._cesiumWidget.scene.globe.pick(e,this._cesiumWidget.scene);if(t){a=Cesium.Cartesian3.distance(t,r);const e=Cesium.Ellipsoid.WGS84.cartesianToCartographic(t);n=[Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude),e.height]}}const o=s.positionCartographic,l=[Cesium.Math.toDegrees(o.longitude),Cesium.Math.toDegrees(o.latitude),o.height],c=new me({groundPosition:i?n:[],cameraPosition:l,distance:a,heading:Cesium.Math.toDegrees(s.heading),pitch:Cesium.Math.toDegrees(s.pitch),roll:Cesium.Math.toDegrees(s.roll)});return t?Promise.resolve(c):c}async gotoViewPoint(e,t,i,s){if(s&&this.logger.deprecate("gotoViewPoint","gotoViewPoint returns a promise when the view is set"),t&&this.logger.deprecate("gotoViewPoint","gotoViewPoint no longer accepts optional duration. use the duration property on the viewpoint"),this.movementDisabled)return;if(fe.getInstance().navActive&&fe.getInstance().activateOverviewMode(),!e.isValid())return;let r=null;const{distance:n}=e,a=Cesium.Math.toRadians(e.heading),o=Cesium.Math.toRadians(e.pitch),l=Cesium.Math.toRadians(e.roll);if(e.cameraPosition){const t=e.cameraPosition;r=Cesium.Cartesian3.fromDegrees(t[0],t[1],t[2])}else{if(!e.groundPosition)return;const t=e.groundPosition;if(!t[2]){const e=await this.getHeightFromTerrain([W.wgs84ToMercator(t)]);t[2]=e[0][2]}const i=Cesium.Cartesian3.fromDegrees(t[0],t[1],t[2]),s=new Cesium.Camera(this._cesiumWidget.scene),c={destination:i,orientation:{heading:a,pitch:o,roll:l}};s.setView(c),s.moveBackward(null!=n?n:2e3),r=s.position}const c=this._cesiumWidget.scene.camera,u={heading:a,pitch:o,roll:l};r=r||null,e.animate?await new Promise(n=>{const a=s?()=>{n(),s()}:n,o={destination:r,orientation:u,complete:a};e.duration?o.duration=e.duration:t&&(o.duration=t),e.easingFunction&&(o.easingFunction=e.easingFunction),i&&(o.maximumHeight=i),c.flyTo(o)}):(c.setView({destination:r,orientation:u}),s&&s())}disableMovement(e){super.disableMovement(e),e?(this.originalState={enableRotate:this._cesiumWidget.scene.screenSpaceCameraController.enableRotate,enableTranslate:this._cesiumWidget.scene.screenSpaceCameraController.enableTranslate,enableZoom:this._cesiumWidget.scene.screenSpaceCameraController.enableZoom,enableTilt:this._cesiumWidget.scene.screenSpaceCameraController.enableTilt,enableLook:this._cesiumWidget.scene.screenSpaceCameraController.enableLook},this._cesiumWidget.scene.screenSpaceCameraController.enableRotate=!1,this._cesiumWidget.scene.screenSpaceCameraController.enableTranslate=!1,this._cesiumWidget.scene.screenSpaceCameraController.enableZoom=!1,this._cesiumWidget.scene.screenSpaceCameraController.enableTilt=!1,this._cesiumWidget.scene.screenSpaceCameraController.enableLook=!1):!e&&this.originalState&&(this._cesiumWidget.scene.screenSpaceCameraController.enableRotate=this.originalState.enableRotate,this._cesiumWidget.scene.screenSpaceCameraController.enableTranslate=this.originalState.enableTranslate,this._cesiumWidget.scene.screenSpaceCameraController.enableZoom=this.originalState.enableZoom,this._cesiumWidget.scene.screenSpaceCameraController.enableTilt=this.originalState.enableTilt,this._cesiumWidget.scene.screenSpaceCameraController.enableLook=this.originalState.enableLook,this.originalState=null)}setDay(e){this._cesiumWidget.clock.currentTime=e,this._cesiumWidget.clock.multiplier=1}setLightning(e){this.enableLightning=e,this._cesiumWidget.scene.globe.enableLighting=e}getCesiumWidget(){return this._cesiumWidget}getEntities(){return this.dataSourceDisplay.defaultDataSource.entities}getDatasources(){return this.dataSourceDisplay.dataSources}getClusterDatasources(){if(this._clusterDataSourceDisplay)return this._clusterDataSourceDisplay.dataSources;const e=new Cesium.DataSourceCollection;function t(e,t,i){const{entities:s}=i;return[new Cesium.BillboardVisualizer(t,s),new Cesium.LabelVisualizer(t,s),new Cesium.PointVisualizer(t,s)]}return this._clusterDataSourceDisplay=new Cesium.DataSourceDisplay({scene:this._cesiumWidget.scene,dataSourceCollection:e,visualizersCallback:t}),this._cesiumWidget.clock.onTick.addEventListener(e=>{this._clusterDataSourceDisplay.update(e.currentTime)}),e}getDataSourceDisplay(){return this.dataSourceDisplay}getScene(){return this._cesiumWidget.scene}getViewer(){return this.logger.deprecate("getViewer","use getCesiumWidget instead."),this._cesiumWidget}pointIsVisible(e){const{camera:t}=this._cesiumWidget.scene,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],0),s=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC);return s.computeVisibility(new Cesium.BoundingSphere(i))===Cesium.Intersect.INSIDE}handleURLParameter(e){e.debug&&(this.initialized?this.setDebugMode():this.urlParameter=e)}setDebugMode(){this.debugMode||(this.debugMode=!0,this.cesiumInspectorContainer=document.createElement("div"),this.cesiumInspectorContainer.className="vcm-cesium-inspector",this.framework.getMapContainer().appendChild(this.cesiumInspectorContainer),this.cesiumInspector=new Cesium.CesiumInspector(this.cesiumInspectorContainer,this.getScene()))}pickPositionSupported(){return!!this.initialized&&this._cesiumWidget.scene.pickPositionSupported}isGroundPrimitiveSupported(){return!!this.initialized&&this._cesiumWidget.scene.context.fragmentDepth}}var Pt=Ot,At=i(19);function xt(e,t,i){const s=6371e3,r=Cesium.Math.toRadians(i),n=Cesium.Math.toRadians(e[1]),a=Cesium.Math.toRadians(e[0]),o=Math.asin(Math.sin(n)*Math.cos(t/s)+Math.cos(n)*Math.sin(t/s)*Math.cos(r)),l=a+Math.atan2(Math.sin(r)*Math.sin(t/s)*Math.cos(n),Math.cos(t/s)-Math.sin(n)*Math.sin(o));return[parseFloat(Cesium.Math.toDegrees(l).toFixed(5)),parseFloat(Cesium.Math.toDegrees(o).toFixed(5))]}function Yt(e,t){const i=Cesium.Math.toRadians(e[0]),s=Cesium.Math.toRadians(e[1]),r=Cesium.Math.toRadians(t[0]),n=Cesium.Math.toRadians(t[1]),a=Math.sin(r-i)*Math.cos(n),o=Math.cos(s)*Math.sin(n)-Math.sin(s)*Math.cos(n)*Math.cos(r-i);let l=Cesium.Math.toDegrees(Math.atan2(a,o));return l=(l+360)%360,l}function jt(e,t){const i=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(i*i+s*s)}const Nt=new ol.Sphere(6378137);function Ft(e,t){if(e instanceof ol.geom.Polygon)return null!=t?e.getLinearRing(t):e.getLinearRings();if(e instanceof ol.geom.MultiLineString)return null!=t?e.getLineString(t):e.getLineStrings();if(e instanceof ol.geom.MultiPoint)return null!=t?e.getPoint(t):e.getPoints();if(e instanceof ol.geom.MultiPolygon)return null!=t?e.getPolygon(t):e.getPolygons();if(e instanceof ol.geom.GeometryCollection)return null!=t?e.getGeometries()[t]:e.getGeometries();throw new Error("Geometry is not a MultiGeometry")}function Rt(e,t){if(e instanceof ol.geom.Polygon&&t instanceof ol.geom.LinearRing)e.appendLinearRing(t);else if(e instanceof ol.geom.MultiLineString&&t instanceof ol.geom.LineString)e.appendLineString(t);else if(e instanceof ol.geom.MultiPoint&&t instanceof ol.geom.Point)e.appendPoint(t);else{if(!(e instanceof ol.geom.MultiPolygon&&t instanceof ol.geom.Polygon))throw new Error("Geometry is not a MultiGeometry");e.appendPolygon(t)}}let Ht=new Cesium.Cartesian2,Gt=new Cesium.Cartesian2,zt=new Cesium.Cartesian2,Bt=new Cesium.Cartesian3,Vt=new Cesium.Cartesian3,Ut=new Cesium.Cartesian3;function Wt(e,t,i){Bt=Cesium.Cartesian3.fromElements(t[0]-e[0],t[1]-e[1],t[2]-e[2],Bt),Bt.equals(Cesium.Cartesian3.ZERO)&&(Bt=Cesium.Cartesian3.fromElements(1,1,1,Bt)),Bt=Cesium.Cartesian3.normalize(Bt,Bt),Vt=Cesium.Cartesian3.fromElements(i[0]-e[0],i[1]-e[1],i[2]-e[2],Vt);const s=Cesium.Cartesian3.dot(Bt,Vt);return Bt=Cesium.Cartesian3.multiplyByScalar(Bt,s,Bt),[Bt.x+e[0],Bt.y+e[1],Bt.z+e[2]]}function qt(e,t){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2)}function Jt(e,t){return Bt=Cesium.Cartesian3.fromElements(e[0],e[1],e[2],Bt),Vt=Cesium.Cartesian3.fromElements(t[0],t[1],t[2],Vt),Cesium.Cartesian3.distance(Bt,Vt)}function Kt(e,t,i,s){Bt=Cesium.Cartesian3.fromElements(t[0]-e[0],t[1]-e[1],t[2]-e[2],Bt),Vt=Cesium.Cartesian3.fromElements(i[0]-e[0],i[1]-e[1],i[2]-e[2],Vt),Ut=Cesium.Cartesian3.fromElements(i[0]-t[0],i[1]-t[1],i[2]-i[2],Ut);const r=Cesium.Cartesian3.magnitude(Bt);return!(r<Cesium.Cartesian3.magnitude(Vt)||r<Cesium.Cartesian3.magnitude(Ut))&&(Bt=Cesium.Cartesian3.normalize(Bt,Bt),Vt=Cesium.Cartesian3.normalize(Vt,Vt),Bt.equalsEpsilon(Vt,s||Cesium.Math.EPSILON5))}function Zt(e,t,i,s){Ht=Cesium.Cartesian2.fromElements(t[0]-e[0],t[1]-e[1],Ht),Gt=Cesium.Cartesian2.fromElements(i[0]-e[0],i[1]-e[1],Gt),zt=Cesium.Cartesian2.fromElements(i[0]-t[0],i[1]-t[1],zt);const r=Cesium.Cartesian2.magnitude(Ht);return!(r<Cesium.Cartesian2.magnitude(Gt)||r<Cesium.Cartesian2.magnitude(zt))&&(Ht=Cesium.Cartesian2.normalize(Ht,Ht),Gt=Cesium.Cartesian2.normalize(Gt,Gt),Ht.equalsEpsilon(Gt,s||Cesium.Math.EPSILON5))}function Qt(e,t){const i=W.mercatorToWgs84(e);return Bt=Cesium.Cartesian3.fromDegrees(i[0],i[1],i[2]),Vt=t.globe.ellipsoid.geodeticSurfaceNormal(Bt,Vt),Vt=Cesium.Cartesian3.cross(t.camera.rightWC,Vt,Vt),Vt=Cesium.Cartesian3.normalize(Vt,Vt),Cesium.Plane.fromPointNormal(Bt,Vt)}function Xt(e,t){const i=W.mercatorToWgs84(e);return Bt=Cesium.Cartesian3.fromDegrees(i[0],i[1],i[2]),Vt=t.globe.ellipsoid.geodeticSurfaceNormal(Bt,Vt),Cesium.Plane.fromPointNormal(Bt,Vt)}function $t(e,t){const i=t||e.getCoordinates();let s=null;return e instanceof ol.geom.Point?s=[i]:e instanceof ol.geom.LineString?s=i:e instanceof ol.geom.Polygon?s=i.reduce((e,t)=>e.concat(t)):e instanceof ol.geom.MultiPoint?s=i:e instanceof ol.geom.MultiLineString?s=i.reduce((e,t)=>e.concat(t)):e instanceof ol.geom.MultiPolygon?s=i.reduce((e,t)=>e.concat(t)).reduce((e,t)=>e.concat(t)):e instanceof ol.geom.Circle?s=i:e instanceof ol.geom.GeometryCollection&&(s=e.getGeometries().map((e,t)=>$t(e,i[t])).reduce((e,t)=>e.concat(t))),s}function ei(e,t,i){let s=-1/0,r=1/0;const n=e.getGeometry();if(n){const t=$t(n);let a=t.length;while(a--)3===t[a].length&&(s=t[a][2]>s?t[a][2]:s,r=t[a][2]<r?t[a][2]:r);if(!i&&"sphere"===e.get("olcs.circle_type")&&n instanceof ol.geom.Circle){const e=n.getCoordinates();W.mercatorToWgs84(e[0],!0),W.mercatorToWgs84(e[1],!0);const t=Nt.haversineDistance(e[0],e[1]),i=e[0][2]||0;s=i+t>s?i+t:s,r=i-t<r?i-t:r}}if(r=r===1/0?0:r,!i){let i=e.get("olcs_extrudedHeight");if(!i){const s=e.get("olcs_storeyHeight")||t,r=e.get("olcs_storeyNumber");s&&r&&(i=r*s)}const n=e.get("olcs_groundLevel");i&&(r=n||r),Array.isArray(i)||i&&(i>0?(s=n||s,s=r+i>s?r+i:s):(s=r>s?r:s,r=r+i<r?r+i:r))}return{max:r>s?r:s,min:r}}function ti(e,t,i,s){function r(e){let r=e.length;while(r--)null==e[r][2]||s?e[r][2]=i:e[r][2]+=t;return e}const n=e.getCoordinates(),a=$t(e,n);r(a),e.setCoordinates(n)}function ii(e){e.unset("olcs_groundLevel",!0);const t=j.getInstance().getActiveMap();if(t instanceof Pt){const i=e.getGeometry();if(i){const e=i.getCoordinates(),s=$t(i,e);return t.getHeightFromTerrain(s).then(()=>{i.setCoordinates(e)})}}return Promise.resolve()}function si(e){e.set("olcs_altitudeMode","clampToGround")}function ri(e){return e instanceof ol.geom.Circle?ol.geom.Polygon.fromCircle(e):(e instanceof ol.geom.Polygon&&e.unset("_vcsGeomType"),e)}function ni(e,t){const i=Nt.offset(W.mercatorToWgs84(e),t,Math.PI/2),s=W.wgs84ToMercator(i),r=e[0]-s[0],n=e[1]-s[1],a=r*r,o=n*n,l=Math.sqrt(a+o);return new ol.geom.Circle(e,l,"XYZ")}function ai(e){let t=0;for(let i=0;i<e.length;i++){let s=i+1;s>=e.length&&(s=0);const r=e[i],n=e[s],a=jt(r,n);a>t&&(t=a)}return t}function oi(e,t){const i=ai(t.groundCoordinates),s=Math.PI/3,r=e.getViewport(),n={height:r.offsetHeight,width:r.offsetWidth},a=n.width/n.height,o=2*Math.atan(Math.tan(.5*s)/a),[l,c]=t.size,u=l>c?l:c,h=i/u;return{size:n,fovy:o,metersPerUnit:h}}function li(e,t,i){const s=e instanceof ol.geom.Circle?ol.geom.Polygon.fromCircle(e):e,r=s.getCoordinates(),n=$t(s,r),a=ol.proj.getTransform(ol.proj.get("EPSG:4326"),i.projection),o=n.map(e=>(W.mercatorToWgs84(e,!0),Cesium.Cartographic.fromDegrees(e[0],e[1])));return Cesium.sampleTerrainMostDetailed(i.terrainProvider,o).then(e=>(n.forEach(e=>a(e,e,3)),e.forEach((e,t)=>{const s=i.transformRealWorld2Image(n[t],e.height);n[t][0]=s[0],n[t][1]=s[1]}),t.setCoordinates(r),t))}function ci(e,t,i){const s=e.getCoordinates(),r=ol.proj.get("EPSG:3857"),n=$t(e,s),a=n.map(e=>Object(At["e"])(i,e,{dataProjection:r}).then(t=>{e[0]=t.coords[0],e[1]=t.coords[1],e[2]=t.coords[2]}));return Promise.all(a).then(()=>(t.setCoordinates(s),t))}function ui(e){const t=e.getGeometry(),i=t instanceof ol.geom.Circle,s=ri(t);return i&&e.setGeometry(s),s}var hi=i(564),di=i(98),mi=i(493),gi=i(69);class pi extends gi["a"]{constructor(e){e.footPrintFeatures.forEach(t=>{t.set("direction",e.direction)}),super(e),this.layer=e.layer||null,this.suppressPublish=!1}addOptions(e){e.footPrintFeatures.forEach(e=>{e.set("direction",this.direction)}),super.addOptions(e)}activateWithViewPoint(e,t){return this.olMap!==e&&this.deactivate(),this.state===gi["a"].STATE.INACTIVE&&(this.state=gi["a"].STATE.LOADING,this.olMap=e,t)?this.setViewPoint(t).then(()=>{this.state=gi["a"].STATE.ACTIVE}):Promise.resolve(this.state)}setImageOnMap(e,t){const i=!this.suppressPublish&&(!this.currentImage||this.currentImage.name!==e);return super.setImageOnMap(e,t).then(()=>{i&&j.getInstance().publish(L.OBLIQUE_IMAGE_CHANGED,this.layer,this.currentImage)})}setViewPoint(e,t){let i=e.groundPosition;i||(i=e.cameraPosition);const s=ol.proj.transform(i,q.proj,this.projection),r=this.getImageNameForCoordinates(s);if(null!=r){const n=i[2]||!this.terrainProvider?Promise.resolve([s]):Object(At["c"])(this.terrainProvider,[s],this.projection);return n.then(([e])=>this.setImageOnMap(r,e)).catch(()=>this.setImageOnMap(r,s)).then(()=>{let{distance:i}=e;i||(i=e.cameraPosition?e.cameraPosition[2]:1e3);const{size:s,fovy:r,metersPerUnit:n}=oi(this.olMap,this.currentImage),a=2*i*Math.tan(r/2),o=a/n,l=o/s.height,{view:c}=this.currentView;c.setResolution(t?l:c.constrainResolution(l))})}return Promise.reject(new Error("could not find an image in this direction"))}canShowViewpoint(e){let t=e.groundPosition;t||(t=e.cameraPosition);const i=ol.proj.transform(t,q.proj,this.projection),s=this.getImageNameForCoordinates(i);if(null!=s){const e=this.images[s],t=ol.extent.boundingExtent(e.groundCoordinates);return ol.extent.containsCoordinate(t,i)}return!1}}var fi=pi;class yi extends hi["a"]{constructor(e){super(e),this.layer=e.layer,this.directions={}}handleMetadataResponse(e,t){const i=hi["a"].getVersion(e);return i.version>=3.5||3.4===i.version&&i.buildNumber>=36?this.handleMetadataResponseV35(e,t,i):(i.version>=3.1||null===i.version?this.handleMetadataResponseV34(e,t,i):console.log("Could not load Meta Data, only meta data version 3.4 and higher are supported"),Promise.resolve())}createDirection(e){return new fi(Object.assign({layer:this.layer},e))}handleMetadataResponseV34(e,t,i){const s=[e.generalImageInfo.width,e.generalImageInfo.height],r=e.generalImageInfo["tile-resolution"],n=[e.generalImageInfo["tile-width"],e.generalImageInfo["tile-width"]];e.generalImageInfo.width&&e.generalImageInfo.height&&e.generalImageInfo["tile-resolution"]&&this.getImageMeta(t,s,r,n,i);const a=[],{cameraParameter:o}=e.generalImageInfo;o&&Object.keys(o).forEach(e=>{const t=new mi["a"](Object.assign({name:e},o[e]));a.push(t)});const l={};e.images&&Array.isArray(e.images)&&(e.images.forEach(e=>{const c=yi.getImageOptionsFromJSON(e,a,o),u=e.width&&e.height?[e.width,e.height]:s,h=e["tile-resolution"]?e["tile-resolution"]:r,d=this.getImageMeta(t,u,h,n,i),m=new di["a"](Object.assign({terrainProvider:this.terrainProvider,projection:this.projection,meta:d},c));l[m.viewDirection]||(l[m.viewDirection]={direction:m.viewDirection,images:{},rTreeItems:[],footPrintFeatures:[],projection:this.projection,terrainProvider:this.terrainProvider}),l[m.viewDirection].images[m.name]=m,l[m.viewDirection].rTreeItems.push({minX:m.centerPointOnGround[0],minY:m.centerPointOnGround[1],maxX:m.centerPointOnGround[0],maxY:m.centerPointOnGround[1],name:m.name});const g=new ol.geom.Polygon([m.groundCoordinates.concat([m.groundCoordinates[0]])]);g.transform(this.projection,ol.proj.get("EPSG:3857"));const p=new ol.Feature({geometry:g});p.setId(m.name),l[m.viewDirection].footPrintFeatures.push(p)}),this.handleDirectionOptions(l))}static getImageOptionsFromJSON(e,t,i){const s=u["c"][e["view-direction"]],r=e["view-directionAngle"],n=e["projection-center"],{name:a,groundCoordinates:o,centerPointOnGround:l}=e,c=e["camera-name"],h=t.find(e=>e.name===c),d={name:a,viewDirection:s,viewDirectionAngle:r,groundCoordinates:o,centerPointOnGround:l};if(h){const t=i[c],s=Cesium.Matrix3.fromRowMajorArray([].concat(...t["camera-matrix"])),r=Cesium.Matrix3.inverse(s,new Cesium.Matrix3),a=Cesium.Matrix3.fromRowMajorArray([].concat(...e["rotation-matrix"])),o=Cesium.Matrix3.transpose(a,new Cesium.Matrix3),l=-1*t["focal-length"];Cesium.Matrix3.multiplyByScalar(r,l,r);const u=Cesium.Matrix3.multiply(o,r,new Cesium.Matrix3),m=Cesium.Matrix4.fromRotationTranslation(s,Cesium.Cartesian3.ZERO,new Cesium.Matrix4),g=Cesium.Cartesian3.fromArray(n),p=Cesium.Matrix4.fromTranslation(Cesium.Cartesian3.multiplyByScalar(g,-1,new Cesium.Cartesian3),new Cesium.Matrix4),f=Cesium.Matrix4.fromRotationTranslation(a,Cesium.Cartesian3.ZERO,new Cesium.Matrix4),y=Cesium.Matrix4.multiply(m,Cesium.Matrix4.multiply(f,p,new Cesium.Matrix4),new Cesium.Matrix4);d.projectionCenter=g,d.camera=h,d.pToRealworld=u,d.pToImage=y}return d}destroy(){super.destroy(),this.layer=null}}var _i=yi;Mt.OBLIQUE_OBLIQUELAYER=Mt.lastLayerId,Mt.lastLayerId+=1,L.OBLIQUE_IMAGE_CHANGED="OBLIQUE_IMAGE_CHANGED",L.OBLIQUE_DIRECTION_CHANGED="OBLIQUE_DIRECTION_CHANGED";const vi={[u["a"].NORTH]:0,[u["a"].EAST]:90,[u["a"].SOUTH]:180,[u["a"].WEST]:270};function Li(e){const{heading:t}=e;let i=u["a"].NORTH;return t>=45&&t<135?i=u["a"].EAST:t>=135&&t<225?i=u["a"].SOUTH:t>=225&&t<315&&(i=u["a"].WEST),i}class Mi extends Et{static get className(){return"vcs.vcm.layer.oblique.ObliqueLayer"}constructor(e){e.layertype=Mt.OBLIQUE_OBLIQUELAYER,e.className=Mi.className,super(e);const t=e.terrain?e.terrain.url:e.terrainUrl;this.terrainProvider=t?kt({url:t}):null,this.sourceProjection=e.projection?new W(e.projection):new W({epsg:e.epsg,proj4:e.proj4}),this.terrainErrorThreshold=Object(c["g"])(e.terrainErrorThreshold,1),this.terrainErrorCountThreshold=Object(c["h"])(e.terrainErrorCountThreshold,3),this.obliqueCollection=new _i({terrainProvider:this.terrainProvider,projection:this.sourceProjection.proj,minZoom:e.minZoom,maxZoom:e.maxZoom,hideLevels:e.hideLevels,layer:this}),this.obliqueMap=null,this.currentDirection=null,this.isDefaultObliqueLayer=this.activeOnStartup}get currentImage(){return this.currentDirection?this.currentDirection.currentImage:null}initialize(){return this.initialized?Promise.resolve():(this.obliqueMap||(this.obliqueMap=this.framework.getMapByType("vcs.vcm.maps.Oblique"),this.obliqueMap||this.logger.warning("Oblique layer is not loading on top of an oblique map, please check: "+this.name),this.olMap=this.obliqueMap.olMap),this.obliqueCollection.loadData(this.url).then(()=>{this.initialized=!0,this.currentDirection=this.obliqueCollection.directions[u["a"].NORTH]}))}activate(e){if(null!=e&&this.logger.deprecate("activate","activate no longer accepts an argument, use deactivate to deactivate the layer"),!1===e)return this.deactivate(),Promise.resolve();if(this._state&wt.INACTIVE&&this.isSupported()){const e=this.framework.getActiveMap();return this.olMap=e.olMap,this._state|=wt.LOADING,e.setObliqueLayer(this)}return Promise.resolve()}deactivate(){this.logger.warning("cannot deactivate oblique base layer")}show(e){return this._state=wt.ACTIVE,this.initialize().then(()=>e?this.setViewPoint(e):this.currentDirection.activate(this.olMap,[0,0],this.obliqueCollection.options.minZoom))}hide(){this._state=wt.INACTIVE,this.currentDirection&&this.currentDirection.deactivate()}canShowViewpoint(e){return this.initialize().then(()=>this.obliqueCollection.isTiled?this.obliqueCollection.loadTiledImageJson(W.wgs84ToMercator(e.groundPosition||e.cameraPosition)):Promise.resolve()).then(()=>{const t=Li(e);return!!this.obliqueCollection.directions[t]&&this.obliqueCollection.directions[t].canShowViewpoint(e)})}getExtentOfCurrentImage(){return this.currentImage&&this.currentImage.groundCoordinates?new Le({coordinates:ol.extent.boundingExtent(this.currentImage.groundCoordinates),epsg:this.sourceProjection.epsg}):(this.logger.warning("No currentImage, cannot compute extent"),null)}computeViewpoint(e){if(!this.currentImage)return e?Promise.resolve(null):null;if(e)return Object(At["e"])(this.currentImage,this.olMap.getView().getCenter(),{dataProjection:ol.proj.get("EPSG:4326")}).then(({coords:e})=>this._computeViewpointInternal(e));const t=this.olMap.getView().getCenter(),i=this.currentImage.transformImage2RealWorld(t,this.currentImage.averageHeight),s=this.sourceProjection.transformTo(q,i);return this._computeViewpointInternal(s)}_computeViewpointInternal(e){const{size:t,fovy:i,metersPerUnit:s}=oi(this.olMap,this.currentImage),r=this.olMap.getView(),n=r.getResolution(),a=n*t.height,o=a*s,l=Math.abs(o/2/Math.tan(i/2)),c=e[2]||this.currentImage.averageHeight,u=l+c;return new me({cameraPosition:[e[0],e[1],u],groundPosition:e,heading:vi[this.currentImage.viewDirection],pitch:0,roll:0,distance:l})}async setViewPoint(e){const t=Li(e);if(this.obliqueCollection.isTiled&&await this.obliqueCollection.loadTiledImageJson(W.wgs84ToMercator(e.groundPosition||e.cameraPosition)),this.currentDirection){if(this.currentDirection.direction===t)return this.currentDirection.state===gi["a"].STATE.ACTIVE?this.currentDirection.setViewPoint(e):this.currentDirection.activateWithViewPoint(this.olMap,e);this.currentDirection.deactivate()}return this.obliqueCollection.directions[t]&&(this.currentDirection=this.obliqueCollection.directions[t]),this.currentDirection.suppressPublish=!0,this.currentDirection.activateWithViewPoint(this.olMap,e).then(()=>{this.framework.publish(L.OBLIQUE_DIRECTION_CHANGED,this,this.currentDirection),this.framework.publish(L.OBLIQUE_IMAGE_CHANGED,this,this.currentImage),this.currentDirection.suppressPublish=!1}).catch(e=>{this.logger.error(e.message),this.currentDirection.suppressPublish=!1})}async getImageIdInDirection(e,t){const i=2*Math.PI-(e*Math.PI/180-Math.PI/2),s=this.currentDirection.getImageIdInDirection(i,t);if(!s&&this.obliqueCollection.isTiled){const{currentImage:s}=this,r=ol.proj.getTransform(s.projection,J.proj),n=this.obliqueCollection.getTileCoordinate(r(this.currentImage.centerPointOnGround.slice(0,2)));return e>315||e<=45?n[2]-=1:e>45&&e<=135?n[1]+=1:e>135&&e<=225?n[2]+=1:n[1]-=1,await this.obliqueCollection.loadTile(n.join("/")),this.currentDirection.getImageIdInDirection(i,t)}return s}getCurrentImage(){return this.currentImage}existsImageForViewDirection(e){const t=this.currentImage.transformRealWorld2Image(e);return!(t[0]<0||t[0]>this.currentImage.size[0]||t[1]<0||t[1]>this.currentImage.size[1])}dispose(){super.dispose(),this.obliqueCollection.destroy()}}var bi=Mi;class wi extends ue{static get className(){return"vcs.vcm.maps.Oblique"}constructor(e){e.className=wi.className,super(e),this.olMap=null,this.mouseClickEvents=!1,this.activeLayer=null,this.listenerKey=null,this.mapChangeEvent=e.changeOnMoveEnd?"moveend":"postrender",this.switchThreshold=Object(c["g"])(e.switchThreshold,0),this.switchThreshold>1&&(this.switchThreshold=.2),this._switchOnEdge=null==e.switchOnEdge||e.switchOnEdge,this.switchEnabled=!0,this.supportedlayers=[Mt.OBLIQUE_OBLIQUELAYER,Mt.VECTOR,Mt.GEOJSON,Mt.WSV,Mt.CLUSTER],this.interactionsDefaultsObject={altShiftDragRotate:!1,pinchRotate:!1,shiftDragZoom:!1,doubleClickZoom:!1},this._initialViewpoint=null}get switchOnEdge(){return this._switchOnEdge}set switchOnEdge(e){this.logger.warning("switchOnEdge is deprecated, use switchEnabled instead"),this._switchOnEdge=e}_getInitialLayer(){const e=Object.values(this.framework.getLayers()).filter(e=>e instanceof bi);return e.find(e=>e.isDefaultObliqueLayer)||e[0]}initialize(){if(!this.initializedPromise){this.olMap||(this.olMap=new ol.Map({layers:[],logo:!1,controls:[],loadTilesWhileInteracting:!0,interactions:this.getMapInteractions(),target:this.mapElement}));const e=this._getInitialLayer();if(!e)return Promise.reject(new Error("Could not find an oblique layer for configured oblique map"));this.setLayerLoading(e,!0),this.initializedPromise=e.activate().then(()=>{this.initialized=!0,this.olMap.on(this.mapChangeEvent,this._postRenderHandler.bind(this))})}return this.initializedPromise}canShowViewpoint(e){if(this.initialized&&this.activeLayer)return this.activeLayer.canShowViewpoint(e);const t=this._getInitialLayer();return t?t.canShowViewpoint(e):Promise.reject(new Error("Could not find an oblique layer for configured oblique map"))}getOl3Map(){return this.logger.deprecate("getOl3Map","access the olMap property directly"),this.olMap}setObliqueLayer(e){this.switchEnabled=!1;let t=Promise.resolve(null);if(this.activeLayer){const e=this.activeLayer;t=e.computeViewpoint(!0).then(t=>(e.hide(),this.framework.publish(L.LAYER_CHANGED,e),this.framework.publish(L.LAYER_DEACTIVATED,e),t))}else this._initialViewpoint&&(this.olMap.updateSize(),t=Promise.resolve(this._initialViewpoint));return this.setLayerLoading(e,!0),this.activeLayer=e,t.then(e=>this.activeLayer.show(e)).then(()=>{this.framework.getActiveMap().setLayerLoading(e,!1),this.switchEnabled=!0,this.framework.publish(L.LAYER_CHANGED,this.activeLayer),this.framework.publish(L.LAYER_ACTIVATED,this.activeLayer)}).catch(t=>{this.activeLayer=null,this.logger.warning("could not show oblique layer "+e.name),this.logger.warning(""+t.message)})}_postRenderHandler(){if(this.active&&this._switchOnEdge&&this.switchEnabled){const e=this.olMap.getView().getCenter(),{currentImage:t,currentDirection:i,obliqueCollection:s}=this.activeLayer,r=this.switchThreshold,n=1-r;if(!t||e[0]/t.size[0]>r&&e[0]/t.size[0]<n&&e[1]/t.size[1]>r&&e[1]/t.size[1]<n)return;if(null===t.averageHeight)return;if(s.isTiled){const i=W.transform(J,this.activeLayer.sourceProjection,t.transformImage2RealWorld(e));s.loadTiledImageJson(i)}i.postRenderHandler(e)}}async activate(e){this.show(),this.switchEnabled=!0,this.initialized||(await this.initialize(),this.olMap.updateSize()),e&&await this.gotoViewPoint(e),this.active=!0}getExtentOfCurrentImage(){return this.activeLayer?this.activeLayer.getExtentOfCurrentImage():(this.logger.warning("Could not compute extent, because no oblique layer is active in the map"),new Le({coordinates:[-18924313.4349,-15538711.0963,18924313.4349,15538711.0963],epsg:"EPSG:3857"}))}getExtent(){return this.activeLayer?this.activeLayer.getExtent():(this.logger.warning("Could not compute extent, because no oblique layer is active in the map"),new Le({coordinates:[-18924313.4349,-15538711.0963,18924313.4349,15538711.0963],epsg:"EPSG:3857"}))}getCurrentImage(){return this.activeLayer?this.activeLayer.currentImage:(this.logger.warning("Could not obtain currentImage, because no oblique layer is active in the map"),null)}deactivate(){return this.initializedPromise.then(()=>(this.active=!1,this.getViewPoint(!1,!0).then(e=>(this.hide(),e))))}getViewPoint(e,t){return this.activeLayer?this.activeLayer.computeViewpoint(t):this._initialViewpoint?t?Promise.resolve(this._initialViewpoint):this._initialViewpoint:t?Promise.reject(new Error("no active layer or cachedViewpoint")):null}disableMovement(e){super.disableMovement(e),this.olMap.getInteractions().forEach(t=>{t.setActive(!e)})}gotoViewPoint(e){return this.movementDisabled?Promise.resolve():this.activeLayer?this.activeLayer.setViewPoint(e):(this.logger.warning("Can't go to viewpoint, no active oblique layer."),Promise.resolve())}getMapInteractions(){return ol.interaction.defaults(this.interactionsDefaultsObject)}getolMap(){return this.logger.deprecate("getolMap","access the olMap property directly"),this.olMap}pointIsVisible(e){const t=this.olMap.getView(),i=t.calculateExtent(this.olMap.getSize());let s=[i[0],i[3]];s=this.activeLayer.currentImage.transformImage2RealWorld(s);let r=[i[2],i[1]];r=this.activeLayer.currentImage.transformImage2RealWorld(r);const n=[s,r],a=W.transformCoordinates(q,this.activeLayer.sourceProjection,n);return ol.extent.containsXY(ol.extent.boundingExtent(a),e[0],e[1])}getLink(e){return super.getLink(e).then(()=>(e.addQueryParams({osi:this.getCurrentImage().name}),e))}async handleURLParameter(e){if(this.active&&e.osi){const t=this.getCurrentImage();if(t.name!==e.osi){const{coords:i}=await Object(At["e"])(t,this.olMap.getView().getCenter());await this.activeLayer.currentDirection.setImageOnMap(e.osi,i)}}}requestRender(){this.initialized&&this.olMap.render()}dispose(){this.olMap.setTarget(null),super.dispose()}}var Ti=wi;let Si=new Cesium.Cartographic,Ci=new Cesium.Cartesian3;class Ei extends se{constructor(){super(),this.activeMapHandler=this.pipeThrough,this._defaultActive=X.ALL,this._defaultModificationKey=Q.ALL,this.setActive()}pipe(e){return this.activeMapHandler(e)}handleMapChange(e){this.activeMapHandler=e instanceof Pt?Ei.cesiumHandler.bind(null,e):e instanceof Ti?Ei.obliqueHandler.bind(null,e):this.pipeThrough}static cesiumHandler(e,t){const i=e.getScene();return t.ray=i.camera.getPickRay(t.windowPosition),Ci=i.globe.pick(t.ray,i,Ci),Ci?(Si=Cesium.Cartographic.fromCartesian(Ci,i.globe.ellipsoid,Si),t.position=W.wgs84ToMercator([Cesium.Math.toDegrees(Si.longitude),Cesium.Math.toDegrees(Si.latitude),Si.height],!0)):(Ci=new Cesium.Cartesian3,t.position=[0,0,0]),t.positionOrPixel=t.position,Promise.resolve(t)}static obliqueHandler(e,t){if(e.activeLayer&&e.activeLayer.currentImage){const i=t.type&(X.MOVE^X.DRAGEVENTS),s=t.position.slice(0,2);return Object(At["e"])(e.activeLayer.currentImage,s,{dontUseTerrain:!!i,dataProjection:J.proj}).then(e=>(t.obliqueParameters={pixel:s},t.position=e.coords,t.obliqueParameters.estimate=e.estimate,t))}return t.stopPropagation=!0,Promise.resolve(t)}}var Ii=Ei;class ki extends ue{static get className(){return"vcs.vcm.maps.Openlayers"}constructor(e){e.className=ki.className,super(e),this.olMap=null,this.listenerKey=null,this.fixedNorthOrientation=Object(c["e"])(e.fixedNorthOrientation,!0),this.supportedlayers=[Mt.TMSBase,Mt.VECTOR,Mt.CLUSTER,Mt.WSV,Mt.WMS,Mt.WMTS,Mt.GEOJSON,Mt.IMAGE,Mt.OPENSTREETMAP,Mt.TILED_LAYER]}initialize(){this.initialized||(this.olMap=new ol.Map({layers:[],logo:!1,controls:[],interactions:ol.interaction.defaults({altShiftDragRotate:!1,pinchRotate:!1,shiftDragZoom:!1,doubleClickZoom:!1}),loadTilesWhileInteracting:!0,target:this.mapElement,view:new ol.View({center:[1230922.6203948376,6350766.117974091],zoom:13})}),this.initialized=!0)}activate(e){return this.active=!0,this.show(),this.initialize(),e?(this.fixedNorthOrientation&&(e.heading=0),this.gotoViewPoint(e)):(this.olMap.updateSize(),Promise.resolve())}getViewPoint(e,t){const i=this.olMap.getView(),s=i.getCenter(),r=ol.proj.getTransform(i.getProjection(),"EPSG:4326"),n=Math.PI/3,a=this.olMap.getViewport(),o={};o.height=a.offsetHeight,o.width=a.offsetWidth;const l=o.width/o.height,c=2*Math.atan(Math.tan(.5*n)/l),u=r(s.slice(0,2)),h=i.getProjection().getMetersPerUnit(),d=i.getResolution(),m=d*o.height,g=Math.cos(Math.abs(Cesium.Math.toRadians(u[1]))),p=m*h*g,f=Math.abs(p/2/Math.tan(c/2)),y=-Cesium.Math.toDegrees(i.getRotation()),_=u,v=-90,L=new me({groundPosition:_,pitch:v,heading:y,distance:f});return t?Promise.resolve(L):L}disableMovement(e){super.disableMovement(e),this.olMap.getInteractions().forEach(t=>{t.setActive(!e)})}gotoViewPoint(e){if(this.movementDisabled)return Promise.resolve();const t=this.olMap.getView(),i=ol.proj.getTransform("EPSG:4326",t.getProjection());let s=[];s=e.groundPosition?e.groundPosition.slice(0,2):e.cameraPosition.slice(0,2);const r=e.distance||e.cameraPosition[2],n=i(s),a=Math.PI/3,o=this.olMap.getViewport(),l={};l.height=o.offsetHeight?o.offsetHeight:1,l.width=o.offsetWidth?o.offsetWidth:1;const c=l.width/l.height,u=2*Math.atan(Math.tan(.5*a)/c),h=2*r*Math.tan(u/2),d=t.getProjection().getMetersPerUnit(),m=Math.cos(Math.abs(Cesium.Math.toRadians(s[1]))),g=h/d/m,p=g/l.height;if(e.animate){let i=0;this.fixedNorthOrientation||null==e.heading||(i=-Cesium.Math.toRadians(e.heading)),t.animate({duration:e.duration||100,center:n,easing:ol.easing.inAndOut,resolution:p,rotation:i})}else t.setCenter(n),t.setResolution(p),this.fixedNorthOrientation||null==e.heading||t.setRotation(-Cesium.Math.toRadians(e.heading));return Promise.resolve()}getolMap(){return this.logger.deprecate("getolMap","access the olMap property directly"),this.olMap}getOl3Map(){return this.logger.deprecate("getOl3Map","access the olMap property directly"),this.olMap}pointIsVisible(e){const t=this.olMap.getView(),i=t.calculateExtent(this.olMap.getSize()),s=ol.proj.getTransform(t.getProjection(),"EPSG:4326"),r=[i[0],i[3]],n=[i[2],i[1]],a=[s(r),s(n)];return ol.extent.containsXY(ol.extent.boundingExtent(a),e[0],e[1])}requestRender(){this.initialized&&this.olMap.render()}}var Di=ki;i(596),i(610);function Oi(e,t,i,s){const r=1e-6,n=[0,0,0],a=[0,0,0],o=[0,0,0],l=[0,0,0],c=[0,0,0];function u(e,t,i){let s=t[0],r=t[1],n=t[2],a=i[0],o=i[1],l=i[2];return e[0]=r*l-n*o,e[1]=n*a-s*l,e[2]=s*o-r*a,e}function h(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function d(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}h(n,s[1],s[0]),h(a,s[2],s[0]),u(l,i,a);const m=d(n,l);if(m<r)return null;h(o,t,s[0]);const g=d(o,l);if(g<0||g>m)return null;u(c,o,n);const p=d(i,c);if(p<0||g+p>m)return null;const f=d(a,c)/m;return e[0]=t[0]+f*i[0],e[1]=t[1]+f*i[1],e[2]=t[2]+f*i[2],e}function Pi(e){const t=4;e||console.error("b3dmBuffer is not defined.");const i=new Uint8Array(e),s=Cesium.getStringFromTypedArray(i,0,4);"b3dm"!==s&&console.error(`Invalid magic, expected "b3dm", got: "${s}".`);const r=new DataView(e);let n=4;const a=r.getUint32(n,!0);1!==a&&console.error(`Invalid version, only "1" is valid, got: "${a}".`),n+=t;const o=r.getUint32(n,!0);n+=t;let l=r.getUint32(n,!0);n+=t;let c=r.getUint32(n,!0);n+=t;let u=r.getUint32(n,!0);n+=t;let h,d=r.getUint32(n,!0);n+=t,u>=570425344?(n-=2*t,h=l,u=c,d=0,l=0,c=0):d>=570425344&&(n-=t,h=u,u=l,d=c,l=0,c=0),n+=u,n+=d,n+=l,n+=c,0!==d&&console.error("The length of the binary BatchTable is not zero, currently only JSON based BatchTables are supported");const m=new Uint8Array(e,n,o-n);return{header:{magic:s,version:a,batchLength:h},batchTable:null,binaryGLTF:m}}function Ai(e){const t=4;function i(e){const t=Cesium.getMagic(e);return"glTF"===t}i(e)||console.error("bgltf is not a valid Binary glTF file.");const s=new DataView(e.buffer,e.byteOffset,e.byteLength);let r=t;const n=s.getUint32(r,!0);if(1!==n&&2!==n&&console.error(`Only Binary glTF version 1 is supported.  Version ${n} is not.`),1===n){r+=t;const i=s.getUint32(r,!0);console.log("len",i),r+=t;const a=s.getUint32(r,!0);r+=t;const o=s.getUint32(r,!0);0!==o&&console.error("content format should be 0 (-> JSON)");const l=20+a;r+=t;const c=r,u=c+a,h=Cesium.getStringFromTypedArray(e,c,a),d=e.subarray(l,i);return{glTF:JSON.parse(h),binaryOffset:u,binaryData:d,version:n,contentLength:a}}let a=null;r+=t;const o=s.getUint32(r,!0);let l,c=12;while(c<o){const t=new DataView(e.buffer,e.byteOffset+c,8),i=t.getInt32(0,!0),s=t.getInt32(4,!0);c+=8;const r=e.subarray(c,c+i);if(c+=i,1313821514===s){const e=Cesium.getStringFromTypedArray(r);a=JSON.parse(e)}else 5130562===s&&(l=r)}return{glTF:a,version:n,binaryData:l}}function xi(e){const t=[],i=e.meshes;for(const s in i){if(!i.hasOwnProperty(s))continue;const r=i[s].primitives;for(let i=0;i<r.length;i++){const s=r[i].mode;if(4!=s){console.log("Unknown mode: "+s);continue}const n=r[i].attributes.POSITION,a=e.accessors[n],o=a.bufferView,l=void 0!==r[i].attributes.BATCHID&&null!==r[i].attributes.BATCHID?r[i].attributes.BATCHID:r[i].attributes._BATCHID,c=e.accessors[l],u=c.bufferView,h={positionAccessor:a,positionBufferView:e.bufferViews[o],batchIdAccessor:c,batchIdBufferView:e.bufferViews[u]};t.push(h)}}return t}function Yi(e){const t=[];for(let i=0;i<e.length;i+=3){const s=[];s.push(e[i]),s.push(e[i+1]),s.push(e[i+2]),t.push(s)}return t}function ji(e,t,i,s,r,n){const a=new Array(3);let o=new Cesium.Matrix4;new Cesium.Matrix4;const l=Object.keys(n.glTF.nodes);o=Cesium.Matrix4.fromArray(n.glTF.nodes[l[0]].matrix,0,o);for(let g=0;g<3;g++)a[g]=e.getFloat32(t+i*g,!0);let c=new Cesium.Cartesian3;c=Cesium.Matrix4.multiplyByPoint(o,new Cesium.Cartesian3(a[0],a[1],a[2]),c);const u=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationX(Cesium.Math.PI_OVER_TWO));let h=new Cesium.Cartesian3;h=Cesium.Matrix4.multiplyByPoint(u,c,h);const d=Cesium.Cartesian3.fromArray(r.center,0);let m=new Cesium.Cartesian3;return m=Cesium.Cartesian3.add(d,h,m),[m.x,m.y,m.z]}function Ni(e,t,i,s){function r(e){const t=e.componentType;switch(t){case 5120:case 5121:return 1;case 5122:case 5123:return 2;case 5126:return 4}}const n=i.glTF.extensions.CESIUM_RTC,a=(Cesium.Cartographic.fromCartesian(new Cesium.Cartesian3(n.center[0],n.center[1],n.center[2])),i.contentLength,[]);for(let o=0;o<t.length;o++){const e=t[o];if(e.batchIdAccessor.min[0]<=s&&e.batchIdAccessor.max[0]>=s){const t=r(e.positionAccessor),o=r(e.batchIdAccessor);let l,c;1===i.version?(l=null!=e.positionAccessor.byteStride?e.positionAccessor.byteStride:t,c=null!=e.batchIdAccessor.byteStride?e.batchIdAccessor.byteStride:o):(l=null!=e.positionBufferView.byteStride?e.positionBufferView.byteStride:t,c=null!=e.batchIdBufferView.byteStride?e.batchIdBufferView.byteStride:o);const u=e.positionBufferView,h=e.batchIdBufferView,d=new DataView(i.binaryData.buffer,i.binaryData.byteOffset+h.byteOffset,h.byteLength),m=new DataView(i.binaryData.buffer,i.binaryData.byteOffset+u.byteOffset,u.byteLength),g=null!=e.positionAccessor.byteOffset?e.positionAccessor.byteOffset:0;for(let r=0,p=e.batchIdAccessor.byteOffset;r<e.batchIdAccessor.count;r++,p+=c){const e=d.getUint16(p,!0);if(e===s){const e=ji(m,g+r*l,t,l,n,i);a.push(e)}}}}return a}function Fi(e,t){function i(e,t){let i,s=0;for(i=0;i<e.length;i++)s+=Math.pow(e[i]-t[i],2);return s}let s,r=99999999999;for(let n=0;n<t.length;n++){const a=Oi([],e.origin,e.direction,t[n]);if(null!=a){const t=i(e.origin,a);r>=t&&(r=t,s=a)}}return null==s?(console.error("No intersection found!"),null):s}function Ri(e,t,i,s){return Cesium.Resource.fetchArrayBuffer({url:e}).then(e=>{const r=Pi(e),n=r.binaryGLTF,a=Ai(n),o=xi(a.glTF),l=Ni(n,o,a,t),c=Yi(l),u={origin:[i.origin.x,i.origin.y,i.origin.z],direction:[i.direction.x,i.direction.y,i.direction.z]},h=Fi(u,c);if(h)return Cesium.Cartesian3.fromElements(h[0],h[1],h[2],s)}).otherwise(e=>{console.error(e)})}var Hi=i(5),Gi=i(581),zi=i.n(Gi);class Bi extends Et{constructor(e){super(e),this.specificImpl={},this.options.commonLayer=this}getImplementation(e){const t=e.id;return this.specificImpl[t]||(this.specificImpl[t]=this.getImplementationObject(e.className)),this.specificImpl[t]}getImplementations(){return Object.values(this.specificImpl).filter(e=>e)}getImplementationObject(e){return ue.specificLayerImpl[e]&&ue.specificLayerImpl[e][this.className]?new ue.specificLayerImpl[e][this.className](this.options):null}isCommonLayer(){return!0}initialize(){this.initialized=!0;const e=this.framework.getActiveMap();if(e){const t=this.getImplementation(e);if(t&&!t.initialized)return t.initialize()}return Promise.resolve()}synchronizeImplementations(e,t){let i=Promise.resolve();if(t){const e=this.getImplementation(t);e&&(i=i.then(()=>e.mapDeactivated(t)))}if(e){const t=this.getImplementation(e);t&&(i=i.then(()=>t.mapActivated(e)))}return i}synchronize(e,t){return this.synchronizeImplementations(e,t).then(()=>{const t=this.getImplementation(e);if(t&&this.isSupported(e)){if(this.active)return this.setSyncing(),this.activate();if(!this.initialized&&this.activeOnStartup)return this.activate()}return Promise.resolve()})}setSyncing(){this.active&&(this._state|=wt.SYNCING)}show(){const e=this.getImplementation(this.framework.getActiveMap());e&&e.initialized&&e.show()}hide(){this.getImplementations().forEach(e=>{e.initialized&&e.hide()})}setStyle(e,t){super.setStyle(e,t),this.getImplementations().forEach(e=>{e.updateStyle(t)})}dispose(){this.getImplementations().forEach(e=>{e.dispose()}),this.initialized=!1,this._state=wt.INACTIVE,this.specificImpl={},super.dispose()}}var Vi=Bi;let Ui=Z.interactionTypeCounter;const Wi={NONE:Ui=Z.getNextBit(Ui),SELECT:Ui=Z.getNextBit(Ui),TRANSLATE:Ui=Z.getNextBit(Ui),ROTATE:Ui=Z.getNextBit(Ui),SCALE:Ui=Z.getNextBit(Ui),CREATE:Ui=Z.getNextBit(Ui),EDIT:Ui=Z.getNextBit(Ui),REMOVEVERTEX:Ui=Z.getNextBit(Ui),TRANSLATEVERTEX:Ui=Z.getNextBit(Ui),PAINTBUCKET:Ui=Z.getNextBit(Ui),PIPETTE:Ui=Z.getNextBit(Ui),FEATUREMODES:0,GEOMETRYMODES:0,PROPAGATEONSELECT:0};Wi.FEATUREMODES=Wi.SELECT|Wi.TRANSLATE|Wi.ROTATE|Wi.SCALE|Wi.PAINTBUCKET|Wi.PIPETTE,Wi.GEOMETRYMODES=Wi.CREATE|Wi.EDIT|Wi.REMOVEVERTEX|Wi.TRANSLATEVERTEX,Wi.PROPAGATEONSELECT=Wi.TRANSLATE|Wi.PAINTBUCKET|Wi.PIPETTE;const qi={UNEDITABLE:Ui=Z.getNextBit(Ui),EDITING:Ui=Z.getNextBit(Ui),EDITABLE:Ui=Z.getNextBit(Ui),VERTEX:Ui=Z.getNextBit(Ui),HEIGHTVERTEX:Ui=Z.getNextBit(Ui)},Ji={none:Wi.NONE,select:Wi.SELECT,translate:Wi.TRANSLATE,rotate:Wi.ROTATE,scale:Wi.SCALE,create:Wi.CREATE,edit:Wi.EDIT,removeVertex:Wi.REMOVEVERTEX,translateVertex:Wi.TRANSLATEVERTEX,paintBucket:Wi.PAINTBUCKET,pipette:Wi.PIPETTE,geometryModes:Wi.GEOMETRYMODES,featureModes:Wi.FEATUREMODES},Ki={CLAMP:1,ABSOLUTE:2,ZPLANE:4},Zi={clampToGround:Ki.CLAMP,absolute:Ki.ABSOLUTE,zPlane:Ki.ZPLANE},Qi={both:Cesium.ClassificationType.BOTH,terrain:Cesium.ClassificationType.TERRAIN,cesium3DTile:Cesium.ClassificationType.CESIUM_3D_TILE},Xi={[Qi.both]:"both",[Qi.terrain]:"terrain",[Qi.cesium3DTile]:"cesium3DTile"};function $i(e,t){if(e.image&&e.image.src&&/^data:/.test(e.image.src))if(t){let i=t.indexOf(e.image.src);-1===i&&(t.push(e.image.src),i=t.length-1),e.image.src=":"+i}else e.image={radius:5};return e}function es(e,t={}){return e[j.configContentSymbol]?t.style=e.getReference():e instanceof et?t.style=$i(e.getOptions(),t.embeddedIcons):e instanceof gt&&(t.style=e.getOptions()),t}var ts=es;Mt.VECTOR=Mt.lastLayerId,Mt.lastLayerId+=1,L.FEATURE_REMOVED="FEATURE_REMOVED";class is extends Vi{static get className(){return"vcs.vcm.layer.Vector"}static get alreadyTransformedToMercator(){return st}static get alreadyTransformedToImage(){return rt}static get imageGeometryChanged(){return nt}static get obliqueGeometry(){return at}static get doNotTransform(){return ot}static get originalFeatureSymbol(){return lt}constructor(e){e.layertype=e.layertype?e.layertype:Mt.VECTOR,e.className=e.className?e.className:is.className,super(e),this.source=new ol.source.Vector({}),this.projection=new W(e.projection),this.maxResolution=null!=e.maxResolution?e.maxResolution:null,this.minResolution=null!=e.minResolution?e.minResolution:null,this.dontUseTerrainForOblique=!!e.dontUseTerrainForOblique,this.sourceProjection=this.projection.proj,this._altitudeMode=e.altitudeMode||"relativeToGround",this._skirt=Object(c["g"])(e.skirt,null),this._storeyHeight=Object(c["g"])(e.storeyHeight,null),this._classificationType=e.classificationType,this.balloonHeightOffset=Object(c["h"])(e.balloonHeightOffset,10),this.zIndex=Object(c["h"])(e.zIndex,50),this.zCoordinateEyeOffset=Object(c["h"])(e.zCoordinateEyeOffset,0),this.heightAboveGround=null!=e.heightAboveGround?e.heightAboveGround:null,this.scaleByDistance=e.scaleByDistance||null,this.internalProjection=J,this.destinationProjection=this.internalProjection.proj,this.highlightStyle=e.highlightStyle?new et(e.highlightStyle):null,this.featureVisibility=e.featureVisibility||new yt,this.hasFeatureUUID=!1,this.visibility=!0,this.isDynamic=e.isDynamic,this.FVlastUpdated=0,this._onStyleChangeRemover=null}get altitudeMode(){return this._altitudeMode}set altitudeMode(e){this._altitudeMode=e,this.getImplementations().forEach(t=>{t.olLayer&&t.olLayer.set("olcs_altitudeMode",e)})}get skirt(){return this._skirt}set skirt(e){this._skirt=e,this.getImplementations().forEach(t=>{t.olLayer&&t.olLayer.set("olcs_skirt",e)})}get storeyHeight(){return this._storeyHeight}set storeyHeight(e){this._storeyHeight=e,this.getImplementations().forEach(t=>{t.olLayer&&t.olLayer.set("olcs_storeyHeight",e)})}get classificationType(){return this._classificationType}set classificationType(e){this._classificationType=e,this.getImplementations().forEach(t=>{t.olLayer&&t.olLayer.set("olcs_classificationType",e)})}initialize(){return super.initialize().then(()=>{this._trackStyleChanges()})}getVcsMeta(e={}){const t={version:St};if(this.skirt&&(t.skirt=this.skirt),this.storeyHeight&&(t.storeyHeight=this.storeyHeight),this.classificationType&&(t.classificationType=this.classificationType),this.altitudeMode&&(t.altitudeMode=this.altitudeMode),e.embedIcons&&(t.embeddedIcons=[]),e.writeStyle){const i=this.getStyleOrDefaultStyle(this.options.activeStyleName||this.options.style);!e.writeDefaultStyle&&zi()(i.getOptions(),this.style.getOptions())||ts(this.style,t)}return t}setVcsMeta(e){e.skirt!==this.skirt&&(this.skirt=e.skirt),e.storeyHeight!==this.storeyHeight&&(this.storeyHeight=e.storeyHeight),e.altitudeMode&&e.altitudeMode!==this.altitudeMode&&(this.altitudeMode=e.altitudeMode),e.classificationType!==this.classificationType&&(this.classificationType=e.classificationType)}getStyleOrDefaultStyle(e,t){return super.getStyleOrDefaultStyle(e,t||tt.clone())}setStyle(e,t){super.setStyle(e,t),this._trackStyleChanges();const i=e instanceof gt;this.getFeatures().forEach(e=>{e[Xe]&&(i?this.featureVisibility.highlightedObjects[e.getId()]&&this.featureVisibility.highlightedObjects[e.getId()].features.has(e)?this.featureVisibility.highlightedObjects[e.getId()].features.set(e,void 0):e.setStyle(void 0):e.getStyle()?this.featureVisibility.highlightedObjects[e.getId()]&&this.featureVisibility.highlightedObjects[e.getId()].features.has(e)&&this.featureVisibility.highlightedObjects[e.getId()].features.set(e,e[Xe].style):e.setStyle(e[Xe].style))})}_trackStyleChanges(){this._onStyleChangeRemover&&(this._onStyleChangeRemover(),this._onStyleChangeRemover=null);const e=this.style instanceof gt;this._onStyleChangeRemover=this.style.styleChanged.addEventListener(()=>{this.getFeatures().forEach(t=>{!e&&t[Xe]||t.changed()})})}setHighlightStyle(e){a(e,[ol.style.Style,et,Function]),e instanceof et?this.highlightStyle=e:(this.highlightStyle||(this.highlightStyle=new et({})),this.highlightStyle.style=e)}postRenderStyling(){if(this.FVlastUpdated<this.featureVisibility.lastUpdated||this.FVlastUpdated<this.globalHider.lastUpdated){if(this.visibility){const e=Object.keys(this.featureVisibility.highlightedObjects),t=e.length;for(let r=0;r<t;r++){const t=e[r];if(!this.featureVisibility.hiddenObjects[t]){const e=this.getFeatureById(t);e&&(this.featureVisibility.highlightedObjects[t].features.has(e)||this.featureVisibility.highlightedObjects[t].features.set(e,e.getStyle()),e.getStyle()!==this.featureVisibility.highlightedObjects[t].style.style&&e.setStyle(this.featureVisibility.highlightedObjects[t].style.style))}}const i=Object.keys(this.featureVisibility.hiddenObjects),s=i.length;for(let r=0;r<s;r++){const e=i[r],t=this.getFeatureById(e);t&&!this.featureVisibility.hiddenObjects[e].has(t)&&(t.setStyle(He.clone()),this.featureVisibility.hiddenObjects[e].add(t))}if(this.hasFeatureUUID){const e=Object.keys(this.globalHider.hiddenObjects),t=e.length;for(let i=0;i<t;i++){const t=e[i],s=this.getFeatureById(t);s&&!this.globalHider.hasFeature(t,s)&&(s.setStyle(He.clone()),this.globalHider.addFeature(t,s))}}}this.FVlastUpdated=Date.now()}}getSource(){return this.source}updateGeometryOfFeature(e,t){t.transform(this.sourceProjection,this.destinationProjection);const i=this.source.getFeatureById(e);i&&i.setGeometry(t)}addFeatures(e){a(e,[ol.Feature]);const t=this.style instanceof gt,i=e.map(e=>{const i=e.getId();if(null==i)e.setId(Object(c["c"])());else if(this.hasFeatureUUID=!0,i&&this.getFeatureById(i))return!1;if(this.projection.epsg!==this.internalProjection.epsg){const t=e.getGeometry();t&&(t[is.alreadyTransformedToMercator]||(t.transform(this.sourceProjection,this.destinationProjection),t[is.alreadyTransformedToMercator]=!0))}return this.zCoordinateEyeOffset&&!e.get("olcs_zCoordinateEyeOffset")&&e.set("olcs_zCoordinateEyeOffset",this.zCoordinateEyeOffset,!1),this.heightAboveGround&&!e.get("olcs_heightAboveGround")&&e.set("olcs_heightAboveGround",this.heightAboveGround,!1),this.scaleByDistance&&!e.get("olcs_scaleByDistance")&&e.set("olcs_scaleByDistance",this.scaleByDistance,!1),e[Et.vcsLayerNameSymbol]=this.name,t&&e[Xe]&&e.setStyle(),e}).filter(e=>e);return this.source.addFeatures(i),this.FVlastUpdated=0,e.map(e=>e.getId())}removeFeaturesById(e){const t=this.getFeaturesById(e);for(let i=0;i<t.length;i++)this.source.removeFeature(t[i])}removeAllFeatures(){this.source.clear()}getFeaturesById(e){const t=[];let i,s=null;for(let r=0;r<e.length;r++)i=e[r],s=this.getFeatureById(i),s&&t.push(s);return t}getFeatureById(e){let t=e;return-1!==String(e).indexOf("_OBLIQUE")&&(t=String(e).split("_OBLIQUE")[0]),this.source.getFeatureById(t)}getFeatures(){return this.source.getFeatures()}getFeatureExtent(){return new Le(Object(Hi["a"])(Object(Hi["a"])({},J.getConfigObject()),{},{coordinates:this.source.getExtent()}))}setVisibility(e){const t=this.getImplementation(this.framework.getActiveMap());t&&t.setVisibility(e),this.visibility=e}determineHighlightStyle(e,t){const i=t||this.source.getFeatureById(e);return i?this.highlightStyle?this.highlightStyle:this.framework.getSelectBehavior().determineDefaultVectorHighlightStyle(e,i,this):(this.logger.warning("No object found to highlight."),null)}objectClickedHandler(e,t,i){if(this.allowPicking){const s=this.getFeatureById(e.getId()),r=s.getId();return this.raiseFeatureEvent(t,r,s,i||this),!0}return!1}getGenericFeatureFromClickedObject(e){if(!(e instanceof ol.Feature))return null;const t=e.getProperties();delete t[e.getGeometryName()];let{clickedPosition:i}=e;const s=e.getGeometry();if(s&&("Point"===s.getType()||i&&!i.exactPosition||!i&&s)){const e=ol.extent.getCenter(s.getExtent());e&&(W.mercatorToWgs84(e,!0),i={longitude:e[0],latitude:e[1]})}let r=ei(e,this.storeyHeight).max,n=!1;const a=e.get("olcs_altitudeMode")||this.altitudeMode;return r&&(Zi[a]===Ki.ABSOLUTE||e.get("olcs_extrudedHeight")||e.get("olcs_storeyNumber"))||(r=this.heightAboveGround,n=!0),r+=this.balloonHeightOffset,delete t.clickedPosition,{layerName:this.name,layerClass:this.className,attributes:Object.assign({},this._genericFeatureProperties,t),longitude:i.longitude,latitude:i.latitude,height:r,relativeToGround:n}}isVisible(){return this.logger.deprecate("isVisible","Access the property visibility directly"),this.visibility}getZCoordinateEyeOffset(){return this.logger.deprecate("zCoordinateEyeOffset","Access the property zCoordinateEyeOffset directly"),this.zCoordinateEyeOffset}getHeightAboveGround(){return this.logger.deprecate("getHeightAboveGround","Access the property heightAboveGround directly"),this.heightAboveGround}getZIndex(){return this.logger.deprecate("getZIndex","Access the property zIndex directly"),this.zIndex}getAltitudeMode(){return this.logger.deprecate("altitudeMode","Access the property altitudeMode directly"),this.altitudeMode}getScaleByDistance(){return this.logger.deprecate("scaleByDistance","Access the property scaleByDistance directly"),this.scaleByDistance}getProjection(){return this.logger.deprecate("getProjection","Access the property projection directly"),this.projection}setProjection(e){this.logger.deprecate("setProjection","Access the property projection directly"),this.projection=e}getStyle(){return this.logger.deprecate("getStyle","Access the property style directly"),this.style}getMaxResolution(){return this.logger.deprecate("getMaxResolution","Access the property maxResolution directly"),this.maxResolution}getMinResolution(){return this.logger.deprecate("getMinResolution","Access the property minResolution directly"),this.minResolution}}var ss=is;let rs=null,ns=new Cesium.Cartographic,as=new Cesium.Cartesian3,os=new Cesium.Cartesian3;class ls extends se{constructor(){super(),this.activeMapHandler=this.pipeThrough,this._pickPosition=X.CLICK,this._pickPositionMask=-1,this.pickTranslucent=!0,this.pullPickedPosition=0,this.hitTolerance=10,this._defaultModificationKey=Q.ALL,this._defaultActive=X.ALL^X.MOVE,this.setActive()}get pickPosition(){return this._pickPosition}set pickPosition(e){this._pickPosition=e&this._pickPositionMask}get excludedPickPositionEvents(){return~this._pickPositionMask}set excludedPickPositionEvents(e){this._pickPositionMask=~e}pipe(e){return e.type&X.DRAG&&!(this._pickPosition&X.DRAG)?(rs&&(e.feature=rs),Promise.resolve(e)):(e.type&X.DRAGEND&&(rs=null),this.activeMapHandler(e).then(t=>(e.type&X.DRAGSTART&&t.feature&&(rs=t.feature),e.type&X.DRAG&&rs&&(e.feature=rs),Promise.resolve(e))))}handleMapChange(e){this.activeMapHandler=e instanceof Di?this._openlayersHandler.bind(this,e):e instanceof Ti?this._obliqueHandler.bind(this,e):e instanceof Pt?this._cesiumHandler.bind(this,e):this.pipeThrough}setActive(e){"undefined"===typeof e&&(this.pickPosition=X.CLICK,this.pullPickedPosition=0),super.setActive(e)}_openlayersHandler(e,t){let i=null,s=null;return e.olMap.forEachFeatureAtPixel([t.windowPosition.x,t.windowPosition.y],(e,t)=>(!e||null!=e.get("olcs_allowPicking")&&!0!==e.get("olcs_allowPicking")||(i=e,s=t),!0),{hitTolerance:this.hitTolerance}),i&&s&&(t.feature=i,i.get("features")&&(t.feature[Et.vcsLayerNameSymbol]=s.get("name")),t.exactPosition=!0),Promise.resolve(t)}_obliqueHandler(e,t){let i=null,s=null;return e.olMap.forEachFeatureAtPixel([t.windowPosition.x,t.windowPosition.y],(e,t)=>(e&&(i=e.get("features")&&!e[ss.originalFeatureSymbol]?e:e[ss.originalFeatureSymbol]),s=t,!0),{hitTolerance:this.hitTolerance}),i&&s&&(t.feature=i,i.get("features")&&(t.feature[Et.vcsLayerNameSymbol]=s.get("name")),t.exactPosition=!0),Promise.resolve(t)}_cesiumHandler(e,t){const i=e.getScene(),s=i.pick(t.windowPosition,this.hitTolerance,this.hitTolerance),r=()=>as?(this.pullPickedPosition&&t.ray&&(os=Cesium.Cartesian3.multiplyByScalar(t.ray.direction,this.pullPickedPosition,os),as=Cesium.Cartesian3.subtract(as,os,as)),ns=Cesium.Cartographic.fromCartesian(as,i.globe.ellipsoid,ns),t.position=W.wgs84ToMercator([Cesium.Math.toDegrees(ns.longitude),Cesium.Math.toDegrees(ns.latitude),ns.height],!0),t.positionOrPixel=t.position,i.pickTranslucentDepth=!1,Promise.resolve(t)):(as=new Cesium.Cartesian3,Promise.resolve(t));if(s){if(s.primitive&&s.primitive.olFeature)t.feature=s.primitive.olFeature;else if(s.primitive&&s.primitive[Et.vcsLayerNameSymbol]&&(s instanceof Cesium.Cesium3DTileFeature||s instanceof Cesium.Cesium3DTilePointFeature)){t.feature=s;const e=Object.getOwnPropertySymbols(s.primitive),i=e.length;for(let r=0;r<i;r++)t.feature[e[r]]=s.primitive[e[r]]}else if(s.id&&s.id.olFeature)t.feature=s.id.olFeature;else if(s.id&&s.id[Et.vcsLayerNameSymbol])t.feature=s,t.feature[Et.vcsLayerNameSymbol]=s.id[Et.vcsLayerNameSymbol];else if(Array.isArray(s.id)){if(1!==s.id.length)return ns=Cesium.Cartographic.fromCartesian(s.primitive.position,null,ns),t.position=W.wgs84ToMercator([Cesium.Math.toDegrees(ns.longitude),Cesium.Math.toDegrees(ns.latitude),ns.height],!0),t.positionOrPixel=t.position,t.feature=new ol.Feature({geometry:new ol.geom.Point(t.position),features:s.id.map(e=>e.olFeature)}),t.feature[Et.vcsLayerNameSymbol]=s.id[0].olLayer.get("layerName"),Promise.resolve(t);t.feature=s.id[0].olFeature}else t.feature=s;if(!(t.type&this.pickPosition))return Promise.resolve(t);if(i.pickPositionSupported)return!s.primitive||!this.pickTranslucent||s.primitive.pointCloudShading&&s.primitive.pointCloudShading.attenuation||(i.pickTranslucentDepth=!0,i.render(e.getCesiumWidget().clock.currentTime),t.exactPosition=!0),as=i.pickPosition(t.windowPosition,as),r();if(s.content&&s.content.url&&null!=s._batchId){const e=t.ray||i.camera.getPickRay(t.windowPosition);return Ri(s.content.url,s._batchId,e,as).then(e=>e?r():Promise.resolve(t))}}return Promise.resolve(t)}}var cs=ls;class us extends se{constructor(e){super(),this.events=Object.assign({},e||L),this._defaultActive=X.CLICK,this._defaultModificationKey=Q.NONE|Q.CTRL,this.setActive()}pipe(e){if(e.key&Q.CTRL){if(e.feature&&e.feature[Et.vcsLayerNameSymbol]){const t=j.getInstance().getLayerByName(e.feature[Et.vcsLayerNameSymbol]);t.objectClickedHandler(e.feature,L.FEATURE_CTRL_CLICKED)}return Promise.resolve(e)}if(!e.position.every(e=>0===e)){const[t,i,s]=W.mercatorToWgs84(e.position),r={latitude:i,longitude:t,height:s||0};if(e.obliqueParameters&&(r.obliqueParameters=e.obliqueParameters),this.raise(L.CLICKED,r),e.feature&&e.feature[Et.vcsLayerNameSymbol]){r.exactPosition=e.exactPosition,e.feature.clickedPosition=r;const t=j.getInstance().getLayerByName(e.feature[Et.vcsLayerNameSymbol]);t.objectClickedHandler(e.feature,L.FEATURE_CLICKED)}else this.raise(L.MAP_CLICKED,r)}return Promise.resolve(e)}raise(e,...t){this.events[e]&&j.getInstance().publish(e,...t)}}var hs=us;const ds=new Ii,ms=new cs,gs=new hs,ps=new ne([ds,ms,gs]);let fs=null;class ys{constructor(){this.listeners=[],this.clickDuration=400,this.dragDuration=100,this._lastDown=null,this._lastClick={time:null,windowPosition:new Cesium.Cartesian2},this._dragging=null,this._running=!1,this._eventQueue=[];const e=j.getInstance();e.subscribe("MAP_ACTIVATED",this.handleMapChange,this),this.handleMapChange(j.getInstance().getActiveMap()),ps.initialize(),this._exclusiveInteraction=null,this._exclusiveFrameworkKey=null,this._multiples=!1}get positionInteraction(){return ds}get featureInteraction(){return ms}get eventEmitter(){return gs}get interactions(){return ps.chain.slice()}addExclusiveInteraction(e,t,i=2,s){return a(e,se),a(t,Function),a(i,Number),o(s,String),this._exclusiveInteraction&&this._exclusiveInteraction.id!==s&&this._removeExclusive(),e.handleMapChange(j.getInstance().getActiveMap()),ps.addInteraction(e,i),this._exclusiveInteraction?(this._exclusiveInteraction.interactions.push(e),this._exclusiveInteraction.cb.push(t)):this._exclusiveInteraction={id:s||Object(c["c"])(),cb:[t],interactions:[e]},null===this._exclusiveFrameworkKey&&(this._exclusiveFrameworkKey=j.getInstance().subscribeExclusive(L.CLICKED,()=>{},"vcs:EventHandler",this._removeExclusive.bind(this))),this._exclusiveUnListen.bind(this,e,this._exclusiveInteraction.id)}_removeExclusive(){this._exclusiveInteraction&&(this._exclusiveInteraction.interactions.filter(e=>e).forEach(e=>{ps.removeInteraction(e)}),this._exclusiveInteraction.cb.filter(e=>e).forEach(e=>{e()}),this._exclusiveInteraction=null)}_exclusiveUnListen(e,t){if(!this._exclusiveInteraction||this._exclusiveInteraction&&this._exclusiveInteraction.id!==t)return 0;const i=ps.removeInteraction(e),s=this._exclusiveInteraction.interactions.findIndex(t=>t&&t.id===e.id);return s>-1&&(this._exclusiveInteraction.interactions.splice(s,1,void 0),this._exclusiveInteraction.cb.splice(s,1,void 0)),this._exclusiveInteraction.interactions.every(e=>void 0===e)&&(this._exclusiveInteraction=null,j.getInstance().unsubscribeByKey(this._exclusiveFrameworkKey),this._exclusiveFrameworkKey=null),-1!==i?1:0}addPersistentInteraction(e,t=2){return a(e,se),a(t,Number),e.handleMapChange(j.getInstance().getActiveMap()),ps.addInteraction(e,t),()=>-1!==ps.removeInteraction(e)?1:0}handleMapChange(e){this.listeners.forEach(e=>{e()}),this.listeners.splice(0),e instanceof Di||e instanceof Ti?this._setupOpenlayersHandlers(e):e instanceof Pt&&this._setupCesiumHandlers(e),ps.handleMapChange(e)}_mouseDown(e,t,i){if(this._lastDown)return void(this._multiples=!0);const s=e(t,i);0===s.windowPosition.x&&0===s.windowPosition.y||(this._lastDown=s,this._lastDown.time=Date.now())}_mouseUp(e,t,i){const s=e(t,i);return s.multipleTouch?(this._multiples=!0,void(this._lastDown=null)):this._multiples?(this._lastDown=null,void(this._multiples=!1)):(this._dragging?(s.type=X.DRAGEND,s.key=this._dragging.key,s.pointer=this._dragging.pointer,this._startChain(s)):this._lastDown&&(this._lastClick.time&&Date.now()-this._lastClick.time<this.clickDuration&&Cesium.Cartesian2.distanceSquared(this._lastClick.windowPosition,s.windowPosition)<12?(this._lastClick.time=null,s.type=X.DBLCLICK):(this._lastClick.time=Date.now(),Cesium.Cartesian2.clone(s.windowPosition,this._lastClick.windowPosition),s.type=X.CLICK),this._startChain(s)),this._dragging=null,void(this._lastDown=null))}_mouseMove(e,t,i){let s=e(t,i);this._lastDown?this._dragging?(s.type=X.DRAG,s.key=this._dragging.key,s.pointer=this._dragging.pointer,this._startChain(s,!0)):!this._dragging&&Date.now()-this._lastDown.time>this.dragDuration&&(s=Object.assign({type:X.DRAGSTART},this._lastDown),this._dragging=s,this._startChain(s,!0)):(s.type=X.MOVE,this._startChain(s,!0))}_startChain(e,t){this._running&&t||(this._running?this._eventQueue.push(e):(this._running=!0,ps.pipe(e).then(this._endChain.bind(this)).catch(this._endChain.bind(this))))}_endChain(){this._running=!1,this._eventQueue.length>0&&this._startChain(this._eventQueue.shift())}_setupOpenlayersHandlers(e){const t=(e,t)=>{const i={"-1":$.ALL,0:$.LEFT,1:$.MIDDLE,2:$.RIGHT};let s=t.originalEvent.shiftKey?Q.SHIFT:Q.NONE;s=t.originalEvent.ctrlKey?Q.CTRL:s,s=t.originalEvent.altKey?Q.ALT:s,s!==Q.NONE&&t.preventDefault(),t.originalEvent.preventDefault();const r=[t.coordinate[0],t.coordinate[1],0];return{position:r,positionOrPixel:r,windowPosition:Cesium.Cartesian2.fromArray(t.pixel,0,new Cesium.Cartesian2),key:s,pointer:i[t.originalEvent.button||0]}},{olMap:i}=e,s=[];s.push(i.on("pointerdown",this._mouseDown.bind(this,t,null))),s.push(i.on("pointerup",this._mouseUp.bind(this,t,null))),s.push(i.on("pointermove",this._mouseMove.bind(this,t,null))),this.listeners=s.map(e=>()=>{ol.Observable.unByKey(e)})}_setupCesiumHandlers(e){const t={[Cesium.KeyboardEventModifier.ALT]:Q.ALT,[Cesium.KeyboardEventModifier.CTRL]:Q.CTRL,[Cesium.KeyboardEventModifier.SHIFT]:Q.SHIFT},i=({mod:i,pointer:s},r)=>{const n=e.eventHandler._positions.length>1;return{windowPosition:r.position||r.endPosition,key:t[i]||Q.NONE,pointer:s,multipleTouch:n}},s={[Cesium.ScreenSpaceEventType.LEFT_DOWN]:{handler:this._mouseDown,pointer:$.LEFT},[Cesium.ScreenSpaceEventType.LEFT_UP]:{handler:this._mouseUp,pointer:$.LEFT},[Cesium.ScreenSpaceEventType.RIGHT_DOWN]:{handler:this._mouseDown,pointer:$.RIGHT},[Cesium.ScreenSpaceEventType.RIGHT_UP]:{handler:this._mouseUp,pointer:$.RIGHT},[Cesium.ScreenSpaceEventType.MIDDLE_DOWN]:{handler:this._mouseDown,pointer:$.MIDDLE},[Cesium.ScreenSpaceEventType.MIDDLE_UP]:{handler:this._mouseUp,pointer:$.MIDDLE},[Cesium.ScreenSpaceEventType.MOUSE_MOVE]:{handler:this._mouseMove,pointer:$.ALL}};Object.keys(s).forEach(r=>{const n=Object.keys(t);n.push(void 0),n.forEach(t=>{const{handler:n,pointer:a}=s[r];null!=t?(e.eventHandler.setInputAction(n.bind(this,i,{mod:t,pointer:a}),r,t),this.listeners.push(()=>{e.eventHandler.removeInputAction(r,t)})):(e.eventHandler.setInputAction(n.bind(this,i,{mod:t,pointer:a}),r),this.listeners.push(()=>{e.eventHandler.removeInputAction(r)}))})})}static destroy(){fs&&(fs._removeExclusive(),fs.listeners.forEach(e=>{e()})),fs=null}}var _s=ys;function vs(){return null===fs&&(fs=new ys),fs}function Ls(e){const t=e.getPropertyNames(),i={};for(let s=0;s<t.length;s++)i[t[s]]=e.getProperty(t[s]);return null==i.id&&(i.id=`${e.content.url}${e._batchId}`),i.attributes?i.attributes.gmlId=i.id:null==i.gmlId&&(i.gmlId=i.id),i.clickedPosition=e.clickedPosition?e.clickedPosition:{},i}var Ms=i(54),bs=i.n(Ms);const ws=Symbol("vcsFeatureType"),Ts={DYNAMIC:"dynamic",STATIC:"static",EDITED:"edited"},Ss=new ol.format.GeoJSON,Cs="EPSG:3857",Es=new ol.Sphere(6378137),Is=v.getLogger("vcs.vcm.layer.GeoJSONHelper");function ks(e){const[t,i]=e[e.length-1];e[0][0]===t&&e[0][1]===i||e.push(e[0].slice())}function Ds(e){const[t,i]=e[e.length-1];e[0][0]===t&&e[0][1]===i&&e.pop()}function Os(e){if(e instanceof ol.geom.Polygon){const t=e.getCoordinates();t.forEach(e=>{Ds(e)}),e.setCoordinates(t)}else if(e instanceof ol.geom.MultiPolygon){const t=e.getCoordinates();t.forEach(e=>{e.forEach(e=>{Ds(e)})}),e.setCoordinates(t)}}function Ps(e){const{crs:t}=e;if(t){if("name"===t.type)return t.properties.name;if("EPSG"===t.type)return"EPSG:"+t.properties.code}return null}function As(e){if(e.get("altitudeMode")&&(e.set("olcs_altitudeMode",e.get("altitudeMode"),!0),e.unset("altitudeMode",!0)),e.get("extrudedHeight")){if(e.get("drawingType"))e.set("olcs_extrudedHeight",e.get("extrudedHeight"),!0);else{const t=ei(e).min;e.set("olcs_extrudedHeight",e.get("extrudedHeight")-t,!0)}e.unset("extrudedHeight",!0)}e.get("skirt")&&(e.set("olcs_skirt",e.get("skirt"),!0),e.unset("skirt",!0)),e.get("radius")&&e.unset("radius",!0)}function xs(e,t){const i=Ss.readGeometry(e,t.formatOptions);return"EPSG:3857"===String(t.formatOptions.featureProjection)&&(i[ss.alreadyTransformedToMercator]=!0),Os(i),new ol.Feature({geometry:i})}function Ys(e,t){return e.image&&e.image.src&&/^:\d+$/.test(e.image.src)&&(t.embeddedIcons?e.image.src=t.embeddedIcons[e.image.src.substring(1)]:delete e.image.src),e}function js(e,t){const i=!!e.color&&Ie(e.color),s=e.width||1.25,r=e.pointRadius||5,n=e.opacity||.8;if(delete e.color,delete e.width,delete e.pointRadius,delete e.opacity,"Polygon"===t||"Circle"===t){const e=i?i.slice():[255,255,255,.4];return e[3]=n,{fill:{color:e},stroke:{color:i||Ie("#3399CC"),width:s}}}return"LineString"===t?{stroke:{color:i||Ie("#3399CC"),width:s}}:"Point"===t?{image:{fill:{color:[255,255,255,.4]},radius:r,stroke:{color:i||Ie("#3399CC"),width:1}}}:void 0}function Ns(e,t){if(!e.geometry)return null;const i=e.geometry.olcs_radius;let s=Ss.readGeometry(e.geometry,t.formatOptions);if(e.radius&&s instanceof ol.geom.Point){const t=s.getCoordinates();2===t.length&&t.push(0),s=new ol.geom.Circle(t,e.radius,"XYZ")}if(i&&s instanceof ol.geom.Point){const e=s.getCoordinates();2===e.length&&e.push(0),s=ni(e,i)}"EPSG:3857"===String(t.formatOptions.featureProjection)&&(s[ss.alreadyTransformedToMercator]=!0),e.vcsMeta=e.vcsMeta||{},e.vcsStyle&&(e.vcsMeta.style=e.vcsMeta.style||e.vcsStyle);const{properties:r}=e;t.readLegacyStyleOptions&&!e.vcsMeta.style&&(e.vcsMeta.style=js(r,s.getType())),Os(s);const n=new ol.Feature(Object.assign({},r,{geometry:s}));if(e.id&&n.setId(e.id),e.state&&(n[ws]=e.state),e.vcsMeta.style&&!t.dontReadStyle){let i;e.vcsMeta.style=Ys(e.vcsMeta.style,t),t.defaultStyle?(i=t.defaultStyle.clone().assign(new et(e.vcsMeta.style)),null!=i.label&&s.set("_vcsGeomType","Label")):i=new et(e.vcsMeta.style),n[Xe]=i,n.setStyle(i.style)}return As(n),n}function Fs(e,t={}){const i="string"===typeof e?JSON.parse(e):e,s=Ps(i),r=s?{epsg:s}:t.dataProjection,n={formatOptions:{dataProjection:r?r.epsg:q.epsg,featureProjection:t.targetProjection?t.targetProjection.epsg:J.epsg},dontReadStyle:t.dontReadStyle,readLegacyStyleOptions:t.readLegacyStyleOptions,defaultStyle:t.defaultStyle};if(t.dynamicStyle&&!n.defaultStyle&&(n.defaultStyle=tt),"FeatureCollection"===i.type){let e;return i.vcsMeta=i.vcsMeta||{embeddedIcons:i.vcsEmbeddedIcons,style:i.vcsStyle},i.vcsMeta.embeddedIcons&&(n.embeddedIcons=i.vcsMeta.embeddedIcons),i.vcsMeta.style&&t.dynamicStyle&&(i.vcsMeta.style.type===Me.REFERENCE?(e=j.getInstance().getStyleByName(i.vcsMeta.style.name),e?e instanceof et&&(n.defaultStyle=e):Is.warning("could not load referenced style "+i.vcsMeta.style.name)):i.vcsMeta.style.type===Me.DECLARATIVE?e=new gt(i.vcsMeta.style):(i.vcsMeta.style=Ys(i.vcsMeta.style,n),n.defaultStyle=n.defaultStyle.clone().assign(new et(i.vcsMeta.style)),e=n.defaultStyle)),{features:i.features.map(e=>Ns(e,n)).filter(e=>e),style:i.vcsMeta.style?e:void 0,vcsMeta:i.vcsMeta?i.vcsMeta:void 0}}if("Feature"===i.type){const e=Ns(i,n);return{features:e?[e]:[],vcsMeta:i.vcsMeta?i.vcsMeta:void 0}}return null!=i.type?{features:[xs(i,n)]}:{features:[]}}function Rs(e,t={},i){const s={type:"Feature",properties:e.getProperties()};t.writeId&&(s.id=e.getId()),delete s.properties[e.getGeometryName()],delete s.properties.style,delete s.properties.olcs_allowPicking;let r=e.getGeometry(),n=null;if(r instanceof ol.geom.Circle){const e=r.getCoordinates();n=Es.haversineDistance(W.mercatorToWgs84(e[0],!0),W.mercatorToWgs84(e[1],!0)),r=new ol.geom.Point(r.getCenter())}else if(r instanceof ol.geom.Polygon){const e=r.getCoordinates();e.forEach(e=>{ks(e)}),r.setCoordinates(e)}else if(r instanceof ol.geom.MultiPolygon){const e=r.getCoordinates();e.forEach(e=>{e.forEach(e=>{ks(e)})}),r.setCoordinates(e)}return s.geometry=Ss.writeGeometryObject(r,{featureProjection:Cs,rightHanded:!0}),n&&(s.geometry.olcs_radius=n),s.vcsMeta={},t.writeStyle&&e[Xe]&&(s.vcsMeta.style=$i(e[Xe].getOptionsForFeature(e),i)),s}function Hs(e,t={}){const i=e.vcsMeta||{};i.version=St;const s=e.features.map(e=>Rs(e,t,i.embeddedIcons)),r={type:"FeatureCollection",features:s,vcsMeta:i};return t.writeStyle&&e.style&&(Is.deprecate("data.style","use layer.getVcsMeta and pass that in instead"),ts(e.style,r.vcsMeta)),t.asObject?r:JSON.stringify(r,null,t.prettyPrint?2:null)}function Gs(e){let t=0;const i=e.length;for(let s=0;s<=i-2;s++){const i=e[s],r=e[s+1];t+=i[0]*r[1]-i[1]*r[0]}return t/=2,t}function zs(e){const t=Gs(e);return t<0&&e.reverse(),e}Mt.TILED_LAYER=Mt.lastLayerId,Mt.lastLayerId+=1;const Bs=Symbol("isTiledFeature");class Vs extends Vi{static get className(){return"vcs.vcm.layer.TiledLayer"}constructor(e){e.layertype=e.layertype?e.layertype:Mt.TILED_LAYER,e.className=e.className?e.className:Vs.className,super(e),this.featureVisibility=e.featureVisibility||new yt,this.highlightStyle=null,e.highlightStyle&&(this.highlightStyle=e.highlightStyle instanceof et?e.highlightStyle:new et(e.highlightStyle)),this.cesiumTilesetLayerOptions=Object.assign({},e.cesiumTilesetLayerOptions,{featureVisibility:this.featureVisibility,highlightStyle:this.highlightStyle,genericFeatureProperties:this._genericFeatureProperties}),this.openlayersTiledLayerOptions=Object.assign({},e.openlayersTiledLayerOptions,{featureVisibility:this.featureVisibility,highlightStyle:this.highlightStyle,genericFeatureProperties:this._genericFeatureProperties}),this._dataFetched=!1,this.source=new ol.source.Vector({}),this.projection=J,this.sourceProjection=this.projection.proj,this.internalProjection=J,this.zIndex=50,this.editing=null,this.addedEditingSymbol=!1,this.FVlastUpdated=0,this._dataFetchedPromise=null,this._featureExtent=null}get screenSpaceErrorMobile(){const e=this.framework.getMapByType("vcs.vcm.maps.Cesium");if(e){const t=this.getImplementation(e);if(t)return t.screenSpaceErrorMobile}return null}get screenSpaceError(){const e=this.framework.getMapByType("vcs.vcm.maps.Cesium");if(e){const t=this.getImplementation(e);if(t)return t.screenSpaceError}return null}getSource(){return this.source}postRenderStyling(){ss.prototype.postRenderStyling.call(this)}setEditing(e,t){this._dataFetched?this.addedEditingSymbol&&!t?(this.source.getFeatures().forEach(t=>{delete t[e]}),this.addedEditingSymbol=!1):t&&(this.addedEditingSymbol=!0,this.source.getFeatures().forEach(i=>{i[e]=t})):this.editing={symbol:e,featureType:t}}getFeatureById(e){let t=e;return-1!==String(e).indexOf("_OBLIQUE")&&(t=String(e).split("_OBLIQUE")[0]),this.source.getFeatureById(t)}async initialize(){const e=this.framework.getActiveMap(),t="vcs.vcm.maps.Cesium"===e.className?!!this.cesiumTilesetLayerOptions.url:!!this.openlayersTiledLayerOptions.url;t&&(await super.initialize(),this.getFeatureExtent())}activate(e){if(null!=e&&this.logger.deprecate("activate","activate no longer accepts an argument, use deactivate to deactivate the layer"),!1===e)return this.deactivate(),Promise.resolve();const t=this.framework.getActiveMap(),i="vcs.vcm.maps.Cesium"===t.className?!!this.cesiumTilesetLayerOptions.url:!!this.openlayersTiledLayerOptions.url;return i?super.activate():Promise.resolve()}setHighlightStyle(e){this.highlightStyle=e}determineHighlightStyle(e,t){const i=this.framework.getActiveMap();if(this.highlightStyle)return this.highlightStyle;if("vcs.vcm.maps.Cesium"===i.className){const e=this.getImplementation(this.framework.getActiveMap());return e.determineHighlightStyle()}return ss.prototype.determineHighlightStyle.call(this,e,t)}setMaximumScreenSpaceError(e){const t=this.framework.getMapByType("vcs.vcm.maps.Cesium");if(t){const i=this.getImplementation(t);i&&i.setMaximumScreenSpaceError(e)}}fetchData(){return this._dataFetchedPromise||(null!=this.openlayersTiledLayerOptions.url?(this.framework.getActiveMap().setLayerLoading(this,!0),this._dataFetchedPromise=G.a.get(this.openlayersTiledLayerOptions.url).then(({data:e})=>{const{features:t}=Fs({features:e.features,type:"FeatureCollection"},{defaultStyle:this.defaultStyle instanceof et?this.defaultStyle:tt});t.forEach(e=>{e[Bs]=!0}),ss.prototype.addFeatures.call(this,t),this.editing&&(this.setEditing(this.editing.symbol,this.editing.featureType),this.editing=null)}).catch(e=>(this.logger.warning(`Could not send request for loading layer content (${e.message})`),Promise.reject(e))).then(()=>{this.framework.getActiveMap().setLayerLoading(this,!1)})):(this._dataFetched=!0,this._dataFetchedPromise=Promise.resolve())),this._dataFetchedPromise}objectClickedHandler(e,t,i){if(this.allowPicking){const s=this.framework.getActiveMap();if((e instanceof Cesium.Cesium3DTileFeature||e instanceof Cesium.Cesium3DTilePointFeature)&&"vcs.vcm.maps.Cesium"===s.className){const r=this.getImplementation(s);return r.objectClickedHandler(e,t,i||this)}if(e instanceof ol.Feature&&("vcs.vcm.maps.Openlayers"===s.className||"vcs.vcm.maps.Oblique"===s.className))return ss.prototype.objectClickedHandler.call(this,e,t,i||this)}return!1}getGenericFeatureFromClickedObject(e){const t=this.framework.getActiveMap(),i=this.getImplementation(t);return i?i.getGenericFeatureFromClickedObject(e):null}getFeatureExtent(){if(!this._featureExtent){const e=this.framework.getActiveMap();if(this.initialized&&"vcs.vcm.maps.Cesium"===e.className){const t=this.getImplementation(e);this._featureExtent=t.getFeatureExtent()}else{if(!this.initialized||"vcs.vcm.maps.Openlayers"!==e.className){const e=new Le(J.getConfigObject());return e.extent=ol.extent.createEmpty(),e}this._featureExtent=new Le(J.getConfigObject()),this._featureExtent.extent=this.source.getExtent()}}return this._featureExtent.clone()}}var Us=Vs;const Ws=v.getLogger("vcs.vcm.util.clipping.ClippingObject"),qs=Symbol("ClippingObjectGlobe");class Js{constructor(e={}){this.id=bs()(),this.layerNames=e.layerNames||[],this.entities=e.entities||[],this.targets=new Map,this._clippingPlaneCollection=e.clippingPlaneCollection||null,this._terrain=Object(c["e"])(e.terrain,!1),this._local=Object(c["e"])(e.local,!1),this.targetsUpdated=new Cesium.Event,this.clippingPlaneUpdated=new Cesium.Event,this._cachedTiledLayers=new Set}get clippingPlaneCollection(){return this._clippingPlaneCollection}set clippingPlaneCollection(e){this._clippingPlaneCollection=e,this.clippingPlaneUpdated.raiseEvent()}get terrain(){return this._terrain}set terrain(e){a(e,Boolean),this._terrain!==e&&(this._terrain=e,this.handleMapChanged(j.getInstance().getActiveMap()))}get local(){return this._local}set local(e){a(e,Boolean),this._local!==e&&(this._local=e,this.clippingPlaneUpdated.raiseEvent())}handleLayerChanged(e){const t=j.getInstance().getActiveMap();if(t instanceof Pt){if(this.layerNames.includes(e.name))if(e.active){let i;if(e.cesium3DTileset?i=e:e instanceof Us&&(i=e.getImplementation(t)),i)i.cesium3DTileset.readyPromise.then(t=>{this.layerNames.includes(e.name)&&e.active&&(this.targets.set(e.name,t),this.targetsUpdated.raiseEvent())});else{const t=this.layerNames.indexOf(e.name);Ws.warning(`layer ${e.name} cannot have a ClippingObject applied`),this.layerNames.splice(t,1)}}else this.targets.has(e.name)&&(this.targets.delete(e.name),this.targetsUpdated.raiseEvent());else if(this.entities.find(t=>t.layerName===e.name)){let t=!1;this.entities.filter(t=>t.layerName===e.name).forEach(i=>{const s=`${i.layerName}-${i.entityId}`;if(e.active){const r=e.entities.getById(i.entityId);if(r)this.targets.set(s,r),t=!0;else{const e=this.entities.indexOf(i);Ws.warning(`could not find entity with id ${i.entityId} in layer ${i.layerName}`),this.entities.splice(e,1)}}else this.targets.has(s)&&(this.targets.delete(s),t=!0)}),t&&this.targetsUpdated.raiseEvent()}}else this.layerNames.includes(e.name)&&e instanceof Us&&(e.active?this._cachedTiledLayers.add(e):this._cachedTiledLayers.has(e)&&this._cachedTiledLayers.delete(e))}handleMapChanged(e){if(e instanceof Pt){const{globe:t}=e.getScene();let i=!1;this._terrain&&!this.targets.has(qs)?(this.targets.set(qs,t),i=!0):!this._terrain&&this.targets.has(qs)&&(this.targets.delete(qs),i=!0),i&&this.targetsUpdated.raiseEvent(),this._cachedTiledLayers.size>0&&(this._cachedTiledLayers.forEach(e=>{this.handleLayerChanged(e)}),this._cachedTiledLayers.clear())}}addLayer(e){if(a(e,String),!this.layerNames.includes(e)){this.layerNames.push(e);const t=j.getInstance().getLayerByName(e);t&&t.active&&this.handleLayerChanged(t)}}removeLayer(e){a(e,String);const t=this.layerNames.indexOf(e);t>-1&&this.layerNames.splice(t,1),this.targets.has(e)&&(this.targets.delete(e),this.targetsUpdated.raiseEvent())}addEntity(e,t){if(a(e,String),a(t,String),!this.entities.find(i=>i.layerName===e&&i.entityId===t)){this.entities.push({layerName:e,entityId:t});const i=j.getInstance().getLayerByName(e);i&&i.active&&this.handleLayerChanged(i)}}removeEntity(e,t){a(e,String),a(t,String);const i=this.entities.findIndex(i=>i.layerName===e&&i.entityId===t);i>-1&&this.entities.splice(i,1);const s=`${e}-${t}`;this.targets.has(s)&&(this.targets.delete(s),this.targetsUpdated.raiseEvent())}}var Ks=Js;class Zs extends se{constructor(e){super(),this.zPlane=e.zPlane,this.scene=null,this.plane=null,this.ray=new Cesium.Ray,this.cartographic=new Cesium.Cartographic}handleMapChange(e){this.plane=null,this.scene=e instanceof Pt?e.getScene():null}createPlane(e){this.scene&&(this.plane=this.zPlane?Xt(e,this.scene):Qt(e,this.scene))}getPosition(e){let t=e.positionOrPixel.slice();if(this.plane){this.ray=this.scene.camera.getPickRay(e.windowPosition,this.ray);const i=Cesium.IntersectionTests.rayPlane(this.ray,this.plane);i&&(this.cartographic=this.scene.globe.ellipsoid.cartesianToCartographic(i,this.cartographic),this.zPlane?t=W.wgs84ToMercator([Cesium.Math.toDegrees(this.cartographic.longitude),Cesium.Math.toDegrees(this.cartographic.latitude),this.cartographic.height]):t[2]=this.cartographic.height)}return t}}var Qs=Zs;class Xs extends Qs{constructor(e,t,i){super({zPlane:!0}),this.editor=e,this.finished=!0,this.onFinish=t,this._lastVertex=null,this.maxVertices=i,this._lastPosition=null,this._defaultActive=X.CLICKMOVE,this.setActive(!1)}pipe(e){if(this.finished)return Promise.resolve(e);let t;return e.type&X.MOVE?(t=this.getPosition(e),this.editor.vertices.length<this.maxVertices?this.editor.changeVertex(this._lastVertex,t,!this.editor.state.transformGeometryOnMove):this.editor.translateVertex(t[0]-this._lastPosition[0],t[1]-this._lastPosition[1],t,this._lastVertex,!this.editor.state.transformGeometryOnMove),this._lastPosition=t):e.type&X.CLICK&&(this.editor.vertices.length<this.maxVertices?(1!==this.editor.vertices.length||!this.scene||this.editor.state.altitudeMode&Ki.CLAMP||this.createPlane(e.positionOrPixel),t=this.getPosition(e),this._lastVertex.setStyle(null),this.editor.changeVertex(this._lastVertex,t),this._lastVertex=this.editor.pushVertex(t),this._lastVertex.setStyle(He),this._lastPosition=t):(t=this.getPosition(e),this.editor.translateVertex(t[0]-this._lastPosition[0],t[1]-this._lastPosition[1],t,this._lastVertex,!1),this._lastVertex.setStyle(null),this.editor.state.transformGeometryOnMove||this.editor.updateGeometry(),this._lastVertex&&this._lastVertex.setStyle(null),this.onFinish(),this.setActive(!1))),Promise.resolve(e)}setActive(e){let t=e;e&&0===this.editor.vertices.length?(this.finished=!1,this._lastVertex=this.editor.pushVertex([0,0,0]),this._lastVertex.setStyle(He)):(t=!1,this.finished=!0),super.setActive(t)}}var $s=Xs;const er=v.getLogger("vcs.vcm.util.editor.AbstractEditor");class tr{get className(){return"vcs.vcm.util.editor.AbstractEditor"}constructor(e){this.parent=e.parent||null;const t=this.parent?this.parent.scratchLayer:e.scratchLayer;this.scratchLayer=t||new ss({projection:J.getConfigObject(),altitudeMode:"clampToGround",isDynamic:!0,zCoordinateEyeOffset:-1}),this.interactionChain=new ne;const i=this.parent?this.parent.state:e.state;this.state=i||{mode:Wi.NONE,altitudeMode:Ki.CLAMP,defaultAltitudeMode:Ki.CLAMP,allowedGeometries:[],allowedModes:[],onlyAllowTranslation:!1,selectedFeatures:0,selectedCesiumFeatures:0,layerName:null,selectedFeatureId:null,active:!1,featureTypeSymbol:Symbol("featureType"),exclusiveId:Object(c["c"])(),dedicatedFeatureStyle:!1,transformGeometryOnMove:E.getInstance().transformGeometryOnMove,activeMap:null,isFeatureStore:!1,canSwitchToDynamic:!1,classificationType:Qi.terrain,defaultClassificationType:Qi.terrain,isDeclarativeStyle:!1,isLayerStyle:!1},this.isOblique=j.getInstance().getActiveMap()instanceof Ti,this._mapChangedSubscriptionKey=j.getInstance().subscribe(L.MAP_ACTIVATED,e=>{this.state.active&&this.handleMapChange(e)}),this.modeChange=new Cesium.Event}activate(){this.isOblique=j.getInstance().getActiveMap()instanceof Ti,this.parent||(this.state.active=!0,this.scratchLayer.activate())}deactivate(){this.parent||(this.state.active=!1,this.scratchLayer.deactivate())}getRootEditor(){let e=this;while(e.parent)e=e.parent;return e}initialize(){this.interactionChain.initialize(),this.handleMapChange(j.getInstance().getActiveMap())}beforeSetMode(e){}setMode(e){this.parent||this.beforeSetMode(e),er.debug(`AbstractEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`),a(e,Number),this.interactionChain.chain.forEach(e=>{e.setActive(!1)}),this.state.mode=e,this.modeChange.raiseEvent(e)}destroy(){null!=this._mapChangedSubscriptionKey&&j.getInstance().unsubscribeByKey(this._mapChangedSubscriptionKey)}handleMapChange(e){this.isOblique=e instanceof Ti}}var ir=tr;const sr=new ol.style.Style({});class rr extends Qs{constructor(e,t){super({zPlane:!0}),this.editor=e,this.selectFeatureInteraction=e.parent?e.parent.selectFeatureInteraction:null,this.forceZPlane=!!t,this._defaultActive=X.DRAGEVENTS,this._defaultModificationKey=Q.ALT,this._lastPosition=null,this._vertex=null,this.setActive()}pipe(e){if(this._lastPosition){const t=this.getPosition(e),i=e.type&(X.DRAGEND|X.CLICK);this.editor.translateVertex(t[0]-this._lastPosition[0],t[1]-this._lastPosition[1],t,this._vertex,!(this.editor.state.transformGeometryOnMove||i)),this._lastPosition=t,i&&(this._lastPosition=null,this._vertex.setStyle(this._vertex[Xe]?this._vertex[Xe].style:null),this._vertex=null,this.editor.feature.set("olcs_allowPicking",!!(this.editor.state.mode&Wi.EDIT)),this.selectFeatureInteraction&&this.selectFeatureInteraction.setActive(!0))}else e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.VERTEX&&e.type&(X.DRAGSTART|X.CLICK)&&(this.scene&&(this.editor.state.altitudeMode&Ki.ZPLANE||this.forceZPlane&&this.editor.state.altitudeMode&Ki.ABSOLUTE)?(this._lastPosition=e.feature.getGeometry().getCoordinates(),this.createPlane(this._lastPosition)):(this.plane=null,this._lastPosition=this.scene?e.feature.getGeometry().getCoordinates():e.positionOrPixel),this._vertex=e.feature,this._vertex.setStyle(sr),this.editor.feature.set("olcs_allowPicking",!1),this.selectFeatureInteraction&&this.selectFeatureInteraction.setActive(!1));return Promise.resolve(e)}}var nr=rr;class ar extends Qs{constructor(e){super({zPlane:!1}),this.editor=e,this.selectFeatureInteraction=e.parent?e.parent.selectFeatureInteraction:null,this._defaultActive=X.DRAGEVENTS,this._defaultModificationKey=Q.CTRL,this._lastHeight=null,this._vertex=null,this.setActive()}pipe(e){if(this.scene)if(this._lastHeight){const t=this.getPosition(e),i=e.type&(X.DRAGEND|X.CLICK);this.editor.translateVertexHeight(t[2]-this._lastHeight,this._vertex,!(this.editor.state.transformGeometryOnMove||i)),this._lastHeight=t[2],i&&(this._lastHeight=null,this._vertex=null,this.selectFeatureInteraction&&this.selectFeatureInteraction.setActive(!0))}else if(e.key&Q.CTRL&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.VERTEX&&e.type&(X.DRAGSTART|X.CLICK)){const t=e.feature.getGeometry().getCoordinates();this._lastHeight=t[2],this.createPlane(t),this._vertex=e.feature,this.selectFeatureInteraction&&this.selectFeatureInteraction.setActive(!0)}return Promise.resolve(e)}setActive(e){super.setActive("clampToGround"!==this.editor.feature.get("olcs_altitudeMode")&&e)}}var or=ar;const lr=Symbol("vertexIndex"),cr=v.getLogger("vcs.vcm.util.editor.AbstractGeometryEditor");class ur extends ir{constructor(e,t){super(e),this.creationActive=!1,this.geometry=e.geometry,this.layer=e.layer,this.feature=e.feature,this.vertices=[],this.onFinish=e.onFinish||this.getRootEditor().setMode.bind(this,Wi.EDIT),this.onRemoved=e.onRemoved||(()=>{}),this._create=null,this._translateVertex=new nr(this,t),this.interactionChain.addInteraction(this._translateVertex),this._translateVertexHeight=new or(this),this.interactionChain.addInteraction(this._translateVertexHeight),this.setAltitudeModeToAbsoluteOnClassification=!0}initialize(){super.initialize(),this._createVertices(),this.feature.set("olcs_allowPicking",!1)}_createVertices(){}_createVertex(e,t){const i=this.feature.get("olcs_extrudedHeight")||this.feature.get("olcs_storeyNumber")&&this.feature.get("olcs_storeyHeight")?this.feature.get("olcs_groundLevel"):0;e[2]=i||e[2]||0;const s=new ol.geom.Point(e);this.isOblique&&(s[ss.alreadyTransformedToImage]=!0);const r=new ol.Feature({geometry:s});r[this.state.featureTypeSymbol]=qi.VERTEX,null!=t&&(r[lr]=t),r[ss.doNotTransform]=!0;let n=this.feature.get("olcs_altitudeMode")||this.layer.altitudeMode;return this.setAltitudeModeToAbsoluteOnClassification&&this.state.classificationType!==Qi.terrain&&(n="absolute"),r.set("olcs_altitudeMode",n),r}getVertexIndex(e){return this.vertices.findIndex(t=>t.getId()===e.getId())}changeVertex(e,t,i){e.getGeometry().setCoordinates(t),i||this.updateGeometry()}translateVertex(e,t,i,s,r){this.state.altitudeMode&Ki.ZPLANE?s.getGeometry().translate(e,t):(this.isOblique&&(s.getGeometry()[ss.alreadyTransformedToImage]=!0),s.getGeometry().setCoordinates(i)),r||this.updateGeometry()}updateGeometry(){}pushVertex(e){return null}translateVertexHeight(e,t,i){const s=t.getGeometry(),r=s.getCoordinates();r[2]+=e,s.setCoordinates(r),i||this.updateGeometry()}validate(){return!1}_validateOnFinish(){this.creationActive=!1,this.validate()?this.onFinish():this._removeFeature()}_removeFeature(){if(!this.parent||"vcs.vcm.util.editor.MultiGeometryEditor"!==this.parent.className){const e=j.getInstance().getLayerByName(this.feature[Et.vcsLayerNameSymbol]);e&&e instanceof ss&&e.removeFeaturesById([this.feature.getId()])}this.onRemoved()}setAltitudeMode(e){let t=this.vertices.length;while(t--)this.vertices[t].set("olcs_altitudeMode",e&Ki.CLAMP?"clampToGround":"absolute");this.state.mode^Wi.CREATE&&this.setMode(this.state.mode)}stopCreation(){if(!this.validate()){const e=j.getInstance().getLayerByName(this.feature[Et.vcsLayerNameSymbol]);e&&e instanceof ss&&e.removeFeaturesById([this.feature.getId()])}}setMode(e){cr.debug(`AbstractGeometryEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`);let t=e;0===this.vertices.length&&(t=Wi.CREATE),super.setMode(t),this.creationActive&&(this.stopCreation(),this.creationActive=!1),t&Wi.CREATE?(this.creationActive=!0,this._create.setActive(!0)):t&Wi.TRANSLATEVERTEX?(this._translateVertex.setModification(Q.NONE),this._translateVertex.setActive(X.CLICKMOVE),this._translateVertexHeight.setModification(Q.NONE|Q.CTRL),this._translateVertexHeight.setActive(X.CLICKMOVE)):t&Wi.GEOMETRYMODES&&(this._translateVertex.setActive(),this._translateVertexHeight.setActive())}destroy(){super.destroy(),this._clearVertices(),this.feature.set("olcs_allowPicking",!0)}_clearVertices(){const e=this.vertices.map(e=>e.getId());this.scratchLayer.removeFeaturesById(e),this.vertices.splice(0)}}var hr=ur;const dr=v.getLogger("vcs.vcm.util.editor.RectangleEditor");class mr extends hr{constructor(e){const t=e.geometry,i=t.getLinearRing(0);e.geometry=i,super(e,!0),this._create=new $s(this,this._validateOnFinish.bind(this),e.isBBox?2:3),this.interactionChain.addInteraction(this._create),this.polygon=t,this.geometry=this.geometry,this._setupGeometry(t),this.isBBox=e.isBBox||!1,this._aspectRatio=null,this.aspectRatio=e.aspectRatio,this._scratchCartesian1=new Cesium.Cartesian2,this._scratchCartesian2=new Cesium.Cartesian2,this.setAltitudeModeToAbsoluteOnClassification=!1}set aspectRatio(e){o(e,Number),e&&e<1e3&&e>1e-4?this._aspectRatio=e:(this._aspectRatio=null,e&&dr.warning(`aspect ratio ${e} is too small or too large`))}get aspectRatio(){return this._aspectRatio}_createVertices(){const e=this.geometry.getCoordinates();for(let t=0;t<e.length;t++)this.vertices.push(this._createVertex(e[t],t));this.scratchLayer.addFeatures(this.vertices)}pushVertex(e){if(4===this.vertices.length)return this._create.setActive(!1),this.vertices[3];if(this.isBBox&&1===this.vertices.length){const t=[1,2,0].map(t=>{const i=e.slice();2===t?(i[0]+=1e-4,i[1]+=1e-4):i[t]+=1e-4;const s=this._createVertex(i);return this.vertices.push(s),s});return this.scratchLayer.addFeatures(t),this.vertices[0]}if(this.vertices.length<2){const t=this._createVertex(e),i=this.geometry.getCoordinates();return i.push(e),this.geometry.setCoordinates(i),this.vertices.push(t),this.scratchLayer.addFeatures([t]),t}const t=Cesium.Matrix2.fromArray([0,1,-1,0]),i=this.vertices[0].getGeometry().getCoordinates(),s=this.vertices[1].getGeometry().getCoordinates();this._scratchCartesian1=Cesium.Cartesian2.fromElements(i[0]-s[0],i[1]-s[1],this._scratchCartesian1),this._scratchCartesian2=Cesium.Matrix2.multiplyByVector(t,this._scratchCartesian1,this._scratchCartesian2),this._scratchCartesian2=Cesium.Cartesian2.normalize(this._scratchCartesian2,this._scratchCartesian2),this._scratchCartesian2=Cesium.Cartesian2.multiplyByScalar(this._scratchCartesian2,1e-4,this._scratchCartesian2);const r=[this._scratchCartesian2.x+i[0],this._scratchCartesian2.y+i[1],i[2]],n=this._createVertex([r[0]-this._scratchCartesian1.x,r[1]-this._scratchCartesian1.y,i[2]]),a=this._createVertex(r);return this.vertices.push(n),this.vertices.push(a),this.scratchLayer.addFeatures([n,a]),this.updateGeometry(),n}updateGeometry(){this.isOblique&&(this.geometry[ss.imageGeometryChanged]=!0),this.geometry.setCoordinates(this.vertices.map(e=>this.isOblique?e[ss.obliqueGeometry].getCoordinates():e.getGeometry().getCoordinates()),"XYZ")}_setupGeometry(e){this.polygon=e,this.geometry=e.getLinearRing(0),this.listener=this.geometry.on("change",()=>{this.polygon.setCoordinates([this.geometry.getCoordinates()],"XYZ")})}translateVertex(e,t,i,s,r){const n=this.isOblique?s[ss.obliqueGeometry]:s.getGeometry();this.isOblique&&(n[ss.alreadyTransformedToImage]=!0);let a=t;if(this.aspectRatio){const t=this.vertices.findIndex(e=>e===s);a=e*this.aspectRatio,a=1===t||3===t?-a:a}n.translate(e,a);const o=n.getCoordinates(),l={0:[3,1,2],1:[2,0,3],2:[1,3,0],3:[0,2,1]},c=l[this.getVertexIndex(s)],u=this.isOblique?this.vertices[c[2]][ss.obliqueGeometry]:this.vertices[c[2]].getGeometry(),h=u.getCoordinates(),d=Jt(h,o);if(d<1e-4)return void n.setCoordinates([h[0]+1e-4,h[1]+1e-4,i[2]]);const m=this.isOblique?this.vertices[c[0]][ss.obliqueGeometry]:this.vertices[c[0]].getGeometry(),g=this.isOblique?this.vertices[c[1]][ss.obliqueGeometry]:this.vertices[c[1]].getGeometry();this.isOblique&&(m[ss.alreadyTransformedToImage]=!0,g[ss.alreadyTransformedToImage]=!0),m.setCoordinates(Wt(h,m.getCoordinates(),o)),g.setCoordinates(Wt(h,g.getCoordinates(),o)),r||this.updateGeometry()}translateVertexHeight(e,t,i){let s=this.vertices.length;while(s--)super.translateVertexHeight(e,this.vertices[s],!0);i||this.updateGeometry()}validate(){return!this.creationActive&&4===this.vertices.length}destroy(){super.destroy(),ol.Observable.unByKey(this.listener)}setExtent(e,t){a(e,[Number]),a(e.length,4);const i=ol.geom.Polygon.fromExtent(e).getLinearRing(0).getCoordinates();Ds(i);const s=t||(this.vertices.length?this.vertices[0].getGeometry().getCoordinates()[2]:0);this.geometry.setCoordinates(i.map(e=>(e[2]=s,e))),this._clearVertices(),this._createVertices()}}var gr=mr;const pr=new ol.style.Style({});function fr(){}class yr extends se{constructor(e,t){super(),this.editor=e,this.finished=!0,this.onFinish=t||fr,this._defaultActive=X.CLICKMOVE,this.setActive(!1)}pipe(e){return this.finished||(e.type&X.MOVE&&this.editor.changeVertex(this._lastVertex,e.positionOrPixel,!this.editor.state.transformGeometryOnMove),e.type&X.CLICK&&(this.editor.changeVertex(this._lastVertex,e.positionOrPixel),this._lastVertex.setStyle(null),this.editor.feature.setStyle(this._featureStyle),this.onFinish(),this.setActive(!1))),Promise.resolve(e)}setActive(e){e&&0===this.editor.vertices.length?(this.finished=!1,this._lastVertex=this.editor.pushVertex([0,0,0]),this._lastVertex.setStyle(pr),this._featureStyle=this.editor.feature.getStyle(),this.editor.feature.setStyle(pr)):this.finished=!0,super.setActive(!this.finished&&e)}}var _r=yr;class vr extends se{constructor(e){super(),this.editor=e,this._defaultActive=X.CLICK,this._defaultModificationKey=Q.SHIFT,this.setActive()}pipe(e){return!this.editor.state.onlyAllowTranslation&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.VERTEX&&this.editor.removeVertex(e.feature),Promise.resolve(e)}}var Lr=vr,Mr=i(44),br=i.n(Mr);const wr=[/\+/,/-/,/\*/,new RegExp("\\/")];class Tr extends oe{static get className(){return"vcs.vcm.util.Balloon"}constructor(e){e.className=Tr.className,super(e),this.balloonContent=e.balloonContent,this.template=e.template,this.attributes=e.attributes,this.layerName=e.layerName,this.longitude=e.longitude,this.latitude=e.latitude,this.height=e.height||0,this.relativeToGround=e.relativeToGround,this.minTop=e.minTop||"0",this.viewerTopOffset=0,this.minLeft=e.minLeft||"0",this.containerId=e.containerId||"balloonContainer",this.balloonWidget=e.balloonWidget,this.balloonId=Object(c["c"])(),this.initialized=!1,this.initializedFor=null,this.cartographic=new Cesium.Cartographic,this.cartesian3=null,this.mercatorCoordinates=null,this.obliqueCoordinates=null,this.obliqueImageChangedSubscriptionKey=this.framework.subscribe(L.OBLIQUE_IMAGE_CHANGED,this.obliqueChangedListener.bind(this))}initialize(){const e=this.framework.getActiveMap();e instanceof Pt?this.initializeForCesium():e instanceof Di?this.initializeForOpenlayers():e instanceof Ti&&this.initializeForOblique()}setPosition(e){if("cesium"===this.initializedFor)W.mercatorToWgs84(e,!0),this.relativeToGround?(this.cartographic.longitude=Cesium.Math.toRadians(e[0]),this.cartographic.latitude=Cesium.Math.toRadians(e[1])):this.cartesian3=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2],this.cesiumScene.globe.ellipsoid,this.cartesian3);else if("openlayers"===this.initializedFor)this.mercatorCoordinates.splice(0,3,e[0],e[1],e[2]);else if("oblique"===this.initializedFor){const t=this.framework.getActiveMap();if(t instanceof Ti)return Object(At["f"])(t.activeLayer.currentImage,[e[0],e[1],e[2]],{dataProjection:ol.proj.get("EPSG:3857")}).then(({coords:e})=>{this.obliqueCoordinates.splice(0,2,e[0],e[1])})}return Promise.resolve()}obliqueChangedListener(){this.close()}getDomNodes(){let e;if(this.balloonContent)e=this.balloonContent;else try{e=br()(this.template)(this.attributes)}catch(i){return this.logger.warning(`Could not render the template for layer: ${this.layerName}. Please verify that the balloon template is correct`),null}const t=document.createElement("div");if(t.setAttribute("id",this.balloonId),e instanceof HTMLElement?t.appendChild(e):t.innerHTML=e,!t.children.length){const i=document.createElement("div");i.innerHTML=e,t.appendChild(i)}for(let s=0;s<t.children.length;s++){w.getInstance().translateAll(t.children[s]);const e=t.children[s];e.style.top="-1000px",e.style.left="-1000px"}return t}initializeForCesium(){if(!this.initialized){const e=this.initializeBalloon();if(this.cesiumMap=this.framework.getActiveMap(),this.cesiumScene=this.cesiumMap.getScene(),!this.cartesian3||this.relativeToGround&&Cesium.Cartographic.equals(this.cartographic,Cesium.Cartographic.ZERO)){if(null==this.longitude||null==this.latitude)return void this.logger.error("Cannot instatiate balloon without defined cartesian3 or longitude latitude");this.relativeToGround&&Cesium.Cartographic.equals(this.cartographic,Cesium.Cartographic.ZERO)?(this.cartographic=Cesium.Cartographic.fromDegrees(this.longitude,this.latitude,this.height,this.cartographic),this.cartographic.height=this.cesiumScene.globe.getHeight(this.cartographic)+this.height,this.cartesian3=Cesium.Cartographic.toCartesian(this.cartographic)):this.cartesian3=Cesium.Cartesian3.fromDegrees(this.longitude,this.latitude,this.height)}this.cesiumPostRenderBind=this.cesiumPostRenderHandler.bind(this,e.minTop,e.minLeft),this.cesiumScene.postRender.addEventListener(this.cesiumPostRenderBind),this.initialized=!0,this.initializedFor="cesium"}}cesiumPostRenderHandler(e,t){this.relativeToGround&&(this.cartographic.height=this.cesiumScene.globe.getHeight(this.cartographic)+this.height,this.cartesian3=Cesium.Cartographic.toCartesian(this.cartographic,this.cesiumScene.globe.ellipsoid,this.cartesian3));const i=Cesium.SceneTransforms.wgs84ToWindowCoordinates(this.cesiumScene,this.cartesian3);i&&i.x&&i.y&&(this.poiLocationWindowCoordsx=i.x,this.poiLocationWindowCoordsy=i.y,this.setBalloonPosition(e,t))}initializeForOpenlayers(){if(!this.initialized){const e=this.initializeBalloon();this.olMap=this.framework.getActiveMap().olMap,this.mercatorCoordinates||(this.mercatorCoordinates=W.wgs84ToMercator([this.longitude,this.latitude,this.height])),this.openlayersUnsubscribeKey=this.olMap.on("postrender",this.olPostRenderHandler.bind(this,this.mercatorCoordinates,e.minTop,e.minLeft)),this.initialized=!0,this.initializedFor="openlayers",this.olMap.dispatchEvent("postrender")}}setBalloonPosition(e,t){const i=document.getElementById(this.balloonId);if(i&&i.children[0]){const s=i.children[0];s.style.top=this.poiLocationWindowCoordsy-e+"px",s.style.left=this.poiLocationWindowCoordsx-t+"px"}}olPostRenderHandler(e,t,i){const s=this.olMap.getPixelFromCoordinate(e);if(s){const e=this.olMap.get("vcs_scale")||1;this.poiLocationWindowCoordsx=s[0]/e,this.poiLocationWindowCoordsy=s[1]/e,this.setBalloonPosition(t,i)}}initializeBalloon(){const e=this.getDomNodes();if(!e)return null;const t=document.getElementById(this.containerId);t.appendChild(e);const i=Tr.computeOffset(e,this.minTop)-this.viewerTopOffset,s=Tr.computeOffset(e,this.minLeft),r=document.getElementById(this.balloonId).getElementsByClassName("close-balloon");if(r)for(let n=0;n<r.length;n++)r[n].addEventListener("click",this.closeBalloonClicked.bind(this));return{minTop:i,minLeft:s}}initializeForOblique(){if(!this.initialized){const e=this.initializeBalloon(),t=this.framework.getActiveMap();this.olMap=t.olMap;let i=Promise.resolve();this.obliqueCoordinates||(i=Object(At["f"])(t.activeLayer.currentImage,[this.longitude,this.latitude,this.relativeToGround?0:this.height],{dataProjection:ol.proj.get("EPSG:4326")}).then(({coords:e})=>{this.obliqueCoordinates=e})),i.then(()=>{this.obliqueUnsubscribeKey=this.olMap.on("postrender",this.olPostRenderHandler.bind(this,this.obliqueCoordinates,e.minTop,e.minLeft)),this.initializedFor="oblique",this.initialized=!0,this.olMap.dispatchEvent("postrender")})}}close(){const e=document.getElementById(this.balloonId);e&&(e.parentNode.removeChild(e),"cesium"===this.initializedFor?this.cesiumScene.postRender.removeEventListener(this.cesiumPostRenderBind):"openlayers"===this.initializedFor?ol.Observable.unByKey(this.openlayersUnsubscribeKey):"oblique"===this.initializedFor&&ol.Observable.unByKey(this.obliqueUnsubscribeKey)),this.obliqueImageChangedSubscriptionKey&&this.framework.unsubscribeByKey(this.obliqueImageChangedSubscriptionKey),this.initialized=!1}closeBalloonClicked(){const e=E.getInstance();e&&this.balloonWidget?e.clearCurrentItem():this.close()}show(e){document.getElementById(this.balloonId).style.display=e?"block":"none"}static computeOffset(e,t){if("number"===typeof t)return t;const i=e.children[0],s=i.offsetHeight,r=i.offsetWidth;function n(e){return/\d+/.test(e)?Number(e.match(/\d+/)[0]):/balloonHeight/.test(e)?s:/balloonWidth/.test(e)?r:0}function a(e,t){return e.reduce((e,i)=>{switch(!0){case t.test("+"):return e+i;case t.test("-"):return e-i;case t.test("*"):return e*i;case t.test("/"):return e/i;default:return e+i}})}const o=wr.find(e=>e.test(t));let l;if(o){const e=t.split(o),i=e.map(n);l=a(i,o)}else l=n(t);return Number(l)}getLink(e){const t=`${this.longitude.toFixed(8)},${this.latitude.toFixed(8)},${this.height.toFixed(2)}`,i={slLayer:this.layerName,slPos:t,slR2G:this.relativeToGround,slAt:JSON.stringify(this.attributes)};e.addQueryParams(i)}}var Sr=Tr;class Cr extends se{constructor(e){super(),this._defaultActive=X.CLICK,this.editor=e,this.setActive()}pipe(e){return e.feature&&e.feature[this.editor.state.featureTypeSymbol]&(qi.EDITING|qi.VERTEX)&&this.editor.editLabel(),Promise.resolve(e)}}var Er=Cr;const Ir=v.getLogger("vcs.vcm.util.editor.PointGeometryEditor");class kr extends hr{constructor(e){super(e),this._create=new _r(this,this._checkLabel.bind(this)),this.interactionChain.addInteraction(this._create),this.geometry=this.geometry,this.feature[this.state.featureTypeSymbol]|=qi.VERTEX,this._removeVertex=new Lr(this),this.interactionChain.addInteraction(this._removeVertex),this.isLabel="Label"===this.geometry.get("_vcsGeomType"),this._selectLabel=null,this.isLabel&&(this._selectLabel=new Er(this),this.interactionChain.addInteraction(this._selectLabel)),this._balloon=null,this._textArea=null}_createVertices(){const e=this.geometry.getCoordinates();if(!e.every(e=>0===e)){const t=this._createVertex(e);this.vertices.push(t),this.scratchLayer.addFeatures([t])}}pushVertex(e){if(this.vertices.length)return this.state.mode&Wi.CREATE&&this.onFinish(),this.vertices[0];const t=this._createVertex(e);return this.vertices.push(t),this.geometry.setCoordinates(e),this.scratchLayer.addFeatures([t]),t}_checkLabel(){!this._balloon&&this.isLabel&&1===this.vertices.length?this.editLabel():super._validateOnFinish()}_validateOnFinish(){this.creationActive=!!this.isLabel&&!this._hasLabel(),this.validate()?this.onFinish():this._removeFeature()}addLabel(){this._selectLabel||(this._selectLabel=new Er(this),this.interactionChain.addInteraction(this._selectLabel)),this.isLabel=!0,this.geometry.set("_vcsGeomType","Label",!0),this.feature[Xe]||(this.feature[Xe]=this.parent.activeLayer.style.clone(),this.feature.setStyle(this.feature[Xe].style),this.feature.changed()),this.editLabel()}editLabel(){this._setBalloon(this.feature[Xe].label)}_setBalloon(e){if(!this._textArea){this._textArea=document.createElement("textarea"),this._textArea.rows=1,this._textArea.cols=100,this._textArea.classList.add("balloon");const e=this.feature[Xe].text;if(e){if(this._textArea.style.font=e.getFont(),e.getStroke()){const t=e.getStroke().getWidth(),i=Oe(Ie(e.getStroke().getColor()));this._textArea.style.textShadow=`-${t}px ${t}px 0 ${i},${t}px ${t}px 0 ${i},${t}px -${t}px 0 ${i},-${t}px -${t}px 0 ${i}`}e.getFill()&&(this._textArea.style.color=Oe(Ie(e.getFill().getColor())))}this._textArea.addEventListener("keydown",this._labelKeyDown.bind(this))}e&&(this._textArea.value=e);const t={balloonContent:this._textArea};this.isOblique||([t.longitude,t.latitude,t.height]=W.mercatorToWgs84(this.geometry.getCoordinates())),this._balloon=new Sr(t),this.isOblique&&(this._balloon.obliqueCoordinates=this.geometry.getCoordinates()),this._balloon.initialize(),this._textArea.focus()}stopEditingLabel(e){this._balloon&&(e&&this._textArea&&(this.feature[Xe].label=this._textArea.value,this.feature.changed()),this._balloon.close(),this._balloon=null,this._textArea=null,this.state.mode&Wi.CREATE?this._validateOnFinish():this.validate()||this.stopCreation())}translateVertex(e,t,i,s,r){super.translateVertex(e,t,i,this.vertices[0],r)}translateVertexHeight(e,t,i){super.translateVertexHeight(e,this.vertices[0],i)}_labelKeyDown(e){e.stopPropagation(),"Escape"===e.key?this.stopEditingLabel():"Enter"===e.key&&this.stopEditingLabel(!0)}removeVertex(e){this.scratchLayer.removeFeaturesById([e.getId()]),this._removeFeature()}_hasLabel(){const e=this.feature[Xe]?this.feature[Xe].label:null;return e&&e.length}stopCreation(){super.stopCreation(),this.validate()&&this.isLabel&&(this._hasLabel()||this.geometry.unset("_vcsGeomType",!0))}validate(){return!this.creationActive&&!this.geometry.getCoordinates().every(e=>0===e)}updateGeometry(){const e=this.vertices[0].getGeometry().getCoordinates();this.geometry.setCoordinates(e,"XYZ"),this._balloon&&(this.isOblique?this._balloon.obliqueCoordinates.splice(0,2,e[0],e[1]):this._balloon.setPosition(e))}setPosition(e){a(e,[Number]),a(e.length,3),this.vertices.length?(this.vertices[0].getGeometry().setCoordinates(e),this.updateGeometry()):this.pushVertex(e),this.creationActive&&this._validateOnFinish()}setMode(e){Ir.debug(`PointGeometryEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`),super.setMode(e),this.state.mode&Wi.EDIT?(this._selectLabel&&this._selectLabel.setActive(),this._removeVertex.setActive()):this.state.mode&Wi.REMOVEVERTEX&&(this._removeVertex.setActive(!0),this._removeVertex.setModification(Q.NONE))}handleMapChange(e){this._balloon&&(this._balloon.close(),this._setBalloon())}destroy(){this._balloon&&(this._balloon.close(),this._balloon=null,this._textArea=null),this.feature[this.state.featureTypeSymbol]^=qi.VERTEX,super.destroy()}}var Dr=kr;function Or(){}const Pr=new ol.style.Style({});class Ar extends se{constructor(e,t){super(),this.editor=e,this.finished=!0,this._lastVertex=null,this.onFinish=t||Or,this._defaultActive=X.CLICK|X.DBLCLICK|X.MOVE,this.setActive(!1)}pipe(e){return this.finished||(e.type&X.MOVE&&this.editor.changeVertex(this._lastVertex,e.positionOrPixel,!this.editor.state.transformGeometryOnMove),e.type&X.CLICK&&(this.editor.changeVertex(this._lastVertex,e.positionOrPixel),this._lastVertex.setStyle(null),this._lastVertex=this.editor.reverse?this.editor.unshiftVertex(e.positionOrPixel):this.editor.pushVertex(e.positionOrPixel),this._lastVertex.setStyle(Pr)),e.type&X.DBLCLICK&&(this.editor.removeVertex(this._lastVertex),this.editor.reverse=!1,this.onFinish(),this.setActive(!1))),Promise.resolve(e)}setActive(e){if(e){let e;this.finished=!1,this.editor.vertices.length>0?(e=this.editor.reverse?this.editor.vertices[0]:this.editor.vertices.slice(-1)[0],e=e.getGeometry().getCoordinates()):e=[0,0,0],this._lastVertex=this.editor.reverse?this.editor.unshiftVertex(e):this.editor.pushVertex(e),this._lastVertex.setStyle(Pr)}else this.finished=!0;super.setActive(e)}}var xr=Ar;class Yr extends se{constructor(e,t){super(),this.editor=e,this.callback=t,this.timeOut=null,this.clickDuration=vs().clickDuration,this._defaultActive=X.CLICK|X.DBLCLICK,this.setActive()}pipe(e){if(!this.editor.state.onlyAllowTranslation){if(e.type&X.DBLCLICK)return this.editor.reverse=!1,clearTimeout(this.timeOut),Promise.resolve(e);if(e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.VERTEX){const t=this.editor.getVertexIndex(e.feature);0===t?(this.editor.reverse=!0,this.doCallback()):t===this.editor.vertices.length-1&&this.doCallback()}}return Promise.resolve(e)}doCallback(){this.timeOut=setTimeout(this.callback,this.clickDuration)}}var jr=Yr;class Nr extends se{constructor(e){super(),this.editor=e,this._defaultActive=X.CLICK,this.setActive()}pipe(e){return!this.editor.state.onlyAllowTranslation&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.EDITING&&this.editor.insertVertex(e.positionOrPixel),Promise.resolve(e)}}var Fr=Nr;const Rr=v.getLogger("vcs.vcm.util.editor.LineGeometryEditor");class Hr extends hr{constructor(e){super(e),this._create=new xr(this,this._validateOnFinish.bind(this)),this.interactionChain.addInteraction(this._create),this.geometry=this.geometry,this.reverse=!1,this._lastVertex=new jr(this,()=>{this.getRootEditor().setMode(Wi.CREATE)}),this.interactionChain.addInteraction(this._lastVertex),this._insertVertex=new Fr(this),this.interactionChain.addInteraction(this._insertVertex),this._removeVertex=new Lr(this),this.interactionChain.addInteraction(this._removeVertex)}_createVertices(){const e=this.geometry.getCoordinates();for(let t=0;t<e.length;t++)this.vertices.push(this._createVertex(e[t]));this.scratchLayer.addFeatures(this.vertices)}updateGeometry(){this.isOblique&&(this.geometry[ss.imageGeometryChanged]=!0),this.geometry.setCoordinates(this.vertices.map(e=>this.isOblique?e[ss.obliqueGeometry].getCoordinates():e.getGeometry().getCoordinates()),"XYZ")}pushVertex(e){const t=this._createVertex(e);this.vertices.push(t),this.scratchLayer.addFeatures([t]);const i=this.geometry.getCoordinates();return i.push(e),this.geometry.setCoordinates(i),t}insertVertex(e){const t=this.geometry.getCoordinates(),i=this.geometry.getClosestPoint(e);this.geometry instanceof ol.geom.LinearRing&&t.push(t[0]);const s="clampToGround"===this.feature.get("olcs_altitudeMode")?qt(i,e):Jt(i,e);if(s<5){const s=t.length-1;let r=0;for(r;r<s;r++){const e="clampToGround"===this.feature.get("olcs_altitudeMode")?Zt(t[r],t[r+1],i):Kt(t[r],t[r+1],i);if(e)break}const n=this._createVertex(e);return this.vertices.splice(r+1,0,n),this.scratchLayer.addFeatures([n]),this.updateGeometry(),n}return null}unshiftVertex(e){const t=this._createVertex(e);this.vertices.unshift(t),this.scratchLayer.addFeatures([t]);const i=this.geometry.getCoordinates();return i.unshift(e),this.geometry.setCoordinates(i),t}removeVertex(e){const t=this.getVertexIndex(e);if(t>-1){const i=this.geometry.getCoordinates();i.splice(t,1),this.geometry.setCoordinates(i),this.vertices.splice(t,1),this.scratchLayer.removeFeaturesById([e.getId()])}}stopCreation(){if(super.stopCreation(),this.creationActive&&this.validate()){const e=this.reverse?this.vertices[0]:this.vertices[this.vertices.length-1];this.removeVertex(e)}}setMode(e){Rr.debug(`LineGeometryEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`),super.setMode(e),this.feature.set("olcs_allowPicking",!!(e&Wi.EDIT)),this.state.mode&Wi.EDIT?(this._lastVertex.setActive(),this._insertVertex.setActive(),this._removeVertex.setActive()):this.state.mode&Wi.REMOVEVERTEX&&(this._removeVertex.setActive(!0),this._removeVertex.setModification(Q.NONE))}validate(){let e=1;return this.creationActive&&(e+=1),"LinearRing"===this.geometry.getType()&&(e+=1),this.geometry.getCoordinates().length>e}}var Gr=Hr;const zr=new ol.Sphere(6378137);class Br extends hr{constructor(e){super(e),this._create=new $s(this,this._validateOnFinish.bind(this),2),this.interactionChain.addInteraction(this._create),this.geometry=this.geometry,this.radius=null;const t=this.feature.get("olcs.circle_type");t&&"sphere"===t||(this._translateVertex.forceZPlane=!0),this.setAltitudeModeToAbsoluteOnClassification=!1}initialize(){const e=this.geometry.getCenter();e[2]=e[2]||0;const t=this.geometry.getRadius();this.geometry.setCenterAndRadius(e,t,"XYZ"),super.initialize()}_createVertices(){const e=this.geometry.getFirstCoordinate();if(!e.every(e=>0===e)){this.vertices.push(this._createVertex(e,0));const t=this.geometry.getLastCoordinate();t.length&&this.vertices.push(this._createVertex(t,1)),this.scratchLayer.addFeatures(this.vertices)}}updateGeometry(){2===this.vertices.length&&this.geometry.setCoordinates([this.vertices[0].getGeometry().getCoordinates(),this.vertices[1].getGeometry().getCoordinates()])}pushVertex(e){if(this.vertices.length<2){let t=!1;const i=this.vertices.length;1===i&&(this.geometry.setCenter(this.vertices[0].getGeometry().getCoordinates()),this.radius&&(this.geometry.setRadius(this.radius),e[0]+=this.radius,this.radius=null,t=!0));const s=this._createVertex(e,i);return this.vertices.push(s),this.scratchLayer.addFeatures([s]),t&&this.stopCreation(),s}return this.vertices[1]}validate(){return!this.creationActive}translateVertex(e,t,i,s,r){if(0===s[lr])super.translateVertex(e,t,i,s,!0),r||(this.geometry.setCenter(s.getGeometry().getCoordinates()),this.vertices[1].getGeometry().setCoordinates(this.geometry.getLastCoordinate()));else{const n=this.feature.get("olcs.circle_type");let a;if(n&&"sphere"===n?(a=Jt,super.translateVertex(e,t,i,s,!0)):(a=qt,s.getGeometry().translate(e,t)),!r){const e=this.vertices[0].getGeometry().getCoordinates(),t=s.getGeometry().getCoordinates(),i=a(e,t);this.geometry.setRadius(i)}}}translateVertexHeight(e,t,i){let s=2;while(s--){const t=this.vertices[s].getGeometry(),i=t.getCoordinates();i[2]+=e,t.setCoordinates(i)}i||this.geometry.setCenter(this.vertices[0].getGeometry().getCoordinates())}setPosition(e){a(e,[Number]),a(e.length,3),this.geometry.setCenter(e),this._clearVertices(),this._createVertices()}setRadius(e){a(e,Number);const t=this.geometry.getCenter(),i=zr.offset(W.mercatorToWgs84(t),e,Math.PI/2);i[2]=t[2],this.geometry.setCoordinates([t,W.wgs84ToMercator(i,!0)]),this.vertices.length>1?(this.vertices[1].getGeometry().setCoordinates(this.geometry.getLastCoordinate()),this.creationActive&&this._validateOnFinish()):this.radius=Math.abs(i[0]-t[0])}}var Vr=Br;class Ur extends se{constructor(e,t,i,s){super(),this.geometry=e,this.cb=t,this.isEditingGeometry=i,this.featureTypeSymbol=s,this._defaultActive=X.CLICK,this.setActive()}pipe(e){if(e.feature&&e.feature[this.featureTypeSymbol]&qi.EDITING&&this.geometry[this.isEditingGeometry]){const t=Ft(this.geometry);if(0===t.length)return this.cb(0),Promise.resolve(e);let i=1/0,s=0;for(let r=0;r<t.length;r++){const n=t[r].getClosestPoint(e.positionOrPixel),a=Jt(n,e.positionOrPixel);a<i&&(s=r,i=a)}this.cb(s)}return Promise.resolve(e)}}var Wr=Ur;const qr={MultiPolygon:"Polygon",MultiPoint:"Point",MultiLineString:"LineString",Polygon:"LinearRing"},Jr=v.getLogger("vcs.vcm.util.editor.MultiGeometryEditor"),Kr=Symbol("isEditingGeometry");class Zr extends ir{get className(){return"vcs.vcm.util.editor.MultiGeometryEditor"}constructor(e){super(e),this.geometry=e.geometry,this.feature=e.feature,this.layer=e.layer,this.editors=[],this.listeners=[],this.isEditingGeometry=Symbol("isEditingGeometry"),this._selectGeometryInteraction=new Wr(this.geometry,this.activateEditor.bind(this),Kr,this.state.featureTypeSymbol),this.interactionChain.addInteraction(this._selectGeometryInteraction),this._finishAction=e.onFinish||this.setMode.bind(this,Wi.EDIT),this.onRemoved=e.onRemoved||(()=>{}),this.activateEditorIndex=null,this._setupGeometries(),this.geometry[Kr]=!0}_setupGeometries(){const e=Ft(this.geometry);e.forEach(this.addGeometry,this)}addGeometry(e){const t=e||Xr[qr[this.geometry.getType()]](),i=$r({parent:this,geometry:t,layer:this.layer,feature:this.feature,onFinish:this._finishAction,onRemoved:this._geometryRemoved.bind(this,this.editors.length)}),s=this.editors.push(i)-1;this.listeners.push(t.on("change",()=>{const e=this.geometry.getCoordinates();e[s]=t.getCoordinates(),this.geometry.setCoordinates(e,"XYZ")})),e||(Rt(this.geometry,t),this.state.mode=Wi.CREATE,this.activateEditor(s))}_geometryRemoved(e,t){if(e||"Polygon"!==this.geometry.getType()){const i=this.geometry.getCoordinates();if(i.splice(e,1),!i.length)return void this._removeFeature(t);this.geometry.setCoordinates(i,"XYZ"),this.destroy(),this.editors=[],this.listeners=[],this._setupGeometries()}else this._removeFeature(t)}_removeFeature(e){const t=this.parent&&this.parent.className===this.className;if(!t){const e=j.getInstance().getLayerByName(this.state.layerName);e.removeFeaturesById([this.feature.getId()])}e&&!t||this.onRemoved()}setAltitudeMode(e){null!=this.activateEditorIndex&&this.editors[this.activateEditorIndex].setAltitudeMode(e)}activateEditor(e){if(this.activateEditorIndex===e)return;if(null!==this.activateEditorIndex){const e=this.editors[this.activateEditorIndex];e.destroy(),e.geometry[Kr]=!1,this.interactionChain.removeInteraction(e.interactionChain)}this.activateEditorIndex=e,this._selectGeometryInteraction.setActive(!1);const t=this.editors[e];t.initialize(),t.geometry[Kr]=!0,this.interactionChain.addInteraction(t.interactionChain),this.setMode(this.state.mode)}setMode(e){Jr.debug(`MultiGeometryEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`);const t=Ft(this.geometry,null===this.activateEditorIndex?0:this.activateEditorIndex);if(!t)return void this.addGeometry();let i=e;const s=t.getExtent();if((ol.extent.isEmpty(s)||s.every(e=>0===e))&&(i=Wi.CREATE),super.setMode(i),i^Wi.CREATE&&this._selectGeometryInteraction.setActive(),null===this.activateEditorIndex)this.activateEditor(0);else{const e=this.editors[this.activateEditorIndex];e.interactionChain.setActive(!0),e.setMode(i)}}stopCreation(){null!==this.activateEditorIndex&&(this.editors[this.activateEditorIndex].validate()?this.editors[this.activateEditorIndex].stopCreation():this._geometryRemoved(this.activateEditorIndex,!0))}validate(){return this.editors.some(e=>e.validate())}destroy(){super.destroy(),ol.Observable.unByKey(this.listeners);for(let e=0;e<this.editors.length;e++)this.editors[e].destroy();this.activateEditorIndex=null}}var Qr=Zr;const Xr={Point(){const e=new ol.geom.Point([0,0,0],"XYZ");return e[ss.alreadyTransformedToMercator]=!0,e},Label(){const e=new ol.geom.Point([0,0,0],"XYZ");return e[ss.alreadyTransformedToMercator]=!0,e.set("_vcsGeomType","Label"),e},Circle(){const e=new ol.geom.Circle([0,0,0],20,"XYZ");return e[ss.alreadyTransformedToMercator]=!0,e},LineString(){return new ol.geom.LineString([],"XYZ")},LinearRing(){return new ol.geom.LinearRing([],"XYZ")},Polygon(){return new ol.geom.Polygon([[]],"XYZ")},BBox(){const e=new ol.geom.Polygon([[]],"XYZ");return e.set("_vcsGeomType","bbox"),e},Rectangle(){const e=new ol.geom.Polygon([[]],"XYZ");return e.set("_vcsGeomType","rectangle"),e},MultiLineString(){return new ol.geom.MultiLineString([[]],"XYZ")},MultiPolygon(){return new ol.geom.MultiPolygon([[[]]],"XYZ")},MultiPoint(){const e=new ol.geom.MultiPoint([[0,0,0]],"XYZ");return e[ss.alreadyTransformedToMercator]=!0,e}};function $r(e){const t=e.geometry;if(t instanceof ol.geom.Polygon){const i=t.get("_vcsGeomType"),s=t.get("_vcsAspectRatio");return i&&"rectangle"===i?new gr(Object.assign(e,{aspectRatio:s})):i&&"bbox"===i?new gr(Object.assign(e,{isBBox:!0,aspectRatio:s})):new Qr(Object.assign(e,{geomType:"LinearRing"}))}if(t instanceof ol.geom.Circle)return new Vr(e);if(t instanceof ol.geom.Point)return new Dr(e);const i=["LineString","Polygon","Point"],s=i.find(e=>t instanceof ol.geom["Multi"+e]);return s?new Qr(Object.assign(e,{geomType:s})):new Gr(e)}const en={DISTANCE:"distance",AREA:"area",VERTICAL_HEIGHT:"verticalHeight",OBLIQUE_HEIGHT:"obliqueHeight",OBLIQUE_DISTANCE:"obliqueDistance",POINT:"point",CARTESIAN_DISTANCE:"cartesianDistance",CARTESIAN_AREA:"cartesianArea"};class tn{static get measurementType(){return en.DISTANCE}constructor(e){this.parent=e.parent,this.decimalPlaces=this.parent.decimalPlaces,this.map=j.getInstance().getActiveMap(),this.featureIds=[],this.forceMove=null!=e.forceMove?e.forceMove:null,this.values={type:e.type,isValid:!1}}_createFeature(e){if(this.feature=this.parent.geometryEditor.createFeature(e.geometryType),e.isAbsolute?this.feature.set("olcs_altitudeMode","absolute",!0):this.feature.set("olcs_altitudeMode","clampToGround",!0),e.startPosition){const t=this.feature.getGeometry();t instanceof ol.geom.LineString?t.setCoordinates([e.startPosition]):t instanceof ol.geom.Polygon?t.setCoordinates([[e.startPosition]]):t instanceof ol.geom.Point&&t.setCoordinates(e.startPosition)}e.addFeatureStyle&&(this.feature[Xe]=this.parent.featureLayer.style.clone(),this.feature.setStyle(this.feature[Xe].style)),this.map instanceof Ti?(this.feature[ss.obliqueGeometry].on("change",this.geometryChangedCallback.bind(this)),this.feature[ss.doNotTransform]=!0):this.feature.getGeometry().on("change",this.geometryChangedCallback.bind(this));let t=Wi.CREATE;e.startPosition&&"Point"===e.geometryType&&(this.feature.getGeometry().changed(),t=Wi.EDIT),this.parent.geometryEditor.setModeAndSelectFeature(t,this.feature),this.id=this.feature.getId().toString(),this.featureIds.push(this.id)}geometryChangedCallback(e){}getValue(e,t){let i=Math.abs(e);const s=t?2:1;let r=t?"m²":"m";const n=1e3**s;return i>n*(t?1:10)&&(i/=n,r="k"+r),`${i.toFixed(this.decimalPlaces)} ${r}`}addLabel(){const e=Xr.Point(),t=new ol.Feature({geometry:e});return this.map instanceof Ti&&(e[ss.alreadyTransformedToImage]=!0,t[ss.doNotTransform]=!0),t.setStyle(new ol.style.Style({text:this.parent.featureLayer.style.text.clone()})),this.parent.featureLayer.addFeatures([t]),t[this.parent.geometryEditor.state.featureTypeSymbol]=0,this.featureIds.push(t.getId()),t}destroy(){this.parent.featureLayer.removeFeaturesById(this.featureIds)}static setTextOnLabel(e,t){e.getStyle().getText().setText(t)}}var sn=tn;const rn=new ol.Sphere(6378137);function nn(e,t){const i=Cesium.Cartesian3.subtract(e,t,new Cesium.Cartesian3);Cesium.Cartesian3.normalize(i,i);const s=Cesium.Plane.fromPointNormal(e,i);return Cesium.ClippingPlane.fromPlane(s)}function an(e){const t=[],i=e.map(e=>Cesium.Cartesian3.fromDegrees(...W.mercatorToWgs84(e)));for(let s=0;s<i.length-1;s++){const e=s+1,r=new Cesium.Cartesian3;Cesium.Cartesian3.cross(i[e],i[s],r),Cesium.Cartesian3.normalize(r,r);const n=new Cesium.Plane(r,0);Number.isNaN(n.distance)||t.push(Cesium.ClippingPlane.fromPlane(n))}return t}function on(e,t,i){const s=[],r=ei(e),n=e.get("olcs_extrudedHeight");n&&e.get("olcs_skirt")&&(r.min-=e.get("olcs_skirt")),r.min===r.max&&(r.max+=1);const[a,o]=W.mercatorToWgs84(t[0]),l=Cesium.Cartesian3.fromDegrees(a,o,r.min),c=Cesium.Cartesian3.fromDegrees(a,o,r.max);return i.createBottomPlane&&s.push(nn(l,c)),n&&i.createTopPlane&&s.push(nn(c,l)),s}function ln(e){const t=[],i=e.map(e=>Cesium.Cartesian3.fromDegrees(...W.mercatorToWgs84(e))),s=new Cesium.Cartesian3;function r(e){const i=Cesium.Cartesian3.add(e,s,new Cesium.Cartesian3),r=new Cesium.Cartesian3;Cesium.Cartesian3.cross(e,i,r),Cesium.Cartesian3.normalize(r,r);const n=new Cesium.Plane(r,0);t.push(Cesium.ClippingPlane.fromPlane(n))}return Cesium.Cartesian3.cross(i[0],i[1],s),Cesium.Cartesian3.normalize(s,s),r(i[0]),Cesium.Cartesian3.negate(s,s),r(i[1]),t}function cn(e,t={},i){a(e,ol.Feature),a(t,Object),o(i,Cesium.Matrix4);const s=[],r=e.getGeometry(),n=r.getType();if("Point"===n)s.push(...on(e,[r.getCoordinates()],t));else{const i=$t(r);if(i.length<2||i[0][0]===i[1][0]&&i[0][1]===i[1][1])return null;"Polygon"===n?(ks(i),zs(i)):"LineString"===n&&2===i.length&&t.createEndingPlanes&&s.push(...ln(i)),t.createVerticalPlanes&&s.push(...an(i)),"absolute"===e.get("olcs_altitudeMode")&&(t.createBottomPlane||t.createTopPlane)&&s.push(...on(e,i,t))}return i&&s.forEach(e=>{const t=Cesium.Plane.transform(e,i);e.normal=t.normal,e.distance=t.distance}),t.reverse&&s.forEach(e=>{Cesium.Cartesian3.negate(e.normal,e.normal),e.distance*=-1}),new Cesium.ClippingPlaneCollection({planes:s,unionClippingRegions:t.reverse})}function un(e,t,i,s){a(e,Cesium.ClippingPlaneCollection),a(t,Cesium.ClippingPlaneCollection),t.length>0&&t.removeAll();for(let r=0;r<e.length;r++){const n=e.get(r);if(i&&s){const e=Cesium.Plane.getPointDistance(n,s),r=Cesium.Plane.transform(n,i);r.distance=e,t.add(Cesium.ClippingPlane.fromPlane(r))}else t.add(Cesium.ClippingPlane.clone(n))}return t.modelMatrix=e.modelMatrix.clone(),t.unionClippingRegions=e.unionClippingRegions,t.edgeColor=e.edgeColor.clone(),t.edgeWidth=e.edgeWidth,t}function hn(e){if(e instanceof Cesium.Entity){if(e.model)if(e.model.clippingPlanes){const t=e.model.clippingPlanes.getValue();t.removeAll()}else e.model.clippingPlanes=new Cesium.ConstantProperty(new Cesium.ClippingPlaneCollection)}else e.clippingPlanes?e.clippingPlanes.removeAll():e.clippingPlanes=new Cesium.ClippingPlaneCollection}function dn(e,t,i){if(hn(e),i)un(t,e.clippingPlanes);else{const i=Cesium.Matrix4.getMatrix3(Cesium.Matrix4.inverse(e.clippingPlanesOriginMatrix,new Cesium.Matrix4),new Cesium.Matrix3),s=Cesium.Matrix4.fromRotationTranslation(i,new Cesium.Cartesian3);un(t,e.clippingPlanes,s,e.boundingSphere.center)}}function mn(e,t){hn(e),un(t,e.clippingPlanes)}function gn(e,t,i){if(e.model){hn(e);const s=e.model.clippingPlanes.getValue();if(un(t,s),!i){const i=e.computeModelMatrix(Cesium.JulianDate.now());Cesium.Matrix4.inverseTransformation(i,s.modelMatrix),t.modelMatrix.equals(Cesium.Matrix4.IDENTITY)||Cesium.Matrix4.multiply(s.modelMatrix,t.modelMatrix,s.modelMatrix)}}}function pn(e,t,i){e instanceof Cesium.Cesium3DTileset?dn(e,t,i):e instanceof Cesium.Globe?mn(e,t):gn(e,t,i)}function fn(e,t=!1,i=25){let s;if(a(e,[Number]),a(t,Boolean),a(i,Number),t){const{camera:t}=j.getInstance().getMapByType("vcs.vcm.maps.Cesium").getScene(),r=rn.offset(e,-i,t.heading),n=rn.offset(e,i,t.heading);s=new ol.geom.LineString([[r[0],r[1],e[2]],[n[0],n[1],e[2]]],"XYZ")}else{s=Xr.Polygon();let t=2*Math.PI-Math.PI/4;const r=[...new Array(4)].map(()=>{const s=rn.offset(e,i,t);return t-=Math.PI/2,[s[0],s[1],e[2]]});s.setCoordinates([r])}const r=new ol.Feature({geometry:s});return r.set("olcs_altitudeMode","absolute"),t&&r.set("olcs_extrudedHeight",2*i),s.transform(q.proj,J.proj),r}function yn(e,t=!1){o(e,ol.Feature),a(t,Boolean);const i=!!e&&"LineString"===e.getGeometry().getType();return i?{createBottomPlane:!t,createTopPlane:!t,createEndingPlanes:!t,createVerticalPlanes:!0}:{createVerticalPlanes:!t,createBottomPlane:!0}}let _n=null;class vn{static get className(){return"vcs.vcm.util.clipping.ClippingObjectManager"}constructor(){this._defaultClippingObjects=new Set,this._exclusiveClippingObjects=null,this._targetsMap=new Map,this._listenersMap=new Map,this._exclusiveRemovedCb=null,this.initialized=!1,this._updateSuspended=!1,this._dirty=!1}get suspendUpdate(){return this._updateSuspended}set suspendUpdate(e){a(e,Boolean),this._updateSuspended=e,!this._updateSuspended&&this._dirty&&(this._dirty=!1,this._update())}static getInstance(){return _n||(_n=new vn,_n.initialize()),_n}initialize(){if(!this.initialized){const e=j.getInstance();e.subscribe(L.LAYER_CHANGED,e=>{this.suspendUpdate=!0,this._defaultClippingObjects.forEach(t=>{t.handleLayerChanged(e)}),this._exclusiveClippingObjects&&this._exclusiveClippingObjects.forEach(t=>{t.handleLayerChanged(e)}),this.suspendUpdate=!1}),e.subscribe(L.MAP_ACTIVATED,e=>{this.suspendUpdate=!0,this._defaultClippingObjects.forEach(t=>{t.handleMapChanged(e)}),this._exclusiveClippingObjects&&this._exclusiveClippingObjects.forEach(t=>{t.handleMapChanged(e)}),this.suspendUpdate=!1})}}addClippingObject(e){if(a(e,Ks),this.hasClippingObject(e))throw new Error("ClippingObject already managed, remove it first");this._defaultClippingObjects.add(e);const t=j.getInstance(),i=t.getActiveMap();i instanceof Pt&&(e.handleMapChanged(i),t.getLayers().forEach(t=>{e.handleLayerChanged(t)})),this._listenersMap.set(e,[e.targetsUpdated.addEventListener(this._update.bind(this)),e.clippingPlaneUpdated.addEventListener(this._clippingPlaneUpdated.bind(this,e))]),this._update()}removeClippingObject(e){a(e,Ks),this._defaultClippingObjects.has(e)&&(this._defaultClippingObjects.delete(e),this._listenersMap.get(e).forEach(e=>{e()}),this._listenersMap.delete(e),this._update())}hasClippingObject(e){return a(e,Ks),this._defaultClippingObjects.has(e)||!(!this._exclusiveClippingObjects||!this._exclusiveClippingObjects.includes(e))}setExclusiveClippingObjects(e,t){if(a(e,[Ks]),a(t,Function),e.find(e=>this._defaultClippingObjects.has(e)))throw new Error("Some ClippingObjects are already managed, remove them first");const i=j.getInstance(),s=i.getActiveMap(),r=i.getLayers();this._clearExclusiveClippingObjects(),this._exclusiveRemovedCb=t,this._exclusiveClippingObjects=e,this._exclusiveClippingObjects.forEach(e=>{s instanceof Pt&&(e.handleMapChanged(s),r.forEach(t=>{e.handleLayerChanged(t)})),this._listenersMap.set(e,[e.targetsUpdated.addEventListener(this._update.bind(this)),e.clippingPlaneUpdated.addEventListener(this._clippingPlaneUpdated.bind(this,e))])}),this._update()}_clearExclusiveClippingObjects(e){this._exclusiveClippingObjects&&(this._exclusiveClippingObjects.forEach(e=>{this._listenersMap.get(e).forEach(e=>{e()}),this._listenersMap.delete(e)}),this._exclusiveClippingObjects=null),!e&&this._exclusiveRemovedCb&&this._exclusiveRemovedCb(),this._exclusiveRemovedCb=null}clearExclusiveClippingObjects(e){this._clearExclusiveClippingObjects(e),this._update()}_update(){if(this._updateSuspended)return void(this._dirty=!0);const e=new Set(this._targetsMap.keys()),t=t=>{t.targets.forEach(i=>{this._targetsMap.set(i,t),e.delete(i)})};this._targetsMap.clear(),this._defaultClippingObjects.forEach(t),this._exclusiveClippingObjects&&this._exclusiveClippingObjects.forEach(t),e.forEach(e=>{hn(e)}),this._targetsMap.forEach((e,t)=>{e.clippingPlaneCollection&&pn(t,e.clippingPlaneCollection,e.local)})}_clippingPlaneUpdated(e){this._targetsMap.forEach((t,i)=>{t===e&&e.clippingPlaneCollection&&pn(i,e.clippingPlaneCollection)})}}var Ln=vn;let Mn;L.SPLIT_DIRECTION_CHANGED="SPLIT_DIRECTION_CHANGED";class bn{constructor(){this._position=.5,this.scene=null,this.olMap=null,this.initialized=!1,this.leftScreenClippingObject=new Ks,this.rightScreenClippingObject=new Ks,this._cameraListener=null,this.originalCameraPercentageChanged=null}get position(){return this._position}set position(e){if(a(e,Number),e<0||e>1)throw new Error("Position must be between 0 and 1");Math.abs(this._position-e)>1e-4&&this._updatePosition(e)}initialize(){if(!this.initialized){const e=j.getInstance();this.handleMapChange(e.getActiveMap()),this.mapListener=e.subscribe(L.MAP_ACTIVATED,this.handleMapChange,this),this.rightScreenClippingObject.targetsUpdated.addEventListener(this._targetsChanged,this),this.leftScreenClippingObject.targetsUpdated.addEventListener(this._targetsChanged,this),Ln.getInstance().addClippingObject(this.rightScreenClippingObject),Ln.getInstance().addClippingObject(this.leftScreenClippingObject),this.initialized=!0}}_targetsChanged(){if(this.scene){const e=this.rightScreenClippingObject.targets.size+this.leftScreenClippingObject.targets.size,{camera:t}=this.scene;this._cameraListener&&0===e?(this._cameraListener(),this._cameraListener=null,t.percentageChanged=this.originalCameraPercentageChanged):!this._cameraListener&&e>0&&(this.originalCameraPercentageChanged=t.percentageChanged,t.percentageChanged=0,this._cameraListener=t.changed.addEventListener(this._updateClippingPlanes.bind(this)),this._updateClippingPlanes())}}_updatePosition(e){this._position=e,this.scene?(this.scene.imagerySplitPosition=e,this._updateClippingPlanes()):this.olMap&&this.olMap.render()}handleMapChange(e){e instanceof Pt?(this.scene=e.getScene(),this.olMap=null,this._targetsChanged()):e instanceof Di&&(this.scene=null,this.olMap=e.olMap),this._updatePosition(this.position)}_calcClippingPlane(){const{camera:e}=this.scene,{fov:t,near:i}=e.frustum,s=this.scene.canvas.width,r=this.scene.canvas.height;let n;n=r>s?i*Math.tan(.5*t)*2/r:i*Math.tan(.5*t)*2/s;const a=s*this.position-s/2,o=r/2,l=new Cesium.Cartesian3(n*a,n*o,-1*i),c=new Cesium.Cartesian3(n*a,-1*n*o,-1*i);Cesium.Matrix4.multiplyByPoint(e.inverseViewMatrix,l,l),Cesium.Matrix4.multiplyByPoint(e.inverseViewMatrix,c,c);const u=e.positionWC;Cesium.Cartesian3.subtract(u,l,l),Cesium.Cartesian3.subtract(u,c,c);const h=Cesium.Cartesian3.cross(l,c,new Cesium.Cartesian3);Cesium.Cartesian3.normalize(h,h);const d=Cesium.Plane.fromPointNormal(u,h);return Cesium.ClippingPlane.fromPlane(d)}_updateClippingPlanes(){const e=this._calcClippingPlane();this.leftScreenClippingObject.clippingPlaneCollection=new Cesium.ClippingPlaneCollection({planes:[e]});const t=Cesium.ClippingPlane.clone(e);t.normal=Cesium.Cartesian3.negate(t.normal,t.normal),t.distance*=-1,this.rightScreenClippingObject.clippingPlaneCollection=new Cesium.ClippingPlaneCollection({planes:[t]})}getClippingObjectForDirection(e){return a(e,[Cesium.ImagerySplitDirection.LEFT,Cesium.ImagerySplitDirection.RIGHT,Cesium.ImagerySplitDirection.NONE]),e===Cesium.ImagerySplitDirection.LEFT?this.leftScreenClippingObject:e===Cesium.ImagerySplitDirection.RIGHT?this.rightScreenClippingObject:null}destroy(){this.initialized&&(j.getInstance().unsubscribeByKey(this.mapListener),Ln.getInstance().removeClippingObject(this.rightScreenClippingObject),Ln.getInstance().removeClippingObject(this.leftScreenClippingObject),this.rightScreenClippingObject.targetsUpdated.removeEventListener(this._targetsChanged,this),this.leftScreenClippingObject.targetsUpdated.removeEventListener(this._targetsChanged,this)),this._cameraListener&&(this._cameraListener(),this._cameraListener=null),Mn=null}}function wn(){return Mn||(Mn=new bn,Mn.initialize()),Mn}const Tn=Symbol("_lastUpdated");class Sn extends Et{static get className(){return"vcs.vcm.layer.cesium.AbstractCesiumTilesetLayer"}static get lastUpdated(){return Tn}constructor(e){super(e),this.url&&!/\.json$/.test(this.url)&&(this.url=this.url.replace(/\/$/,"")+"/tileset.json"),this.featureVisibility=e.featureVisibility||new yt,this.highlightStyle=e.highlightStyle?new et(e.highlightStyle):null,this.jumpToLocation=!!e.jumpToLocation,this.screenSpaceError=Object(c["h"])(e.screenSpaceError,16),this.screenSpaceErrorMobile=Object(c["h"])(e.screenSpaceErrorMobile,32),this.maximumMemoryUsage=Object(c["h"])(e.maximumMemoryUsage,16),this._featureExtent=null;const t=e.tilesetOptions||{};this.tilesetOptions=Object.assign({url:this.url,maximumScreenSpaceError:this.framework.isMobile()?this.screenSpaceErrorMobile:this.screenSpaceError,maximumMemoryUsage:this.maximumMemoryUsage},t),this._styleLastUpdated=Date.now(),this._loadProgressListener=null,this._splitDirection=Cesium.ImagerySplitDirection.NONE,e.splitDirection&&(this._splitDirection="left"===e.splitDirection?Cesium.ImagerySplitDirection.LEFT:Cesium.ImagerySplitDirection.RIGHT)}get splitDirection(){return this._splitDirection}set splitDirection(e){if(e!==this._splitDirection){const t=wn(),i=t.getClippingObjectForDirection(this._splitDirection);if(i&&i.removeLayer(this.name),this._splitDirection=e,this.active){const e=t.getClippingObjectForDirection(this._splitDirection);e&&e.addLayer(this.name)}this.framework.publish(L.SPLIT_DIRECTION_CHANGED,this,e)}}initialize(){return this._initializedPromise||(this.cesium3DTileset=new Cesium.Cesium3DTileset(this.tilesetOptions),this.cesium3DTileset[Et.vcsLayerNameSymbol]=this.name,this.cesium3DTileset.tileVisible.addEventListener(this.applyStyle.bind(this)),this.cesium3DTileset.tileUnload.addEventListener(e=>{delete e[Sn.lastUpdated]}),this.layerLoadingEventListener=function(e,t){0===e&&0===t?this.framework.getActiveMap().setLayerLoading(this,!1):this.framework.getActiveMap().setLayerLoading(this,!0)}.bind(this),this._initializedPromise=new Promise((e,t)=>{this.cesium3DTileset.readyPromise.then(t=>{if(this.jumpToLocation){const e=this.framework.getActiveMap();e.getCesiumWidget().camera.viewBoundingSphere(t.boundingSphere,new Cesium.HeadingPitchRange(0,-2,0)),e.getCesiumWidget().camera.lookAtTransform(Cesium.Matrix4.IDENTITY)}this.initialized=!0,this.setStyle(this.style),e()},t)})),this._initializedPromise}show(){const e=this.framework.getActiveMap();if(e&&"vcs.vcm.maps.Cesium"===e.className&&(e.getScene().primitives.contains(this.cesium3DTileset)||e.getScene().primitives.add(this.cesium3DTileset)),this._loadProgressListener||(this._loadProgressListener=this.cesium3DTileset.loadProgress.addEventListener(this.layerLoadingEventListener)),this.splitDirection){const e=wn().getClippingObjectForDirection(this.splitDirection);e&&e.addLayer(this.name)}this.cesium3DTileset.show=!0}hide(){if(this._loadProgressListener&&(this._loadProgressListener(),this._loadProgressListener=null),this.splitDirection){const e=wn().getClippingObjectForDirection(this.splitDirection);e&&e.removeLayer(this.name)}this.cesium3DTileset.show=!1,this.framework.getActiveMap().setLayerLoading(this,!1)}objectClickedHandler(e,t,i){if(this.allowPicking){const s=Ls(e);if(s)return this.raiseFeatureEvent(t,s.id,s,i||this),!0}return!1}getGenericFeatureFromClickedObject(e){const t=Object.assign({},this._genericFeatureProperties,e.attributes||e);return{layerName:this.name,layerClass:this.className,attributes:t,longitude:e.clickedPosition.longitude,latitude:e.clickedPosition.latitude,height:e.clickedPosition.height,relativeToGround:!1}}getCesium3DTileset(){return this.logger.warning("Function getCesium3DTileset is deprecated and will be removed in the next release. Access the property cesium3DTileset directly instead"),this.cesium3DTileset}getFeatureExtent(){if(this._featureExtent)return this._featureExtent.clone();const e=new Le(J.getConfigObject());if(e.extent=ol.extent.createEmpty(),this.cesium3DTileset){const{rectangle:t}=this.cesium3DTileset.root.boundingVolume;if(t){const i=Cesium.Rectangle.southwest(t),s=Cesium.Rectangle.northeast(t),r=W.wgs84ToMercator([Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude)]),n=W.wgs84ToMercator([Cesium.Math.toDegrees(s.longitude),Cesium.Math.toDegrees(s.latitude)]);e.extent=[r[0],r[1],n[0],n[1]]}else{const{center:t,radius:i}=this.cesium3DTileset.boundingSphere,s=Cesium.Cartographic.fromCartesian(t),r=W.wgs84ToMercator([Cesium.Math.toDegrees(s.longitude),Cesium.Math.toDegrees(s.latitude),s.height]),n=ni(r,i);e.extent=n.getExtent()}e.isValid()&&(this._featureExtent=e.clone())}return e}setStyle(e,t){super.setStyle(e,t),this.initialized&&(this.cesium3DTileset.style=this.style.cesiumStyle,this._onStyleChangeRemover&&this._onStyleChangeRemover(),this._onStyleChangeRemover=this.style.styleChanged.addEventListener(()=>{this.cesium3DTileset.makeStyleDirty(),this._styleLastUpdated=Date.now(),this._lastUpdated=Date.now()}),this._styleLastUpdated=Date.now(),this.featureVisibility.lastUpdated=Date.now(),this.cesium3DTileset.readyPromise.then(()=>{this.cesium3DTileset.colorBlendMode!==this.style.colorBlendMode&&(this.style.colorBlendMode!==Cesium.Cesium3DTileColorBlendMode.HIGHLIGHT?this.cesium3DTileset.extras&&this.cesium3DTileset.extras._3DTILESDIFFUSE&&(this.cesium3DTileset.colorBlendMode=this.style.colorBlendMode):this.cesium3DTileset.colorBlendMode=this.style.colorBlendMode)}))}applyStyle(e){if(e.content instanceof Cesium.Composite3DTileContent)for(let t=0;t<e.content.innerContents.length;t++)this.styleContent(e.content.innerContents[t]);else this.styleContent(e.content)}styleContent(e){if(!e[Sn.lastUpdated]||e[Sn.lastUpdated]<this.featureVisibility.lastUpdated||e[Sn.lastUpdated]<this.globalHider.lastUpdated||e[Sn.lastUpdated]<this._styleLastUpdated){const t=e.featuresLength;for(let i=0;i<t;i++){const t=e.getFeature(i);if(t){let s=t.getProperty("id");s||(s=`${e.url}${i}`),this.featureVisibility.highlightedObjects[s]&&((!this.featureVisibility.highlightedObjects[s].features.has(t)||this._styleLastUpdated>e[Sn.lastUpdated])&&this.featureVisibility.highlightedObjects[s].features.set(t,t.color.clone()),t.color=this.featureVisibility.highlightedObjects[s].style.cesiumFillColor),this.featureVisibility.hiddenObjects[s]?(this.featureVisibility.hiddenObjects[s].add(t),t.show=!1):this.globalHider.hiddenObjects[s]&&(this.globalHider.addFeature(s,t),t.show=!1)}}e[Sn.lastUpdated]=Date.now()}}determineHighlightStyle(){return this.highlightStyle?this.highlightStyle:E.getInstance()._currentItemHighlightColor}setMaximumScreenSpaceError(e){this.cesium3DTileset&&(this.cesium3DTileset.maximumScreenSpaceError=e)}dispose(){if(this.cesium3DTileset){this.hide();const e=this.framework.getMapByType("vcs.vcm.maps.CesiumMap");let t=!1;e&&e.initialized&&(t=e.getScene().primitives.remove(this.cesium3DTileset)),t||this.cesium3DTileset.destroy(),this.cesium3DTileset=null}this.initialized=!1,this._state=wt.INACTIVE,super.dispose()}handleURLParameter(e){e.debug&&(this.cesium3DTileset?(this.cesium3DTileset.debugShowRenderingStatistics=!0,this.cesium3DTileset.debugShowBoundingVolume=!0,this.cesium3DTileset.debugShowContentBoundingVolume=!0):(this.tilesetOptions.debugShowRenderingStatistics=!0,this.tilesetOptions.debugShowBoundingVolume=!0,this.tilesetOptions.debugShowContentBoundingVolume=!0))}}var Cn=Sn;Mt.CESIUM_TILESET_LAYER=Mt.lastLayerId,Mt.lastLayerId+=1;class En extends Cn{static get className(){return"vcs.vcm.layer.cesium.CesiumTilesetLayer"}constructor(e){e.layertype=e.layertype||Mt.CESIUM_TILESET_LAYER,e.className=e.className||En.className,super(e),this.pickMode=e.pickMode||"topLevelFeature"}}var In=En;Mt.CESIUM_BUILDINGSLAYER=Mt.lastLayerId,Mt.lastLayerId+=1;class kn extends In{static get className(){return"vcs.vcm.layer.cesium.Buildings"}constructor(e){e.layertype=Mt.CESIUM_BUILDINGSLAYER,e.className=kn.className,super(e)}}var Dn=kn;Mt.CESIUM_ENTITIESLAYER=Mt.lastLayerId,Mt.lastLayerId+=1;class On extends Et{static get className(){return"vcs.vcm.layer.cesium.Entities"}constructor(e){e.layertype=Mt.CESIUM_ENTITIESLAYER,e.className=e.className||On.className,super(e),this.dataSource=e.dataSource||new Cesium.CustomDataSource(this.name),this.entities=this.dataSource.entities}initialize(){if(!this.initialized){const e=this.framework.getActiveMap();e.getDatasources().add(this.dataSource),this.initialized=!0}return Promise.resolve()}getEntities(){return this.logger.deprecate("getEntities","access the entities property directly"),this.entities}getDataSource(){return this.logger.deprecate("getEntities","access the dataSource property directly"),this.dataSource}show(){this.dataSource.show=!0}hide(){this.dataSource.show=!1}dispose(){if(this.entities.removeAll(),this.initialized){const e=this.framework.getMapByType("vcs.vcm.maps.Cesium");e&&e.getDatasources().contains(this.dataSource)&&e.getDatasources().remove(this.dataSource)}this.initialized=!1,this._state=wt.INACTIVE,super.dispose()}hideObjects(e){e.forEach(e=>{const t=this.entities.getById(e);t&&(t.show=!1)})}showObjects(e){e.forEach(e=>{const t=this.entities.getById(e);t&&(t.show=!0)})}addEntity(e,t,i){const s=this.entities.add(e);return s[Et.vcsLayerNameSymbol]=this.name,s.attributes=t||null,s.allowPicking=null!=i?i:this.allowPicking,s.id}flyToEntity(e){const t=this.framework.getActiveMap(),i=this.entities.getById(e);if(!i)return void this.logger.warning("could not find entity on this layer");const s=t.getDataSourceDisplay(),r=t.getScene(),{camera:n}=r,a=new Cesium.BoundingSphere,o=t.getViewPoint(),{heading:l,pitch:c}=o,u=new Cesium.HeadingPitchRange(Cesium.Math.toRadians(l),Cesium.Math.toRadians(c<-45?c:-45),void 0);let h,d=0;function m(){const e=s.getBoundingSphere(i,!0,a);if(e!==Cesium.BoundingSphereState.PENDING){if(e===Cesium.BoundingSphereState.FAILED)return d+=1,void(d>3&&h());n.flyToBoundingSphere(a,{duration:1,offset:u}),h()}}const g=s.defaultDataSource;if(g.isLoading){const e=g.loadingEvent.addEventListener(()=>{h=r.postRender.addEventListener(m),e()})}else h=r.postRender.addEventListener(m)}removeObjectById(e){return this.entities.removeById(e)}objectClickedHandler(e,t,i){if(this.allowPicking&&e.id.allowPicking){const s=e.id,{id:r}=s;return s.clickedPosition=e.clickedPosition,this.raiseFeatureEvent(t,r,s,i||this),!0}return!1}getGenericFeatureFromClickedObject(e){const t=Object.assign({},this._genericFeatureProperties,e.attributes||{});return{layerName:this.name,layerClass:this.className,attributes:t,longitude:e.clickedPosition.longitude,latitude:e.clickedPosition.latitude,height:e.clickedPosition.height,relativeToGround:!1}}}var Pn=On;Mt.CESIUM_CZMLLAYER=Mt.lastLayerId,Mt.lastLayerId+=1;class An extends Pn{static get className(){return"vcs.vcm.layer.cesium.Czml"}constructor(e){e.layertype=Mt.CESIUM_CZMLLAYER,e.className=An.className,e.dataSource=new Cesium.CzmlDataSource,super(e),this.sourceUri=e.sourceUri||null,this._loadedResolve=()=>{},this._loadedReject=()=>{},this.loaded=new Promise((e,t)=>{this._loadedResolve=e,this._loadedReject=t})}initialize(){return this.initialized?Promise.resolve():super.initialize().then(()=>{const e=this.dataSource.load(this.url,this.sourceUri?{sourceUri:this.sourceUri}:void 0);return e.then(this._handleLoaded.bind(this),this._loadedReject),e})}_handleLoaded(){this.entities.values.forEach(e=>{e[Et.vcsLayerNameSymbol]=this.name,e.allowPicking=this.allowPicking}),this._loadedResolve()}}var xn=An;Mt.CESIUM_GLTFLAYER=Mt.lastLayerId,Mt.lastLayerId+=1;class Yn extends Pn{static get className(){return"vcs.vcm.layer.cesium.Gltf"}constructor(e){e.layertype=Mt.CESIUM_GLTFLAYER,e.className=Yn.className,super(e),this.modelConfigs=e.models||[]}initialize(){return this.initialized?Promise.resolve():super.initialize().then(()=>{this.modelConfigs.forEach(this.addObject,this)})}addObject(e){const t=this.getEntityOptionsFromModel(e);if(!t)return null;let i={uri:t.url,scale:t.scale};i=e.modelOptions?Object.assign({},e.modelOptions,i):i;const s={name:t.url,position:t.position,orientation:t.orientation,show:t.show,model:i};return this.addEntity(s,t.attributes,t.allowPicking)}getEntityOptionsFromModel(e){const t={};if("string"!==typeof e.url)return this.logger.warning("Could not find URL for model "+e),null;t.url=e.url;const i=[e.longitude,e.latitude,e.height].every(e=>Number.isFinite(e));if(!i)return this.logger.warning("Could not find longitude/latitude/height for model"+e),null;t.position=Cesium.Cartesian3.fromDegrees(e.longitude,e.latitude,e.height);let s=0;Number.isFinite(e.heading)?s=e.heading/180*Math.PI:Number.isFinite(e.rotation)&&(s=e.rotation/180*Math.PI);let r=0;Number.isFinite(e.pitch)&&(r=e.pitch/180*Math.PI);let n=0;Number.isFinite(e.roll)&&(n=e.roll/180*Math.PI);const a=new Cesium.HeadingPitchRoll(s,r,n);return t.orientation=Cesium.Transforms.headingPitchRollQuaternion(t.position,a),t.scale=1,Number.isFinite(e.scale)&&(t.scale=e.scale),t.attributes={},e.attributes&&(t.attributes=e.attributes),t.allowPicking=null==e.allowPicking||e.allowPicking,t.show=null==e.show||e.show,t}updateEntityById(e,t){const i=this.entities.getById(e),s=this.getEntityOptionsFromModel(t);i&&s&&(i.model.scale=s.scale,i.orientation=s.orientation,i.position=s.position,i.attributes=s.attributes,i.allowPicking=s.allowPicking)}}var jn=Yn;Mt.CESIUM_POINTCLOUDLAYER=Mt.lastLayerId,Mt.lastLayerId+=1;const Nn=new gt({});class Fn extends Cn{static get className(){return"vcs.vcm.layer.cesium.PointCloud"}constructor(e){e.layertype=Mt.CESIUM_POINTCLOUDLAYER,e.className=Fn.className,super(e),this.defaultPointSize=null!=e.pointSize?e.pointSize:null,this._pointSize=this.defaultPointSize}getStyleOrDefaultStyle(e,t){return super.getStyleOrDefaultStyle(e,t||Nn)}get pointSize(){return this._pointSize}set pointSize(e){o(e,[Number,String]),this._pointSize=e,this._assignPointSize()}initialize(){return super.initialize().then(()=>{this._assignPointSize()})}clearStyle(){super.clearStyle(),this.pointSize=this.defaultPointSize}setStyle(e,t){e instanceof et?this.logger.warning("trying to apply vector style to point cloud layer."):super.setStyle(e,t)}_assignPointSize(){this.initialized&&(this.cesium3DTileset.style?(this.cesium3DTileset.style.pointSize=this._pointSize,this.cesium3DTileset.makeStyleDirty()):null!=this._pointSize&&(this.cesium3DTileset.style=new Cesium.Cesium3DTileStyle({pointSize:this._pointSize.toString()})))}}var Rn=Fn;Mt.CESIUM_TERRAIN=Mt.lastLayerId,Mt.lastLayerId+=1;class Hn extends Et{static get className(){return"vcs.vcm.layer.cesium.Terrain"}constructor(e){e.layertype=Mt.CESIUM_TERRAIN,e.className=Hn.className,super(e),this.requestVertexNormals=null==e.requestVertexNormals||e.requestVertexNormals}initialize(){return this.initialized||(this.cesiumTerrainProvider=kt({url:this.url,requestVertexNormals:this.requestVertexNormals}),this.initialized=!0),Promise.resolve()}show(){const e=this.framework.getActiveMap();if(e&&e.initialized){this.framework.getLayers().filter(e=>e instanceof Hn&&e!==this).forEach(e=>{e.deactivate()});const{globe:t}=e.getScene();t.depthTestAgainstTerrain=!0,t.terrainProvider=this.cesiumTerrainProvider}}hide(){const e=this.framework.getActiveMap();if(e){this.ellipsoidProvider||(this.ellipsoidProvider=new Cesium.EllipsoidTerrainProvider({}));const{globe:t}=e.getScene();t.depthTestAgainstTerrain=!1,t.terrainProvider=this.ellipsoidProvider}}dispose(){const e=this.framework.getActiveMap();e&&(e.getCesiumWidget().terrainProvider=new Cesium.EllipsoidTerrainProvider({})),this.ellipsoidProvider=null,this.cesiumTerrainProvider=null,this.initialized=!1,this._state=wt.INACTIVE,super.dispose()}getHeightForWGS84Coordinates(e){return Dt(this.cesiumTerrainProvider,e)}}var Gn=Hn;Mt.GEOJSON=Mt.lastLayerId,Mt.lastLayerId+=1;class zn extends ss{static get className(){return"vcs.vcm.layer.GeoJSON"}constructor(e){e.className=zn.className,e.projection||(e.projection=q.getConfigObject()),super(e),this.url=e.url||null,this.altitudeMode=e.altitudeMode||"none",this._dataFetchedPromise=null}fetchData(){return this._dataFetchedPromise?this._dataFetchedPromise:null!=this.url?(this.framework.getActiveMap().setLayerLoading(this,!0),this._dataFetchedPromise=G.a.get(this.url).then(e=>{this.dataFetchedHandler(e.data)}).catch(e=>(this.logger.warning(`Could not send request for loading layer content (${e.message})`),Promise.reject(e))).then(()=>{this.framework.getActiveMap().setLayerLoading(this,!1)}),this._dataFetchedPromise):(this.logger.warning("Could not load GeoJSON layer, no url is set"),Promise.reject(new Error("missing url in GeoJSON layer")))}dataFetchedHandler(e){const t=Fs(e,{dataProjection:this.projection,dynamicStyle:!0});this.addFeatures(t.features),t.style&&this.setStyle(t.style)}}var Bn=zn;class Vn extends Vi{constructor(e){e.url=e.url||"",super(e);const t=null!=e.minLevel?e.minLevel:e.minZoom,i=null!=e.maxLevel?e.maxLevel:e.maxZoom;this.minLevel=Object(c["h"])(t,0),this.maxLevel=Object(c["h"])(i,18),this.tilingSchema=e.tilingSchema,null==t&&e.extent&&this.calculateMinLevel(),this.opacity=Object(c["g"])(e.opacity,1),this.opacity=this.opacity<0?0:this.opacity,this.opacity=this.opacity>1?1:this.opacity,"string"!==typeof this.url&&this.framework.subscribe("LOCALE_CHANGED",this.handleLocaleChange,this),this._splitDirection=Cesium.ImagerySplitDirection.NONE,e.splitDirection&&(this._splitDirection="left"===e.splitDirection?Cesium.ImagerySplitDirection.LEFT:Cesium.ImagerySplitDirection.RIGHT)}get splitDirection(){return this._splitDirection}set splitDirection(e){e!==this._splitDirection&&(this._splitDirection=e,this.getImplementations().forEach(e=>{e.updateSplitDirection()}),this.framework.publish(L.SPLIT_DIRECTION_CHANGED,this,e))}handleLocaleChange(){const e=this.active;e&&this.deactivate(),this.getImplementations().forEach(e=>{e.initialized=!1}),e&&this.activate()}getUrl(){return this.logger.deprecate("getUrl","access the url property directly"),this.url}getTilingScheme(e={}){return"mercator"===this.tilingSchema?new Cesium.WebMercatorTilingScheme(e):new Cesium.GeographicTilingScheme(e)}_getExtentPoints(){const e=this.extent.getCoordinatesInProjection(q),t=[ol.extent.getBottomLeft(e),ol.extent.getBottomRight(e),ol.extent.getTopRight(e),ol.extent.getTopLeft(e)];return t.map(e=>Cesium.Cartographic.fromDegrees(e[0],e[1]))}calculateMinLevel(){if(!this.extent.isValid())return;const e=this.getTilingScheme(),t=this._getExtentPoints();while(this.minLevel<this.maxLevel){const i=t.map(t=>e.positionToTileXY(t,this.minLevel)),s=[];if(s.push(Math.abs(i[0].x-i[1].x)),s.push(Math.abs(i[0].y-i[3].y)),s[0]>1||s[1]>1){this.minLevel-=1;break}this.minLevel+=1}}setOpacity(e){a(e,Number),this.opacity=e,this.getImplementations().forEach(e=>{e.updateOpacity()})}}var Un=Vn;Mt.IMAGE=Mt.lastLayerId,Mt.lastLayerId+=1;class Wn extends Un{static get className(){return"vcs.vcm.layer.SingleImage"}constructor(e){e.layertype=Mt.IMAGE,e.className=Wn.className,super(e),this.imageExtent=e.imageExtent,this.credit=e.credit}setExtent(e){this.imageExtent=e;const t=this.getImplementation(this.framework.getActiveMap());t&&t.updateLayer()}}var qn=Wn;Mt.OPENSTREETMAP=Mt.lastLayerId,Mt.lastLayerId+=1;class Jn extends Vi{static get className(){return"vcs.vcm.layer.OpenStreetMap"}constructor(e){e.layertype=Mt.OPENSTREETMAP,e.className=Jn.className,super(e),this._splitDirection=Cesium.ImagerySplitDirection.NONE,e.splitDirection&&(this._splitDirection="left"===e.splitDirection?Cesium.ImagerySplitDirection.LEFT:Cesium.ImagerySplitDirection.RIGHT)}get splitDirection(){return this._splitDirection}set splitDirection(e){e!==this._splitDirection&&(this._splitDirection=e,this.getImplementations().forEach(e=>{e.updateSplitDirection()}),this.framework.publish(L.SPLIT_DIRECTION_CHANGED,this,e))}}var Kn=Jn;Mt.TMSBase=Mt.lastLayerId,Mt.lastLayerId+=1;class Zn extends Un{static get className(){return"vcs.vcm.layer.TMSBase"}constructor(e){e.layertype=Mt.TMSBase,e.className=Zn.className,e.tilingSchema=e.tilingSchema||"mercator",super(e),this.format=e.format||"jpeg",this.tileWidth=Object(c["h"])(e.tileWidth,256),this.tileHeight=Object(c["h"])(e.tileHeight,256)}}var Qn=Zn;Mt.CLUSTER=Mt.lastLayerId,Mt.lastLayerId+=1;class Xn extends ss{static get className(){return"vcs.vcm.layer.VectorCluster"}constructor(e){e.layertype=Mt.CLUSTER,e.className=Xn.className,e.zCoordinateEyeOffset=Object(c["h"])(e.zCoordinateEyeOffset,-200),e.heightAboveGround=Object(c["h"])(e.heightAboveGround,65),e.activeOnStartup=!0,e.altitudeMode=e.altitudeMode||"none",e.zIndex=Object(c["h"])(e.zIndex,60),super(e),this.clusterSource=new ol.source.Cluster({source:this.source,distance:Object(c["h"])(e.clusterDistance,40)}),this.clusterLayers=e.clusterLayers||[],this.activeClusterLayers=[],this.activeClusterLayersLastUpdated={},this.lastClickedFeatures=[];let t=e.defaultFeatureTemplate||"<%=title%>";Array.isArray(t)&&(t=t.join(" ")),this.defaultFeatureTemplate=br()(t),this.showInContent=Object(c["e"])(e.showInContent,!0);const i=e.style||{};this.icon=i.icon||"images/clusterIcon.svg",this.selectedIcon=i.selectedIcon||"images/clusterSelectedIcon.svg",this.iconWidth=Object(c["h"])(i.iconWidth,40),this.iconHeight=Object(c["h"])(i.iconHeight,44),this.iconScaleFactor=Object(c["h"])(i.iconScaleFactor,.05),this.fontSize=Object(c["h"])(i.fontSize,16),this.textOffset=Object(c["h"])(i.textOffset,-4),this.breaks=i.breaks||[2,3,4,5,10,15,20,25],this.zeroScaleOffset=Object(c["h"])(i.zeroScaleOffset,3),this._icons=new Array(this.breaks.length),this._selectedIcons=new Array(this.breaks.length),this._images=new Array(this.breaks.length),this._inactive2dClustering=!0,this._resultLayer=new ss({name:"_clusterResultLayer"+this.name,altitudeMode:this.altitudeMode,activeOnStartup:!0,zCoordinateEyeOffset:this.zCoordinateEyeOffset-20,zIndex:1e3,projection:J.getConfigObject(),allowPicking:!1}),this._resultFeature=null,this._initializedPromise=null,this.framework.subscribe(L.LAYER_ACTIVATED,this._handleActivation.bind(this)),this.framework.subscribe(L.LAYER_DEACTIVATED,this._handleDeactivation.bind(this)),this.framework.subscribe(L.SELECTED_ITEM_CHANGED,this._handleSelectedItemChanged.bind(this)),this.mapNames=[]}initialize(){return null===this._initializedPromise&&(this.clusterLayers=this._validateLayers(this.clusterLayers),this._initializedPromise=this.framework.loadLibraries(["./lib/thirdparty/canvg-1.4/rgbcolor.js","./lib/thirdparty/canvg-1.4/StackBlur.js","./lib/thirdparty/canvg-1.4/canvg.js"]).then(this._createIcons.bind(this)).then(()=>{this.setStyle(this._styleFunction.bind(this)),this._resultLayer.setStyle(this._getSelectedStyle()),this.framework.addLayer(this._resultLayer)})),this._initializedPromise.then(()=>super.initialize())}synchronize(e,t){return"vcs.vcm.maps.Openlayers"!==e.className?(this._inactive2dClustering=!0,this.clusterSource.setPause(!0)):(this._inactive2dClustering=!1,this.clusterSource.setPause(!1)),super.synchronize(e,t)}deactivate(){throw this.logger.error("trying to deactivate cluster layer!"),new Error("cannot deactivate cluster layer")}_validateLayers(e,t){return e.filter(e=>{const i=this.framework.getLayerByName(e.name);if(!(i&&i instanceof ss))return this.logger.warning("Missconfigured cluster layer, failed with layer: "+i),!1;if("string"===typeof e.featureTemplate&&(e.featureTemplate=br()(e.featureTemplate)),i.heightAboveGround=this.heightAboveGround,i.altitudeMode=this.altitudeMode,i.setVisibility(!1),t){const t=this.clusterLayers.find(t=>t.name===e.name);t?(t.title=e.title||t.title,t.featureTemplate=e.featureTemplate||t.featureTemplate):this.clusterLayers.push(e)}return!0})}_createIcons(){function e(e,t,i,s,r){let n=t-this.zeroScaleOffset;n=n>0?n:0,n=r?n:n+.2;const a=Math.round(this.iconWidth*(1+this.iconScaleFactor*n)),o=Math.round(this.iconHeight*(1+this.iconScaleFactor*n));return new Promise(e=>{const t=document.createElement("canvas");t.width=a,t.height=o,canvg(t,i,{renderCallback(){e(t)}})}).then(i=>new Promise(s=>{const{fontSize:r}=this;let n;n=t<this.zeroScaleOffset?e:e+"+";const l=`<svg xmlns="http://www.w3.org/2000/svg" width="${a}" heigth="${o}" viewbox="0 0 ${a} ${o}"><text x="${a/2}" y="${o/2+r/2+this.textOffset}" text-anchor="middle" lengthAdjust="spacingAndGlyphs" textLength="${a-20}" font-size="${r}" font-family="Arial" font-weight="bold">${n}</text></svg>`,c=document.createElement("canvas");c.width=a,c.height=o,canvg(c,l,{ignoreDimensions:!0,renderCallback(){const e=document.createElement("canvas");e.width=a,e.height=o;const t=e.getContext("2d");t.drawImage(i,0,0),t.drawImage(c,0,0),s(e)}})})).then(e=>(r&&(this._images[t]=e),s[t]=new ol.style.Style({image:new ol.style.Icon({img:e,imgSize:[a,o],anchor:[.5,.5]})}),Promise.resolve()))}const t=this.breaks.map((t,i)=>Promise.all([e.bind(this)(t,i,this.icon,this._icons,!0),e.bind(this)(t,i,this.selectedIcon,this._selectedIcons,!1)]));return Promise.all(t)}getSource(){return this.clusterSource}_styleFunction(e){const t=e.get("features");if(t&&t.length>1){const e=t.length;let i=this.breaks.findIndex((t,i)=>i>this.zeroScaleOffset?e<t:e<=t);return i=i>this.zeroScaleOffset?i-1:i,-1===i?this._icons[this._icons.length-1]:this._icons[i]}const i=t?t[0]:e,s=i[ss.originalFeatureSymbol]||i,r=this.framework.getLayerByName(s.get("_layerName"));if(r){if(s.getId()&&E.getInstance().getCurrentItem().id===s.getId())return r.highlightStyle?r.highlightStyle.style:null;const{style:e}=r.style;if(e instanceof ol.style.Style)return e;if("function"===typeof e)return e(s)}return new ol.style.Style({})}_getSelectedStyle(){return function(e){const t=e[ss.originalFeatureSymbol]||e,i=t.get("features");if(i&&i.length>1){const e=i.length;let t=this.breaks.findIndex((t,i)=>i>this.zeroScaleOffset?e<t:e<=t);return t=t>this.zeroScaleOffset?t-1:t,-1===t?this._selectedIcons[this._selectedIcons.length-1]:this._selectedIcons[t]}return this._selectedIcons[0]}.bind(this)}cesiumStyleFunction(e,t){if(e.length<2)return;let i;const s=e.length;let r=this.breaks.findIndex((e,t)=>t>this.zeroScaleOffset?s<e:s<=e);r=r>this.zeroScaleOffset?r-1:r,i=-1===r?this._images[this._images.length-1]:this._images[r],t.billboard.setImage(this.name+r,i),t.billboard.show=!0}objectClickedHandler(e,t,i){this.unSelect();const s=e.get("features");if(s&&s.length>1){this.lastClickedFeatures.splice(0),s.forEach(e=>{const t=e[ss.originalFeatureSymbol]||e,i=this.clusterLayers.find(e=>e.name===t.get("_layerName")),s=t.getProperties();s.template=i&&i.featureTemplate?i.featureTemplate(s):this.defaultFeatureTemplate(s),s.template=s.template.replace(/\[br\]/g,"<br>");const r={id:t.getId()||s.id,template:s.template,_layerName:s._layerName};this.lastClickedFeatures.push(r)}),this.raiseFeatureEvent(L.CLUSTER_CLICKED,"",s,this),this.framework.getSelectBehavior().clearCurrentItem();const t=e.getGeometry().clone();return t[ss.alreadyTransformedToImage]="vcs.vcm.maps.Oblique"===this.framework.getActiveMap().className,this._resultFeature=new ol.Feature({geometry:t,features:this.lastClickedFeatures}),this._resultLayer.addFeatures([this._resultFeature]),!0}const r=s?s[0]:e,n=r[ss.originalFeatureSymbol]||r,a=this.framework.getLayerByName(n.get("_layerName"));return a.objectClickedHandler(n,t,i)}contains(e){const t=this.clusterLayers.findIndex(t=>t.name===e);return t>-1}_handleActivation(e){const t=this.activeClusterLayers.findIndex(t=>t===e.name);if(this.contains(e.name)&&-1===t&&e instanceof ss){const t=e.getSource();if("ready"===t.getState()){const i=e.name,s=t.getFeatures();s.forEach(e=>{e.set("_layerName",i,!0),e.getId()||e.setId(this.framework.getNextUniqueId())}),this.source.addFeatures(s),this.activeClusterLayers.push(i)}else t.once("change",this._handleActivation.bind(this,e))}}_handleDeactivation(e){if(this.contains(e.name)&&e instanceof ss){this._inactive2dClustering||this.clusterSource.setPause(!0);const t=e.getSource();t.getFeatures().forEach(e=>{this.source.removeFeature(e,!0)}),this.source.changed();const i=this.activeClusterLayers.findIndex(t=>t===e.name);this.activeClusterLayers.splice(i,1),delete this.activeClusterLayersLastUpdated[e.name],this._inactive2dClustering||this.clusterSource.setPause(!1);const s=this.lastClickedFeatures.slice();this.lastClickedFeatures.splice(0),s.forEach(t=>{t._layerName!==e.name&&this.lastClickedFeatures.push(t)}),this._resultFeature&&this._resultFeature.changed()}}_handleSelectedItemChanged(e){const t=this.lastClickedFeatures.find(t=>t.id===e);e&&!t&&this.unSelect()}postRenderStyling(){let e=!1;for(let t=0;t<this.activeClusterLayers.length;t++){const i=this.activeClusterLayers[t],s=this.framework.getLayerByName(i);if(s&&(!this.activeClusterLayersLastUpdated[i]||this.activeClusterLayersLastUpdated[i]<s.featureVisibility.lastUpdated)){const t=s.getSource();t.getFeatures().forEach(t=>{this.source.getFeatureById(t.getId())?s.featureVisibility.hiddenObjects[t.getId()]&&(this.source.removeFeature(t,!0),e=!0):s.featureVisibility.hiddenObjects[t.getId()]||(this.source.addFeature(t,!0),e=!0)}),this.activeClusterLayersLastUpdated[i]=Date.now()}}e&&this.source.changed()}unSelect(){this._resultFeature=null,this._resultLayer.removeAllFeatures()}addLayers(e){this._validateLayers(Array.isArray(e)?e:[e],!0)}}var $n=Xn;class ea extends ss{static get className(){return"vcs.vcm.layer.WFS"}constructor(e){e.className=ea.className;const t=new W(e.projection).getConfigObject();t.alias=["http://www.opengis.net/gml/srs/epsg.xml#"+t.epsg.match(/\d+/)[0]],e.projection=t,super(e),this.featureType=Array.isArray(e.featureType)?e.featureType:[e.featureType],this.featureNS=e.featureNS,this.featurePrefix=e.featurePrefix,this.getFeaturesOptions=e.getFeatureOptions||{},this.wfsFormat=new ol.format.WFS({featureNS:this.featureNS,featureType:this.featureType}),this._dataFetchedPromise=null}fetchData(){if(this._dataFetchedPromise)return this._dataFetchedPromise;if(null!=this.url){const e=this.wfsFormat.writeGetFeature(Object.assign({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureTypes:[this.featureType],srsName:this.projection.epsg},this.getFeaturesOptions)),t=(new XMLSerializer).serializeToString(e);return this.framework.getActiveMap().setLayerLoading(this,!0),this._dataFetchedPromise=G.a.post(this.url,t,{headers:{"Content-Type":"application/text+xml"}}).then(e=>{this.dataFetchedHandler(e.data)}).catch(e=>(this.logger.info(`Could not send request for loading layer content (${e.message})`),Promise.reject(e))).then(()=>{this.framework.getActiveMap().setLayerLoading(this,!1)}),this._dataFetchedPromise}return this.logger.warning("Could not load WFS layer, no url is set"),Promise.reject(new Error("missing url in WFS layer"))}dataFetchedHandler(e){const t=this.wfsFormat.readFeatures(e);this.addFeatures(t)}}var ta=ea;Mt.WMS=Mt.lastLayerId,Mt.lastLayerId+=1;const ia=["application/geojson","application/json","application/vnd.geo+json"];class sa extends Un{static get className(){return"vcs.vcm.layer.Wms"}constructor(e){if(e.layertype=Mt.WMS,e.className=sa.className,e.tilingSchema=e.tilingSchema||"geographic",super(e),this.layers=e.layers?e.layers.split(","):[],this.version=e.version||"1.1.1",this.parameters={},e.parameters){let t;"string"===typeof e.parameters?t=n["a"].parseQueryParams(e.parameters):e.parameters instanceof Object&&(t=e.parameters),Object.keys(t).forEach(e=>{this.parameters[e.toUpperCase()]=t[e]})}null==this.parameters.TRANSPARENT&&(this.parameters.TRANSPARENT=!1),this.version&&(this.parameters.VERSION=this.version),this.parameters.LAYERS=this.layers.join(","),this.featureInfoResponseType=e.featureInfo&&e.featureInfo.responseType?e.featureInfo.responseType:null,this.featureInfoProjection=e.featureInfo&&e.featureInfo.projection?new W(e.featureInfo.projection):null,this.showFeatureInfoGeometry=!!e.featureInfo&&Object(c["e"])(e.featureInfo.showGeometry,!1),this.tileSize=e.tileSize||[256,256],this.highResolution=Object(c["e"])(e.highResolution,!1),this.featureInfoActivated=!1,this.featureInfoListenerKey=null,this.featureClickedDataHandler=this._defaultFeatureClickedDataHandler.bind(this),this.featureInfoResponseFormat=this._getDefaultFeatureInfoResponseFormat(e.featureInfo?e.featureInfo.formatOptions:{})}get featureInfo(){return this.featureInfoResponseType&&this.featureInfoResponseFormat&&this.featureClickedDataHandler}activateFeatureInfo(e){if(!this.featureInfo)throw new Error("this layer does not support featureInfo request");e&&!this.featureInfoActivated?(this.featureInfoListenerKey=this.framework.subscribe(L.MAP_CLICKED,this.featureInfoHandler.bind(this)),this.featureInfoActivated=!0):!e&&this.featureInfoActivated&&this.featureInfoListenerKey&&(this.framework.unsubscribeByKey(this.featureInfoListenerKey),this.featureInfoActivated=!1,this.featureInfoListenerKey=null)}featureInfoHandler(e){const t=this.framework.getActiveMap();let i=0;if("vcs.vcm.maps.Openlayers"===t.className)i=t.olMap.getView().getResolution()/1e5;else if("vcs.vcm.maps.Cesium"===t.className){const s=t.getViewPoint(),r=Math.PI/3,n={};n.width=this.framework.getMapContainer().offsetWidth,n.height=this.framework.getMapContainer().offsetHeight;const a=n.width/n.height,o=2*Math.atan(Math.tan(.5*r)/a),l=2*s.distance*Math.tan(o/2),c=111194.87428468118,u=Math.cos(Math.abs(Cesium.Math.toRadians(e.latitude))),h=l/c/u;i=h/n.height}let s="EPSG:4326";"1.3.0"===this.version&&(s="CRS:84");let r=[e.longitude,e.latitude];"mercator"===this.tilingSchema&&(r=q.transformTo(J,r),s="EPSG:3857");const n=this.wmsSource.getGetFeatureInfoUrl(r,i,s,{INFO_FORMAT:this.featureInfoResponseType});n&&G.a.get(n).then(({data:t})=>{this.featureClickedDataHandler(t,W.wgs84ToMercator([e.longitude,e.latitude]))})}_getResultLayer(){let e=this.framework.getLayerByName("_wmsResultLayer");return e||(e=new ss({projection:J.getConfigObject(),name:"_wmsResultLayer",style:this.options.featureInfo?this.options.featureInfo.style:void 0}),e.activate(),this.framework.addLayer(e)),e}_getDefaultFeatureInfoResponseFormat(e={}){return"text/xml"===this.featureInfoResponseType?(e.gmlFormat=e.gmlFormat?new ol.format[e.gmlFormat]:new ol.format.GML2,new ol.format.WFS(e)):ia.includes(this.featureInfoResponseType)?new ol.format.GeoJSON(e):"application/vnd.ogc.gml"===this.featureInfoResponseType?new ol.format.GML2(e):"application/vnd.ogc.gml/3.1.1"===this.featureInfoResponseType?new ol.format.GML3(e):null}_defaultFeatureClickedDataHandler(e,t){let i;try{i=this.featureInfoResponseFormat.readFeatures(e,{dataProjection:this.featureInfoProjection?this.featureInfoProjection.proj:void 0,featureProjection:J.proj})}catch(s){return void this.logger.warning("Features could not be read, please verify the featureInfoResponseType with the capabilities from the server")}if(Array.isArray(i)&&i.length>=1){const e=i[0],s=e.getGeometry();if(s||e.setGeometry(new ol.geom.Point(t)),this.showFeatureInfoGeometry){const t=this._getResultLayer();t.removeAllFeatures(),t.addFeatures([e])}e[Et.vcsLayerNameSymbol]=this.name,this.framework.publish(L.FEATURE_CLICKED,"wmsFeatureInfo",e,this),this.showFeatureInfoGeometry&&this.framework.subscribeOnce(L.SELECTED_ITEM_CHANGED,()=>{this._getResultLayer().removeFeaturesById([e.getId()])})}}getTilingOptions(){const e="geographic"===this.tilingSchema?q:J,t=e.proj.getExtent(),i=ol.extent.getWidth(t),s="geographic"===this.tilingSchema?i/(2*this.tileSize[0]):i/this.tileSize[0],r=this.maxLevel+1,n=[];for(let o=0;o<r;++o)n.push(s/2**o);const a={origin:ol.extent.getTopLeft(t),resolutions:n,tileSize:this.tileSize,minZoom:this.minLevel};return this.extent.isValid()&&(a.extent=this.extent.getCoordinatesInProjection(e)),a}setCommonSource(){if(this.wmsSource)return;const e=this.getTilingOptions(),t=new ol.tilegrid.TileGrid(e),i={url:this.url,tileGrid:t,params:this.parameters};n["a"].hasSameOrigin(this.url)||(i.crossOrigin="anonymous"),"geographic"===this.tilingSchema&&("1.3.0"===this.version?i.projection="CRS:84":i.projection="EPSG:4326"),this.wmsSource=new ol.source.TileWMS(i)}getGenericFeatureFromClickedObject(e){const t=e.getGeometry(),i=W.mercatorToWgs84(ol.extent.getCenter(t.getExtent())),s=e.getProperties();return delete s[e.getGeometryName()],{layerName:this.name,layerClass:this.className,attributes:Object.assign({},this._genericFeatureProperties,s),longitude:i[0],latitude:i[1],height:0,relativeToGround:!0}}setLayers(e){a(e,[String,[String]]),this.layers=Array.isArray(e)?e:[e],this.parameters.LAYERS=this.layers.join(","),this._updateLayer()}_updateLayer(){this.wmsSource&&(this.wmsSource.updateParams(this.parameters),this.getImplementations().forEach(e=>{e.updateLayer()}))}dispose(){super.dispose(),this.showFeatureInfoGeometry&&this._getResultLayer().dispose()}}var ra=sa;Mt.WMTS=Mt.lastLayerId,Mt.lastLayerId+=1;class na extends Un{static get className(){return"vcs.vcm.layer.Wmts"}constructor(e){e.layertype=Mt.WMTS,e.className=na.className,e.tilingSchema=e.tilingSchema||"mercator",super(e),this.numberOfLevelZeroTilesX=e.numberOfLevelZeroTilesX?e.numberOfLevelZeroTilesX:1,this.numberOfLevelZeroTilesY=e.numberOfLevelZeroTilesY?e.numberOfLevelZeroTilesY:1,this.layer=e.layer||"",this.wmtsStyle=e.style||"",this.format=e.format||"",this.tileMatrixPrefix=e.tileMatrixPrefix||"",this.tileMatrixSetID=e.tileMatrixSetID||"",this.olOptions=e.ol3Options?e.ol3Options:{},this.matrixIds=e.matrixIds?e.matrixIds:null,this.tileSize=e.tileSize||[256,256]}getTilingScheme(e={}){return this.numberOfLevelZeroTilesX&&this.numberOfLevelZeroTilesY&&(e.numberOfLevelZeroTilesX=this.numberOfLevelZeroTilesX,e.numberOfLevelZeroTilesY=this.numberOfLevelZeroTilesY),super.getTilingScheme(e)}}var aa=na;let oa=null;class la extends oe{static get className(){return"vcs.vcm.util.IconManager"}constructor(){super({className:la.className}),this.colorLayerMap={},this.layerLegendCanvasMap={},this.baseUrl="./images/icons.json",this.iconMap={0:{stroke:"inner_0.svg"},1:{stroke:"inner_2.svg",fill:"inner_2_fill_shaded.svg",colorizeInner:!0},2:{stroke:"inner_3.svg",fill:"inner_3_fill_white.svg",colorizeOuter:!0},3:{stroke:"inner_4.svg"},4:{stroke:"inner_1.svg",fill:"inner_1_fill_shaded.svg",colorizeInner:!0},5:{stroke:"inner_5.svg",fill:"inner_5_fill_white.svg",colorizeOuter:!0},6:{stroke:"inner_10.svg"},7:{stroke:"inner_9.svg",fill:"inner_9_fill_shaded.svg",colorizeInner:!0},8:{stroke:"inner_8.svg",fill:"inner_8_fill_white.svg",colorizeOuter:!0},9:{stroke:"inner_6.svg"},10:{stroke:"inner_12.svg",fill:"inner_12_fill_shaded.svg",colorizeInner:!0},11:{stroke:"inner_7.svg",fill:"inner_7_fill_white.svg",colorizeOuter:!0},12:{stroke:"inner_11.svg"},13:{stroke:"inner_0.svg",fill:"inner_0_fill_shaded.svg",colorizeInner:!0},14:{stroke:"inner_2.svg",fill:"inner_2_fill_white.svg",colorizeOuter:!0},15:{stroke:"inner_3.svg"},16:{stroke:"inner_4.svg",fill:"inner_4_fill_shaded.svg",colorizeInner:!0},17:{stroke:"inner_1.svg",fill:"inner_1_fill_white.svg",colorizeOuter:!0},18:{stroke:"inner_5.svg"},19:{stroke:"inner_10.svg",fill:"inner_10_fill_shaded.svg",colorizeInner:!0},20:{stroke:"inner_9.svg",fill:"inner_9_fill_white.svg",colorizeOuter:!0},21:{stroke:"inner_8.svg"},22:{stroke:"inner_6.svg",fill:"inner_6_fill_shaded.svg",colorizeInner:!0},23:{stroke:"inner_12.svg",fill:"inner_12_fill_white.svg",colorizeOuter:!0},24:{stroke:"inner_7.svg"},25:{stroke:"inner_11.svg",fill:"inner_11_fill_shaded.svg",colorizeInner:!0},26:{stroke:"inner_0.svg",fill:"inner_0_fill_white.svg",colorizeOuter:!0},27:{stroke:"inner_2.svg"},28:{stroke:"inner_3.svg",fill:"inner_3_fill_shaded.svg",colorizeInner:!0},29:{stroke:"inner_4.svg",fill:"inner_4_fill_white.svg",colorizeOuter:!0},30:{stroke:"inner_1.svg"},31:{stroke:"inner_5.svg",fill:"inner_5_fill_shaded.svg",colorizeInner:!0},32:{stroke:"inner_10.svg",fill:"inner_10_fill_white.svg",colorizeOuter:!0},33:{stroke:"inner_9.svg"},34:{stroke:"inner_8.svg",fill:"inner_8_fill_shaded.svg",colorizeInner:!0},35:{stroke:"inner_6.svg",fill:"inner_6_fill_white.svg",colorizeOuter:!0},36:{stroke:"inner_12.svg"},37:{stroke:"inner_7.svg",fill:"inner_7_fill_shaded.svg",colorizeInner:!0},38:{stroke:"inner_11.svg",fill:"inner_11_fill_white.svg",colorizeOuter:!0},39:{stroke:"inner_last.svg"}},this._svgMap={};const e=this.framework.loadLibraries(["./lib/thirdparty/canvg-1.4/rgbcolor.js","./lib/thirdparty/canvg-1.4/StackBlur.js","./lib/thirdparty/canvg-1.4/canvg.js"]),t=G.a.get(this.baseUrl).then(e=>(this._svgMap=e.data,!0));this.readyPromise=Promise.all([e,t]),this.dedicatedIconMap={berlinpartner:"outerCircle.svg",sbahn:"SBahn.svg",ubahn:"UBahn.svg",haltestelle:"Haltestelle.svg",top200:"Top200.svg",gewerbeimmobilien:"GewerbeImmobilien-rot.svg"},this.width=40,this.height=44}static getInstance(){return oa||(oa=new la),oa}getStyleForColor(e,t,i){const s=ol.color.asArray(t);if(!s)return Promise.reject(new Error(`Not a valid color is provided for the layer with name ${e}, no style is provided`));let r;return this.colorLayerMap[t]?-1!==this.colorLayerMap[t].indexOf(e)?r=this.colorLayerMap[t].indexOf(e):(r=this.colorLayerMap[t].length,this.colorLayerMap[t].push(e)):(this.colorLayerMap[t]=[e],r=0),r=r>39?39:r,this.readyPromise.then(()=>{const t=s[0],n=s[1],a=s[2],o=[];return i?(o.push(this.createOutline(t,n,a,r,this._svgMap["outerSquare.svg"])),o.push(this.createFill(t,n,a,r,this._svgMap["innerWhiteSquare.svg"],this._svgMap["innerShadedSquare.svg"])),o.push(this.createOutline(t,n,a,r,this._svgMap["legendSquare_outer.svg"])),o.push(this.createFill(t,n,a,r,this._svgMap["legendSquare_inner_white.svg"],this._svgMap["legendSquare_inner_shaded.svg"]))):(o.push(this.createOutline(t,n,a,r,this._svgMap["outerCircle.svg"])),o.push(this.createFill(t,n,a,r,this._svgMap["innerWhiteCircle.svg"],this._svgMap["innerShadedCircle.svg"])),o.push(this.createOutline(t,n,a,r,this._svgMap["legendCircle_outer.svg"])),o.push(this.createFill(t,n,a,r,this._svgMap["legendCircle_inner_white.svg"],this._svgMap["legendCircle_inner_shaded.svg"]))),o.push(this.createInner(t,n,a,r)),Promise.all(o).then(t=>{const s=t[0],r=t[1],n=t[2],a=t[3],o=t[4],l=document.createElement("canvas");l.width=22,l.height=22;const c=l.getContext("2d");i?(c.drawImage(n,0,0,25,28,0,0,22,22),c.drawImage(a,0,0,25,28,0,0,22,22),c.drawImage(o,8,6,26,26,2.1,2.4,15,15)):(c.drawImage(a,0,0,28,28,0,0,22,22),c.drawImage(n,0,0,28,28,0,0,22,22),c.drawImage(o,8,6,26,26,3.7,2.9,15,15)),this.layerLegendCanvasMap[e]=l;const u=document.createElement("canvas");u.width=this.width,u.height=this.height;const h=u.getContext("2d");return h.drawImage(s,0,0),h.drawImage(r,0,0),i?h.drawImage(o,-.7,-.52):h.drawImage(o,0,0),u.id=e,new ol.style.Style({image:new ol.style.Icon({img:u,imgSize:[this.width,this.height],anchor:[.5,1]})})})})}getStyleForDedicatedIcon(e,t){return this.readyPromise.then(()=>new Promise((i,s)=>{if(t=t.toLowerCase(),this.dedicatedIconMap[t]){const s=document.createElement("canvas");s.width=this.width,s.height=this.height,canvg(s,this._svgMap.dedicatedIcons[this.dedicatedIconMap[t]],{renderCallback:function(){const t=new ol.style.Style({image:new ol.style.Icon({img:s,imgSize:[this.width,this.height],scale:.8})}),r=document.createElement("canvas");r.width=22,r.height=22;const n=r.getContext("2d");n.drawImage(s,0,0,39,44,0,0,22,22),this.layerLegendCanvasMap[e]=r,i(t)}.bind(this)})}else s(new Error("This icon is not known, please check"))}))}getLegendCanvas(e){if(this.layerLegendCanvasMap[e])return Promise.resolve(this.layerLegendCanvasMap[e]);const t=this.framework.getLayerByName(e);return t?t.dedicatedIcon?this.getStyleForDedicatedIcon(t.name,t.dedicatedIcon).then(()=>this.getLegendCanvas(e)):this.getStyleForColor(t.name,t.iconColor,t.useSquareShapeAsOuter).then(()=>this.getLegendCanvas(e)):Promise.reject(new Error("Could not find layer: "+e))}createOutline(e,t,i,s,r){return new Promise((s,n)=>{const a=document.createElement("canvas");a.width=this.width,a.height=this.height;const o=a.getContext("2d");canvg(a,r,{renderCallback:function(){Ye(o,[e,t,i,0],[this.width,this.height]),s(a)}.bind(this)})})}createFill(e,t,i,s,r,n){return new Promise((a,o)=>{const l=this.iconMap[s];if(l.colorizeOuter){const s=[];s.push(new Promise((e,t)=>{const i=document.createElement("canvas");i.width=this.width,i.height=this.height,canvg(i,r,{renderCallback(){e(i)}})})),s.push(new Promise((s,r)=>{const a=document.createElement("canvas");a.width=this.width,a.height=this.height;const o=a.getContext("2d");canvg(a,n,{renderCallback:function(){Ye(o,[e,t,i,0],[this.width,this.height]),s(a)}.bind(this)})})),Promise.all(s).then(e=>{const t=e[0],i=e[1],s=document.createElement("canvas");s.width=this.width,s.height=this.height;const r=s.getContext("2d");t&&r.drawImage(t,0,0),i&&r.drawImage(i,0,0),a(s)})}else{const e=document.createElement("canvas");e.width=this.width,e.height=this.height,canvg(e,r,{renderCallback(){a(e)}})}})}createInner(e,t,i,s){return new Promise((r,n)=>{const a=this.iconMap[s],o=[];o.push(new Promise((s,r)=>{if(a.stroke){const r=document.createElement("canvas");r.width=this.width,r.height=this.height;const n=r.getContext("2d");canvg(r,this._svgMap[a.stroke],{renderCallback:function(){Ye(n,[e,t,i,0],[this.width,this.height]),s(r)}.bind(this)})}else s()})),o.push(new Promise((s,r)=>{if(a.fill){const r=document.createElement("canvas");r.width=this.width,r.height=this.height;const n=r.getContext("2d");canvg(r,this._svgMap[a.fill],{renderCallback:function(){a.colorizeInner&&Ye(n,[e,t,i,0],[this.width,this.height]),s(r)}.bind(this)})}else s()})),Promise.all(o).then(e=>{const t=e[0],i=e[1],s=document.createElement("canvas");s.width=this.width,s.height=this.height;const n=s.getContext("2d");i&&n.drawImage(i,0,0),t&&n.drawImage(t,0,0),r(s)})})}}var ca=la;Mt.WSV=Mt.lastLayerId,Mt.lastLayerId+=1;class ua extends ss{static get className(){return"vcs.vcm.layer.Wsv"}constructor(e){e.projection={epsg:"EPSG:4326",proj4:"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "},e.zCoordinateEyeOffset=-100,e.heightAboveGround=10,e.altitudeMode="relativeToGround",e.zIndex=e.zIndex||60,e.className=ua.className,e.layertype=Mt.WSV,super(e),this.dedicatedIcon=e.dedicatedIcon||null,this.iconColor=e.iconColor||null,this.useSquareShapeAsOuter=!!e.useSquareShape,this.iconManagerInUse=!(!this.dedicatedIcon&&!this.iconColor),this.baseUrl=e.baseurl||"/wsv-live",this.name=e.name,this.logo="adf33bbe08057b9251536c73ff627f512955ffc7.png",this.scaleUnselected=this.iconManagerInUse?.8:.5,this.scaleSelected=this.iconManagerInUse?0:1,e.wsvProjection||(e.wsvProjection={proj4:"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 +x_0=40000 +y_0=10000 +ellps=bessel +datum=potsdam +units=m +no_defs",epsg:"3068"}),this.wsvProjection=new W(e.wsvProjection),this.noFilterValue=e.noFilterValue?e.noFilterValue:"Keine Angabe",this.filter=e.filter?e.filter:null,this.filterAttribute=e.filterAttribute?e.filterAttribute:"tags",this.filterAttributeName=e.filterAttributeName?e.filterAttributeName:null,this._dataFetchedPromise=null,this._initializedPromise=null}initialize(){return this._initializedPromise||(this.framework.subscribe(L.LOCALE_CHANGED,this.handleLocaleChanged,this),this._initializedPromise=this.framework.loadLibraries(["./lib/thirdparty/canvg-1.4/rgbcolor.js","./lib/thirdparty/canvg-1.4/StackBlur.js","./lib/thirdparty/canvg-1.4/canvg.js"])),this._initializedPromise.then(()=>this.fetchData()).then(()=>super.initialize())}fetchData(){if(!this._dataFetchedPromise){this.framework.getActiveMap().setLayerLoading(this,!0);const e=`${this.baseUrl}/api/${this.framework.getLocale()}/layer/${this.name}.json`;this._dataFetchedPromise=G.a.get(e).then(e=>this.dataFetchedHandler(e.data)).catch(e=>(this.logger.warning(`Could not send request for loading layer content (${e.message})`),Promise.reject(e))).then(()=>{this.framework.getActiveMap().setLayerLoading(this,!1)})}return this._dataFetchedPromise}handleLocaleChanged(){if(this._dataFetchedPromise){const e=this.active;e&&this.deactivate(),this.removeAllFeatures(),this._dataFetchedPromise=null,e&&this.activate()}}getFilter(){if(this.filter)return this.filter;const e=this.source.getFeatures(),t={};for(let i=0;i<e.length;i++){const s=e[i].get(this.filterAttribute);if(s)if(Array.isArray(s))for(let e=0;e<s.length;e++){const i=s[e];i&&(this.filterAttributeName?t[i[this.filterAttributeName]]=!0:t[i]=!0)}else"string"===typeof s?t[s]=!0:"object"===typeof s&&this.filterAttributeName&&(t[s[this.filterAttributeName]]=!0);else t[this.noFilterValue]=!0}return Object.keys(t)}setFilter(e){this.activeFilter=e;const t=this.source.getFeatures();for(let i=0;i<t.length;i++){const s=t[i].get(this.filterAttribute);let r=!1;if(s){if(Array.isArray(s))for(let t=0;t<s.length;t++)if(this.filterAttributeName){if(s[t][this.filterAttributeName]){const i=e.indexOf(s[t][this.filterAttributeName]);if(i>-1){r=!0;break}}}else{const i=e.indexOf(s[t]);if(i>-1){r=!0;break}}else if("string"===typeof s){const t=e.indexOf(s);if(t>-1){r=!0;break}}else if("object"===typeof s&&this.filterAttributeName){const t=e.indexOf(s[this.filterAttributeName]);if(t>-1){r=!0;break}}}else{const t=e.indexOf(this.noFilterValue);t>-1&&(r=!0)}r?t[i].setGeometryName("geometry"):t[i].setGeometryName("hidden")}}dataFetchedHandler(e){try{return e?(e.logo&&(this.logo=this.baseUrl+e.logo),e.name&&(this.options.title=e.name),e.category&&(this.options.category=e.category),this._createStyle().then(()=>{const{locations:t}=e;if(t){const e=[];t.forEach(t=>{const i=this._createLocation(t);i&&e.push(i)}),this.addFeatures(e)}return this.activeFilter&&this.setFilter(this.activeFilter),!0})):Promise.resolve()}catch(t){return this.logger.warning("Could not load WSV json: "+t.message),Promise.reject(t)}}_createStyle(){if(this.iconManagerInUse){let e;return e=this.dedicatedIcon?ca.getInstance().getStyleForDedicatedIcon(this.name,this.dedicatedIcon):ca.getInstance().getStyleForColor(this.name,this.iconColor,this.useSquareShapeAsOuter),e.then(e=>{e.getImage().setScale(this.scaleUnselected),this.setStyle(e);const t=e.clone();return t.getImage().setOpacity(0),this.setHighlightStyle(t),!0})}return this.setStyle(new ol.style.Style({image:new ol.style.Icon({src:this.logo,scale:this.scaleUnselected})})),this.setHighlightStyle(new ol.style.Style({image:new ol.style.Icon({src:this.logo,scale:this.scaleSelected})})),Promise.resolve()}_createLocation(e){if(!e.address||!e.address.x||!e.address.y||!e.name||!e.id)return!1;const t="&amp;",i=/&(?!([a-zA-Z0-9]+|#([0-9]+|x[A-Z0-9]+));)/g,s=new ol.Feature;e.id=`${this.name}_${e.id}`,s.setId(e.id),s.setProperties({name:e.name.replace(i,t)});const r=this.wsvProjection.transformTo(this.projection,[e.address.x,e.address.y]),n=new ol.geom.Point(r);if(this.extent.isValid()){const e=n.clone();if(e.transform(ol.proj.get("EPSG:4326"),this.extent.projection.proj),!e.intersectsExtent(this.extent.extent))return!1}return s.setGeometry(n),s.setProperties(e),e.logo&&(s.setProperties({logo:this.baseUrl+e.logo}),e.logosize&&e.logosize.width&&e.logosize.height&&(s.setProperties({width:e.logosize.width}),s.setProperties({height:e.logosize.height}))),e.address&&e.address.city?s.setProperties({city:e.address.city.replace(i,t)}):s.setProperties({city:""}),e.address&&e.address.zip?s.setProperties({zip:e.address.zip}):s.setProperties({zip:""}),e.address&&e.address.street?s.setProperties({street:e.address.street.replace(i,t)}):s.setProperties({street:""}),e.contact&&e.contact.website?s.setProperties({website:e.contact.website}):s.setProperties({website:""}),s.setProperties({placemarkurl:`${this.baseUrl}/${this.framework.getLocale()}/location/${e.id}`}),this.options.title&&s.setProperties({layername:this.options.title}),this.options.category&&s.setProperties({category:this.options.category}),s}}var ha=ua;const da=v.getLogger("vcs.vcm.layer.FeatureStoreChanges");class ma{constructor(e){this.layer=e,this._changesListeners={addfeature:null,changefeature:null,removefeature:null},this._addedFeatures=new Set,this._editedFeatures=new Set,this._removedFeatures=new Set,this._convertedFeatures=new Set,this.values={changed:!1}}get active(){return Object.values(this._changesListeners).some(e=>null!==e)}track(){null===this._changesListeners.addfeature&&(this._changesListeners.addfeature=this.layer.source.on("addfeature",this._featureAdded.bind(this))),null===this._changesListeners.changefeature&&(this._changesListeners.changefeature=this.layer.source.on("changefeature",this._featureChanged.bind(this))),null===this._changesListeners.removefeature&&(this._changesListeners.removefeature=this.layer.source.on("removefeature",this._featureRemoved.bind(this)))}getChanges(){return{add:[...this._addedFeatures],edit:[...this._editedFeatures],remove:[...this._removedFeatures]}}commitChanges(e){const t=[];this._addedFeatures.forEach(e=>{const i=Rs(e,{writeStyle:!0});t.push({action:"add",feature:i,original:e,success(t){e.setId(t),e[ws]=Ts.DYNAMIC}})}),this._editedFeatures.forEach(e=>{const i=Rs(e,{writeStyle:!0});i._id=e.getId(),i.geomety="test",t.push({action:"edit",original:e,feature:i,success(){e[ws]===Ts.STATIC&&(e[ws]=Ts.EDITED)}})}),this._removedFeatures.forEach(e=>{const i=e.getId();t.push({original:e,action:"remove",feature:{_id:i},success(){}})});let i=Promise.resolve();return t.length&&(i=G.a.post(e.toString(),t.map(e=>({action:e.action,feature:e.feature}))).then(({data:e})=>{const i=e.failedActions.map(({index:e,error:i})=>{const s=t[e];return da.log(`failed action ${s.action}: ${i}`),t[e]=null,this._resetFeature(s.original)});return t.filter(e=>e).forEach(({action:t,success:i})=>{"add"===t?i(e.insertedIds.shift()._id):i()}),Promise.all(i)})),i.then(()=>{const e=[];this._convertedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),Promise.all(e)}).then(()=>{this._resetValues()}).catch(e=>{this._resetValues(),da.error(e.message)})}reset(){const e=[];return this._addedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),this._editedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),this._removedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),this._convertedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),Promise.all(e).then(()=>{this._resetValues()}).catch(e=>{da.error(e),this._resetValues()})}_resetFeature(e){const t=[e.getId()];return e[ws]?e[ws]===Ts.STATIC?(this.layer.removeFeaturesById(t),this.layer.hiddenStaticFeatureIds.delete(e.getId()),this.layer.showObjects(t),Promise.resolve()):this.layer.injectedFetchDynamicFeatureFunc(e.getId()).then(e=>{const{features:i}=Fs(e);this.layer.removeFeaturesById(t),this.layer.addFeatures(i)}).catch(e=>{da.error("failed to reset feature, giving up",e.message)}):(this.layer.removeFeaturesById(t),Promise.resolve())}_resetValues(){this._addedFeatures.clear(),this._editedFeatures.clear(),this._removedFeatures.clear(),this._convertedFeatures.clear(),this.values.changed=!1}unTrack(){ol.Observable.unByKey(Object.values(this._changesListeners)),this._changesListeners.addfeature=null,this._changesListeners.changefeature=null,this._changesListeners.removefeature=null,this._resetValues()}pauseTracking(e){this._changesListeners[e]&&(ol.Observable.unByKey(this._changesListeners[e]),this._changesListeners[e]=null)}_featureAdded(e){const{feature:t}=e;t[ws]?t[ws]===Ts.STATIC&&(this._convertedFeatures.add(t),this.values.changed=!0):(this._addedFeatures.add(t),this.values.changed=!0)}_featureChanged(e){const{feature:t}=e;t[ws]&&(this._convertedFeatures.delete(t),this._editedFeatures.add(t),this.values.changed=!0)}_featureRemoved(e){const{feature:t}=e;t[ws]?(this._removedFeatures.add(t),this._editedFeatures.delete(t),this._convertedFeatures.delete(t),this.values.changed=!0):this._addedFeatures.delete(t)}removeFeature(e){a(e,ol.Feature),this._featureRemoved({feature:e})}addFeature(e){a(e,ol.Feature),this._featureAdded({feature:e})}editFeature(e){a(e,ol.Feature),this._featureChanged({feature:e})}dispose(){this.unTrack(),this.layer=null}}var ga=ma;Mt.FEATURESTORE=Mt.lastLayerId,Mt.lastLayerId+=1;class pa extends ss{static get className(){return"vcs.vcm.layer.FeatureStore"}constructor(e){const t=Object.assign({altitudeMode:"clampToGround",layerType:Mt.FEATURESTORE,className:pa.className,projection:J.getConfigObject()},e);if(super(t),this.extent.projection=J,this.layerId=e.id,this.staticRepresentation=e.staticRepresentation||{},this.hiddenStaticFeatureIds=new Set(e.hiddenStaticFeatureIds||[]),this.changeTracker=new ga(this),this.vcsMeta=e.vcsMeta||{},this.setVcsMeta(this.vcsMeta),this.injectedFetchDynamicFeatureFunc=e.injectedFetchDynamicFeatureFunc,this._staticFeaturesLayer=new Us({cesiumTilesetLayerOptions:{url:this.staticRepresentation.threeDim,screenSpaceError:this.vcsMeta.screenSpaceError?this.vcsMeta.screenSpaceError:4},openlayersTiledLayerOptions:this.staticRepresentation.twoDim?{url:this.staticRepresentation.twoDim}:void 0,name:this.name,style:this.style,genericFeatureProperties:this._genericFeatureProperties}),this._setEditing=null,e.features){const t={type:"FeatureCollection",features:e.features,vcsMeta:e.vcsMeta},{style:i,features:s}=Fs(t,{targetProjection:J,dynamicStyle:!0});i&&(this.defaultStyle=i,this._staticFeaturesLayer.defaultStyle=i,this.setStyle(i)),this.addFeatures(s)}}get altitudeMode(){return this._altitudeMode}set altitudeMode(e){const t=this.changeTracker.active;t&&this.changeTracker.pauseTracking("changefeature"),super.altitudeMode=e,t&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}get skirt(){return this._skirt}set skirt(e){const t=this.changeTracker.active;t&&this.changeTracker.pauseTracking("changefeature"),super.skirt=e,t&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}get storeyHeight(){return this._storeyHeight}set storeyHeight(e){const t=this.changeTracker.active;t&&this.changeTracker.pauseTracking("changefeature"),super.storeyHeight=e,t&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}get classificationType(){return this._classificationType}set classificationType(e){const t=this.changeTracker.active;t&&this.changeTracker.pauseTracking("changefeature"),super.classificationType=e,t&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}get screenSpaceErrorMobile(){return this._staticFeaturesLayer.screenSpaceErrorMobile}get screenSpaceError(){return this._staticFeaturesLayer.screenSpaceError}initialize(){return this.initialized?super.initialize().then(()=>this._staticFeaturesLayer.initialize()):super.initialize().then(()=>this._staticFeaturesLayer.initialize()).then(()=>{this._hideDynamicFeatures()})}getVcsMeta(e){const t=super.getVcsMeta(e);return t}synchronizeImplementations(e,t){return super.synchronizeImplementations(e,t).then(()=>this._staticFeaturesLayer.synchronizeImplementations(e,t))}_hideDynamicFeatures(){const e=[];this.hiddenStaticFeatureIds.forEach(t=>{e.push(t)}),this._staticFeaturesLayer.hideObjects(e)}setSyncing(){super.setSyncing(),this._staticFeaturesLayer.setSyncing()}async activate(e){null!=e&&this.logger.deprecate("activate","activate no longer accepts an argument, use deactivate to deactivate the layer"),!1!==e?this.isSupported()&&(this._state&wt.CANCELED&&this.setStateLoading(),this._loadingPromise?await this._loadingPromise:(await super.activate(),this.active&&(await this._staticFeaturesLayer.activate(),this._setEditing&&this.setEditing(this._setEditing.symbol,this._setEditing.featureType)))):this.deactivate()}deactivate(){super.deactivate(),this._staticFeaturesLayer.deactivate()}setStyle(e,t){const i=this.changeTracker.active;i&&this.changeTracker.pauseTracking("changefeature"),super.setStyle(e,t),this._staticFeaturesLayer.setStyle(e,t),i&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}getFeatureExtent(){const e=super.getFeatureExtent();if(this._staticFeaturesLayer.initialized){const t=this._staticFeaturesLayer.getFeatureExtent();ol.extent.extend(e.extent,t.extent)}return e}setEditing(e,t){const i=this.framework.getMapByType("vcs.vcm.maps.Cesium");if(this._staticFeaturesLayer.setEditing(e,t),i){const s=this._staticFeaturesLayer.getImplementation(i);s.initialized?(null!=t?s.cesium3DTileset[e]=t:delete s.cesium3DTileset[e],this._setEditing=null):this._setEditing={symbol:e,featureType:t}}}hideObjects(e){super.hideObjects(e),this._staticFeaturesLayer.hideObjects(e)}showObjects(e){super.showObjects(e);const t=e.filter(e=>!this.hiddenStaticFeatureIds.has(e));this._staticFeaturesLayer.showObjects(t)}clearHiddenObjects(){super.clearHiddenObjects(),this._staticFeaturesLayer.clearHiddenObjects(),this._hideDynamicFeatures()}highlight(e){super.highlight(e),this._staticFeaturesLayer.highlight(e)}unHighlight(e){super.unHighlight(e),this._staticFeaturesLayer.unHighlight(e)}clearHighlighting(){super.clearHighlighting(),this._staticFeaturesLayer.clearHighlighting()}objectClickedHandler(e,t,i){return e[Bs]?this._staticFeaturesLayer.objectClickedHandler(e,t,i||this):e instanceof ol.Feature&&super.objectClickedHandler(e,t,i||this)}getGenericFeatureFromClickedObject(e){if(e instanceof ol.Feature)return super.getGenericFeatureFromClickedObject(e);const t=this._staticFeaturesLayer.getGenericFeatureFromClickedObject(e);return t.layerName=this.name,t.layerClass=this.className,t}determineHighlightStyle(e,t){const i=this.getFeatureById(e);return i||t instanceof ol.Feature?super.determineHighlightStyle(e,t):this._staticFeaturesLayer.determineHighlightStyle(e,t)}setMaximumScreenSpaceError(e){this._staticFeaturesLayer.setMaximumScreenSpaceError(e)}switchStaticFeatureToDynamic(e){return this.hiddenStaticFeatureIds.has(e)?Promise.resolve(this.getFeatureById(e)):this.injectedFetchDynamicFeatureFunc?this.injectedFetchDynamicFeatureFunc(e).then(t=>{const{features:i}=Fs(t,{targetProjection:J,defaultStyle:this.defaultStyle instanceof et?this.defaultStyle:tt});return this._staticFeaturesLayer.hideObjects([e]),this.hiddenStaticFeatureIds.add(e),this.addFeatures(i),i[0]}).catch(e=>{this.logger.error(e.message)}):Promise.reject(new Error("no injected fetching function"))}removeStaticFeature(e){this._staticFeaturesLayer.hideObjects([e]),this.hiddenStaticFeatureIds.add(e);const t=new ol.Feature;t.setId(e),t[ws]=Ts.STATIC,this.changeTracker.removeFeature(t)}dispose(){this.removeAllFeatures(),this._staticFeaturesLayer.dispose(),this.changeTracker.dispose(),super.dispose()}}var fa=pa;L.WIDGET_ACTIVATED="WIDGET_ACTIVATED",L.WIDGET_DEACTIVATED="WIDGET_DEACTIVATED",L.WIDGET_STATE_CHANGED="WIDGET_STATE_CHANGED";class ya extends oe{static getDefaultOptions(){return{supportedMaps:["ALL"]}}constructor(e){super(e);const t=ya.getDefaultOptions();this.supportedMaps=e.supportedMaps?e.supportedMaps:t.supportedMaps,this.initializeKey=null,this.initialized=!1,this.active=!1}initialize(){if(!this.initialized){if("ALL"===this.supportedMaps[0])return!0;const e=this.framework.getActiveMap();return this.isSupported(e)?(this.initializeKey&&this.framework.unsubscribeByKey(this.initializeKey),this.framework.subscribe(L.MAP_ACTIVATED,this.handleMapChangeEvent.bind(this)),!0):(this.initializeKey||(this.initializeKey=this.framework.subscribe(L.MAP_ACTIVATED,this.initialize.bind(this))),!1)}return!0}initializedFinished(){"ALL"!==this.supportedMaps[0]&&this.handleMapChangeEvent(this.framework.getActiveMap())}dispose(){}isActive(){return this.logger.deprecate("isActive","please use the property .active directly"),this.active}activate(){this.active||(this.active=!0,this.framework.publish(L.WIDGET_ACTIVATED,this))}deactivate(){this.active&&(this.active=!1,this.framework.publish(L.WIDGET_DEACTIVATED,this))}handleURLParameter(e){}getLink(e){}isSupported(e){a(e,[ue,String]);const t=e instanceof ue?e.className:e;return"ALL"===this.supportedMaps[0]||-1!==this.supportedMaps.indexOf(t)}getSupportedMaps(){return this.supportedMaps}handleMapChangeEvent(e){this.isSupported(e)?this.framework.publish(L.WIDGET_STATE_CHANGED,this):(this.framework.publish(L.WIDGET_STATE_CHANGED,this),this.deactivate())}isInitialized(){return this.logger.deprecate("isInitialized","access the initialized property directly."),this.initialized}}var _a=ya;const va=v.getLogger("vcs.vcm.widgets.legend.TreeItem"),La={ACTIVE:"active",INACTIVE:"inactive",LOADING:"loading",INDETERMINATE:"indeterminate"};class Ma{constructor(e){this.className=e.className,this.titleObject=e.title,this.infoUrl=e.infoUrl?e.infoUrl:null,this.infoUrlTarget=e.infoUrlTarget?e.infoUrlTarget:null,this.viewpointName=e.viewpointName?e.viewpointName:null,this.level=0,this.visible=!1,this.disabled=!1,this.id=e.name||Object(c["c"])(),this.focus=!1,this.initialized=!1,this.showInLegendIfDisabled=Object(c["e"])(e.showInLegendIfDisabled,!0),this.icon=e.icon||null}initialize(e){return this.initialized||(this.level=e),!0}isIconManagerInUse(){return!1}isInitialized(){return va.deprecate("isInitialized","access the property .initialized directly."),this.initialized}activate(e,t){return Promise.resolve()}mapChanged(e){}layerChanged(e){}getViewPoint(){return va.deprecate("getViewPoint","use goToViewpoint instead or access the .viewpointName property."),this.viewpointName?j.getInstance().getViewPointByName(this.viewpointName):null}gotoViewpoint(){if(this.viewpointName){const e=j.getInstance(),t=e.getViewPointByName(this.viewpointName);t&&e.getActiveMap().gotoViewPoint(t)}}}var ba=Ma;class wa extends ba{constructor(e){if(super(e),this.factory=e.factory,this.startopen=Object(c["e"])(e.startOpen,!1),this.clickable=Object(c["e"])(e.clickable,!0),this.open=this.startopen,this.children=[],this.state=La.INACTIVE,Array.isArray(e.children)){const t=e.children;for(let e=0;e<t.length;e++){const i=t[e],s=this.factory(i);s&&s instanceof ba&&this.children.push(s)}if(e.clusterIcons){const i=[],s=e=>{e.children?e.children.forEach(s):i.push({name:e.layerName,title:e.title,parent:{id:this.id,title:this.titleObject}})};if(t.forEach(s),"string"===typeof e.clusterIcons){const t=j.getInstance(),s=t.getLayerByName(e.clusterIcons);s&&s instanceof $n?s.addLayers(i):t.addLayer(new $n({name:e.clusterIcons,clusterLayers:i,activeOnStartup:!0}))}}}}initialize(e){if(!this.initialized){if(!super.initialize(e))return!1;const t=[];this.children.forEach((e,i)=>{e.initialize(this.level+1)||t.push(i)});for(let e=t.length-1;e>-1;e--)this.children.splice(t[e],1)}return!0}setState(){if(this.visible){let e=null;const t=t=>{t.visible&&t.state&&(e?e===La.ACTIVE||e===La.INACTIVE?e!==t.state&&(e=t.state===La.LOADING?t.state:La.INDETERMINATE):e===La.INDETERMINATE&&t.state===La.LOADING&&(e=t.state):e=t.state)};this.children.forEach(t),this.state=e}}activate(e,t){const i=this.children.map(t=>t.activate(e,!0));return this.setState(),e&&!t&&this.gotoViewpoint(),Promise.all(i)}mapChanged(e){this.children.forEach(t=>{t.mapChanged(e)},this),this.visible=!!this.children.find(e=>e.visible),this.setState()}layerChanged(e){this.children.forEach(t=>{t.layerChanged(e)},this),this.visible=!!this.children.find(e=>e.visible),this.setState()}}var Ta=wa;class Sa extends Ta{static get className(){return"vcs.vcm.widgets.legend.ClusterItem"}constructor(e){e.className=Sa.className,super(e),this.startopen=!0,this.clickable=!1,this.open=!0,this.breakAfter=!!e.breakAfter}}var Ca=Sa;const Ea=v.getLogger("vcs.vcm.widgets.legend.LayerItem");class Ia extends ba{constructor(e){super(e),this.layerName=e.layerName?e.layerName:"",this.state=La.INACTIVE,this.activeStyleName=null,this.hasFeatureListView=!1,this._styleListener=null}initialize(e){if(!this.initialized){if(!super.initialize(e))return!1;const t=j.getInstance().getLayerByName(this.layerName);if(!t)return Ea.warning(`Could not find Layer with name ${this.layerName} Legend LayerItem for layer ${this.layerName} is not shown`),this.visible=!1,!1;this.activeStyleName=t.style?t.style.name:null,this._styleListener=t.styleChanged.addEventListener(this._styleChangedHandler,this),this.initialized=!0}return!0}_styleChangedHandler(e){this.activeStyleName!==e.name&&(this.activeStyleName=e.name)}layerChanged(e){e.name===this.layerName&&this.setState()}mapChanged(e){const t=j.getInstance().getLayerByName(this.layerName);t&&(this.visible=t.isSupported(e),this.setState())}setState(){if(this.visible){const e=j.getInstance().getLayerByName(this.layerName);e&&(e.active?this.state=La.ACTIVE:e.loading?this.state=La.LOADING:this.state=La.INACTIVE)}}activate(e,t){const i=j.getInstance().getLayerByName(this.layerName);if(i&&i.isSupported()&&(i.active||i.loading)!==e){let s=Promise.resolve();return e?(this.state=La.LOADING,s=i.activate()):i.deactivate(),s.then(()=>{this.setState(),e&&!t&&this.gotoViewpoint()}).catch(()=>{this.visible=!1})}return Promise.resolve()}isIconManagerInUse(){const e=j.getInstance().getLayerByName(this.layerName);return e&&e.iconManagerInUse}destroy(){this._styleListener&&(this._styleListener(),this._styleListener=null)}}var ka=Ia;const Da=v.getLogger("vcs.vcm.widgets.legend.LayerItem");class Oa extends ka{static get className(){return"vcs.vcm.widgets.legend.LayerItem"}constructor(e){e.className=Oa.className,super(e),this.availableStyles=e.availableStyles||[],e.styles&&(Da.deprecate("styles","define styles in the config and add their names as availableStyles, do not define them in the LayerItem config"),e.styles.forEach(e=>{e.name||("string"===typeof e.title?e.name=e.title:e.name=Object(c["c"])()),j.getInstance().addStyle(new gt(e)),this.availableStyles.push(e.name)}))}}var Pa=Oa;const Aa=v.getLogger("vcs.vcm.widgets.legend.GroupLayerItem");class xa extends ba{static get className(){return"vcs.vcm.widgets.legend.GroupLayerItem"}constructor(e){e.className=xa.className,super(e),this.layerNames=e.layerNames||e.layerName||[],e.layerName&&Aa.deprecate("option.layerName","Use option.layerNames instead"),this.state=La.INACTIVE,this.availableStyles=e.availableStyles||[]}initialize(e){if(!this.initialized){super.initialize(e);const t=j.getInstance(),i=[];let s;const r=this.layerNames.every(e=>{const r=t.getLayerByName(e);return r?(i.push(r),s?s=!(!r.style||r.style.name!==s)&&s:!1!==s&&(s=!!r.style&&r.style.name),this.activeStyleName=s,!0):(Aa.warning(`Could not find Layer with name ${e} Legend GroupLayerItem is not shown`),!1)});if(!r)return!1;this.visible=i.some(e=>e.isSupported()),this.state=i.every(e=>e.active||e.activeOnStartup)?La.ACTIVE:La.INACTIVE}return!0}activate(e,t){if(this.setState(),this.state!==La.ACTIVE&&e||!e){const i=j.getInstance();this.state=e?La.LOADING:La.INACTIVE;const s=this.layerNames.map(e=>i.getLayerByName(e)).map(t=>e?t.activate():(t.deactivate(),Promise.resolve()));return e&&!t&&this.gotoViewpoint(),Promise.all(s).then(()=>{this.state=La.INDETERMINATE,this.setState()})}return Promise.resolve()}setState(){const e=j.getInstance(),t=this.layerNames.map(t=>e.getLayerByName(t)).filter(e=>e.isSupported()).map(e=>e.active);(this.state!==La.LOADING||t.every(e=>e))&&(t.every(e=>e)?this.state=La.ACTIVE:t.some(e=>e)?this.state=La.INDETERMINATE:this.state=La.INACTIVE)}mapChanged(e){const t=j.getInstance();this.visible=this.layerNames.map(e=>t.getLayerByName(e)).some(t=>t.isSupported(e)),this.visible&&this.state===La.ACTIVE&&this.activate(!0)}layerChanged(e){if(this.visible&&this.layerNames.includes(e.name)){if(this.state===La.ACTIVE||this.state===La.LOADING)return void this.setState();const e=j.getInstance(),t=this.layerNames.map(t=>e.getLayerByName(t)).every(e=>e.initialized&&!e.active||!e.initialized&&!e.activeOnStartup);t&&this.setState()}}}var Ya=xa;class ja extends Ta{static get className(){return"vcs.vcm.widgets.legend.GroupItem"}constructor(e){e.className=ja.className,super(e)}}var Na=ja;class Fa extends ba{static get className(){return"vcs.vcm.widgets.legend.PluginItem"}constructor(e){e.className=Fa.className,super(e),this.name=e.name,this.id=e.id||bs()(),this.plugin=e.plugin,this.config=e.config||{},this.visible=!0}}var Ra=Fa;class Ha extends ba{static get className(){return"vcs.vcm.widgets.legend.ViewpointItem"}constructor(e){e.className=Ha.className,super(e),this.layerNames=e.layerNames||[]}initialize(e){if(!this.initialized){if(!super.initialize(e))return!1;this.viewpointName&&(this.visible=!!j.getInstance().getViewPointByName(this.viewpointName))}return!0}activate(e,t){return t||!e?Promise.resolve():(this.gotoViewpoint(),Promise.all(this.layerNames.map(e=>{const t=j.getInstance().getLayerByName(e);return t?t.activate():Promise.resolve()})))}}var Ga=Ha;class za extends ba{static get className(){return"vcs.vcm.widgets.legend.PlanningInstanceItem"}constructor(e){e.className=za.className,super(e),this.planningInstance=e.planningInstance,this.titleObject=this.planningInstance.name,this.visible=!0}}var Ba=za;const Va=v.getLogger("vcs.vcm.widgets.legend.PlanningClusterItem");let Ua;class Wa extends Ca{static get className(){return"vcs.vcm.widgets.legend.PlanningClusterItem"}constructor(e){if(Ua)return Va.warning("trying to instanciate PlanningClusterItem more then once!"),Ua;super(e),Ua=this}destroy(){Ua=void 0}}var qa=Wa;function Ja(){return Ua}class Ka extends ba{static get className(){return"vcs.vcm.widgets.legend.FlightInstanceItem"}constructor(e){e.className=Ka.className,super(e),this.flightInstance=e.flightName?j.getInstance().getFlightByName(e.flightName):e.flightInstance,this.titleObject=e.title||this.flightInstance.name,this.allowPlayer=Object(c["e"])(e.allowPlayer,!1),this.visible=!0}mapChanged(e){this.visible=e instanceof Pt}}var Za=Ka;const Qa=v.getLogger("vcs.vcm.widgets.legend.StyledLayerItem");class Xa extends ka{static get className(){return"vcs.vcm.widgets.legend.StyledLayerItem"}constructor(e){e.className=Xa.className,super(e),this.styleName=e.styleName}initialize(e){const t=super.initialize(e);if(t){const e=j.getInstance().getStyleByName(this.styleName);if(!e)return this.visible=!1,this.initialized=!1,Qa.warning(`cannot created styled layer item for layer ${this.layerName}. style ${this.styleName} cannot be found`),!1}return t}_styleChangedHandler(e){this.activeStyleName!==e.name&&(super._styleChangedHandler(e),this.setState())}setState(){this.activeStyleName===this.styleName||this.state===La.LOADING?super.setState():this.state=La.INACTIVE}activate(e,t){return super.activate(e,t).then(()=>{const e=j.getInstance().getLayerByName(this.layerName);e.setStyle(this.styleName)})}}var $a=Xa;L.LEGEND_INITIALIZED="LEGEND_INITIALIZED";const eo={[Ca.className]:Ca,[Pa.className]:Pa,[Ya.className]:Ya,[Na.className]:Na,[Ra.className]:Ra,[Ba.className]:Ba,[Ga.className]:Ga,[Za.className]:Za,[qa.className]:qa,[$a.className]:$a},to=v.getLogger("vcs.vcm.widgets.legend.Legend");function io(e){if(!e.type)return to.warning("Need a type to instanciate a Legend Entry"),null;const t=eo[e.type];return t?(e.factory=io,new t(e)):(to.warning("could not find constructor for "+e.type),null)}class so extends _a{static get className(){return"vcs.vcm.widgets.legend.Legend"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{children:[],zoomToFirstLayer:!1})}constructor(e){e.className=so.className,super(e);const t=so.getDefaultOptions();this.cluster=[],this.level=-1;const i=[];if(Array.isArray(e.children)){const t=e.children;for(let e=0;e<t.length;e++){const s=t[e];if(s.type&&s.type===Ca.className){const e=io(s);e&&e instanceof Ca&&this.cluster.push(e)}else i.push(s)}}if(i.length>0){const e=new Ca({children:i,factory:io});this.cluster.push(e)}this.layerTitles={};var s=function e(t){t.children?t.children.forEach(e,this):t.layerName&&(this.layerTitles[t.layerName]=t.titleObject)};this.cluster.forEach(s,this),this.zoomToFirstLayer=Object(c["e"])(e.zoomToFirstLayer,t.zoomToFirstLayer)}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;this.cluster.forEach((function(e){e.initialize(this.level)}),this);const t=this.framework.getActiveMap();this.cluster.forEach(e=>{e.mapChanged(t)},this),this.initialized=!0,this.framework.publish(L.LEGEND_INITIALIZED,this),this.framework.subscribe(L.MAP_ACTIVATED,this.mapChanged.bind(this)),this.framework.subscribe(L.LAYER_CHANGED,this.layerChanged.bind(this)),this.framework.subscribe(L.PLANNINGINSTANCES_CHANGED,this.layerChanged.bind(this,{}))}}handleURLParameter(e){if(this.zoomToFirstLayer&&e.layerToActivate){const i=Array.isArray(e.layerToActivate)?e.layerToActivate:[e.layerToActivate];var t=function e(t){if(t.children){const i=t.children.find(e);return i&&(t.open=!0,t.startopen=!0,(i instanceof Pa||i instanceof Ya)&&(i.level>0?t.focus=!0:i.focus=!0)),i}return t.layerNames?t.visible&&t.layerNames.every(e=>i.includes(e)):t.visible&&t.layerName&&i.includes(t.layerName)};this.cluster.find(t)}}mapChanged(e){this.cluster.forEach(t=>{t.mapChanged(e)},this)}layerChanged(e){this.cluster.forEach(t=>{t.layerChanged(e)},this)}resetLayer(){this.framework.getLayers().forEach(e=>{e.active!==e.activeOnStartup&&(e.activeOnStartup?e.activate():e.deactivate())})}getLayerTitle(e){return a(e,String),this.layerTitles[e]||null}findTreeItems(e){const t=[];function i(s){for(let r=0;r<s.length;r++)e(s[r])&&t.push(s[r]),s[r]instanceof Ta&&i(s[r].children)}return i(this.cluster),t}}var ro=so;L.PLANNING_OBJECT_SAVED="PLANNING_OBJECT_SAVED";const no={GLTF:"gltf",FEATURE_STORE:"featureStore",IMAGE:"image",DRAWING:"drawing",PROCESSING:"processing",TILED:"tiled"},ao={INITIALIZING:"initializing",CONVERTING:"converting",OPTIMIZING:"optimizing",READY:"ready",FAILED:"failed"};class oo{static get className(){return"vcs.vcm.widgets.planning.PlanningObject"}constructor(e){this.name=e.name?e.name:"think of something",this._id=e._id,this.planningInstanceId=e.planningInstanceId,this.type=e.type,this.created=e.created,this.lastUpdated=e.lastUpdated||null,this.allowPicking=e.allowPicking,this.status=e.status,this._onServiceUrl=e.url,this.serviceUrl=e.serviceUrl;const t=this.serviceUrl.clone();if(t.clearQueryParams(),this.url=e.url?t.extendPath("..",e.url).toString():null,this.inputFileUrl=null,e.inputFile){const e=this.serviceUrl.clone();e.addQueryParams({planningObjectId:this._id,planningId:this.planningInstanceId}),e.extendPath("input-file"),this.inputFileUrl=e.toString()}this.description=e.description,this.visible=Object(c["e"])(e.visibility,!0),this.supportedMaps=[],this.supported=!1,this.properties=e.properties||{}}initialize(){const e=j.getInstance().getActiveMap();this.handleMapChange(e)}getDefinition(){return{_id:this._id,planningId:this.planningInstanceId,name:this.name,description:this.description,type:this.type,visibility:this.visible,url:this.getDefinitionUrl()}}handleMapChange(e){this.isSupported(e)}isSupported(e){this.supported=0===this.supportedMaps.length||this.supportedMaps.indexOf(e.className)>-1}save(){const e=this.serviceUrl.clone().extendPath("edit-object");return G.a.post(e.toString(),this.getDefinition()).then(()=>{j.getInstance().publish(L.PLANNING_OBJECT_SAVED)})}delete(){const e=this.serviceUrl.clone().extendPath("delete-object");return G.a.post(e.toString(),{_id:this._id,planningId:this.planningInstanceId})}getDefinitionUrl(){return this._onServiceUrl}load(){}unload(){}hide(){this.visible=!1,this.unload()}show(){this.visible=!0}isPlaced(){return!0}zoomTo(){}destroy(){}getConfigObject(){return{url:this.url,attributes:{name:this.name,description:this.description}}}}var lo=oo;const co=["longitude","latitude","height","heading","pitch","roll","scale"],uo=v.getLogger("vcs.vcm.widgets.planning.PlanningObjectGltf");class ho extends lo{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectGltf"}constructor(e){super(e),this.planningInstanceGltfLayerName=e.planningInstanceGltfLayerName,this.latitude=e.modelMeta.latitude,this.longitude=e.modelMeta.longitude,this.height=null!=e.modelMeta.height?e.modelMeta.height:0,this.heading=e.modelMeta.heading,this.heading=this.heading>180?this.heading-360:this.heading,this.pitch=e.modelMeta.pitch,this.roll=e.modelMeta.roll,this.scale=e.modelMeta.scale,this.supportedMaps=["vcs.vcm.maps.Cesium"],this.entityId=null,this.loaded=Promise.resolve()}handleMapChange(e){if(super.handleMapChange(e),this.supported&&!this.entityId){const e=this.getModelLayer();this.entityId=e.addObject(this.getConfigObject())}}getModelLayer(){const e=j.getInstance().getLayerByName(this.planningInstanceGltfLayerName);return e}getDefinition(){const e=super.getDefinition(),t={};return co.forEach(e=>{t[e]=this[e]}),e.modelMeta=t,e}resetModelMatrix(){if(this.entityId){const e=this.getModelLayer();e.updateEntityById(this.entityId,this.getConfigObject())}}zoomTo(){this.isPlaced()&&this.getModelLayer().flyToEntity(this.entityId)}hide(){super.hide(),this.entityId&&this.getModelLayer().hideObjects([this.entityId])}show(){super.show(),this.entityId&&this.getModelLayer().showObjects([this.entityId])}setObjectOntoTerrain(){uo.deprecate("setObjectOntoTerrain","use vcs.vcm.maps.Cesium.getHeightFromTerrain with this object coordinates instead");const e=j.getInstance().getLayers(),t=e.find(e=>e instanceof Gn&&e.active);return Dt(t.cesiumTerrainProvider,[[this.longitude,this.latitude]]).then(e=>{this.height=e[0][2]})}isPlaced(){const e=[];return co.forEach(t=>{const i=this[t];-1===e.indexOf(i)&&e.push(i)}),!(0===e[0]&&1===e[1]&&2===e.length)}destroy(){this.entityId&&this.getModelLayer().removeObjectById(this.entityId)}getConfigObject(){const e=super.getConfigObject();return e.latitude=this.latitude,e.longitude=this.longitude,e.height=this.height,e.heading=this.heading,e.pitch=this.pitch,e.roll=this.roll,e.scale=this.scale,e.allowPicking=this.allowPicking,e.show=this.visible,e}}var mo=ho;class go extends lo{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectImage"}constructor(e){super(e),this.extent=[-.5,-.5,.5,.5],e.imageMeta.extent&&this._setExtent(e.imageMeta.extent);const{size:t}=e.imageMeta;this._size=t&&Array.isArray(t)&&2===t.length?t:null,this.opacity=e.imageMeta.opacity,this.credit=e.imageMeta.credit,this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"],this.editorId=e.editorId}get size(){return this._size?this._size.slice(0):null}load(){if(!this.getImageLayer()){const e=new qn({name:this._id,url:this.url,imageExtent:this.extent,opacity:this.opacity,credit:this.credit});j.getInstance().addLayer(e)}if(!this.size){const e=new Image;e.src=this.url,e.onload=()=>{this._size=[e.width,e.height]}}this.visible&&this.getImageLayer().activate()}unload(){const e=this.getImageLayer();e&&e.deactivate()}isPlaced(){return!this.extent.every(e=>.5===Math.abs(e))}getAspectRatio(){if(this.isPlaced()){const e=new Le({coordinates:this.extent,epsg:q.epsg});if(e.isValid()){const t=ol.extent.getSize(e.getCoordinatesInProjection(J));return t[1]/t[0]}}return this._size?this._size[1]/this._size[0]:null}getImageLayer(){const e=j.getInstance().getLayerByName(this._id);return e}getDefinition(){const e=super.getDefinition();return e.imageMeta={extent:this.extent,size:this.size,opacity:this.opacity,credit:this.credit},e}zoomTo(){if(this.isPlaced()){const e=j.getInstance().getActiveMap(),t=me.createViewPointFromExtent(this.extent);t.heading=0,t.pitch=-90,t.roll=0,e.gotoViewPoint(t)}}show(){super.show();const e=this.getImageLayer();e&&e.activate()}setOpacity(e){a(e,Number),this.opacity=e,this.getImageLayer().setOpacity(e)}setExtent(e,t){a(e,[Number]),a(e.length,4),o(t,W);const i=this._setExtent(e,t);i.isValid()&&this.getImageLayer().setExtent(this.extent)}_setExtent(e,t){let i=t?t.epsg:void 0;if(!i){const t=ol.extent.containsExtent(Le.WGS_84_EXTENT,e);i=t?"EPSG:4326":i}const s=new Le({coordinates:e,epsg:i});return s.isValid()&&s.getCoordinatesInProjection(q,this.extent),s}destroy(){const e=this.getImageLayer();e&&e.dispose()}getConfigObject(){const e=super.getConfigObject();return e.extent=this.extent,e.credit=this.credit,e.opacity=this.opacity,e}}var po=go;class fo extends se{constructor(e){super(),this._onSelect=[],this._onCesiumSelect=[],this.featureMap=new Map,this.cesiumFeatureMap=new Map,this.state=e,this._defaultActive=X.CLICK,this._defaultModificationKey=Q.NONE,this.modificationKey=this._defaultModificationKey,this.maintainSelection=!1,this.setActive(!1)}pipe(e){return e.feature&&e.feature[this.state.featureTypeSymbol]&qi.EDITABLE&&!(e.feature[this.state.featureTypeSymbol]&qi.EDITING)?(e.key&Q.NONE?this.selectFeature(e.feature):e.key&Q.CTRL&&this.selectionSetClick(e.feature),e.stopPropagation=!(this.state.mode&Wi.PROPAGATEONSELECT)):e.key&Q.NONE&&(!e.feature||!e.feature[this.state.featureTypeSymbol]&&this.state.mode&(Wi.EDIT|Wi.SELECT))&&this.state.selectedFeatures>0&&this.clearSelectionSet(),Promise.resolve(e)}setActive(e){super.setActive(e),this.maintainSelection=!1}hasMultiSelect(){this._defaultModificationKey&Q.CTRL||(this._defaultModificationKey|=Q.CTRL,this.setModification())}selectFeature(e){this.state.mode&Wi.TRANSLATE&&this.featureMap.has(e.getId())||(this.clearSelectionSet(!0),e[Bs]?(this.cesiumFeatureMap.set(e.getId(),e),this.state.selectedCesiumFeatures=this.cesiumFeatureMap.size,this.state.selectedFeatures=this.featureMap.size+this.cesiumFeatureMap.size,this._setState(e),this._cesiumCb()):(this.featureMap.set(e.getId(),e),this.state.selectedFeatures=this.featureMap.size+this.cesiumFeatureMap.size,this._setState(e)),this._cb())}_setState(e){if(e){this.state.selectedFeatureId=e.getId(),this.state.layerName=e[Et.vcsLayerNameSymbol];const t=e.getProperty("olcs_classificationType");t&&Qi[t]?this.state.classificationType=Qi[t]:this.state.classificationType=this.state.defaultClassificationType;const i=e.getProperty("olcs_altitudeMode");if(i&&Zi[i]){const e=Zi[i];this.state.altitudeMode&Ki.ZPLANE&&e&Ki.ABSOLUTE||(this.state.altitudeMode=e)}else this.state.altitudeMode=this.state.defaultAltitudeMode}else this.state.altitudeMode=this.state.defaultAltitudeMode,this.state.classificationType=this.state.defaultClassificationType,this.state.selectedCesiumFeatures=0,this.state.selectedFeatures=0,this.state.selectedFeatureId=null}selectionSetClick(e,t){const i=e.getId(),s=!e[Bs],r=s?this.featureMap.delete(i):this.cesiumFeatureMap.delete(i);r||(s?this.featureMap.set(i,e):this.cesiumFeatureMap.set(i,e)),r?r&&i===this.state.selectedFeatureId&&(this.featureMap.size?this._setState(this.featureMap.values().next().value):this.cesiumFeatureMap.size?this._setState(this.cesiumFeatureMap.values().next().value):this._setState()):(s&&1===this.featureMap.size&&!this.cesiumFeatureMap.size||!s&&1===this.cesiumFeatureMap.size&&!this.featureMap.size)&&this._setState(e),this.state.selectedFeatures=this.featureMap.size+this.cesiumFeatureMap.size,this.state.selectedCesiumFeatures=this.cesiumFeatureMap.size,t||(s?this._cb():this._cesiumCb())}clearCesiumSelectionSet(){const e=!!this.cesiumFeatureMap.size;this.cesiumFeatureMap.has(this.state.selectedFeatureId)&&(this.featureMap.size?this._setState(this.featureMap.values().next().value):this._setState()),this.state.selectedCesiumFeatures=0,this.cesiumFeatureMap.clear(),e&&this._cesiumCb()}clearSelectionSet(e){this.featureMap.clear(),this.clearCesiumSelectionSet(),this._setState(),e||this._cb()}onSelect(e){a(e,Function),this._onSelect.push(e)}onCesiumSelect(e){a(e,Function),this._onCesiumSelect.push(e)}_cb(){for(let e=0;e<this._onSelect.length;e++)this._onSelect[e]()}_cesiumCb(){for(let e=0;e<this._onCesiumSelect.length;e++)this._onCesiumSelect[e]()}}var yo=fo;const _o={selectShift:Wi.SELECT|Q.SHIFT,selectAlt:Wi.SELECT|Q.ALT,selectCtrl:Wi.SELECT|Q.CTRL,editShift:Wi.EDIT|Q.SHIFT,editAlt:Wi.EDIT|Q.ALT},vo={auto:"auto",scaleNESW:"nesw-resize",scaleNWSE:"nwse-resize",rotate:"crosshair",translate:"move",select:"pointer",edit:"pointer",translateVertex:"move",removeVertex:"pointer",insertVertex:"cell",addToSelection:"cell",removeFromSelection:"not-allowed"};class Lo extends se{constructor(e){super(),this._lastFeature=null,this.features=e.features,this.cesiumFeatures=e.cesiumFeatures,this.state=e.state,this.cursorStyle=j.getInstance().getMapContainer().style,this._keyDown={[Q.SHIFT]:!1,[Q.ALT]:!1,[Q.CTRL]:!1},this.modifier=0,this.boundKeyListener=this._keyListener.bind(this),this.eventEmitter=vs().eventEmitter,this.hasMultiSelect=!1,this.screenSpaceCameraController=null,this.originalScreenSpaceEvents={lookEventTypes:[],tiltEventTypes:[],rotateEventTypes:[]},this.dragPanInteraction=null,this._defaultActive=X.MOVE,this._defaultModificationKey=Q.ALL,this.modificationKey=this._defaultModificationKey,this.setActive(!1)}pipe(e){return e.feature&&e.feature[this.state.featureTypeSymbol]?(this.screenSpaceCameraController?e.feature[this.state.featureTypeSymbol]&(qi.VERTEX|qi.HEIGHTVERTEX)||this.state.mode&Wi.TRANSLATE&&e.feature[this.state.featureTypeSymbol]&qi.EDITABLE?(this.screenSpaceCameraController.lookEventTypes=void 0,this.screenSpaceCameraController.tiltEventTypes=void 0,this.screenSpaceCameraController.rotateEventTypes=void 0):(this.screenSpaceCameraController.lookEventTypes=this.originalScreenSpaceEvents.lookEventTypes,this.screenSpaceCameraController.tiltEventTypes=this.originalScreenSpaceEvents.tiltEventTypes,this.screenSpaceCameraController.rotateEventTypes=this.originalScreenSpaceEvents.rotateEventTypes):this.dragPanInteraction&&(this.state.mode&(Wi.SCALE|Wi.ROTATE|Wi.TRANSLATE)&&e.feature[this.state.featureTypeSymbol]&(qi.VERTEX|qi.HEIGHTVERTEX)||this.state.mode&Wi.TRANSLATE&&e.feature[this.state.featureTypeSymbol]&qi.EDITABLE?this.dragPanInteraction.setActive(!1):this.dragPanInteraction.setActive(!0)),this.eventEmitter.setActive(!1),this._lastFeature=e.feature,this._evaluate()):(this.eventEmitter.setActive(),this._lastFeature=null,this.reset()),Promise.resolve(e)}setActive(e){super.setActive(e),this.active?(window.addEventListener("keydown",this.boundKeyListener),window.addEventListener("keyup",this.boundKeyListener)):(window.removeEventListener("keydown",this.boundKeyListener),window.removeEventListener("keyup",this.boundKeyListener)),this.cursorStyle.cursor=vo.auto}reset(){this.cursorStyle.cursor=vo.auto,this.screenSpaceCameraController&&(this.screenSpaceCameraController.lookEventTypes=this.originalScreenSpaceEvents.lookEventTypes,this.screenSpaceCameraController.tiltEventTypes=this.originalScreenSpaceEvents.tiltEventTypes,this.screenSpaceCameraController.rotateEventTypes=this.originalScreenSpaceEvents.rotateEventTypes),this.dragPanInteraction&&this.dragPanInteraction.setActive(!0)}handleMapChange(e){function t(e){return Array.isArray(e)?e.slice():"object"===typeof e?Object.assign({},e):e}if(e instanceof Pt)this.dragPanInteraction=null,this.screenSpaceCameraController=e.getScene().screenSpaceCameraController,["lookEventTypes","tiltEventTypes","rotateEventTypes"].forEach(e=>{null!=this.screenSpaceCameraController[e]&&(this.originalScreenSpaceEvents[e]=t(this.screenSpaceCameraController[e]))});else{this.screenSpaceCameraController=null;const t=e.olMap;t.getInteractions().forEach(e=>{e instanceof ol.interaction.DragPan&&(this.dragPanInteraction=e)})}}_evaluate(){if(this._lastFeature){const e=this.state.mode|this.modifier|this._lastFeature[this.state.featureTypeSymbol];if(e&qi.VERTEX)return(e&_o.selectShift)===_o.selectShift||(e&_o.selectAlt)===_o.selectAlt||e&Wi.SCALE?void(this.cursorStyle.cursor=1===this._lastFeature[lr]||3===this._lastFeature[lr]?vo.scaleNWSE:vo.scaleNESW):(e&_o.selectCtrl)===_o.selectCtrl||e&Wi.ROTATE?void(this.cursorStyle.cursor=vo.rotate):(e&_o.editShift)===_o.editShift&&!this.state.onlyAllowTranslation||e&Wi.REMOVEVERTEX?void(this.cursorStyle.cursor=vo.removeVertex):(e&_o.editAlt)===_o.editAlt||e&Wi.TRANSLATEVERTEX?void(this.cursorStyle.cursor=vo.translateVertex):void(this.cursorStyle.cursor=vo.auto);if(e&qi.EDITABLE){const t=this.features.has(this._lastFeature.getId())||this.cesiumFeatures.has(this._lastFeature.getId());return t&&(e&_o.selectAlt)===_o.selectAlt?void(this.cursorStyle.cursor=vo.translate):e&Wi.FEATUREMODES&&e&Q.CTRL&&this.hasMultiSelect?void(this.cursorStyle.cursor=t?vo.removeFromSelection:vo.addToSelection):e&Wi.GEOMETRYMODES&&e&Q.CTRL&&!t&&this.hasMultiSelect?void(this.cursorStyle.cursor=vo.addToSelection):e&Wi.TRANSLATE?void(this.cursorStyle.cursor=vo.translate):e&Wi.EDIT&&t&&this.state.onlyAllowTranslation?void(this.cursorStyle.cursor=vo.auto):void(this.cursorStyle.cursor=vo.select)}}this.cursorStyle.cursor=vo.auto}_keyListener(e){let t=!1,i={};i=Object.assign(i,this._keyDown),this._keyDown[Q.ALT]=e.altKey,this._keyDown[Q.CTRL]=e.ctrlKey,this._keyDown[Q.SHIFT]=e.shiftKey,"Shift"!==e.key&&"Alt"!==e.key||(e.preventDefault(),e.stopPropagation());const s=[Q.ALT,Q.CTRL,Q.SHIFT];for(let r=0;r<3;r++)if(t=i[s[r]]!==this._keyDown[s[r]],t){this.modifier=this._keyDown[s[r]]?s[r]:0,this._evaluate();break}}}var Mo=Lo;const bo=v.getLogger("vcs.vcm.util.editor.AbstractLayerEditor"),wo={};function To(e){return wo[e]}const So=new et({fill:{color:"#E8514C"}});class Co extends ir{get className(){return"vcs.vcm.util.editor.AbstractLayerEditor"}constructor(e){super(e),this.id=Object(c["c"])(),this.convertStaticOnClick=Object(c["e"])(e.convertStaticOnClick,!0),this.defaultMode=Wi.SELECT,this.layers={},this.editingFeature=null,this._listeners=[],this.eventHandler=vs(),this._interactionRemover=null,this._pullPickedPosition=null!=e.pullPickedPosition?e.pullPickedPosition:.05,this.parent?(this.parent=this.parent,this.selectFeatureInteraction=this.parent.selectFeatureInteraction,this.features=this.selectFeatureInteraction.featureMap,this.mouseOverInteraction=this.parent.mouseOverInteraction):(this.selectFeatureInteraction=new yo(this.state),this.interactionChain.addInteraction(this.selectFeatureInteraction),this.features=this.selectFeatureInteraction.featureMap,this.mouseOverInteraction=new Mo({cesiumFeatures:this.selectFeatureInteraction.cesiumFeatureMap,features:this.features,state:this.state}),this.interactionChain.addInteraction(this.mouseOverInteraction)),wo[this.id]=this}initialize(){super.initialize();const e=j.getInstance();e.getLayerByName(this.scratchLayer.name)||e.addLayer(this.scratchLayer),this.selectFeatureInteraction.onSelect(this.onSelect.bind(this)),this.selectFeatureInteraction.onCesiumSelect(this.onCesiumSelect.bind(this))}onSelect(){}onCesiumSelect(){if(!this.parent&&this.state.isFeatureStore&&this.activeLayer)if(this.convertStaticOnClick&&this.selectFeatureInteraction.cesiumFeatureMap.size)this.switchToDynamic();else{this.activeLayer.clearHighlighting();const e={};this.selectFeatureInteraction.cesiumFeatureMap.forEach((t,i)=>{e[i]=So}),this.activeLayer.highlight(e)}}switchToDynamic(){if(this.activeLayer instanceof fa&&this.activeLayer.injectedFetchDynamicFeatureFunc){const e=[];return this.selectFeatureInteraction.cesiumFeatureMap.forEach((t,i)=>{e.push(this.activeLayer.switchStaticFeatureToDynamic(i))}),this.selectFeatureInteraction.clearCesiumSelectionSet(),Promise.all(e).then(e=>{e.forEach(e=>{this.selectFeatureInteraction.selectionSetClick(e)})})}return Promise.resolve()}setAltitudeMode(e){return this.parent||(0===this.features.size&&(this.state.defaultAltitudeMode=e),this.state.altitudeMode=e,this._setPickingBehaviour()),Promise.resolve()}activate(){if(super.activate(),this._interactionRemover||(this._interactionRemover=this.eventHandler.addExclusiveInteraction(this.interactionChain,this.deactivate.bind(this),void 0,this.state.exclusiveId)),!this.parent){const e=j.getInstance();this._setPickingBehaviour();const t=e.getActiveMap();this.state.activeMap!==t.className&&this.handleMapChange(t)}}deactivate(){super.deactivate(),this.eventHandler.featureInteraction.setActive(),this.eventHandler.eventEmitter.setActive(),null!=this._interactionRemover&&(this._interactionRemover(),this._interactionRemover=null),this.mouseOverInteraction&&this.mouseOverInteraction.reset(),this.obliqueImageSubscriptionKey&&(j.getInstance().unsubscribeByKey(this.obliqueImageSubscriptionKey),this.obliqueImageSubscriptionKey=null)}beforeSetMode(e){super.beforeSetMode(e),this.state.active||(this.parent?bo.warning("Trying to set mode on inactive child, set mode on the parent"):this.activate())}setMode(e){bo.debug(`AbstractLayerEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`),super.setMode(e),this.parent||(e&Wi.NONE&&this.selectFeatureInteraction.clearSelectionSet(!0),this._setPickingBehaviour())}_setPickingBehaviour(){if(this.state.mode&Wi.GEOMETRYMODES&&this.features.size?this.eventHandler.featureInteraction.hitTolerance=2:this.eventHandler.featureInteraction.hitTolerance=10,this.state.mode&Wi.CREATE){E.getInstance().deactivateClickBehavior(),this.mouseOverInteraction.setActive(!1),this.mouseOverInteraction.cursorStyle.cursor=vo.edit,this.selectFeatureInteraction.setActive(!1),this.eventHandler.eventEmitter.setActive(!1);const e=this.state.altitudeMode&Ki.CLAMP&&this.state.classificationType===Qi.terrain;e?(this.eventHandler.featureInteraction.setActive(),this.eventHandler.featureInteraction.pickPosition=X.NONE):(this.eventHandler.featureInteraction.setActive(X.CLICKMOVE),this.eventHandler.featureInteraction.pickPosition=X.CLICKMOVE,this.eventHandler.featureInteraction.pullPickedPosition=this._pullPickedPosition)}else if(this.state.mode&Wi.NONE)E.getInstance().activateClickBehavior(),this.eventHandler.featureInteraction.setActive(),this.eventHandler.eventEmitter.setActive(),this.eventHandler.featureInteraction.hitTolerance=10,this.mouseOverInteraction.setActive(!1);else{E.getInstance().deactivateClickBehavior(),this.eventHandler.featureInteraction.setActive(X.ALL),this.mouseOverInteraction.cursorStyle.cursor=vo.auto,this.state.mode&Wi.TRANSLATE?this.selectFeatureInteraction.setActive(X.CLICK|X.DRAGSTART):this.selectFeatureInteraction.setActive(),this.mouseOverInteraction.setActive();const e=this.state.altitudeMode&Ki.ABSOLUTE||this.state.altitudeMode&Ki.CLAMP&&this.state.classificationType!==Qi.terrain;this.state.mode&Wi.EDIT&&e?(this.eventHandler.featureInteraction.pickPosition=X.DRAGEVENTS|X.CLICK,this.eventHandler.featureInteraction.pullPickedPosition=this._pullPickedPosition):this.state.mode&Wi.TRANSLATEVERTEX&&e?(this.eventHandler.featureInteraction.pickPosition=X.CLICKMOVE,this.eventHandler.featureInteraction.pullPickedPosition=this._pullPickedPosition):this.eventHandler.featureInteraction.pickPosition=0}}_setFeatureEditable(e){if(!e[this.state.featureTypeSymbol]){e[this.state.featureTypeSymbol]=qi.EDITABLE;const t=e.getGeometry();if(t&&"XY"===t.getLayout()){const e=t.getCoordinates(),i=$t(t,e);i.forEach(e=>{e[2]=0}),t.setCoordinates(e,"XYZ")}}}addEditingLayer(e){if(a(e,ss),this.activeLayer=e,!this.parent){e.getFeatures().forEach(e=>{this._setFeatureEditable(e)}),this.state.layerName=e.name,this.state.defaultClassificationType=Qi[e.classificationType]||Qi.terrain,this.state.classificationType=this.state.defaultClassificationType,this.state.defaultAltitudeMode="absolute"===e.altitudeMode?Ki.ABSOLUTE:Ki.CLAMP;const t=[];if(t.push(e.source.on("addfeature",({feature:e})=>{this._setFeatureEditable(e)})),t.push(e.source.on("removefeature",({feature:e})=>{this.features.has(e.getId())&&this.selectFeatureInteraction.selectionSetClick(e),delete e[this.state.featureTypeSymbol]})),e instanceof fa){e.setEditing(this.state.featureTypeSymbol,qi.EDITABLE),this.state.isFeatureStore=!0;const t="vcs.vcm.util.editor.CompositeLayerEditor"===this.getRootEditor().className?!!this.getRootEditor().getFeatureLayerEditor():"vcs.vcm.util.editor.FeatureLayerEditor"===this.getRootEditor().className;this.state.canSwitchToDynamic=!!e.injectedFetchDynamicFeatureFunc&&t}else this.state.isFeatureStore=!1,this.state.canSwitchToDynamic=!1;this.layers[e.name]=t}}removeEditingLayer(e){a(e,ss),e.getFeatures().forEach(e=>{delete e[this.state.featureTypeSymbol]}),this.activeLayer instanceof fa&&(this.activeLayer.setEditing(this.state.featureTypeSymbol),this.state.isFeatureStore=!1,this.state.canSwitchToDynamic=!1);const t=this.layers[e.name]||[];t.forEach(e=>{ol.Observable.unByKey(e)}),delete this.layers[e.name],this.activeLayer=null,this.state.layerName=null}handleMapChange(e){if(!this.parent){this.state.activeMap=e.className;const t=j.getInstance();this.obliqueImageSubscriptionKey&&(t.unsubscribeByKey(this.obliqueImageSubscriptionKey),this.obliqueImageSubscriptionKey=null),e instanceof Ti&&(this.obliqueImageSubscriptionKey=t.subscribe("OBLIQUE_IMAGE_CHANGED",()=>{if(this.state.active)if(this.selectFeatureInteraction.active)this.selectFeatureInteraction.clearSelectionSet();else if(this.state.mode&Wi.CREATE){const e=this.activeLayer.getImplementation(t.getActiveMap());if(e.synchronizing){const t=e.synchronizeEvent.addEventListener(()=>{t(),this.selectFeatureInteraction.clearSelectionSet()})}}})),this.selectFeatureInteraction.featureMap.size&&(this.isOblique||e instanceof Ti)&&(this.state.mode&Wi.CREATE?this.getRootEditor().setMode(Wi.NONE):this.selectFeatureInteraction.clearSelectionSet())}super.handleMapChange(e)}destroy(){super.destroy(),Object.keys(this.layers).forEach(e=>{const t=j.getInstance().getLayerByName(e);t&&t instanceof ss&&this.removeEditingLayer(t)}),null!=this.obliqueImageSubscriptionKey&&j.getInstance().unsubscribeByKey(this.obliqueImageSubscriptionKey),delete wo[this.id]}clearSelectionSet(e){this.selectFeatureInteraction.clearSelectionSet(e)}}var Eo=Co;const Io=new et({});Io.style=new ol.style.Style({fill:new ol.style.Fill({color:"rgba(200, 200, 200, 0.5)"}),stroke:new ol.style.Stroke({color:"rgb(200, 200, 200)",width:2}),image:new ol.style.Circle({fill:new ol.style.Fill({color:"rgba(200, 200, 200, 0.5)"}),stroke:new ol.style.Stroke({color:"rgb(200, 200, 200)",width:2}),radius:5})});const ko={};class Do extends lo{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectDrawing"}constructor(e){e.className=Do.className,super(e),this.loaded=null,this.greyed=!1,this.original=null,this.editorId=e.editorId;const t=new ss({name:this._id,projection:J.getConfigObject(),genericFeatureProperties:{planningName:this.name,planningDescription:this.description}});j.getInstance().addLayer(t),t.getSource().on("addfeature",({feature:e})=>{e.get("title")||e.set("title",this.name,!0),e.get("description")||e.set("description",this.description,!0)})}save(){const e=To(this.editorId);return e.state.active&&e.setMode(Ji.none),this.original=this._writeToGeoJSON(),super.save()}load(){!this.loaded&&this.url?this.loaded=G.a.get(this.url).then(({data:e})=>{this.original=e,this._setFeaturesFromGeoJSON()}):this.loaded=Promise.resolve(),this.loaded.then(()=>{this.getDrawingLayer()||(j.getInstance().addLayer(new ss({name:this._id,projection:J.getConfigObject()})),this._setFeaturesFromGeoJSON())}).then(()=>{this.visible&&this.getDrawingLayer().activate()})}unload(){const e=this.getDrawingLayer();e&&this.getDrawingLayer().deactivate()}_setFeaturesFromGeoJSON(){const e=this.getDrawingLayer(),{features:t,style:i}=Fs(this.original,{dynamicStyle:!0,readLegacyStyleOptions:!0});e.addFeatures(t),i&&e.setStyle(i);const s=()=>{const e=t.filter(e=>"clampToGround"===e.get("olcs_altitudeMode")&&e.get("olcs_extrudedHeight")&&e.get("olcs_extrudedHeight")>0);e.forEach(e=>{ii(e).then(()=>{e.set("olcs_altitudeMode","absolute")})})};if("vcs.vcm.maps.Cesium"===j.getInstance().getActiveMap().className)s();else{const e=j.getInstance().subscribe("MAP_ACTIVATED",t=>{"vcs.vcm.maps.Cesium"===t.className&&(s(),j.getInstance().unsubscribeByKey(e))})}}_writeToGeoJSON(){const e=this.getDrawingLayer(),t={asObject:!0,writeStyle:!0,embedIcons:!0};return Hs({features:e.getFeatures(),vcsMeta:e.getVcsMeta(t)},t)}getDrawingLayer(){return j.getInstance().getLayerByName(this._id)}zoomTo(){const e=this.getDrawingLayer();if(e.getFeatures().length>0){const t=e.source.getExtent(),i=W.getTransformer(q,J);i(t,t,2);const s=me.createViewPointFromExtent(t);j.getInstance().getActiveMap().gotoViewPoint(s)}}greyOut(){const e=this.getDrawingLayer();this.loaded&&e.active&&!this.greyed&&(ko[this._id]=e.style,e.setStyle(Io),this.greyed=!0)}unGrey(){this.greyed&&ko[this._id]&&(this.getDrawingLayer().setStyle(ko[this._id]),this.greyed=!1)}show(){super.show(),this.getDrawingLayer().activate()}setDrawing(e){const t=To(this.editorId);e?t.addEditingLayer(this.getDrawingLayer()):t.removeEditingLayer(this.getDrawingLayer())}getDefinition(){const e=super.getDefinition();return e.geoJSON=this._writeToGeoJSON(),e}reset(){this.getDrawingLayer().removeAllFeatures(),this._setFeaturesFromGeoJSON()}destroy(){this.getDrawingLayer().removeAllFeatures(),this.getDrawingLayer().dispose()}}var Oo=Do;const Po=v.getLogger("vcs.vcm.widgets.planning.PlanningObjectProcessing");class Ao extends lo{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectProcessing"}constructor(e){e.className=Ao.className,super(e),this.description=e.stdoutMsgs&&Array.isArray(e.stdoutMsgs)?e.stdoutMsgs.join("\n"):"",this._pollingInterval=null}load(){this._observeStatus()}unload(){clearInterval(this._pollingInterval),this._pollingInterval=null}observeStatus(){Po.deprecate("observeStatus","Use load to start polling the status & unload to stop."),this._observeStatus()}_observeStatus(){null!=this._pollingInterval&&clearInterval(this._pollingInterval),this._pollingInterval=window.setInterval(()=>{const e=this.serviceUrl.clone().extendPath("get-object-status",this._id);G.a.post(e.toString()).then(e=>{if(this.status=e.data,this.status===ao.FAILED||this.status===ao.READY){const e=j.getInstance().getWidgetByType("vcs.vcm.widgets.Planning").planningInstances.find(e=>e._id===this.planningInstanceId);return e.updatePlanningObject(this).then(()=>{this.destroy()})}return Promise.resolve()}).catch(e=>{if(e.response&&e.response.data&&"notFound"===e.response.data.error){const e=j.getInstance().getWidgetByType("vcs.vcm.widgets.Planning").planningInstances.find(e=>e._id===this.planningInstanceId);e.updatePlanningObjects()}else Po.error(`Could not update PlanningObject ${this._id}, polling is stopped Error: ${e.toString()}`),this.destroy()})},1e4)}destroy(){clearInterval(this._pollingInterval),this._pollingInterval=null}}var xo=Ao;const Yo=v.getLogger("vcs.vcm.widgets.planning.PlanningObjectFeatureStore");class jo extends lo{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectFeatureStore"}constructor(e){super(e),this.loaded=null,this.featureStoreUrl=this.serviceUrl.clone(),this.featureStoreUrl.extendPath("feature-store"),this.featureStoreUrl.addQueryParams({planningId:this.planningInstanceId,planningObjectId:this._id}),this.layerId=e.layerId,this.editorId=e.editorId,this.trackerValues={},this.terrainUrl=e.terrainUrl,this._balloonTemplate=e.balloonTemplate||"",this._pollingInterval=null}get balloonTemplate(){return this._balloonTemplate}set balloonTemplate(e){this._balloonTemplate=e;const t=j.getInstance().getWidgetByType("vcs.vcm.widgets.BalloonInfo");if(t)if(this._balloonTemplate&&""!==this._balloonTemplate)if(t.layerNamesToBalloonTypes[this.layerId]){const e=t.balloonTypes[t.layerNamesToBalloonTypes[this.layerId]];e.template=this._balloonTemplate}else t.addTypeForLayer(this.layerId,this._balloonTemplate);else delete t.layerNamesToBalloonTypes[this.layerId]}get name(){return this._name}set name(e){this._name=e;const t=this.getLayer();t&&t.addGenericFeatureProperties({planningName:e})}get description(){return this._description}set description(e){this._description=e;const t=this.getLayer();t&&t.addGenericFeatureProperties({planningDescription:e})}getLayer(){return j.getInstance().getLayerByName(this.layerId)}load(){if(this.status===ao.READY){if(!this.loaded){const e=this.featureStoreUrl.clone();e.extendPath("get-layer"),this.loaded=G.a.get(e.toString()).then(({data:e})=>{if(e.staticRepresentation&&e.staticRepresentation.threeDim){let t=""+this.serviceUrl.base;if(this.serviceUrl.path.length>1){const e=this.serviceUrl.path.slice(0,this.serviceUrl.path.length-1);t=`${t}/${e.join("/")}`}e.staticRepresentation.threeDim=`${t}/${e.staticRepresentation.threeDim}`;const i=this.featureStoreUrl.clone().extendPath("get-layer-file");i.addQueryParams({asJson:!0,onlyStatic:!0}),e.staticRepresentation.twoDim=i.toString()}e.injectedFetchDynamicFeatureFunc=this.getDynamicFeature.bind(this),e.name=this.layerId;const t=j.getInstance();e.genericFeatureProperties={planningName:this.name,planningDescription:this.description};const i=new fa(e);if(t.addLayer(i),this._balloonTemplate){const e=t.getWidgetByType("vcs.vcm.widgets.BalloonInfo");e&&e.addTypeForLayer(this.layerId,this._balloonTemplate)}}).catch(e=>{Yo.log(e)})}this.loaded.then(()=>{this.visible&&this.getLayer().activate()})}else this._observeStatus()}unload(){const e=this.getLayer();e&&e.deactivate(),this._pollingInterval&&(clearInterval(this._pollingInterval),this._pollingInterval=null),this._removeModeChangeListener&&(this._removeModeChangeListener(),this._removeModeChangeListener=null)}getDynamicFeature(e){const t=this.featureStoreUrl.clone();return t.extendPath("get-feature",this.planningInstanceId,this._id,e.toString()),G.a.post(t.toString()).then(({data:e})=>e)}show(){this.getLayer()?(super.show(),this.getLayer().activate()):Yo.warning("FeatureStoreLayer for PlanningObjectFeatureStore does not exists, check code")}setEditing(e){const t=To(this.editorId),i=this.getLayer();this._removeModeChangeListener&&(this._removeModeChangeListener(),this._removeModeChangeListener=null),e?(this._removeModeChangeListener=t.modeChange.addEventListener(e=>{e&Wi.NONE?i.changeTracker.pauseTracking("changefeature"):i.changeTracker.track()}),i.changeTracker.track(),this.trackerValues=i.changeTracker.values,t.addEditingLayer(i),To(this.editorId).state.dedicatedFeatureStyle=!1):(i.changeTracker.unTrack(),t.removeEditingLayer(i),To(this.editorId).state.dedicatedFeatureStyle=!0)}appendFile(e,t={}){a(e,Object),a(t,Object),this.terrainUrl&&(t.terrain=t.terrain||this.terrainUrl),e.append("converterOptions",JSON.stringify(t));const i=this.featureStoreUrl.clone();return i.extendPath("append"),G.a.post(i.toString(),e).then(()=>{this.status=ao.CONVERTING,this._observeStatus()})}calculateStatic(){const e=this.featureStoreUrl.clone();e.extendPath("calculate-static");const t=this.terrainUrl?{terrain:this.terrainUrl}:void 0;return G.a.post(e.toString(),t).then(()=>{this.status=ao.OPTIMIZING,this._observeStatus()})}_observeStatus(){null!=this._pollingInterval&&clearInterval(this._pollingInterval),this._pollingInterval=window.setInterval(()=>{const e=this.serviceUrl.clone().extendPath("get-object-status",this._id);G.a.post(e.toString()).then(e=>{if(this.status=e.data,this.status===ao.FAILED)Yo.warning("conversion failed"),clearInterval(this._pollingInterval),this._pollingInterval=null;else if(this.status===ao.READY){j.getInstance().removeLayerByName(this.layerId);const e=j.getInstance().getWidgetByType("vcs.vcm.widgets.Planning").planningInstances.find(e=>e._id===this.planningInstanceId);this.loaded=null,e.loaded&&this.load(),clearInterval(this._pollingInterval),this._pollingInterval=null}}).catch(e=>{Yo.error(e)})},2e4)}getDefinition(){const e=super.getDefinition();return e.balloonTemplate=this._balloonTemplate&&""!==this._balloonTemplate?this._balloonTemplate:void 0,e}save(){const e=this.getLayer(),t=To(this.editorId);t.state.active&&t.setMode(Wi.NONE);const i=this.featureStoreUrl.clone();return i.extendPath("bulk"),e.changeTracker.commitChanges(i.toString()).then(()=>this.saveVcsMeta()).then(()=>super.save())}saveVcsMeta(){const e=this.getLayer().getVcsMeta({writeStyle:!0}),t=this.featureStoreUrl.clone();return t.extendPath("edit-meta"),G.a.post(t.toString(),e)}reset(){const e=this.getLayer(),t=To(this.editorId);return t.setMode(Wi.NONE),e.changeTracker.reset()}destroy(){const e=this.getLayer();e&&e.dispose(),this._pollingInterval&&(clearInterval(this._pollingInterval),this._pollingInterval=null)}zoomTo(){const e=this.getLayer(),t=e.getFeatureExtent();if(t.isValid()){const e=t.getCoordinatesInProjection(q),i=me.createViewPointFromExtent(e);i.distance=i.distance<4e3?i.distance:4e3,j.getInstance().getActiveMap().gotoViewPoint(i)}}}var No=jo,Fo=i(1),Ro=i.n(Fo),Ho="<div class='balloon' id='myBalloon'>\n  <h1 class='balloon-title'><%= obj.title %></h1>\n  <div class='balloon-content'>\n    <%= obj.description %>\n    <hr>\n    <small>\n    <% if (obj.edited) {%>\n      <i><%= obj.edited %></i>\n    <% }%>\n    <%= obj.author %> <%= obj.date %>\n    </small>\n  </div>\n  <div class='balloon-close-col'>\n    <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>\n  </div>\n  <div class='dialog-image-balloon'></div>\n  <div class='balloon-left-edge'></div>\n</div>\n";let Go=null;class zo{static get className(){return"vcs.vcm.util.Login"}constructor(){this.active=!1,this.setupResolve=null,this.setupPromise=new Promise(e=>{this.setupResolve=e}),this.serviceUrl=null,this.scenarioId=null,this.projectId=null,this.currentUser={userSettings:null},this.projectGroups=[],this.projectUsers=[],this.projectSettings={hasMail:!1,selfRegister:!1,userInvite:!1},this.onLogin=[],this.onLogout=[],this.beforeLogout=[],window.addEventListener("beforeunload",()=>{this.logout()})}static getInstance(){return Go||(Go=new zo),Go}handleURLParameter(e){e["reset-token"]?e.enrollment?window.location.hash="#/login/enroll/"+e["reset-token"]:window.location.hash="#/login/reset/"+e["reset-token"]:e["verify-token"]&&(window.location.hash="#/login/verify/"+e["verify-token"])}registerWidget(e){if(this.active){const t=this.serviceUrl===e.serviceUrl,i=this.projectId===e.projectId,s=this.scenarioId===e.scenarioId;return t&&s&&i?(e.onLogin.forEach((function(e){this.onLogin.push(e)}),this),e.onLogout.forEach((function(e){this.onLogout.push(e)}),this),e.beforeLogout.forEach((function(e){this.beforeLogout.push(e)}),this),Promise.resolve()):Promise.reject(new Error("Login recieved two different configurations"))}return this.serviceUrl=e.serviceUrl,this.url=n["a"].parse(this.serviceUrl),this.url.addQueryParams({version:3.7}),this.projectId=e.projectId,this.scenarioId=e.scenarioId,e.onLogin.forEach((function(e){this.onLogin.push(e)}),this),e.onLogout.forEach((function(e){this.onLogout.push(e)}),this),e.beforeLogout.forEach((function(e){this.beforeLogout.push(e)}),this),this._getProject()}registerHook(e,t){a(e,["onLogin","onLogout","beforeLogout"]),a(t,Function),"onLogin"===e?this.onLogin.push(t):"onLogout"===e?this.onLogout.push(t):"beforeLogout"===e&&this.beforeLogout.push(t)}_getProject(){const e=this.url.clone();return G.a.post(e.extendPath("project","get").toString(),{projectId:this.projectId}).then(this._setProject.bind(this)).catch(()=>{}).then(this.setupResolve)}_setProject(e){return e.data&&e.data._id===this.projectId?(Object.assign(this.projectSettings,e.data),this.active=!0,Promise.resolve()):Promise.reject("Login project was not found or did not match registered project")}login(e,t){if(a(e,String),a(t,String),!this.active)return Promise.reject("Login has not been activated!");const i=zo.sha256(t),s=this.url.clone();return G.a.post(s.extendPath("user","login").toString(),{email:e,password:i,mapId:this.scenarioId}).then(this.setUser.bind(this))}logout(){const e=this.beforeLogout.map(e=>e()).filter(e=>null!=e),t=function(e){return G.a.post(`${this.serviceUrl}/user/logout?access_token=${this.getBearerToken()}`).then(this.clearUser.bind(this)),e?Promise.reject(new Error("logout failed")):Promise.resolve()};return Promise.all(e).then(t.bind(this,!1)).catch(t.bind(this,!0))}register(e,t,i){if(a(e,String),a(t,String),o(i,String),!Object(c["d"])(e))throw new Error("i18n_error_invalidEmail");const s=i?{name:i}:null,r=zo.sha256(t);return G.a.post(this.serviceUrl+"/user/register",{email:e,password:r,projectId:this.projectId,profile:s,mapId:this.scenarioId})}invite(e){if(a(e,String),!Object(c["d"])(e))throw new Error("i18n_error_invalidEmail");const t=this.getBearerToken();return G.a.post(this.serviceUrl+"/user/register?access_token="+t,{email:e,projectId:this.projectId,mapId:this.scenarioId})}verifyEmail(e){return a(e,String),G.a.post(this.serviceUrl+"/user/verify-email",{token:e})}requestResetPassword(e){return a(e,String),G.a.post(this.serviceUrl+"/user/request-reset",{email:e,mapId:this.scenarioId})}resetPassword(e,t){a(e,String),a(t,String);const i=zo.sha256(e);return G.a.post(this.serviceUrl+"/user/reset-password",{password:i,token:t}).then(this.setUser.bind(this))}getCurrentUser(){return this.currentUser}getUserById(e){return this.projectUsers.find(t=>t._id===e)}getBearerToken(){return this.currentUser?this.currentUser.token:null}setUser(e){Object.assign(this.currentUser,e.data),this.url.addQueryParams({access_token:this.currentUser.token});const t=this.url.clone(),i=G.a.post(t.extendPath("group","get-shareable").toString(),{projectId:this.projectId}),s=this.url.clone(),r=G.a.post(s.extendPath("user","get").toString(),{userId:this.currentUser.id}),n=this.url.clone(),a=G.a.get(n.extendPath("project-users",this.projectId).toString());return Promise.all([i,r,a]).then(e=>{this.setProjectGroups(e[0]),this.setProfile(e[1]),this._setProjectUsers(e[2]),this.onLogin.forEach(e=>{e()})})}setProjectGroups(e){this.projectGroups.splice(0,this.projectGroups.length),e.data.forEach((function(e){const t={};t.id=e._id,t.name=e.name,this.projectGroups.push(t)}),this)}setProfile(e){this.currentUser.userSettings=e.data}_setProjectUsers(e){const t=e.data;t.users&&t.users.forEach((function(e){this.projectUsers.push(e)}),this)}clearUser(){Object.keys(this.currentUser).forEach((function(e){"userSettings"===e?this.currentUser[e]=null:delete this.currentUser[e]}),this),this.projectGroups.splice(0,this.projectGroups.length),this.onLogout.forEach(e=>{e()}),console.log("logged out",this.currentUser)}searchUser(e){const t=this.url.clone();return G.a.post(t.extendPath("user","search").toString(),{text:e,projectId:this.projectId})}static sha256(e){const t=8,i=0;function s(e,t){const i=(65535&e)+(65535&t),s=(e>>16)+(t>>16)+(i>>16);return s<<16|65535&i}function r(e,t){return e>>>t|e<<32-t}function n(e,t){return e>>>t}function a(e,t,i){return e&t^~e&i}function o(e,t,i){return e&t^e&i^t&i}function l(e){return r(e,2)^r(e,13)^r(e,22)}function c(e){return r(e,6)^r(e,11)^r(e,25)}function u(e){return r(e,7)^r(e,18)^n(e,3)}function h(e){return r(e,17)^r(e,19)^n(e,10)}function d(e,t){const i=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),r=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),n=new Array(64);let d,m,g,p,f,y,_,v,L,M;e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(let b=0;b<e.length;b+=16){d=r[0],m=r[1],g=r[2],p=r[3],f=r[4],y=r[5],_=r[6],v=r[7];for(let t=0;t<64;t++)n[t]=t<16?e[t+b]:s(s(s(h(n[t-2]),n[t-7]),u(n[t-15])),n[t-16]),L=s(s(s(s(v,c(f)),a(f,y,_)),i[t]),n[t]),M=s(l(d),o(d,m,g)),v=_,_=y,y=f,f=s(p,L),p=g,g=m,m=d,d=s(L,M);r[0]=s(d,r[0]),r[1]=s(m,r[1]),r[2]=s(g,r[2]),r[3]=s(p,r[3]),r[4]=s(f,r[4]),r[5]=s(y,r[5]),r[6]=s(_,r[6]),r[7]=s(v,r[7])}return r}function m(e){const i=Array(),s=(1<<t)-1;for(let r=0;r<e.length*t;r+=t)i[r>>5]|=(e.charCodeAt(r/t)&s)<<24-r%32;return i}function g(e){let t="";for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);s<128?t+=String.fromCharCode(s):s>127&&s<2048?(t+=String.fromCharCode(s>>6|192),t+=String.fromCharCode(63&s|128)):(t+=String.fromCharCode(s>>12|224),t+=String.fromCharCode(s>>6&63|128),t+=String.fromCharCode(63&s|128))}return t}function p(e){const t=i?"0123456789ABCDEF":"0123456789abcdef";let s="";for(let i=0;i<4*e.length;i++)s+=t.charAt(e[i>>2]>>8*(3-i%4)+4&15)+t.charAt(e[i>>2]>>8*(3-i%4)&15);return s}return e=g(e),p(d(m(e),e.length*t))}}var Bo=zo;const Vo=v.getLogger("vcs.vcm.widgets.planning.PlanningComment");function Uo(e){const{properties:t}=e;let i,s;t.editedBy&&t.editedOn?(i=t.editedBy,s=t.editedOn,t.edited=w.getInstance().getSingleMessage("i18n_planning_comment_edited")):(i=t.createdBy,s=t.createdOn);const r=Bo.getInstance().getUserById(i);t.author=r&&r.profile?r.profile.name:"anonymous",t.date=Ro()(s).format("LLL")}function Wo(e){const t=Hs({features:[e]},{asObject:!0}),i=t.features[0];return i.id=e.getId(),delete i.properties.selected,i}const qo={DEFAULT:"default",INFO:"info",SUCCESS:"success",WARNING:"warning"};class Jo{constructor(e,t,i){this.planningId=e,this.url=t.clone(),this.url.addQueryParams({planningId:e}),this.url.extendPath("comment"),this.dataLoaded=!1,this.ready=new Promise(e=>{this._readyResolve=e}),this.permissions=i,this.comments=[];const s=j.getInstance(),r=s.getWidgetByType("vcs.vcm.widgets.BalloonInfo");r&&r.addTypeForLayer(this.planningId+"_comments",Ho),s.subscribe("LOCALE_CHANGED",this.localeChanged.bind(this)),this.localeChanged(s.getLocale()),this.active=!1}getLayer(){const e=j.getInstance();let t=e.getLayerByName(this.planningId+"_comments");return t||(t=new ss({altitudeMode:"absolute",name:this.planningId+"_comments",allowPicking:!0,projection:J.getConfigObject(),balloonHeightOffset:1,style:"planningCommentStyle"}),e.addLayer(t)),t}load(){if(!this.dataLoaded){const e=this.getLayer(),t=this.url.clone();t.extendPath("get-comments"),G.a.get(t.toString()).then(({data:t})=>{this.comments.push(...t.features),this.comments.forEach(Uo);const{features:i}=Fs(t);e.addFeatures(i),this.dataLoaded=!0,this._readyResolve()}).catch(e=>{Vo.error(e.message),this.dataLoaded=!0,this._readyResolve()})}this.ready.then(()=>{this.getLayer().activate(),this.active=!0})}localeChanged(e){if(Ro.a.locale(e),this.dataLoaded){const e=this.getLayer();this.comments.forEach(t=>{Uo(t);const i=e.getFeatureById(t.id);i&&(t.properties.edited&&i.set("edited",t.properties.edited,!0),i.set("author",t.properties.author,!0),i.set("date",t.properties.date))})}}unLoad(){this.getLayer().deactivate(),this.active=!1}lookAt(e){const t=j.getInstance(),i=this.getLayer(),s=i.getFeatureById(e),r=t.getActiveMap(),n=r.getViewPoint();n.pitch>-45&&(n.pitch=-45),n.distance||(n.distance=2e3),n.cameraPosition=null,n.groundPosition=W.mercatorToWgs84(s.getGeometry().getCoordinates()),n.animate=!0,r.gotoViewPoint(n),t.publish("FEATURE_CLICKED",s.getId(),s,i)}addComment(e){a(e,ol.Feature);const t=Wo(e),i=this.url.clone();return i.extendPath("add"),G.a.post(i.toString(),t).then(({data:t})=>{Uo(t),this.comments.push(t),e.setId(t.id),e.set("author",t.properties.author,!0),e.set("date",t.properties.date)})}editComment(e){a(e,ol.Feature);const t=Wo(e),i=this.url.clone();return i.extendPath("edit"),G.a.post(i.toString(),t).then(({data:t})=>{const i=this.comments.findIndex(e=>e.id===t.id);this.comments.splice(i,1,t),Uo(t),e.set("author",t.properties.author,!0),e.set("date",t.properties.date)})}deleteComment(e){a(e,ol.Feature);const t=Wo(e),i=this.url.clone();return i.extendPath("delete"),G.a.post(i.toString(),t).then(()=>{const e=this.comments.findIndex(e=>e.id===t.id);this.comments.splice(e,1),this.getLayer().removeFeaturesById([t.id])})}destroy(){this.comments.splice(0);const e=j.getInstance().getLayerByName(this.planningId+"_comments");e&&e.dispose()}}var Ko=Jo;function Zo(e,t={}){const i=e.viewpoints.map(e=>{e.duration=null!=e.duration?e.duration:null;const t=z(e.cameraPosition.slice(),void 0,3),i=new ol.Feature({geometry:new ol.geom.Point(t)});return i.setProperties(Object.assign({},e)),i}),s={features:i,vcsMeta:{flightOptions:{name:e.name,loop:e.loop,interpolation:e.interpolation}}};return Hs(s,t)}function Qo(e){const t=Fs(e),i=t.vcsMeta&&t.vcsMeta.flightOptions?t.vcsMeta.flightOptions:{name:"ImportedFlight"};return i.viewpoints=t.features.map(e=>{const t={name:e.get("name"),distance:e.get("distance"),groundPosition:e.get("groundPosition"),cameraPosition:e.get("cameraPosition"),heading:e.get("heading"),pitch:e.get("pitch"),roll:e.get("roll"),animate:!1,duration:null!=e.get("duration")?e.get("duration"):null};return t}),i}const Xo={SPLINE:"spline",LINEAR:"linear"};class $o{static get className(){return"vcs.vcm.util.flight.FlightInstance"}constructor(e){this.id=Object(c["c"])(),this.name=e.name,this.viewpoints=e.viewpoints||[],this.multiplier=Object(c["g"])(e.multiplier,1),this.loop=Object(c["e"])(e.loop,!1),this.interpolation=e.interpolation||Xo.SPLINE,this.changed=new Cesium.Event,this.url=e.url,this._readyPromise=null}get ready(){return this._readyPromise||(this.url?this._readyPromise=G.a.get(this.url).then(({data:e})=>{const t=Qo(e);this.assign(t)}):this._readyPromise=Promise.resolve()),this._readyPromise}isValid(){return this.viewpoints.forEach((e,t)=>{e.cameraPosition||this.viewpoints.splice(t,1)}),this.viewpoints.length>=2}assign(e){this.name=e.name,this.viewpoints=e.viewpoints,this.multiplier=e.multiplier,this.loop=e.loop,this.interpolation=e.interpolation,this.changed.raiseEvent()}getConfigObject(){return{name:this.name,multiplier:this.multiplier,loop:this.loop,interpolation:this.interpolation,viewpoints:this.viewpoints.map(e=>Object.assign({},e))}}}var el=$o;const tl=v.getLogger("vcs.vcm.widgets.planning.PlanningObjectTiled"),il=new Cesium.Cartographic,sl=new Cesium.Cartesian3,rl=new Cesium.Cartesian3,nl=new Cesium.HeadingPitchRoll;class al extends lo{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectTiled"}constructor(e){super(e),this.supportedMaps=["vcs.vcm.maps.Cesium"],this._translationModelMeta=e.modelMatrix||null,this.longitude=0,this.latitude=0,this.height=0,this.heading=0,this.pitch=0,this.roll=0,this.scale=1,this.usesCesiumRTC=!1,this._loadedResolve=()=>{},this.loaded=new Promise(e=>{this._loadedResolve=e})}getLayer(){return j.getInstance().getLayerByName(this._id)}load(){let e=this.getLayer();e||(e=new In({name:this._id,url:this.url.toString()}),j.getInstance().addLayer(e));const t=this.visible?e.activate():e.initialize();return t.then(()=>{const t=Cesium.Cartesian3.pack(e.cesium3DTileset.boundingSphere.center,new Array(3));t.some(e=>0!==e)&&Cesium.Matrix4.equals(e.cesium3DTileset.root.transform,Cesium.Matrix4.IDENTITY)&&(this.usesCesiumRTC=!0),this._translationModelMeta&&!this.usesCesiumRTC&&Cesium.Matrix4.unpack(this._translationModelMeta,0,e.cesium3DTileset.root.transform),this._setPositionFields(e.cesium3DTileset.boundingSphere.center,e.cesium3DTileset.root.transform),this._loadedResolve()})}_setPositionFields(e,t){const i=Cesium.Cartographic.fromCartesian(e,null,il);i&&(this.longitude=Cesium.Math.toDegrees(i.longitude),this.latitude=Cesium.Math.toDegrees(i.latitude),this.height=i.height),this.usesCesiumRTC||(Cesium.Matrix4.getScale(t,sl),this.scale=sl.x,Cesium.Transforms.fixedFrameToHeadingPitchRoll(t,void 0,void 0,nl),this.heading=Cesium.Math.toDegrees(nl.heading),this.pitch=Cesium.Math.toDegrees(nl.pitch),this.roll=Cesium.Math.toDegrees(nl.roll))}unload(){const e=this.getLayer();e&&e.deactivate()}show(){this.getLayer()?(super.show(),this.getLayer().activate()):tl.warning("TilesetLayer for PlanningObjectTiled does not exists, check code")}resetModelMatrix(){const e=this.getLayer();e&&e.initialized&&!this.usesCesiumRTC&&(Cesium.Cartesian3.fromDegrees(this.longitude,this.latitude,this.height,null,rl),Cesium.HeadingPitchRoll.fromDegrees(this.heading,this.pitch,this.roll,nl),Cesium.Cartesian3.fromElements(this.scale,this.scale,this.scale,sl),e.cesium3DTileset.root.transform=Cesium.Transforms.headingPitchRollToFixedFrame(rl,nl),Cesium.Matrix4.multiplyByScale(e.cesium3DTileset.root.transform,sl,e.cesium3DTileset.root.transform))}isPlaced(){const e=[];return co.forEach(t=>{const i=this[t];-1===e.indexOf(i)&&e.push(i)}),!(0===e[0]&&1===e[1]&&2===e.length)}zoomTo(){const e=this.getLayer();if(e&&e.initialized){const t=j.getInstance().getActiveMap(),i=t.getViewPoint(),s=new Cesium.HeadingPitchRange(Cesium.Math.toRadians(i.heading),Cesium.Math.toRadians(i.pitch<-45?i.pitch:-45),void 0);t.getScene().camera.flyToBoundingSphere(e.cesium3DTileset.boundingSphere,{duration:1,offset:s})}}getDefinition(){const e=super.getDefinition(),t=this.getLayer();if(t&&t.initialized&&!this.usesCesiumRTC){const i=!t.cesium3DTileset.root.transform.equals(Cesium.Matrix4.IDENTITY);i&&(e.modelMatrix=Cesium.Matrix4.pack(t.cesium3DTileset.root.transform,new Array(16)))}return e}destroy(){const e=this.getLayer();e&&e.dispose()}}var ll=al;L.PLANNING_INSTANCE_LOADED="PLANNING_INSTANCE_LOADED",L.PLANNING_INSTANCE_UNLOADED="PLANNING_INSTANCE_UNLOADED";const cl=Lt();class ul{static get className(){return"vcs.vcm.widgets.planning.PlanningInstance"}constructor(e){this.maintainLockInterval=null,this._id=e._id,this.name=e.name&&""!==e.name?e.name:"planning: "+e._id,this.hiddenObjects=e.hiddenObjects?e.hiddenObjects:[],this.planningObjects=[],this.viewpoints=[],e.viewpoints&&e.viewpoints.length>0?this.viewpoints=e.viewpoints:e.viewpoint&&(e.viewpoint.default=!0,this.viewpoints.push(e.viewpoint)),this.flights=[],e.flights&&e.flights.forEach(e=>{const t=Qo(e);this.flights.push(new el(t))}),this.description=e.description?e.description:null,this.permissions=e.permissions||[],this.owner=e.created,this.lastUpdated=e.lastUpdated||null,this.public=e.public;const t=new jn({allowPicking:!0,name:`_${this._id}_model`});j.getInstance().addLayer(t),this.layerName=t.name,this.sharedUsers=[],this.mapId=e.mapId,this.url=e.url,this.editorId=e.editorId,this.terrainUrl=e.terrainUrl,e.planningObjects&&e.planningObjects.forEach(e=>{this.addPlanningObject(e)}),this.loaded=!1,this.comments=new Ko(this._id,this.url,this.permissions),this.properties=e.properties||{}}load(e){const t=j.getInstance(),i=t.getLayerByName(this.layerName),s=t.getActiveMap();"vcs.vcm.maps.Cesium"===s.className&&(i.initialized||i.initialize(),i.activate()),cl.hideObjects(this.hiddenObjects),this.planningObjects.forEach(e=>{e.handleMapChange(s),e.load()}),e||this.gotoViewpoint(),this.comments.load(),this.loaded=!0,t.publish(L.PLANNING_INSTANCE_LOADED,this)}unLoad(){const e=j.getInstance(),t=e.getLayerByName(this.layerName);t.deactivate(),cl.showObjects(this.hiddenObjects),this.planningObjects.forEach(e=>{e.unload()}),this.comments.unLoad(),this.loaded=!1,e.publish(L.PLANNING_INSTANCE_UNLOADED,this)}handleMapChange(e){if(this.loaded){const t=j.getInstance().getLayerByName(this.layerName);"vcs.vcm.maps.Cesium"===e.className&&t.activate(),this.planningObjects.forEach(t=>{t.handleMapChange(e)})}}addPlanningObject(e){let t;return"geojson"===e.type&&(e.type="drawing"),"ready"!==e.status?(t="featureStore"===e.type?new No(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId,terrainUrl:this.terrainUrl},e)):new xo(Object.assign({planningInstanceId:this._id,serviceUrl:this.url},e)),"failed"!==t.status&&this.loaded&&t.load(),this.planningObjects.push(t)):"gltf"===e.type?(t=new mo(Object.assign({planningInstanceId:this._id,planningInstanceGltfLayerName:this.layerName,serviceUrl:this.url},e)),this.planningObjects.push(t)):"featureStore"===e.type?(t=new No(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId,terrainUrl:this.terrainUrl},e)),this.loaded&&!t.loaded&&t.load(),this.planningObjects.push(t)):"image"===e.type?(t=new po(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId},e)),this.loaded&&t.load(),this.planningObjects.push(t)):"tiled"===e.type?(t=new ll(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId},e)),this.loaded&&t.load(),this.planningObjects.push(t)):"drawing"===e.type&&(t=new Oo(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId},e)),this.loaded&&!t.loaded&&t.load(),this.planningObjects.push(t)),t.initialize(),t}updatePlanningObject(e){const t=this.url.clone();return G.a.post(t.extendPath("get-id").toString(),{id:this._id}).then(({data:t})=>{const i=this.planningObjects.findIndex(t=>t._id===e._id);this.planningObjects.splice(i,1);const s=t.planningObjects.find(t=>t._id===e._id);this.addPlanningObject(s)})}updatePlanningObjects(){const e=this.url.clone();return G.a.post(e.extendPath("get-id").toString(),{id:this._id}).then(({data:e})=>{this.planningObjects.forEach(e=>{e.destroy()}),this.planningObjects.splice(0),e.planningObjects.forEach(this.addPlanningObject.bind(this))})}deletePlanningObject(e,t){a(e,lo),o(t,Function);const i=this.planningObjects.findIndex(t=>t._id===e._id);return this.planningObjects.splice(i,1),e.delete().then(()=>{e.destroy(),t(null)}).catch(i=>{const s=e.getConfigObject();e.destroy(),this.addPlanningObject(s),t(i)})}lock(){const e=this.url.clone();return G.a.post(e.extendPath("lock").toString(),{_id:this._id}).then(()=>{this.maintainLockInterval||(this.maintainLockInterval=setInterval(this.maintainLock.bind(this),1e5))})}maintainLock(){this.lock().catch(()=>{this.unlock()})}unlock(){this.maintainLockInterval&&clearInterval(this.maintainLockInterval),this.maintainLockInterval=null;const e=this.url.clone();return G.a.post(e.extendPath("unlock").toString(),{_id:this._id})}save(){const e={_id:this._id,mapId:this.mapId,name:this.name,description:this.description,viewpoint:void 0,viewpoints:this.viewpoints,flights:this.flights.map(e=>Zo(e,{asObject:!0})),hiddenObjects:this.hiddenObjects},t=this.url.clone();return G.a.post(t.extendPath("update").toString(),e)}getPlanningObjectDefinitions(){return Object.values(this.planningObjects).map(e=>e.getDefinition())}addHiddenObject(e){return a(e,String),!this.hiddenObjects.includes(e)&&(cl.hideObjects([e]),this.hiddenObjects.push(e),!0)}removeHiddenObject(e){if(a(e,[String,Number]),this.hiddenObjects.includes(e)){cl.showObjects([e]);const t=this.hiddenObjects.indexOf(e);return this.hiddenObjects.splice(t,1),!0}return!1}destroy(){this.loaded&&this.unLoad();for(let t=0;t<this.planningObjects.length;t++)this.planningObjects[t].destroy();this.comments.destroy();const e=j.getInstance().getLayerByName(this.layerName);return e.dispose(),this.layerName="",this.maintainLockInterval?this.unlock():Promise.resolve()}gotoViewpoint(e){let t=e;if(null==t&&(t=this.viewpoints.findIndex(e=>e.default),t=-1===t?0:t),this.viewpoints[t]){const e=new me(this.viewpoints[t]),i=j.getInstance();i.getActiveMap().gotoViewPoint(e)}}sharePlanning(e,t,i){a(e,String),a(t,String),o(i,[String]);const s={actorId:t,doc:{_id:e}};i&&(s.permissions=i);const r=this.url.clone().extendPath("share");return G.a.post(r.toString(),s).then(this.getSharedUsers.bind(this))}getSharedUsers(){const e=this.url.clone().extendPath("shared-users");return G.a.post(e.toString(),{_id:this._id}).then(e=>{this.sharedUsers=e.data})}publishPlanning(){const e=this.url.clone().extendPath("publish");return G.a.post(e.toString(),{_id:this._id,public:!this.public}).then(()=>{this.public=!this.public})}userHasPermission(e){return a(e,String),this.permissions.indexOf(e)>-1}isLocked(){return null!==this.maintainLockInterval}uploadNewModel(e,t,i={}){a(e,Object),a(t,{percentage:[Number,String,null]}),a(i,Object);const s={};t&&(s.onUploadProgress=e=>{t.percentage=Math.round(100*e.loaded/e.total)}),this.terrainUrl&&(i.terrain=i.terrain||this.terrainUrl),i.defaultProjection=j.getInstance().projection.epsg,e.append("converterOptions",JSON.stringify(i));const r=this.url.clone().extendPath("upload");return r.addQueryParams({planning_id:this._id}),G.a.post(r.toString(),e,s).then(({data:e})=>{let t=null;return e.planningObjects.forEach(e=>{const i=this.planningObjects.find(t=>t._id===e._id);i||(t=this.addPlanningObject(e))}),t})}createFeatureStoreObject(){const e=this.url.clone().extendPath("feature-store","create");return e.addQueryParams({planningId:this._id}),G.a.post(e.toString()).then(({data:e})=>this.addPlanningObject(e))}}var hl=ul;class dl extends Qs{constructor(e){super({zPlane:!0}),this.editor=e,this._lastPosition=null,this._firstPosition=null,this._translationOptions={},this._defaultActive=X.DRAGEVENTS,this._defaultModificationKey=Q.ALT,this.setActive()}pipe(e){if(this._lastPosition){const t=this.getPosition(e),i=t[0]-this._lastPosition[0],s=t[1]-this._lastPosition[1];e.type&X.DRAGEND?(this._translationOptions.dxTotal=t[0]-this._firstPosition[0],this._translationOptions.dyTotal=t[1]-this._firstPosition[1],this._translationOptions.isMoving=!1,this._translationOptions.toTransform=this.editor.state.transformGeometryOnMove?Sl.BOTH:Sl.GEOMETRY,this.editor.translate(this.editor.state.transformGeometryOnMove?i:this._translationOptions.dxTotal,this.editor.state.transformGeometryOnMove?s:this._translationOptions.dyTotal,this._translationOptions),this._lastPosition=null,this._firstPosition=null):e.type&X.DRAG?(this.editor.translate(i,s,this._translationOptions),this._lastPosition=t):this._lastPosition=null}else e.type&X.DRAGSTART&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.EDITABLE&&this.editor.features.has(e.feature.getId())&&(this.scene?(this.createPlane(e.positionOrPixel),this._lastPosition=this.getPosition(e),this._firstPosition=this.getPosition(e)):(this._lastPosition=e.positionOrPixel,this._firstPosition=e.positionOrPixel),this._translationOptions={toTransform:this.editor.state.transformGeometryOnMove?Sl.BOTH:Sl.VERTEX,isMoving:!0});return Promise.resolve(e)}}var ml=dl;class gl extends Qs{constructor(e){super({zPlane:!0}),this.editor=e,this._defaultActive=X.DRAGEVENTS,this._defaultModificationKey=Q.SHIFT|Q.ALT,this._lastPosition=null,this._firstPosition=null,this.setActive(),this._scaleOptions={}}pipe(e){if(this._lastPosition){const t=this.getPosition(e),i=t[0]-this._lastPosition[0],s=t[1]-this._lastPosition[1];e.type&X.DRAGEND?(this._scaleOptions.dxTotal=t[0]-this._firstPosition[0],this._scaleOptions.dyTotal=t[1]-this._firstPosition[1],this._scaleOptions.isMoving=!1,this._scaleOptions.toTransform=this.editor.state.transformGeometryOnMove?Sl.BOTH:Sl.GEOMETRY,this.editor.scale(this.editor.state.transformGeometryOnMove?i:this._scaleOptions.dxTotal,this.editor.state.transformGeometryOnMove?s:this._scaleOptions.dyTotal,this._scaleOptions),this._lastPosition=null,this._firstPosition=null):(this._lastPosition=t,this.editor.scale(i,s,this._scaleOptions))}else if(e.type&X.DRAGSTART&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.VERTEX){const t=e.feature.getGeometry().getCoordinates()[2]?e.feature.getGeometry().getCoordinates():e.positionOrPixel;this._scaleOptions={maintainAspectRatio:!!(e.key&Q.SHIFT),vertex:e.feature,toTransform:this.editor.state.transformGeometryOnMove?Sl.BOTH:Sl.VERTEX,isMoving:!0},this._lastPosition=t,this._firstPosition=t,this.scene&&this.createPlane(this._lastPosition)}return Promise.resolve(e)}}var pl=gl;function fl(e,t,i){const s=e.x*t.y-e.y*t.x;return s>0?i:-1*i}class yl extends Qs{constructor(e){super({zPlane:!0}),this.editor=e,this._defaultActive=X.DRAGEVENTS,this._defaultModificationKey=Q.CTRL,this._lastPosition=new Cesium.Cartesian2,this._firstPosition=new Cesium.Cartesian2,this._newPosition=new Cesium.Cartesian2,this._scratchCenter=new Cesium.Cartesian2,this._rotationOptions={},this._rotating=!1,this.setActive()}pipe(e){if(this._rotating){const t=this.getPosition(e);let i;this._newPosition=Cesium.Cartesian2.fromElements(t[0],t[1],this._newPosition),this._newPosition=Cesium.Cartesian2.subtract(this._scratchCenter,this._newPosition,this._newPosition),e.type&X.DRAGEND?(this._rotationOptions.angleTotal=fl(this._firstPosition,this._newPosition,Cesium.Cartesian2.angleBetween(this._firstPosition,this._newPosition)),this._rotationOptions.isMoving=!1,this._rotationOptions.toTransform=this.editor.state.transformGeometryOnMove?Sl.BOTH:Sl.GEOMETRY,i=this.editor.state.transformGeometryOnMove?fl(this._lastPosition,this._newPosition,Cesium.Cartesian2.angleBetween(this._lastPosition,this._newPosition)):this._rotationOptions.angleTotal,this._rotating=!1):i=fl(this._lastPosition,this._newPosition,Cesium.Cartesian2.angleBetween(this._lastPosition,this._newPosition)),this.editor.rotate(i,this._rotationOptions),this._lastPosition=this._newPosition.clone(this._lastPosition)}else if(e.type&X.DRAGSTART&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.VERTEX){const t=e.feature.getGeometry().getCoordinates()[2]?e.feature.getGeometry().getCoordinates():e.positionOrPixel;this.scene&&this.createPlane(t),this._scratchCenter=Cesium.Cartesian2.fromArray(ol.extent.getCenter(this.editor.extent),0,this._scratchCenter),this._firstPosition=Cesium.Cartesian2.fromArray(t,0,this._firstPosition),this._firstPosition=Cesium.Cartesian2.subtract(this._scratchCenter,this._firstPosition,this._firstPosition),this._lastPosition=this._firstPosition.clone(this._lastPosition),this._rotationOptions={toTransform:this.editor.state.transformGeometryOnMove?Sl.BOTH:Sl.VERTEX,isMoving:!0},this._rotating=!0}return Promise.resolve(e)}}var _l=yl;class vl extends Qs{constructor(e){super({zPlane:!1}),this.editor=e,this._defaultActive=X.DRAGEVENTS,this._defaultModificationKey=Q.ALT|Q.SHIFT,this._lastHeight=null,this._firstHeight=null,this._isExtrusion=!1,this._heightOptions={},this.setActive()}pipe(e){if(this.scene)if(null!==this._lastHeight){const t=this.getPosition(e);let i;e.type&(X.CLICK|X.DRAGEND)?(this._heightOptions.heightTotal=t[2]-this._firstHeight,this._heightOptions.isMoving=!1,this.editor.state.transformGeometryOnMove?i=t[2]-this._lastHeight:(this._heightOptions.toTransform=Sl.GEOMETRY,i=this._heightOptions.heightTotal),this._lastHeight=null,this._firstHeight=null):(i=t[2]-this._lastHeight,this._lastHeight=t[2]),this._isExtrusion?this.editor.extrude(i,t[2],this._heightOptions):this.editor.translateHeight(i,t[2],this._heightOptions)}else if(e.type&(X.DRAGSTART|X.CLICK)&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&qi.HEIGHTVERTEX){const t=e.feature.getGeometry().getCoordinates();this._lastHeight=t[2]||e.positionOrPixel[2],this._firstHeight=this._lastHeight,this._isExtrusion=!!(e.key&Q.SHIFT),this._heightOptions={toTransform:this.editor.state.transformGeometryOnMove?Sl.BOTH:Sl.VERTEX,isMoving:!0},this.createPlane(t)}return Promise.resolve(e)}}var Ll=vl,Ml=i(582),bl=i.n(Ml),wl=i(583),Tl=i.n(wl);const Sl={VERTEX:1,GEOMETRY:2,BOTH:0};Sl.BOTH=Sl.VERTEX|Sl.GEOMETRY;const Cl=Symbol("isTransformation"),El=Symbol("isEmpty"),Il=v.getLogger("vcs.vcm.util.editor.FeatureLayerEditor"),kl=new ol.style.Icon({src:bl.a,anchor:[.5,.8],scale:.6}),Dl=new ol.style.Style({image:kl}),Ol={olcs_altitudeMode:"altitudeMode",olcs_skirt:"skirt",olcs_storeyHeight:"storeyHeight"};function Pl(e){e instanceof Pt?Dl.setImage(kl):Dl.setImage(null)}class Al extends Eo{get className(){return"vcs.vcm.util.editor.FeatureLayerEditor"}constructor(e={}){super(e),this.translateInteraction=new ml(this),this.interactionChain.addInteraction(this.translateInteraction),this.scaleTransformation=new pl(this),this.interactionChain.addInteraction(this.scaleTransformation),this.rotationTransformation=new _l(this),this.interactionChain.addInteraction(this.rotationTransformation),this.heightTransformation=new Ll(this),this.interactionChain.addInteraction(this.heightTransformation),this.selectFeatureInteraction.hasMultiSelect(),this.mouseOverInteraction.hasMultiSelect=!0,(null==e.allowSelectMode||e.allowSelectMode)&&this.state.allowedModes.push(Object.keys(Ji).find(e=>Ji[e]===Wi.SELECT)),this._scratchCenter=new Cesium.Cartesian2,this.flippedY=!1,this.flippedX=!1,this.heights={min:0,max:0,clamped:!0},this.extent=ol.extent.createEmpty(),this.geometry=this._createExtent(),this.feature=new ol.Feature({geometry:this.geometry}),this.feature[Cl]=!0,this.feature[ss.doNotTransform]=!0,this.feature.set("olcs_altitudeMode",this.heights.clamped?"clampToGround":"absolute"),this.feature.setId("_transformationFeature"),this.vertices=[],this.style=new ol.style.Style({stroke:new ol.style.Stroke({color:"#444444",width:2}),image:new ol.style.Icon({src:Tl.a,scale:.45})})}onSelect(){this.state.mode&Wi.FEATUREMODES&&this.state.active?this.recalculateExtent():this._clearGeometriesFromLayer()}activate(){super.activate(),Pl(j.getInstance().getActiveMap())}_createExtent(){let e=ol.extent.createEmpty(),t=-1/0,i=1/0,s=!0;this.features.forEach(r=>{const n=this.isOblique?r[ss.obliqueGeometry]:r.getGeometry();e=ol.extent.extend(e,n.getExtent());const a=r.get("olcs_altitudeMode");if(("clampToGround"===a||null==a&&"clampToGround"===this.activeLayer.altitudeMode)&&null==r.get("olcs_groundLevel"))i=i>0?0:i;else{s=!1;const e=ei(r,this.activeLayer.storeyHeight);t=e.max>t?e.max:t,i=e.min<i?e.min:i}}),this.extent=e,this.heights.max=t===-1/0?0:t,this.heights.min=i===1/0?0:i,this.heights.clamped=s;const r=ol.extent.getSize(this.extent);return 0===r[0]&&0===r[1]&&(this.extent=ol.extent.buffer(this.extent,10,this.extent)),this._createExtentGeom()}_createExtentGeom(){function e(e,t){const i=[[0,1],[0,3],[2,3],[2,1],[0,1]],s=new Array(5);for(let r=0;r<5;r++)s[r]=[e[i[r][0]],e[i[r][1]],t];return new ol.geom.LineString(s)}let t;if(ol.extent.isEmpty(this.extent)){const i=[0,0,1,1];t=new ol.geom.MultiLineString([e(i,this.heights.min).getCoordinates()]),t[El]=!0}else{const i=e(this.extent,this.heights.max),s=i.getCoordinates();t=new ol.geom.MultiLineString([s]),t.appendLineString(e(this.extent,this.heights.min));for(let e=0;e<4;e++){const i=s[e].slice(0);i[2]=this.heights.min,t.appendLineString(new ol.geom.LineString([s[e],i]))}}return this.isOblique&&(t[ss.alreadyTransformedToImage]=!0),t}_createVertex(e,t){e[2]=e[2]||0;const i=new ol.geom.Point(e);this.isOblique&&(i[ss.alreadyTransformedToImage]=!0);const s=new ol.Feature({geometry:i});return s[this.state.featureTypeSymbol]=qi.VERTEX,s[lr]=t,s[ss.doNotTransform]=!0,s}_createVertices(){if(this.geometry[El])return;const e=this.geometry.getCoordinates()[0];for(let r=0;r<4;r++){const t=e[r];this.vertices.push(this._createVertex(t,r))}const t=ol.extent.getCenter(this.extent);t[2]=this.heights.max;const i=this._createVertex(t,4);i[this.state.featureTypeSymbol]=qi.HEIGHTVERTEX,i.setStyle(Dl),this.vertices.push(i);const s=this.heights.clamped?"clampToGround":"absolute";this.vertices.forEach((e,t)=>{e.set("olcs_altitudeMode",s,!0),t<4&&e.setStyle(this.style)},this),this.feature.set("olcs_altitudeMode",s),this.scratchLayer.addFeatures([...this.vertices,this.feature])}setMode(e){Il.debug(`FeatureLayerEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`),super.setMode(e),this.state.mode&Wi.FEATUREMODES?this.recalculateExtent():this.state.mode&Wi.FEATUREMODES||this._clearGeometriesFromLayer(),e&Wi.SELECT?(this.translateInteraction.setActive(),this.scaleTransformation.setActive(),this.rotationTransformation.setActive(),this.heightTransformation.setActive()):e&Wi.SCALE?(this.scaleTransformation.setModification(Q.NONE|Q.SHIFT),this.scaleTransformation.setActive(X.DRAGEVENTS)):e&Wi.TRANSLATE?(this.translateInteraction.setModification(Q.NONE),this.translateInteraction.setActive(X.DRAGEVENTS)):e&Wi.ROTATE&&(this.rotationTransformation.setModification(Q.NONE),this.rotationTransformation.setActive(X.DRAGEVENTS))}setAltitudeMode(e){const t=[];for(const s of this.features.values())if(e&(Ki.ABSOLUTE|Ki.ZPLANE)&&"absolute"!==s.get("olcs_altitudeMode")){const e=ii(s).then(()=>{s.set("olcs_altitudeMode","absolute")});t.push(e)}else e&Ki.CLAMP&&"clampToGround"!==s.get("olcs_altitudeMode")&&(si(s),t.push(Promise.resolve()));const i=Promise.all(t);return i.then(()=>{t.length&&this.recalculateExtent()})}translate(e,t,i){const s=i&&i.toTransform?i.toTransform:Sl.BOTH;if(this.extent=[this.extent[0]+e,this.extent[1]+t,this.extent[2]+e,this.extent[3]+t],s&Sl.VERTEX)for(let r=this.vertices.length-1;r>=0;r--)this.vertices[r].getGeometry().translate(e,t);s&Sl.GEOMETRY&&(this.feature.getGeometry().translate(e,t),this.features.forEach(i=>{this.isOblique?i[ss.obliqueGeometry].translate(e,t):i.getGeometry().translate(e,t)}))}translateHeight(e,t,i){this.state.altitudeMode&Ki.CLAMP&&(this.state.altitudeMode=Ki.ABSOLUTE);const s=i&&i.toTransform?i.toTransform:Sl.BOTH;let r=!1;if(s&Sl.GEOMETRY&&(this.features.forEach(i=>{const s=i.get("olcs_altitudeMode");r=r||"clampToGround"===s||!s&&"clampToGround"===this.activeLayer.altitudeMode,i.set("olcs_altitudeMode","absolute",!0);const n=i.get("olcs_groundLevel");i.unset("olcs_groundLevel");const a=n&&(i.get("olcs_extrudedHeight")||i.get("olcs_storeyNumber")&&i.get("olcs_storeyHeight"));ti(i.getGeometry(),e,a?n+e:t,a)}),ti(this.geometry,e,t)),s&Sl.VERTEX){let i=this.vertices.length;while(i--)this.vertices[i].set("olcs_altitudeMode","absolute",!0),ti(this.vertices[i].getGeometry(),e,t)}this.heights.min+=e,this.heights.max+=e,r&&this.recalculateExtent(),this.heights.clamped=!1}extrude(e,t,i){const s=i||{};this.state.altitudeMode&Ki.CLAMP&&(this.state.altitudeMode=Ki.ABSOLUTE);const r=s.toTransform||Sl.BOTH,n=[];if(r&Sl.GEOMETRY)this.features.forEach(i=>{let r=i.get("olcs_extrudedHeight");const a=i.get("olcs_altitudeMode"),o="absolute"===a||"absolute"===this.activeLayer.altitudeMode&&null==a||null!=i.get("olcs_groundLevel");if(!o){i.set("olcs_altitudeMode","absolute",!0);const e=ii(i);n.push(e)}if(null==r)s.setHeight?i.set("olcs_extrudedHeight",t):i.set("olcs_extrudedHeight",e);else{if(Array.isArray(r)){let i=r.length;if(s.setHeight)while(i--)r[i]=t;else while(i--)r[i]+=e}else null!=r&&(s.setHeight?r=t:r+=e);i.set("olcs_extrudedHeight",r)}}),this.recalculateExtent();else if(r&Sl.VERTEX){let i=this.vertices.length;while(i--)this.vertices[i].set("olcs_altitudeMode","absolute",!0),ti(this.vertices[i].getGeometry(),e,t)}return n.length?Promise.all(n).then(()=>{this.recalculateExtent()}):Promise.resolve()}placeOnTerrain(){const e=[];return this.features.forEach(t=>{e.push(ii(t))}),e.length?Promise.all(e).then(()=>{this.recalculateExtent()}):Promise.resolve()}setProperty(e,t,i){this.features.forEach(s=>{s.set(e,t,i)}),0===this.features.size&&Ol[e]&&(this.activeLayer[Ol[e]]=t),!i&&this.features.size&&this.recalculateExtent()}unsetProperty(e,t){this.features.forEach(i=>{i.unset(e,t)}),0===this.features.size&&Ol[e]&&(this.activeLayer[Ol[e]]=void 0),!t&&this.features.size&&this.recalculateExtent()}scale(e,t,i){const s=i||{},r=s.toTransform||Sl.BOTH,n=s.vertex||this.vertices[2],a=n[lr],o=n.getGeometry(),l=ol.extent.getSize(this.extent);let c=t;if(s.maintainAspectRatio){const t=l[1]/l[0];t<1e3&&t>1e-4?(c=e*t,c=1===a||3===a?-c:c):s.maintainAspectRatio=!1}const u=[{dx:1,dy:3,across:2,flipY:!1,flipX:!1},{dx:0,dy:2,across:3,flipY:!0,flipX:!1},{dx:3,dy:1,across:0,flipY:!0,flipX:!0},{dx:2,dy:0,across:1,flipY:!1,flipX:!0}],h=u[a];if(r&Sl.VERTEX&&(o.translate(e,c),this.vertices[h.dx].getGeometry().translate(e,0),this.vertices[h.dy].getGeometry().translate(0,c),this.vertices[4].getGeometry().translate(e/2,c/2)),r&Sl.GEOMETRY){const e=this.vertices[h.across].getGeometry().getCoordinates(),t=o.getCoordinates(),i=e[1]-t[1]>0===h.flipY,r=e[0]-t[0]>0===h.flipX,n=[];for(let s=0;s<4;s++)n[s]=this.vertices[s].getGeometry().getCoordinates();const a=ol.extent.boundingExtent(n),c=ol.extent.getSize(a);let u=0!==l[0]?c[0]/l[0]:c[0],d=0!==l[1]?c[1]/l[1]:c[1];this.flippedY!==i&&(this.flippedY=i,d*=-1),this.flippedX!==r&&(this.flippedX=r,u*=-1),this.features.forEach(t=>{const i=this.isOblique?t[ss.obliqueGeometry]:t.getGeometry(),r=i.get("_vcsGeomType");!r||"bbox"!==r&&"rectangle"!==r||s.maintainAspectRatio||i.unset("_vcsGeomType",!0),i.scale(u,d,e)}),this.extent=a,this.feature.getGeometry().scale(u,d,e)}}rotate(e,t){const i=t||{},s=i.toTransform||Sl.BOTH,r=ol.extent.getCenter(this.extent);if(s&Sl.VERTEX)for(let n=this.vertices.length-1;n>=0;n--)this.vertices[n].getGeometry().rotate(e,r);s&Sl.GEOMETRY&&(this.feature.getGeometry().rotate(e,r),this.features.forEach(t=>{const i=this.isOblique?t[ss.obliqueGeometry]:t.getGeometry();"bbox"===i.get("_vcsGeomType")&&i.set("_vcsGeomType","rectangle",!0),i.rotate(e,r)})),i.isMoving||this.recalculateExtent()}_clearGeometriesFromLayer(){let e=this.vertices.length;const t=new Array(e+1);t[e]=this.feature.getId();while(e--)t[e]=this.vertices[e].getId();this.vertices.splice(0),this.scratchLayer.removeFeaturesById(t)}recalculateExtent(){if(this.state.mode&Wi.FEATUREMODES){const e=this._createExtent();if(this._clearGeometriesFromLayer(),e[El])return;this.geometry=e,this.feature.set("olcs_altitudeMode",this.heights.clamped?"clampToGround":"absolute",!0),this.feature.setGeometry(e),this.flippedY=!1,this.flippedX=!1,this.feature.setStyle(this.style),this._createVertices()}}handleMapChange(e){Pl(e),5===this.vertices.length&&this.vertices[4].changed(),super.handleMapChange(e)}}var xl=Al,Yl=i(584),jl=i.n(Yl);const Nl=v.getLogger("vcs.vcm.util.editor.GeometryLayerEditor");class Fl extends Eo{get className(){return"vcs.vcm.util.editor.GeometryLayerEditor"}constructor(e={}){super(e),this.state.allowedGeometries=e.allowedGeometries||["Point","LineString","Polygon","BBox","Circle","Rectangle","Label"],this.lastFeatureType=null,(null==e.allowEditMode||e.allowEditMode)&&this.state.allowedModes.push(Object.keys(Ji).find(e=>Ji[e]===Wi.EDIT)),this.geometryEditor=null,this.defaultMode=Ji[e.defaultMode]||Wi.CREATE,this.scratchLayer.setStyle(new ol.style.Style({image:new ol.style.Icon({src:jl.a,scale:.45})})),this.state.dedicatedFeatureStyle=e.dedicatedFeatureStyle}deactivate(){super.deactivate(),this.isOblique&&(j.getInstance().getActiveMap().switchEnabled=!0)}beforeSetMode(e){super.beforeSetMode(e),e&Wi.GEOMETRYMODES||this.clearGeometryEditor()}setMode(e){if(Nl.debug(`GeometryLayerEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`),super.setMode(e),this.isOblique&&(j.getInstance().getActiveMap().switchEnabled=!(e&Wi.GEOMETRYMODES)||0===this.features.size),e&Wi.GEOMETRYMODES)if(this.geometryEditor)this.geometryEditor.validate()?(this.geometryEditor.setMode(e),this.geometryEditor.interactionChain.setActive(!0)):this.clearGeometryEditor();else if(this.features.size){const t=this.features.values().next().value;if(this.features.size>1)return void this.selectFeatureInteraction.selectFeature(t);this.editingFeature=t,this.editingFeature[this.state.featureTypeSymbol]|=qi.EDITING,this.geometryEditor=$r({parent:this,layer:this.activeLayer,geometry:this.isOblique?this.editingFeature[ss.obliqueGeometry]:this.editingFeature.getGeometry(),feature:this.editingFeature,onFinish:this._onCreationFinish.bind(this),onRemoved:this._onCreationFinish.bind(this)}),this.geometryEditor.initialize(),this.geometryEditor.setMode(e),this.interactionChain.addInteraction(this.geometryEditor.interactionChain)}}setAltitudeMode(e){return e&this.state.altitudeMode?Promise.resolve():super.setAltitudeMode(e).then(()=>{this.geometryEditor&&this.geometryEditor.setAltitudeMode(e)})}createFeature(e,t,i){a(e,Object.keys(Xr)),o(t,[String,Number]);const s=i||Xr[e](),r=new ol.Feature({geometry:s});if(this._setFeatureEditable(r),this.state.altitudeMode!==this.state.defaultAltitudeMode){const e=this.state.altitudeMode!==Ki.CLAMP&&j.getInstance().getActiveMap()instanceof Pt?"absolute":"clampToGround";r.set("olcs_altitudeMode",e)}else this.state.defaultAltitudeMode!==Ki.ABSOLUTE||j.getInstance().getActiveMap()instanceof Pt||r.set("olcs_altitudeMode","clampToGround");if(this.state.classificationType!==this.state.defaultClassificationType&&r.set("olcs_classificationType",Xi[this.state.classificationType]),t&&r.setId(t),this.lastFeatureType=e,this.state.layerName){const i=j.getInstance().getLayerByName(this.state.layerName);if(i&&i instanceof ss&&(t&&i.removeFeaturesById([t]),this.isOblique&&(s[ss.alreadyTransformedToImage]=!0),i.addFeatures([r]),this.state.dedicatedFeatureStyle||"Label"===e)){const e=i.defaultStyle instanceof et?i.defaultStyle:tt;r[Xe]=e.clone(new et({name:r.getId().toString()})),r.setStyle(r[Xe].style)}}return r}setModeAndSelectFeature(e,t){this.getRootEditor().beforeSetMode(e),this.state.mode=e,this.selectFeatureInteraction.selectFeature(t)}clearGeometryEditor(){if(this.editingFeature&&(this.editingFeature[this.state.featureTypeSymbol]^=qi.EDITING,this.editingFeature=null),this.geometryEditor){const e=this.geometryEditor.feature.getId();this.features.has(e)&&!this.geometryEditor.validate()&&this.selectFeatureInteraction.clearSelectionSet(!0),this.geometryEditor.stopCreation(),this.interactionChain.removeInteraction(this.geometryEditor.interactionChain),this.geometryEditor.destroy(),this.geometryEditor=null}}onSelect(){if(this.clearGeometryEditor(),this.state.active){let{mode:e}=this.state;this.state.mode&Wi.GEOMETRYMODES&&this.features.size>1&&this.parent?(e=Wi.SELECT,this.getRootEditor().setMode(e)):e&Wi.CREATE&&0===this.features.size?this._onCreationFinish():e&Wi.GEOMETRYMODES&&this.getRootEditor().setMode(e)}}_onCreationFinish(){if(this.state.mode===Wi.CREATE&&this.defaultMode===Wi.CREATE){const e=this.createFeature(this.lastFeatureType);this.setModeAndSelectFeature(this.state.mode,e)}else this.getRootEditor().setMode(this.defaultMode)}convertEditingFeatureToPolygon(){if(this.editingFeature&&1===this.features.size){const e=this.isOblique?this.editingFeature[ss.obliqueGeometry]:this.editingFeature.getGeometry(),t=ri(e);this.isOblique&&(t[ss.alreadyTransformedToImage]=!0),this.editingFeature.setGeometry(t);const i=this.editingFeature;this.selectFeatureInteraction.clearSelectionSet(!0),this.selectFeatureInteraction.selectFeature(i)}}setEditingFeatureTypeProperty(e,t){this.editingFeature&&1===this.features.size&&(this.editingFeature.set(e,t),this.selectFeatureInteraction.clearSelectionSet(!0),this.selectFeatureInteraction.selectFeature(this.editingFeature))}handleMapChange(e){super.handleMapChange(e)}}var Rl=Fl;const Hl=window.localStorage,Gl=v.getLogger("vcs.vcm.util.storage");function zl(){if(!Hl)return!1;try{const e="__storage_test__";return Hl.setItem(e,e),Hl.removeItem(e),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==Hl.length}}class Bl{constructor(e){this.namespace=e}setItem(e,t){zl()?Hl.setItem(`${this.namespace}.${e}`,t):Gl.warning("storage unavailable or full")}getItem(e){return Hl?Hl.getItem(`${this.namespace}.${e}`):null}removeItem(e){Hl&&Hl.removeItem(`${this.namespace}.${e}`)}}var Vl=Bl;const Ul=v.getLogger("vcs.vcm.util.editor.StyleLayerEditor"),Wl=new Vl("StyleLayerEditor");class ql extends Eo{get className(){return"vcs.vcm.util.editor.StyleLayerEditor"}constructor(e={}){if(super(e),this.icons=e.icons||[],this.customIcons=[],this.allowCustomIcons=e.allowCustomIcons||!1,this.storeCustomIcons=e.storeCustomIcons||!1,this.currentStyleOptions={text:null,fill:null,stroke:null,image:null},this.currentStyleItem=tt.clone(),!e.noDefaultIcons){const e=j.getInstance().libraryBasePath;this._fetchIcons(e+"images/editor/defaultIconsCategory.json")}e.iconLibraries&&e.iconLibraries.forEach(this._fetchIcons.bind(this)),this.allowCustomIcons&&this.storeCustomIcons&&zl()&&this._fetchCustomIcons(),this._syncOptions(tt.getOptions())}_fetchIcons(e){return G.a.get(e).then(({data:t})=>{const i=e.replace(/\/?[^/]+$/,"");Array.isArray(t)?t.forEach(e=>{if("string"===typeof e){const t=/^data/.test(e)?e:`${i}/${e}`;this.icons.push({src:t})}else e.src=`${i}/${e.src}`,this.icons.push(e)}):Ul.error(`could not load icon library, content of ${e} is not a JSONArray`)})}_fetchCustomIcons(){const e=Wl.getItem("customIconIndex");e&&JSON.parse(e).forEach(e=>{const t=Wl.getItem(""+e);t&&this.customIcons.push({src:t})})}readIconFromFile(e,t={}){return this.allowCustomIcons?new Promise((i,s)=>{const r=new FileReader;r.onloadend=()=>{const e=r.result;if(this.customIcons.push(Object.assign(t,{src:e})),this.storeCustomIcons&&zl()){const t=JSON.parse(Wl.getItem("customIconIndex")||"[]"),i=Object(c["c"])();t.push(i),Wl.setItem("customIconIndex",JSON.stringify(t)),Wl.setItem(""+i,e)}i()},r.onerror=s,r.readAsDataURL(e)}):(Ul.warning("custom icons are not supported at this time"),Promise.resolve())}deleteCustomIcon(e){if(this.storeCustomIcons){const t=JSON.parse(Wl.getItem("customIconIndex")||"[]"),i=t.filter(t=>{const i=Wl.getItem(t);return i!==e||(Wl.removeItem(t),!1)});Wl.setItem("customIconIndex",JSON.stringify(i))}const t=this.customIcons.findIndex(t=>t.src===e);t>-1&&this.customIcons.splice(t,1)}addEditingLayer(e){super.addEditingLayer(e),this.onSelect()}setMode(){this.onSelect()}onSelect(){if(this.activeLayer){this.state.isDeclarativeStyle=!1;let e=this.activeLayer.style;if(e instanceof gt&&(this.state.isDeclarativeStyle=!0,e=null),!this.state.isDeclarativeStyle&&this.features.size){const t=this.features.get(this.state.selectedFeatureId);e=t[Xe]||e}this.state.isLayerStyle=this.activeLayer.style===e,e?this.currentStyleItem&&this.currentStyleItem===e||(this.currentStyleItem=e,this._syncOptions(e.getOptions())):(this.currentStyleOptions.text=null,this.currentStyleOptions.fill=null,this.currentStyleOptions.stroke=null,this.currentStyleOptions.image=null,this.currentStyleItem=null)}}setLayerStyle(e){this.activeLayer.setStyle(e||this.activeLayer.defaultStyle),this.onSelect()}_syncOptions(e){e.fill?(this.currentStyleOptions.fill?this.currentStyleOptions.fill.color=e.fill.color:(e.fill.pattern||(e.fill.pattern=null),this.currentStyleOptions.fill=e.fill),e.fill.pattern&&this.currentStyleOptions.fill.pattern?Object.assign(this.currentStyleOptions.fill.pattern,e.fill.pattern):this.currentStyleOptions.fill.pattern={type:0,color:[0,0,0,1],width:1,size:10}):this.currentStyleOptions.fill=null,this.currentStyleOptions.stroke=e.stroke||null,e.text?(this.currentStyleOptions.text=e.text,this.currentStyleOptions.text.font=Ae(e.text.font||"18px sans-serif")):this.currentStyleOptions.text=null,e.image?(this.currentStyleOptions.image=e.image,this.currentStyleOptions.image.currentImage=e.image.radius?this.currentStyleItem.image.getImage(1).toDataURL():e.image.src):this.currentStyleOptions.image=null}addDedicatedStyleFromCurrentStyle(){if(!this.state.isDeclarativeStyle&&this.features.size){let e;this.features.forEach(t=>{const i=this.currentStyleItem.clone(new et({id:t.getId()}));e||(e=i),t[Xe]=i,t.setStyle(t[Xe].style),t.changed()}),this.currentStyleItem=e,this.state.isLayerStyle=!1}}cloneCurrentStyleOntoLayer(){const e=this.currentStyleItem.clone();this.activeLayer.setStyle(e),this.currentStyleItem=e}updateFont(e){this.currentStyleItem.text||(this.currentStyleItem.text=new ol.style.Text);const t=xe(e);this.currentStyleItem.text.setFont(t),this.currentStyleOptions.text||(this.currentStyleOptions.text={}),this.currentStyleOptions.text.font?Object.assign(this.currentStyleOptions.text.font,e):this.currentStyleOptions.text.font=e}setImage(e){let t;const i=Object.assign({},e);t=i.radius?We(i):new ol.style.Icon(i),this.currentStyleItem.image=t;const s=this.currentStyleItem.getOptions({image:!0});s.image?(this.currentStyleOptions.image=s.image,this.currentStyleOptions.image.currentImage=this.currentStyleOptions.image.src||this.currentStyleItem.image.getImage(1).toDataURL()):this.currentStyleOptions.image=null}updateStyle(e){this.features.size&&this.currentStyleItem&&this.features.forEach(e=>{if(!e[Xe]||e[Xe].name!==this.currentStyleItem.name){const t=e[Xe];t?this.currentStyleItem.clone(t):e[Xe]=this.currentStyleItem.clone(new et({id:e.getId()})),e.setStyle(e[Xe].style)}e.changed()}),e&&this._syncOptions(this.currentStyleItem.getOptions())}updateStyleSection(e,t){a(e,["fill","stroke","text","image"]),this.features.size&&this.currentStyleItem&&this.features.forEach(i=>{i[Xe]||(i[Xe]=this.activeLayer.style.clone(new et({id:i.getId()})),i.setStyle(i[Xe].style)),i[Xe].name!==this.currentStyleItem.name&&("fill"===e?(i[Xe].fillColor=this.currentStyleItem.fillColor.slice(),i[Xe].pattern=this.currentStyleItem.pattern?Object.assign({},this.currentStyleItem.pattern):void 0):i[Xe][e]=this.currentStyleItem[e].clone()),t||i.changed()})}}var Jl=ql;const Kl=v.getLogger("vcs.vcm.util.editor.CompositeLayerEditor");class Zl extends Eo{get className(){return"vcs.vcm.util.editor.CompositeLayerEditor"}constructor(e){if(super(e),this.children=[],e.featureLayerEditor&&this.children.push(new xl(Object.assign(e.featureLayerEditor,{parent:this}))),e.geometryLayerEditor){const t=Object.assign(e.geometryLayerEditor,{parent:this});t.dedicatedFeatureStyle=!(null!=t.dedicatedFeatureStyle||!e.styleLayerEditor),this.children.push(new Rl(t))}e.styleLayerEditor&&this.children.push(new Jl(Object.assign(e.styleLayerEditor,{parent:this})))}getFeatureLayerEditor(){return this.children.find(e=>e instanceof xl)}getGeometryLayerEditor(){return this.children.find(e=>e instanceof Rl)}getStyleLayerEditor(){return this.children.find(e=>e instanceof Jl)}initialize(){this.interactionChain.initialize(),this.children.forEach(e=>{e.initialize()}),this.selectFeatureInteraction.onCesiumSelect(this.onCesiumSelect.bind(this))}activate(){this.children.forEach(e=>{e.activate()}),super.activate()}deactivate(){super.deactivate(),this.children.forEach(e=>{e.deactivate()})}beforeSetMode(e){super.beforeSetMode(),this.children.forEach(t=>{t.beforeSetMode(e)})}setMode(e){Kl.debug(`CompositeLayerEditor ${e} ${Object.keys(Wi).find(t=>Wi[t]===e)}`),super.setMode(e),this.children.forEach(t=>{t.setMode(e)})}setAltitudeMode(e){let t=Promise.resolve();return this.children.forEach(i=>{t=t.then(()=>i.setAltitudeMode(e))}),t.then(()=>super.setAltitudeMode(e))}addEditingLayer(e){super.addEditingLayer(e),this.children.forEach(t=>{t.addEditingLayer(e)})}destroy(){super.destroy(),this.children.forEach(e=>{e.destroy()})}}var Ql=Zl,Xl="<div class='balloon' id='myBalloon'>\n  <h1 class='balloon-title'><%= obj.planningName %></h1>\n  <div class='balloon-content'>\n    <%= obj.planningDescription %>\n  </div>\n  <div class='balloon-close-col'>\n    <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>\n  </div>\n  <div class='dialog-image-balloon'></div>\n  <div class='balloon-left-edge'></div>\n</div>\n",$l="<div class='balloon' id='myBalloon'>\n  <div class='balloon-content'>\n    <h1 class='balloon-title'> Available Attributes </h1>\n    <% for (var key in obj) { %>\n    <% if (obj[key] instanceof Object){%>\n    <% for (var key2 in obj[key]) { %>\n    <p class='balloon-text'><span class='balloon-street'> <%=key%>.<%=key2%> : <%=obj[key][key2]%></span><br></p>\n    <% } %>\n    <% } else{ %>\n    <p class='balloon-text'><span class='balloon-street'> <strong> <%=key%> </strong> : <%=obj[key]%></span><br></p>\n    <% } %>\n    <% } %>\n  </div>\n  <div class='balloon-close-col'>\n    <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>\n  </div>\n  <div class='dialog-image-balloon'></div>\n  <div class='balloon-left-edge'></div>\n</div>\n";const ec=[{title:{de:"Leerer Balloon",en:"Empty Balloon"},template:""},{title:{de:"Ebenen Name & Beschreibung",en:"Layer Name & Description"},template:Xl.trim()},{title:{de:"Alle Attribute",en:"All Properties"},template:$l.trim()}];var tc=ec;L.PLANNINGINSTANCES_CHANGED="PLANNINGINSTANCES_CHANGED";class ic extends _a{static get className(){return"vcs.vcm.widgets.Planning"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{serviceUrl:"",scenarioId:"",projectId:"",useLocalCRS:!1,showInLegend:!0,legendTitle:{en:"Plannings",de:"Planungen",pl:"Planowanie"},commentIcons:void 0,useDefaultTerrain:!0,allowBalloonEditor:!1,predefinedBalloons:void 0,editorOptions:void 0,styleLayerEditorOptions:{},showStyleSelector:!1,allowedFeatureStoreGeometries:void 0,featureStoreEditorDefaultMode:"create",simpleEditorUi:!1,allowEditorSwitch:!1,isExtendedPlanner:!1})}constructor(e){e.className=ic.className,super(e);const t=ic.getDefaultOptions();this.serviceUrl=e.serviceUrl||"https://planning.virtualcityplanner.de",this.scenarioId=e.scenarioId,this.projectId=e.projectId,this.useLocalCRS=Object(c["e"])(e.useLocalCRS,t.useLocalCRS),this.showInLegend=Object(c["e"])(e.showInLegend,t.showInLegend),this.legendTitle=e.legendTitle||t.legendTitle,this.loginManager=Bo.getInstance(),this.url=n["a"].parse(this.serviceUrl),this.url.extendPath("planning"),this.loginManager.registerWidget({onLogin:[this.fetchUserPlannings.bind(this),this.fetchUserCreate.bind(this)],onLogout:[this.fetchUserPlannings.bind(this)],beforeLogout:[this.clear.bind(this),this.setUserMayCreate.bind(this,{data:!1})],serviceUrl:this.serviceUrl,projectId:this.projectId,scenarioId:this.scenarioId}).then(()=>{this.url=this.loginManager.url.clone(),this.url.extendPath("planning"),this.url.queryParams=this.loginManager.url.queryParams}).catch(e=>{this.logger.warning(e.message),this.logger.warning("could not initialize planning, missing login url")}),this.planningInstances=[],this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"],this._linkedPlannings=[],this.activePlanningInstance=null,this.userMayCreate={permission:!1},this.fetching=null,this.legendCluster=new Ca({title:this.legendTitle}),this.commentIcons=this._setupCommentStyle(e.commentIcons),this.terrainUrl=e.terrainUrl||null,this.useDefaultTerrain=Object(c["e"])(e.useDefaultTerrain,t.useDefaultTerrain),this.allowBalloonEditor=Object(c["e"])(e.allowBalloonEditor,t.allowBalloonEditor),this.predefinedBalloons=tc,Array.isArray(e.predefinedBalloons)&&this.predefinedBalloons.push(...e.predefinedBalloons),this.editorOptions=Object.assign(e.editorOptions||{},{hideExport:!0,showStyleSelector:Object(c["e"])(e.showStyleSelector,t.showStyleSelector)}),this.allowedFeatureStoreGeometries=e.allowedFeatureStoreGeometries,this.featureStoreEditorDefaultMode=e.featureStoreEditorDefaultMode||t.featureStoreEditorDefaultMode,this.simpleEditorUi=Object(c["e"])(e.simpleEditorUi,t.simpleEditorUi),this.allowEditorSwitch=Object(c["e"])(e.allowEditorSwitch,t.allowEditorSwitch),this.isExtendedPlanner=Object(c["e"])(e.isExtendedPlanner,t.isExtendedPlanner),this.styleLayerEditorOptions=e.styleLayerEditorOptions||t.styleLayerEditorOptions}_setupCommentStyle(e){if(this.framework.getStyleByName("planningCommentStyle"))return{};const t=this.framework.libraryBasePath,i=e||{[qo.DEFAULT]:t+"images/editor/icon-bubble.png",[qo.WARNING]:t+"images/editor/icon-bubble-red.png",[qo.INFO]:t+"images/editor/icon-bubble-blue.png",[qo.SUCCESS]:t+"images/editor/icon-bubble-green.png"},s={strokeColor:'color("#AAAAAA")'};if("string"===typeof i)s.image=`"${i}"`;else{const e=Object.values(qo),r=[];Object.entries(i).forEach(([t,i])=>{e.includes(t)&&t!==qo.DEFAULT&&r.push([`\${commentType} === "${t}"`,`"${i}"`])}),i[qo.DEFAULT]=i[qo.DEFAULT]||t+"images/editor/icon-bubble.png",r.push(["true",`"${i[qo.DEFAULT]}"`]),s.image={conditions:r},e.forEach(e=>{i[e]||(i[e]=i[qo.DEFAULT])})}const r=new gt({name:"planningCommentStyle",declarativeStyle:s});return r.cesiumStyle.ready?(this.framework.addStyle(r),"string"===typeof i?{}:i):(this.logger.warning("could not setup custom comment style, using default"),this._setupCommentStyle())}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;if(this.layerEditor=new Ql({geometryLayerEditor:{allowedGeometries:this.allowedFeatureStoreGeometries,defaultMode:this.featureStoreEditorDefaultMode},featureLayerEditor:{},styleLayerEditor:this.styleLayerEditorOptions}),this.layerEditor.initialize(),this.commentsLayerEditor=new Ql({geometryLayerEditor:{allowedGeometries:["Point"],defaultMode:"edit"},styleLayerEditor:{}}),this.useDefaultTerrain&&!this.terrainUrl){const e=this.framework.getLayers().find(e=>e.activeOnStartup&&e instanceof Gn);this.terrainUrl=e?e.url:null}if(this.terrainUrl&&!/https?:/.test(this.terrainUrl)){const e=n["a"].parse(window.location.href);e.queryParams={},e.hashPath=[],/^\//.test(this.terrainUrl)?(e.path=[],this.terrainUrl=`${e.toString()}${this.terrainUrl}`):this.terrainUrl=`${e.toString().replace(/\/$/,"")}/${this.terrainUrl.replace(/^\.\//,"")}`}if(this.fetchUserPlannings(),this.showInLegend&&(this.legendCluster=Ja(),!this.legendCluster)){this.legendCluster=new Ca({title:this.legendTitle});const e=this.framework.getWidgetByType("vcs.vcm.widgets.legend.Legend");e&&e.cluster.push(this.legendCluster)}this.initialized=!0,this.initializedFinished()}return!0}handleMapChangeEvent(e){super.handleMapChangeEvent(e),-1===this.supportedMaps.indexOf(e.className)?this.legendCluster.visible=!1:this.legendCluster.visible=!0,this.planningInstances.forEach(t=>{t.handleMapChange(e)})}fetchUserCreate(){const e=this.url.clone();G.a.post(e.extendPath("permission").toString(),{mapId:this.scenarioId}).then(this.setUserMayCreate.bind(this))}setUserMayCreate(e){null!==e.data&&(this.userMayCreate.permission=e.data)}fetchUserPlannings(){const e=this.url.clone();this.fetching=G.a.post(e.extendPath("list").toString(),{mapId:this.scenarioId}).then(this.setPlannings.bind(this)).catch(e=>{this.logger.error(e)})}setPlannings(e){this.clear().then(()=>{const t=e.data;t.forEach(this.createPlanningInstance,this),this._linkedPlannings=[],this.fetching=null,this.framework.publish(L.PLANNINGINSTANCES_CHANGED,this.planningInstances)})}setActivePlanning(e){if(a(e,hl),this.activePlanningInstance){if(this.activePlanningInstance._id===e._id)return;this.activePlanningInstance.maintainLockInterval&&this.activePlanningInstance.unlock(),this.activePlanningInstance.unLoad()}this.activePlanningInstance=e,this.activePlanningInstance&&this.activePlanningInstance.load()}deactivateActivePlanning(){this.activePlanningInstance&&(this.activePlanningInstance.maintainLockInterval&&this.activePlanningInstance.unlock(),this.activePlanningInstance.unLoad()),this.activePlanningInstance=null}createPlanningInstance(e){e.url=this.url;const t=new hl(Object.assign(e,{editorId:this.layerEditor.id,commentsEditorId:this.commentsLayerEditor.id,terrainUrl:this.terrainUrl}));return this._linkedPlannings.indexOf(e._id)>-1&&e.public&&t.load(),this.planningInstances.push(t),this.legendCluster.children.push(new Ba({planningInstance:t})),this.legendCluster.visible=!0,t}addPlanningInstance(e,t,i){a(e,String),o(t,String),o(i,Object);const s={name:e,description:t,mapId:this.scenarioId};i&&(s.properties=i);const r=this.url.clone();return G.a.post(r.extendPath("add").toString(),s).then(({data:e})=>{const t=this.createPlanningInstance(e);return this.framework.publish(L.PLANNINGINSTANCES_CHANGED,this.planningInstances),t}).catch(e=>{this.logger.warning(e.response.data)})}deletePlanning(e){a(e,hl);const t=this.url.clone();return G.a.post(t.extendPath("remove").toString(),{_id:e._id}).then(()=>{const t=this.planningInstances.findIndex(t=>t._id===e._id);this.planningInstances.splice(t,1),this.activePlanningInstance&&this.activePlanningInstance._id===e._id&&(this.activePlanningInstance=null);const i=this.legendCluster.children.findIndex(t=>t instanceof Ba&&t.planningInstance._id===e._id);return this.legendCluster.children.splice(i,1),e.destroy(),this.framework.publish(L.PLANNINGINSTANCES_CHANGED,this.planningInstances),e._id})}clear(){const e=this.planningInstances.map(e=>e.destroy().then(()=>Promise.resolve()).catch(()=>(this.logger.error("could not unlock planning instance"+e.name),Promise.resolve())));return Promise.all(e).then(()=>(this.planningInstances.splice(0),this.activePlanningInstance=null,this.legendCluster.children.splice(0),this.legendCluster.visible=!1,Promise.resolve()))}getConfigObject(){return{useLocalCRS:this.useLocalCRS}}handleURLParameter(e){e.plannings&&Array.isArray(e.plannings)&&this.framework.subscribeOnce("PLANNINGINSTANCES_CHANGED",()=>{this.planningInstances.filter(t=>e.plannings.includes(t._id)).forEach(e=>{e.load()})})}getLink(e){const t=this.planningInstances.filter(e=>e.public&&e.loaded).map(e=>e._id);e.queryParams.plannings&&delete e.queryParams.plannings,t.length>0&&e.addQueryParams({plannings:JSON.stringify(t)})}}var sc=ic;class rc{constructor(e,t,i){this.id=e,this.symbol=t,this.openlayersFilter=i}getId(){return this.id}getOpenlayersFilter(){return this.openlayersFilter}}const nc={IS_NULL:new rc("IS_NULL","isNull",ol.format.filter.isNull),EQUAL_TO:new rc("EQUAL_TO"," = ",ol.format.filter.EqualTo),NOT_EQUAL_TO:new rc("NOT_EQUAL_TO"," != ",ol.format.filter.NotEqualTo),LESS_THAN:new rc("LESS_THAN"," < ",ol.format.filter.LessThan),GREATER_THAN:new rc("GREATER_THAN"," > ",ol.format.filter.GreaterThan),LESS_THAN_OR_EQUAL_TO:new rc("LESS_THAN_OR_EQUAL_TO"," <= ",ol.format.filter.LessThanOrEqualTo),GREATER_THAN_OR_EQUAL_TO:new rc("GREATER_THAN_OR_EQUAL_TO"," >= ",ol.format.filter.GreaterThanOrEqualTo),LIKE:new rc("LIKE","like",ol.format.filter.IsLike),BETWEEN:new rc("BETWEEN","between",ol.format.filter.IsBetween),BBOX:new rc("BBOX","bbox",ol.format.filter.Bbox),INTERSECTS:new rc("INTERSECTS","intersects",ol.format.filter.Intersects),DWITHIN:new rc("DWITHIN","distance within",ol.format.filter.DWithin),WITHIN:new rc("WITHIN","within",ol.format.filter.Within),AND:new rc("AND","and",ol.format.filter.and),OR:new rc("OR","or",ol.format.filter.or)};var ac=rc;const oc=v.getLogger("vcs.vcm.cityGML.property.Property"),lc={GEOMETRY:0,ATTRIBUTE:1,GENERICATTRIBUTE:2,GENERICDATEATTRIBUTE:3,DATEATTRIBUTE:4,DATEYEARATTRIBUTE:5,FILTER:6},cc={GEOMETRY:0,STRING:1,DOUBLE:2,INTEGER:3,BOOLEAN:4,DATE:5,DATETIME:6,FILTER:7};class uc{constructor(e,t,i,s,r,n,a){this.id=e,this.type=i,this.dataType=a,this.allowedComparisons=[],this.prefix=n,this.valueReference=s||`${n}:${this.id}`;for(let o=0;o<r.length;o++){const e=r[o];t.hasOwnProperty(e)&&this.allowedComparisons.push(t[e])}}getPrefix(){return oc.deprecate("getPrefix","access the prefix property."),this.prefix}getId(){return oc.deprecate("getId","access the id property."),this.id}getType(){return oc.deprecate("getType","access the type property."),this.type}getAllowedComparisons(){return oc.deprecate("getAllowedComparisons","access the allowedComparisons property."),this.allowedComparisons}getValueReference(){return oc.deprecate("getValueReference","access the valueReference property."),this.valueReference}}const hc={Filter:{[nc.AND.id]:nc.AND,[nc.OR.id]:nc.OR},Geometry:{[nc.BBOX.id]:nc.BBOX,[nc.INTERSECTS.id]:nc.INTERSECTS,[nc.DWITHIN.id]:nc.DWITHIN,[nc.WITHIN.id]:nc.WITHIN},StringAttribute:{[nc.EQUAL_TO.id]:nc.EQUAL_TO,[nc.NOT_EQUAL_TO.id]:nc.NOT_EQUAL_TO,[nc.LIKE.id]:nc.LIKE,[nc.IS_NULL.id]:nc.IS_NULL},BooleanAttribute:{[nc.EQUAL_TO.id]:nc.EQUAL_TO,[nc.NOT_EQUAL_TO.id]:nc.NOT_EQUAL_TO,[nc.IS_NULL.id]:nc.IS_NULL},DateAttribute:{[nc.EQUAL_TO.id]:nc.EQUAL_TO,[nc.NOT_EQUAL_TO.id]:nc.NOT_EQUAL_TO,[nc.LESS_THAN.id]:nc.LESS_THAN,[nc.GREATER_THAN.id]:nc.GREATER_THAN,[nc.LESS_THAN_OR_EQUAL_TO.id]:nc.LESS_THAN_OR_EQUAL_TO,[nc.GREATER_THAN_OR_EQUAL_TO.id]:nc.GREATER_THAN_OR_EQUAL_TO,[nc.BETWEEN.id]:nc.BETWEEN,[nc.IS_NULL.id]:nc.IS_NULL},NumberAttribute:{[nc.EQUAL_TO.id]:nc.EQUAL_TO,[nc.NOT_EQUAL_TO.id]:nc.NOT_EQUAL_TO,[nc.LESS_THAN.id]:nc.LESS_THAN,[nc.GREATER_THAN.id]:nc.GREATER_THAN,[nc.LESS_THAN_OR_EQUAL_TO.id]:nc.LESS_THAN_OR_EQUAL_TO,[nc.GREATER_THAN_OR_EQUAL_TO.id]:nc.GREATER_THAN_OR_EQUAL_TO,[nc.BETWEEN.id]:nc.BETWEEN,[nc.IS_NULL.id]:nc.IS_NULL}};class dc extends uc{constructor(e,t){super("boundedBy",hc.Geometry,lc.GEOMETRY,"gml:boundedBy",e,"gml",cc.GEOMETRY)}}class mc extends uc{constructor(e){super("id",hc.StringAttribute,lc.ATTRIBUTE,"@gml:id",e,"gml",cc.STRING)}}class gc extends uc{constructor(e){super("name",hc.StringAttribute,lc.ATTRIBUTE,"gml:name",e,"gml",cc.STRING)}}class pc extends uc{constructor(e){super("description",hc.StringAttribute,lc.ATTRIBUTE,"gml:description",e,"gml",cc.STRING)}}class fc extends uc{constructor(e){super("lineage",hc.StringAttribute,lc.ATTRIBUTE,"citydb:lineage",e,"citydb",cc.STRING)}}class yc extends uc{constructor(e){super("updatingPerson",hc.StringAttribute,lc.ATTRIBUTE,"citydb:updatingPerson",e,"citydb",cc.STRING)}}class _c extends uc{constructor(e){super("lastModificationDate",hc.DateAttribute,lc.DATEATTRIBUTE,"citydb:lastModificationDate",e,"citydb",cc.DATE)}}class vc extends uc{constructor(e){super("reasonForUpdate",hc.StringAttribute,lc.ATTRIBUTE,"citydb:reasonForUpdate",e,"citydb",cc.STRING)}}class Lc extends uc{constructor(e){super("creationDate",hc.DateAttribute,lc.DATEATTRIBUTE,"core:creationDate",e,"core",cc.DATE)}}class Mc extends uc{constructor(e){super("terminationDate",hc.DateAttribute,lc.DATEATTRIBUTE,"core:terminationDate",e,"core",cc.DATE)}}class bc extends uc{constructor(e){super("relativeToTerrain",hc.StringAttribute,lc.ATTRIBUTE,"core:relativeToTerrain",e,"core",cc.STRING)}}class wc extends uc{constructor(e){super("relativeToWater",hc.StringAttribute,lc.ATTRIBUTE,"core:relativeToWater",e,"core",cc.STRING)}}class Tc extends uc{constructor(e){super("externalReferenceInformationSystem",hc.StringAttribute,lc.ATTRIBUTE,"core:externalReference/core:informationSystem",e,"core",cc.STRING)}}class Sc extends uc{constructor(e){super("externalReferenceName",hc.StringAttribute,lc.ATTRIBUTE,"core:externalReference/core:externalObject/core:name",e,"core",cc.STRING)}}class Cc extends uc{constructor(e){super("externalReferenceUri",hc.StringAttribute,lc.ATTRIBUTE,"core:externalReference/core:externalObject/core:uri",e,"core",cc.STRING)}}class Ec extends uc{constructor(e){super("stringAttribute",hc.StringAttribute,lc.GENERICATTRIBUTE,"gen:stringAttribute[@gen:name='token']/gen:value",e,"gen",cc.STRING)}}class Ic extends uc{constructor(e){super("doubleAttribute",hc.NumberAttribute,lc.GENERICATTRIBUTE,'gen:doubleAttribute[@gen:name="token"]/gen:value',e,"gen",cc.DOUBLE)}}class kc extends uc{constructor(e){super("intAttribute",hc.NumberAttribute,lc.GENERICATTRIBUTE,'gen:intAttribute[@gen:name="token"]/gen:value',e,"gen",cc.INTEGER)}}class Dc extends uc{constructor(e){super("uriAttribute",hc.StringAttribute,lc.GENERICATTRIBUTE,'gen:uriAttribute[@gen:name="token"]/gen:value',e,"gen",cc.STRING)}}class Oc extends uc{constructor(e){super("dateAttribute",hc.DateAttribute,lc.GENERICDATEATTRIBUTE,'gen:dateAttribute[@gen:name="token"]/gen:value',e,"gen",cc.DATE)}}class Pc extends uc{constructor(e){super("measureAttribute",hc.NumberAttribute,lc.GENERICATTRIBUTE,'gen:measureAttribute[@gen:name="token"]/gen:value',e,"gen",cc.DOUBLE)}}class Ac extends uc{constructor(e,t){super("class",hc.StringAttribute,lc.ATTRIBUTE,null,e,t,cc.STRING)}}class xc extends uc{constructor(e,t){super("function",hc.StringAttribute,lc.ATTRIBUTE,null,e,t,cc.STRING)}}class Yc extends uc{constructor(e,t){super("usage",hc.StringAttribute,lc.ATTRIBUTE,null,e,t,cc.STRING)}}class jc extends uc{constructor(e,t){super("yearOfConstruction",hc.DateAttribute,lc.DATEYEARATTRIBUTE,null,e,t,cc.DATE)}}class Nc extends uc{constructor(e,t){super("yearOfDemolition",hc.DateAttribute,lc.DATEYEARATTRIBUTE,null,e,t,cc.DATE)}}class Fc extends uc{constructor(e,t){super("roofType",hc.StringAttribute,lc.ATTRIBUTE,null,e,t,cc.STRING)}}class Rc extends uc{constructor(e,t){super("measuredHeight",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.DOUBLE)}}class Hc extends uc{constructor(e,t){super("storeysAboveGround",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.INTEGER)}}class Gc extends uc{constructor(e,t){super("storeysBelowGround",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.INTEGER)}}class zc extends uc{constructor(e,t){super("storeyHeightsAboveGround",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.DOUBLE)}}class Bc extends uc{constructor(e,t){super("storeyHeightsBelowGround",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.DOUBLE)}}class Vc extends uc{constructor(e){super("street",hc.StringAttribute,lc.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:street",e,"citydb",cc.STRING)}}class Uc extends uc{constructor(e){super("houseNumber",hc.StringAttribute,lc.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:houseNumber",e,"citydb",cc.STRING)}}class Wc extends uc{constructor(e){super("poBox",hc.StringAttribute,lc.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:poBox",e,"citydb",cc.STRING)}}class qc extends uc{constructor(e){super("zipCode",hc.StringAttribute,lc.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:zipCode",e,"citydb",cc.STRING)}}class Jc extends uc{constructor(e){super("city",hc.StringAttribute,lc.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:city",e,"citydb",cc.STRING)}}class Kc extends uc{constructor(e){super("state",hc.StringAttribute,lc.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:state",e,"citydb",cc.STRING)}}class Zc extends uc{constructor(e){super("country",hc.StringAttribute,lc.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:country",e,"citydb",cc.STRING)}}class Qc extends uc{constructor(e,t){super("isMovable",hc.BooleanAttribute,lc.ATTRIBUTE,null,e,t,cc.BOOLEAN)}}class Xc extends uc{constructor(e,t){super("species",hc.StringAttribute,lc.ATTRIBUTE,null,e,t,cc.STRING)}}class $c extends uc{constructor(e,t){super("height",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.DOUBLE)}}class eu extends uc{constructor(e,t){super("trunkDiameter",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.DOUBLE)}}class tu extends uc{constructor(e,t){super("crownDiameter",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.DOUBLE)}}class iu extends uc{constructor(e,t){super("averageHeight",hc.NumberAttribute,lc.ATTRIBUTE,null,e,t,cc.DOUBLE)}}var su=uc;const ru={gml:"http://www.opengis.net/gml",core:"http://www.opengis.net/citygml/2.0",citydb:"http://www.3dcitydb.org/citygml-ade/3.0/citygml/2.0",tran:"http://www.opengis.net/citygml/transportation/2.0",wtr:"http://www.opengis.net/citygml/waterbody/2.0",grp:"http://www.opengis.net/citygml/cityobjectgroup/2.0",luse:"http://www.opengis.net/citygml/landuse/2.0",frn:"http://www.opengis.net/citygml/cityfurniture/2.0",app:"http://www.opengis.net/citygml/appearance/2.0",tex:"http://www.opengis.net/citygml/texturedsurface/2.0",bldg:"http://www.opengis.net/citygml/building/2.0",xal:"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0",dem:"http://www.opengis.net/citygml/relief/2.0",veg:"http://www.opengis.net/citygml/vegetation/2.0",gen:"http://www.opengis.net/citygml/generics/2.0",brid:"http://www.opengis.net/citygml/bridge/2.0",tun:"http://www.opengis.net/citygml/tunnel/2.0",vcs:"http://www.virtualcitysystems.de/wfs/2.0/"},nu=["_CityObject","Building","CityFurniture","GenericCityObject","SolitaryVegetationObject","Bridge","Tunnel","CityObjectGroup","LandUse","TransportationComplex","Railway","Road","Square","Track","PlantCover","WaterBody"],au=["BuildingInstallation","BuildingPart","BridgeInstallation","BridgePart","BridgeConstructionElement","TunnelInstallation","TunnelPart"],ou=["WallSurface","RoofSurface","GroundSurface","ClosureSurface","OuterCeilingSurface","OuterFloorSurface","Window","Door","WaterSurface","WaterGroundSurface","WaterClosureSurface","TrafficArea","AuxiliaryTrafficArea"],lu=["id","name","creationDate","terminationDate","relativeToTerrain","relativeToWater","externalReferenceInformationSystem","externalReferenceName","externalReferenceUri","stringAttribute","doubleAttribute","intAttribute","uriAttribute","dateAttribute","measureAttribute","class","function","usage","yearOfConstruction","yearOfDemolition","roofType","measuredHeight","storeysAboveGround","storeysBelowGround","storeyHeightsAboveGround","storeyHeightsBelowGround","street","houseNumber","poBox","zipCode","city","state","country","isMovable","species","height","trunkDiameter","crownDiameter","averageHeight","lineage","updatingPerson","lastModificationDate","reasonForUpdate"],cu=["id","name","relativeToTerrain","relativeToWater","externalReferenceInformationSystem","externalReferenceName","externalReferenceUri","class","function","usage","roofType","measuredHeight","storeysAboveGround","storeysBelowGround","storeyHeightsAboveGround","storeyHeightsBelowGround","street","houseNumber","poBox","zipCode","city","state","country","isMovable","species","height","trunkDiameter","crownDiameter","averageHeight","lineage","updatingPerson"],uu=["stringAttribute","doubleAttribute","intAttribute","uriAttribute","measureAttribute"],hu=["creationDate","terminationDate","lastModificationDate","reasonForUpdate"],du=["yearOfConstruction","yearOfDemolition"],mu=["genericDateAttribute"],gu={"bldg:Building":26,"frn:CityFurniture":21,"gen:GenericCityObject":5,"veg:SolitaryVegetationObject":7,"veg:PlantCover":8,"brid:Bridge":64,"tun:Tunnel":85,"grp:CityObjectGroup":23,"luse:LandUse":4,"tran:TransportationComplex":42,"tran:Track":43,"tran:Railway":44,"tran:Road":45,"tran:Square":46,"wtr:WaterBody":9},pu=v.getLogger("vcs.vcm.cityGML.feature.FeatureType"),fu={LAND_USE:4,GENERIC_CITY_OBJECT:5,SOLITARY_VEGETATION_OBJECT:7,PLANT_COVER:8,WATER_BODY:9,WATER_SURFACE:11,WATER_GROUND_SURFACE:12,WATER_CLOSURE_SURFACE:13,RELIEF_FEATURE:14,TIN_RELIEF:16,MASSPOINT_RELIEF:17,BREAKLINE_RELIEF:18,RASTER_RELIEF:19,CITY_FURNITURE:21,CITY_OBJECT_GROUP:23,BUILDING_PART:25,BUILDING:26,BUILDING_INSTALLATION:27,INT_BUILDING_INSTALLATION:28,BUILDING_CEILING_SURFACE:30,INTERIOR_BUILDING_WALL_SURFACE:31,BUILDING_FLOOR_SURFACE:32,BUILDING_ROOF_SURFACE:33,BUILDING_WALL_SURFACE:34,BUILDING_GROUND_SURFACE:35,BUILDING_CLOSURE_SURFACE:36,OUTER_BUILDING_CEILING_SURFACE:60,OUTER_BUILDING_FLOOR_SURFACE:61,BUILDING_WINDOW:38,BUILDING_DOOR:39,BUILDING_FURNITURE:40,BUILDING_ROOM:41,TRANSPORTATION_COMPLEX:42,TRACK:43,RAILWAY:44,ROAD:45,SQUARE:46,TRAFFIC_AREA:47,AUXILIARY_TRAFFIC_AREA:48,APPEARANCE:50,X3D_MATERIAL:53,PARAMETERIZED_TEXTURE:54,GEOREFERENCED_TEXTURE:55,CITY_MODEL:57,BRIDGE_PART:63,BRIDGE:64,BRIDGE_INSTALLATION:65,INT_BRIDGE_INSTALLATION:66,BRIDGE_CEILING_SURFACE:68,INTERIOR_BRIDGE_WALL_SURFACE:69,BRIDGE_FLOOR_SURFACE:70,BRIDGE_ROOF_SURFACE:71,BRIDGE_WALL_SURFACE:72,BRIDGE_GROUND_SURFACE:73,BRIDGE_CLOSURE_SURFACE:74,OUTER_BRIDGE_CEILING_SURFACE:75,OUTER_BRIDGE_FLOOR_SURFACE:76,BRIDGE_WINDOW:78,BRIDGE_DOOR:79,BRIDGE_FURNITURE:80,BRIDGE_ROOM:81,BRIDGE_CONSTRUCTION_ELEMENT:82,TUNNEL_PART:84,TUNNEL:85,TUNNEL_INSTALLATION:86,INT_TUNNEL_INSTALLATION:87,TUNNEL_CEILING_SURFACE:89,INTERIOR_TUNNEL_WALL_SURFACE:90,TUNNEL_FLOOR_SURFACE:91,TUNNEL_ROOF_SURFACE:92,TUNNEL_WALL_SURFACE:93,TUNNEL_GROUND_SURFACE:94,TUNNEL_CLOSURE_SURFACE:95,OUTER_TUNNEL_CEILING_SURFACE:96,OUTER_TUNNEL_FLOOR_SURFACE:97,TUNNEL_WINDOW:99,TUNNEL_DOOR:100,TUNNEL_FURNITURE:101,HOLLOW_SPACE:102};class yu{constructor(e,t,i,s,r,n){this.featureType=e,this.featureNs=ru[t],this.featurePrefix=t,this.allowedProperties=[];for(let a=0;a<s.length;a++){const e=s[a];if(i.hasOwnProperty(e)){const s=new i[e](r,t);this.allowedProperties.push(s)}}this.classType=n}getFeatureType(){return pu.deprecate("getFeatureType","access the featureType property."),this.featureType}getFeatureNs(){return pu.deprecate("getFeatureNs","access the featureNs property."),this.featureNs}getFeaturePrefix(){return pu.deprecate("getFeaturePrefix","access the featurePrefix property."),this.featurePrefix}getAllowedProperties(){return pu.deprecate("getAllowedProperties","access the allowedProperties property."),this.allowedProperties}}const _u={boundedBy:dc,id:mc,name:gc,description:pc,lineage:fc,updatingPerson:yc,lastModificationDate:_c,reasonForUpdate:vc,creationDate:Lc,terminationDate:Mc,relativeToTerrain:bc,relativeToWater:wc,externalReferenceInformationSystem:Tc,externalReferenceName:Sc,externalReferenceUri:Cc,stringAttribute:Ec,doubleAttribute:Ic,intAttribute:kc,uriAttribute:Dc,dateAttribute:Oc,measureAttribute:Pc};class vu extends yu{static get properties(){return Object.assign({},_u)}constructor(e,t){super("_CityObject","core",vu.properties,e,t,fu.GENERIC_CITY_OBJECT)}}class Lu extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc})}constructor(e,t){super("GenericCityObject","gen",Lu.properties,e,t,fu.GENERIC_CITY_OBJECT)}}class Mu extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc,yearOfConstruction:jc,yearOfDemolition:Nc,roofType:Fc,measuredHeight:Rc,storeysAboveGround:Hc,storeysBelowGround:Gc,storeyHeightsAboveGround:zc,storeyHeightsBelowGround:Bc,street:Vc,houseNumber:Uc,poBox:Wc,zipCode:qc,city:Jc,state:Kc,country:Zc})}constructor(e,t){super("Building","bldg",Mu.properties,e,t,fu.BUILDING)}}class bu extends yu{constructor(e,t){super("BuildingPart","bldg",Mu.properties,e,t,fu.BUILDING_PART)}}class wu extends yu{constructor(e,t){super("BuildingInstallation","bldg",Mu.properties,e,t,fu.BUILDING_INSTALLATION)}}class Tu extends yu{constructor(e,t){super("WallSurface","bldg",_u,e,t,fu.BUILDING_WALL_SURFACE)}}class Su extends yu{constructor(e,t){super("GroundSurface","bldg",_u,e,t,fu.BUILDING_GROUND_SURFACE)}}class Cu extends yu{constructor(e,t){super("RoofSurface","bldg",_u,e,t,fu.BUILDING_ROOF_SURFACE)}}class Eu extends yu{constructor(e,t){super("ClosureSurface","bldg",_u,e,t,fu.BUILDING_CLOSURE_SURFACE)}}class Iu extends yu{constructor(e,t){super("OuterCeilingSurface","bldg",_u,e,t,fu.OUTER_BUILDING_CEILING_SURFACE)}}class ku extends yu{constructor(e,t){super("OuterFloorSurface","bldg",_u,e,t,fu.OUTER_BRIDGE_FLOOR_SURFACE)}}class Du extends yu{constructor(e,t){super("Window","bldg",_u,e,t,fu.BUILDING_WINDOW)}}class Ou extends yu{constructor(e,t){super("Door","bldg",_u,e,t,fu.BUILDING_DOOR)}}class Pu extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc,yearOfConstruction:jc,yearOfDemolition:Nc,isMovable:Qc})}constructor(e,t){super("Bridge","brid",Pu.properties,e,t,fu.BRIDGE)}}class Au extends yu{constructor(e,t){super("BridgePart","brid",Pu.properties,e,t,fu.BRIDGE_PART)}}class xu extends yu{constructor(e,t){super("BridgeInstallation","brid",Pu.properties,e,t,fu.BRIDGE_INSTALLATION)}}class Yu extends yu{constructor(e,t){super("BridgeConstructionElement","brid",Pu.properties,e,t,fu.BRIDGE_CONSTRUCTION_ELEMENT)}}class ju extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc,yearOfConstruction:jc,yearOfDemolition:Nc})}constructor(e,t){super("Tunnel","tun",ju.properties,e,t,fu.TUNNEL)}}class Nu extends yu{constructor(e,t){super("TunnelPart","tun",ju.properties,e,t,fu.TUNNEL_PART)}}class Fu extends yu{constructor(e,t){super("TunnelInstallation","tun",ju.properties,e,t,fu.TUNNEL_INSTALLATION)}}class Ru extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc})}constructor(e,t){super("CityFurniture","frn",Ru.properties,e,t,fu.CITY_FURNITURE)}}class Hu extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc})}constructor(e,t){super("CityObjectGroup","grp",Hu.properties,e,t,fu.CITY_OBJECT_GROUP)}}class Gu extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc})}constructor(e,t){super("LandUse","luse",Gu.properties,e,t,fu.LAND_USE)}}class zu extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc})}constructor(e,t){super("TransportationComplex","tran",zu.properties,e,t,fu.TRANSPORTATION_COMPLEX)}}class Bu extends yu{constructor(e,t){super("Railway","tran",zu.properties,e,t,fu.RAILWAY)}}class Vu extends yu{constructor(e,t){super("Road","tran",zu.properties,e,t,fu.ROAD)}}class Uu extends yu{constructor(e,t){super("Square","tran",zu.properties,e,t,fu.SQUARE)}}class Wu extends yu{constructor(e,t){super("Track","tran",zu.properties,e,t,fu.TRACK)}}class qu extends yu{constructor(e,t){super("TrafficArea","tran",_u,e,t,fu.TRAFFIC_AREA)}}class Ju extends yu{constructor(e,t){super("AuxiliaryTrafficArea","tran",_u,e,t,fu.AUXILIARY_TRAFFIC_AREA)}}class Ku extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc,species:Xc,height:$c,trunkDiameter:eu,crownDiameter:tu})}constructor(e,t){super("SolitaryVegetationObject","veg",Ku.properties,e,t,fu.SOLITARY_VEGETATION_OBJECT)}}class Zu extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc,averageHeight:iu})}constructor(e,t){super("PlantCover","veg",Zu.properties,e,t,fu.PLANT_COVER)}}class Qu extends yu{static get properties(){const e=Object.assign({},_u);return Object.assign(e,{class:Ac,function:xc,usage:Yc})}constructor(e,t){super("WaterBody","wtr",Qu.properties,e,t,fu.WATER_BODY)}}class Xu extends yu{constructor(e,t){super("WaterSurface","wtr",_u,e,t,fu.WATER_SURFACE)}}class $u extends yu{constructor(e,t){super("WaterGroundSurface","wtr",_u,e,t,fu.WATER_GROUND_SURFACE)}}class eh extends yu{constructor(e,t){super("WaterClosureSurface","wtr",_u,e,t,fu.WATER_GROUND_SURFACE)}}function th(e,t,i){const s={_CityObject:vu,GenericCityObject:Lu,Building:Mu,Bridge:Pu,Tunnel:ju,CityFurniture:Ru,CityObjectGroup:Hu,LandUse:Gu,TransportationComplex:zu,Railway:Bu,Road:Vu,Track:Wu,Square:Uu,SolitaryVegetationObject:Ku,PlantCover:Zu,WaterBody:Qu};return e.map(e=>new s[e](t,i))}function ih(e,t,i){const s={BuildingInstallation:wu,BuildingPart:bu,BridgeInstallation:xu,BridgePart:Au,BridgeConstructionElement:Yu,TunnelInstallation:Fu,TunnelPart:Nu};return e.map(e=>new s[e](t,i))}function sh(e,t,i){const s={WallSurface:Tu,RoofSurface:Cu,GroundSurface:Su,ClosureSurface:Eu,OuterCeilingSurface:Iu,OuterFloorSurface:ku,Window:Du,Door:Ou,WaterSurface:Xu,WaterGroundSurface:$u,WaterClosureSurface:eh,TrafficArea:qu,AuxiliaryTrafficArea:Ju};return e.map(e=>new s[e](t,i))}class rh{constructor(e){this.type=e.type,this.id=e.id||Object(c["c"])(),this.comparison=e.comparison||null,this.fixedComparison=e.comparison&&e.isPreset,this.property=e.property||null,this.isPreset=Object(c["e"])(e.isPreset,!1),this.not=Object(c["e"])(e.not,!1)}getFilter(){a(this.comparison,ac),a(this.property,su);const e=this.property.allowedComparisons.findIndex(e=>e.id===this.comparison.id);if(-1===e)throw new Error(`Comparison ${this.comparison.id} not allowed for ${this.property.id}`);return null}destroy(){}_wrapInNot(e){return this.not?new ol.format.filter.Not(e):e}}var nh=rh;const ah=new su("filter",hc.Filter,lc.FILTER,null,Object.keys(hc.Filter),"",cc.FILTER);class oh extends nh{constructor(e){e.type="combination",e.property=ah,e.comparison=ah.allowedComparisons[0],super(e),this.filters=e.filters||[],this.level=e.level||0;const t=!e.isPreset&&"all";this.allowAdditional=e.allowAdditional||t}getFilter(){super.getFilter();const e=this.comparison.openlayersFilter;if(0===this.filters.length)throw new Error("Cannot process empty filter");if(1===this.filters.length)return this.filters[0].getFilter();const t=this.filters.map(e=>e.getFilter());return this._wrapInNot(e(...t))}removeChild(e){const t=this.filters.findIndex(t=>t.id===e.id);this.filters.splice(t,1)}hasChild(e){return this.filters.some(t=>t&&t.id===e.id)}}var lh=oh;function ch(e){const t=W.mercatorToWgs84(e,!0);return[t[1],t[0]]}function uh(e){const t=e.clone();if(t instanceof ol.geom.Polygon){const e=t.getCoordinates().map(e=>(e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]||e.push(e[0].slice()),e.map(ch)));t.setCoordinates(e,"XY")}else if(t instanceof ol.geom.Point){const e=t.getCoordinates();t.setCoordinates(ch(e),"XY")}else if(t instanceof ol.geom.LineString){const e=t.getCoordinates().map(ch);t.setCoordinates(e,"XY")}return t}class hh extends nh{constructor(e){e.type="geometry";const t=e.allowedComparisons||Object.keys(hc.Geometry).map(e=>hc.Geometry[e].id);e.property=new su("geometry",hc.Geometry,lc.GEOMETRY,"gml:boundedBy",t,"gml",cc.GEOMETRY),super(e),this.distance=null,this.editorId=e.editorId}getFilter(){super.getFilter();const e=this.comparison.openlayersFilter,t=j.getInstance().getLayerByName("_queryWidgetGeometryFilterLayer"),i=t.getFeatureById(this.id);if(!i)throw new Error("cannot find drawing for filter");const s=i.getGeometry();if(!s)throw new Error("cannot find drawing for filter");const r=s.clone(),n=r.getCoordinates();$t(r,n).forEach(e=>{const t=e.slice();e[1]=t[0],e[0]=t[1]}),r.setCoordinates(n);const a=uh(s);if(!e)throw new Error("Comparison is not defined");if("DWITHIN"===this.comparison.id){if(!this.distance)throw new Error("DWITHIN filter requires a distance");return this._wrapInNot(new e(this.property.valueReference,a,this.distance,"m","urn:ogc:def:crs:EPSG::4326"))}return"BBOX"===this.comparison.id?this._wrapInNot(new e(this.property.valueReference,s.getExtent(),"urn:ogc:def:crs:EPSG::4326")):this._wrapInNot(new e(this.property.valueReference,a,"urn:ogc:def:crs:EPSG::4326"))}destroy(){const e=j.getInstance().getLayerByName("_queryWidgetGeometryFilterLayer");e.removeFeaturesById([this.id])}}var dh=hh;class mh extends nh{constructor(e){e.type="property",super(e),this.value=e.value||null,this.fixedValue=e.value&&e.isPreset,this.genericAttributeName=e.genericAttributeName||null}getFilter(){super.getFilter();let{valueReference:e}=this.property;this.genericAttributeName&&(e=e.replace("token",this.genericAttributeName));const t=this.comparison.openlayersFilter;return"BETWEEN"===this.comparison.id?(a(this.value,Array),this.value[0]instanceof Date?this._wrapInNot(new t(e,this._getDateValue(this.value[0]),this._getDateValue(this.value[1]))):this._wrapInNot(new t(e,this.value[0],this.value[1]))):this.value instanceof Date?this._wrapInNot(new t(e,this._getDateValue(this.value))):this._wrapInNot(new t(e,this.value))}_getDateValue(e){return this.property.dataType===cc.DATE?Ro()(e).format("YYYY-MM-DD"):e.toISOString()}}var gh=mh;function ph(e,t,i){return{id:t,type:e,children:[{type:"_3",attributes:{extent:i}}]}}function fh(e){const t=[],i=(new DOMParser).parseFromString(e,"application/xml");if(i){const e=i.getElementsByTagNameNS("http://www.opengis.net/wfs/2.0","member");for(let i=0;i<e.length;i++){const s=e[i],r=s.getElementsByTagNameNS("http://www.opengis.net/gml","boundedBy")[0];let n;if(r){const e=r.getElementsByTagNameNS("http://www.opengis.net/gml","lowerCorner")[0].textContent.split(" "),t=r.getElementsByTagNameNS("http://www.opengis.net/gml","upperCorner")[0].textContent.split(" ");n=[e[0],e[1],t[0],t[1]].map(Number.parseFloat)}t.push(ph(gu[r.parentNode.nodeName],r.parentNode.getAttributeNS("http://www.opengis.net/gml","id"),n))}}return t}class yh extends oe{static get className(){return"vcs.vcm.widgets.wfs.WFSObject"}constructor(e){e.className=yh.className,super(e),this.url=e.url,this.projection=new W(e.projection),this.maxFeatures=e.maxFeatures||1e4,this.runningRequest=null}getFeatures(e,t){if(!this.url||""===this.url)return Promise.reject(new Error("Missing URL"));this.cancelRequest();const i=(new ol.format.WFS2).writeGetFeature({featureNS:e.featureNs,featurePrefix:e.featurePrefix,featureTypes:[e.featureType],propertyNames:["gml:boundedBy"],filter:t,outputFormat:"application/gml+xml; version=3.1",count:this.maxFeatures,allNs:ru});function s(e){let t;return t=window.ActiveXObject?e.xml:(new XMLSerializer).serializeToString(e),t}let r=s(i);return r=r.replace(/__--__/g,":"),this.runningRequest=G.a.CancelToken.source(),G.a.post(this.url,r,{cancelToken:this.runningRequest.token}).then(({data:e})=>fh(e)).catch(e=>{const t=e.response;return t&&t.data?Promise.reject(new Error(t.data)):Promise.reject(e)})}cancelRequest(){this.runningRequest&&this.runningRequest.cancel(),this.runningRequest=null}}const _h=["EQUAL_TO","NOT_EQUAL_TO","LESS_THAN","GREATER_THAN","LESS_THAN_OR_EQUAL_TO","GREATER_THAN_OR_EQUAL_TO","LIKE","IS_NULL"],vh=["BETWEEN"],Lh=["EQUAL_TO","NOT_EQUAL_TO","LESS_THAN","GREATER_THAN","LESS_THAN_OR_EQUAL_TO","GREATER_THAN_OR_EQUAL_TO","LIKE","BETWEEN","IS_NULL"],Mh=["INTERSECTS","WITHIN","DWITHIN"];var bh=yh;class wh extends _a{static get className(){return"vcs.vcm.widgets.Query"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{allFeatureTypes:nu.slice(),allProperties:lu.slice(),allLogicalRelations:Lh.slice(),allSpatialFilters:Mh.slice(),freeQueries:!0,predefinedQueries:[],wfs:{url:""},showDownload:!0,maximumLevel:1})}constructor(e){e.className=wh.className,super(e);const t=wh.getDefaultOptions();this.allFeatureTypes=e.allFeatureTypes||t.allFeatureTypes,this.allProperties=e.allProperties||t.allProperties,this.allLogicalRelations=e.allLogicalRelations||t.allLogicalRelations,this.allSpatialFilters=e.allSpatialFilters||t.allSpatialFilters,this.freeQueriesOption=Object(c["e"])(e.freeQueries,t.freeQueries),this.predefinedQueries=e.predefinedQueries||t.predefinedQueries,this.featureTypes=th(this.allFeatureTypes,this.allProperties,this.allLogicalRelations),this.wfs=new bh(e.wfs||t.wfs),this.showDownload=Object(c["e"])(e.showDownload,t.showDownload),this._filters=[],this._defaultMaxLevel=Object(c["h"])(e.maximumLevel,t.maximumLevel),this.maximumLevel=this._defaultMaxLevel,this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"],this.activeQuery={type:null,featureType:null,filter:null,runningRequest:null},this.foundFeatures=[]}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.geometryFilterLayer=new ss({name:"_queryWidgetGeometryFilterLayer",projection:J,altitudeMode:"clampToGround"}),this.framework.addLayer(this.geometryFilterLayer),this.geometryLayerEditor=new Rl({allowedGeometries:["Point","LineString","BBox","Polygon"],defaultMode:"edit"}),this.geometryLayerEditor.initialize(),this.geometryLayerEditor.addEditingLayer(this.geometryFilterLayer),this.initialized=!0,this.initializedFinished()}return!0}getAllowedProperties(e){a(e,String);const t=this.featureTypes.find(t=>t.featureType===e);return t?t.allowedProperties:[]}setPreset(e){if(a(e,[Object,String]),this.activeQuery.filter&&this.removeFilter(this.activeQuery.filter),this.activeQuery.filter=null,this.activeQuery.featureType=null,this.maximumLevel=this._defaultMaxLevel,"_free"===e)return void(this.activeQuery.type="_free");e=e,this.activeQuery.type=e.name;const t=JSON.parse(JSON.stringify(e));if(this.activeQuery.featureType=t.featureType,t.property){const e=this.getAllowedProperties(this.activeQuery.featureType).find(e=>e.id===t.property);let i=null;t.valueInput?i=t.valueInput:t.dateInput?i=new Date(t.dateInput.year,t.dateInput.month-1,t.dateInput.date):t.dateInputLower&&(i=[new Date(t.dateInputLower.year,t.dateInputLower.month-1,t.dateInputLower.date),new Date(t.dateInputUpper.year,t.dateInputUpper.month-1,t.dateInputUpper.date)]);let s=null;if(t.comparison){const e=Object.keys(nc).find(e=>nc[e].id===t.comparison);s=nc[e]}t.allowAdditional||(this.maximumLevel=0),Number.isFinite(t.maximumLevel)&&(this.maximumLevel=t.maximumLevel),this.addFilter({type:"property",property:e,comparison:s,value:i,isPreset:!0,genericAttributeName:t.genericAttributeName,allowAdditional:t.allowAdditional,not:t.not})}}_createFilter(e){let t;return t="geometry"===e.type?new dh(Object.assign(e,{allowedComparisons:this.allSpatialFilters,editorId:this.geometryLayerEditor.id})):"property"===e.type?new gh(e):new lh(e),this._filters.push(t),t}addFilter(e){if(a(e,{type:["geometry","property","combination"]}),this.activeQuery.filter)return this.addFilterToCombination(this.activeQuery.filter,e);"combination"===e.type&&(e.level=1);const t=this._createFilter(e);return this.activeQuery.filter=this._createFilter({type:"combination",filters:[t],isPreset:e.isPreset,allowAdditional:e.allowAdditional}),t.id}removeFilter(e){a(e,nh);const t=this._filters.find(t=>t instanceof lh&&t.hasChild(e));if(!t)return this.activeQuery.filter=null,this._filters.forEach(e=>{e.destroy()}),void this._filters.splice(0);e instanceof lh&&e.filters.forEach(e=>{this.removeFilter(e)}),t.removeChild(e),0===t.filters.length&&this.removeFilter(t);const i=this._filters.findIndex(t=>t.id===e.id);e.destroy(),this._filters.splice(i,1)}addFilterToCombination(e,t){if(a(t,{type:["geometry","property","combination"]}),a(e,lh),"combination"===t.type){if(e.level===this.maximumLevel)throw new Error("Maximum complexity reached, cannot add another level of depth");t.level=e.level+1}const i=this._createFilter(t);return e.filters.push(i),i.id}sendRequest(){this.foundFeatures.splice(0);const e=this.featureTypes.find(e=>e.featureType===this.activeQuery.featureType),t=this.activeQuery.filter.getFilter();if(!e||!t)throw new Error("Could not find active featureType");return this.wfs.getFeatures(e,t).then(this._handleResult.bind(this))}cancelRequest(){this.wfs.cancelRequest()}_handleResult(e){e.forEach(e=>{this.foundFeatures.push(e)})}addToSelectionSet(e){o(e,Boolean);const t=this.framework.getSelectBehavior();e&&t.clearSelectionSet();const i=this.foundFeatures.map(e=>e.id);t.addToSelectionSet(i)}zoomToFeatures(){if(this.foundFeatures.length>0){let e=ol.extent.createEmpty();this.foundFeatures.forEach(t=>{t.children&&t.children.forEach(t=>{"_3"===t.type&&(e=ol.extent.extend(e,t.attributes.extent))})});const t=ol.proj.getTransform(this.framework.projection.proj,ol.proj.get("EPSG:4326"));e=ol.extent.applyTransform(e,t);const i=me.createViewPointFromExtent(e);this.framework.getActiveMap().gotoViewPoint(i)}}zoomToFeature(e){let t=ol.extent.createEmpty();e.children&&e.children.forEach(e=>{"_3"===e.type&&(t=ol.extent.extend(t,e.attributes.extent))});const i=ol.proj.getTransform(this.framework.projection.proj,ol.proj.get("EPSG:4326"));t=ol.extent.applyTransform(t,i);const s=me.createViewPointFromExtent(t);this.framework.getActiveMap().gotoViewPoint(s)}clear(){const e=this.framework.getSelectBehavior();e.clearSelectionSet(),this.foundFeatures.splice(0)}getConfigObject(){const e=super.getConfigObject();return e.allFeatureTypes=this.allFeatureTypes,e.allProperties=this.allProperties,e.allLogicalRelations=this.allLogicalRelations,e.allSpatialFilters=this.allSpatialFilters,e.freeQueries=this.freeQueriesOption,e.predefinedQueries=this.predefinedQueries,e.maximumLevel=this.maximumLevel,e.wfs={maxFeatures:this.wfs.maxFeatures},e.showDownload=this.showDownload,e}}var Th=wh;class Sh extends oe{static getDefaultOptions(){return{middleware:void 0}}constructor(e){super(e),this.middleware=e.middleware||[]}initialize(){}search(e,t,i){}}var Ch=Sh;const Eh=v.getLogger("vcs.vcm.widgets.search.Nominatim");class Ih extends Ch{static get className(){return"vcs.vcm.widgets.search.Nominatim"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},Ch.getDefaultOptions()),{},{type:Ih.className,url:"https://nominatim.openstreetmap.org/search",city:void 0,state:void 0,countrycode:"de",extent:void 0,limit:20})}constructor(e){e.className=Ih.className,super(e);const t=Ih.getDefaultOptions(),i=e.url||t.url;this.url=n["a"].parse(i),this.city=e.city||null,this.state=e.state||null,this.countrycode=e.countrycode||t.countrycode,this.extent=e.extent?new Le(e.extent):null,this.limit=e.limit||t.limit}search(e,t,i){const s=this.url.clone(),r={q:e,countrycodes:this.countrycode,format:"json",polygon_geojson:1,addressdetails:1,limit:this.limit};this.city&&(r.q+=","+this.city),this.state&&(r.q+=","+this.state),this.extent&&(r.viewbox=this.extent.getCoordinatesInProjection(q).join(","),r.bounded=1),s.addQueryParams(r),G.a.get(s.toString()).then(e=>{const t=Ih.handleSearchResults(e);i(t)}).catch(()=>{Eh.error("got an error from the server"),i([])})}static handleSearchResults({data:e}){return e.map(e=>(e.point=[Number(e.lon),Number(e.lat)],e.geojson?e.type="geojson":e.type="point",e))}getConfigObject(){const e=super.getConfigObject();return Object.assign({},e,{url:this.url.toString(),city:this.city,state:this.state,countrycode:this.countrycode,extent:this.extent?this.extent.getConfigObject():null,limit:this.limit})}}var kh=Ih;const Dh={NEVER:0,MOBILE:1,DESKTOP:2,ALWAYS:3};function Oh(e,t){if(e){const i=e.toUpperCase();return null!=Dh[i]?Dh[i]:t}return t}class Ph extends _a{static get className(){return"vcs.vcm.widgets.Locator"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{classificationType:"both",style:{fill:{color:[85,110,255,.4]},stroke:{color:[0,0,0,1],width:1.25},image:{fill:{color:[255,255,255,1]},stroke:{color:[0,0,0,1],width:1},radius:5}},show:"always",showInToolbox:"mobile",zoomDistance:1e3,extrusion:80})}constructor(e){e.className=Ph.className,super(e);const t=Ph.getDefaultOptions(),i=new et(t.style);this.vectorLayer=new ss({name:"_locatorVector",altitudeMode:"clampToGround",classificationType:e.classificationType||t.classificationType,allowPicking:!1,heightAboveGround:2,projection:{epsg:"EPSG:4326"},style:e.style?i.assign(new et(e.style)):i}),this.show=Oh(e.show,Dh[t.show.toUpperCase()]),this.showInToolbox=Oh(e.showInToolbox,Dh[t.showInToolbox.toUpperCase()]),this.tracker=null,this.flatError=0,this.zoomDistance=Object(c["g"])(e.zoomDistance,t.zoomDistance),this.locatorExtrusion=!1!==e.extrusion&&Object(c["h"])(e.extrusion,t.extrusion),this.values={locatorVisibility:!1},this._pickingTerrain=!1}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;const t=Ph.testForApi();if(!t)return this.logger.warning("Locator Widget is not supported"),!1;this.framework.addLayer(this.vectorLayer),this.locatorPoint=new ol.Feature({geometry:new ol.geom.Point([0,0,0],"XYZ"),heading:!1}),this.locatorExtrusion&&this.locatorPoint.set("olcs_extrudedHeight",this.locatorExtrusion),this.errorCircle=new ol.Feature({geometry:new ol.geom.Circle([0,0],5e3)}),this.vectorLayer.addFeatures([this.locatorPoint,this.errorCircle]),this.framework.subscribe("MAP_ACTIVATED",e=>{"vcs.vcm.maps.Cesium"===e.className&&this.tracker&&this._placeLocatorOnTerrain()}),this.initialized=!0,this.initializedFinished()}return!0}locatorClicked(){if(null===this.tracker)this.tracker=navigator.geolocation.watchPosition(this.trackLocator.bind(this),this.handleError.bind(this));else if(this.locatorInsideView())this.toggleVisibility(),navigator.geolocation.clearWatch(this.tracker),this.tracker=null;else{const e=this.locatorPoint.getGeometry().getCoordinates(),t=W.mercatorToWgs84(e);this.goToLocator(null,{coords:{longitude:t[0],latitude:t[1]}})}}toggleVisibility(){this.values.locatorVisibility=!this.values.locatorVisibility,this.values.locatorVisibility?this.vectorLayer.activate():this.vectorLayer.deactivate()}static getLocation(){return new Promise((e,t)=>{navigator.geolocation.getCurrentPosition(e,t)})}goToLocator(e,t){const i=this.framework.getActiveMap().getViewPoint();i.animate=!0,i.cameraPosition=null,i.groundPosition=[t.coords.longitude,t.coords.latitude],null!=e&&(i.distance=e),this.framework.getActiveMap().gotoViewPoint(i,1,0)}async trackLocator(e){if(this._pickingTerrain)return;const t=e=>{const t=ol.geom.Polygon.circular(new ol.Sphere(6378137),e,this.flatError,128);t.applyTransform((e,t,i)=>{const s=e.length;for(let r=0;r<s;r+=i){const i=[e[r],e[r+1]];W.wgs84ToMercator(i,!0),t[r]=i[0],t[r+1]=i[1]}return t}),this.errorCircle.setGeometry(t)},i=[e.coords.longitude,e.coords.latitude],{heading:s}=e.coords;null!=s?this.locatorPoint.set("heading",s):this.locatorPoint.set("heading",!1);const r=this.locatorPoint.getGeometry().getCoordinates(),n=W.mercatorToWgs84(r);0!==Math.abs(n[0]-i[0])||0!==Math.abs(n[1]-i[1])?(this.locatorPoint.getGeometry().setCoordinates(W.wgs84ToMercator(i)),await this._placeLocatorOnTerrain(),this.flatError=e.coords.accuracy,t(i)):0!==Math.abs(this.flatError-e.coords.accuracy)&&(this.flatError=e.coords.accuracy,t(i)),this.values.locatorVisibility||(this.goToLocator(this.zoomDistance,e),this.toggleVisibility())}async _placeLocatorOnTerrain(){const e=this.framework.getActiveMap();if("vcs.vcm.maps.Cesium"===e.className){const t=this.locatorPoint.getGeometry().getCoordinates();this._pickingTerrain=!0,await e.getHeightFromTerrain([t]),this.locatorPoint.getGeometry().setCoordinates(t),this._pickingTerrain=!1}}locatorInsideView(){const e=this.locatorPoint.getGeometry().getCoordinates(),t=W.mercatorToWgs84(e);return this.framework.getActiveMap().pointIsVisible(t)}handleError(e){switch(this.values.locatorVisibility&&this.toggleVisibility(),e.code){case 1:alert("Der Zugriff auf Ihre Position wurde verweigert.");break;case 2:alert("Ihre momentane Position konnte leider nicht erfasst werden.");break;case 3:alert("Wärend dem ermitteln Ihrer Position wurde die Verbindung verloren");break;default:alert("Ihre Position kann leider nicht erfasst werden");break}this.logger.warning("Geolocation could not be verified")}setStyle(e){this.logger.deprecate("setStyle","use the config or set the style via the .vectorLayer property"),this.vectorLayer.setStyle(e);const t=this.vectorLayer.getFeatures();let i;for(let s=0;s<t.length;s++)i=t[s],i.setStyle(e)}static testForApi(){const{hostname:e,protocol:t}=location,i=!!navigator.geolocation&&!j.getInstance().isIE11;return("localhost"===e||"127.0.0.1"===e||"https:"===t)&&i}getConfigObject(){const e=super.getConfigObject();return e.zoomDistance=this.zoomDistance,e.style=this.vectorLayer.style.getOptions({fill:!0,stroke:!0,image:!0}),e.locatorExtrusion=this.locatorExtrusion,e.classificationType=this.vectorLayer.classificationType,e}isVisible(){return this.logger.deprecate("isVisible","access values.locatorVisibility directly"),this.values.locatorVisibility}getValuesObject(){return this.logger.deprecate("getValuesObject","access values directly"),this.values}}var Ah=Ph;class xh extends Ch{static get className(){return"vcs.vcm.widgets.search.Elasticsearch"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},Ch.getDefaultOptions()),{},{type:xh.className,sortByType:!1,resultSize:void 0})}constructor(e){e.className=xh.className,super(e);const t=xh.getDefaultOptions();this.sortByType=Object(c["e"])(e.sortByType,t.sortByType),this.location={},this.resultSize=null!=e.resultSize?e.resultSize:null}search(e,t,i){this.initSearchQuery(e,t).then(s=>{const r=br()(JSON.stringify(s.query)),n=Object.assign(s.values,{userInput:e});let a=r(n);this.middleware.forEach(e=>{a=e.addToQuery(a)});const o=t.endpoints.find((function(e){return e.searchImpl===this.className}),this),l=w.getInstance().getLocaleAwareString(o.url);G.a.post(l,a).then(this.handleSearch.bind(this,i)).catch(this.handleSearch.bind(this,i))})}handleSearch(e,t){if(t instanceof Error)return void e([]);const i=t.data;let s=[];this.middleware.forEach(e=>{e.handleResult(i)});try{if(i.hits.hits.length>0){const e=i.hits.hits;s=e.map(e=>Object.assign(e._source,{type:e._type}))}}catch(r){}e(s)}parseSearchQuery(e,t){let i;const s={},r=t.hasOwnProperty("filter"),n=t.hasOwnProperty("function")||t.decayByLocation,a=t.hasOwnProperty("rescore");if(t.hasOwnProperty("values")&&Object.assign(s,this.makeTemplateValues(e,t.values)),r&&n){if(t.hasOwnProperty("function")&&t.decayByLocation){var o=this.getDecayByLocation();l=t.functions.concat(o)}else l=t.hasOwnProperty("function")?t.function:this.getDecayByLocation();i={query:{filtered:{query:{function_score:{query:t.query,functions:l}},filter:t.filter}}}}else if(r)i={query:{filtered:{query:t.query,filter:t.filter}}};else if(n){var l;if(t.hasOwnProperty("function")&&t.decayByLocation){o=this.getDecayByLocation();l=t.functions.concat(o)}else l=t.hasOwnProperty("function")?t.function:this.getDecayByLocation();i={query:{function_score:{query:t.query,functions:l}}}}else i={query:t.query};return a&&(i.rescore=t.rescore),this.resultSize&&(i.size=this.resultSize),{query:i,values:s}}async initSearchQuery(e,t){if(t.decayByLocation){const e=this.location.coords&&Date.now()-this.location.setAt>3e5,t=!this.location.coords&&Ah.testForApi();if(e||t)try{const e=await Ah.getLocation();this.location={coords:{lat:e.coords.latitude,lon:e.coords.longitude},setAt:Date.now()}}catch(i){this.logger.warning(i.message)}}return this.parseSearchQuery(e,t)}getDecayByLocation(){let e;return e=this.location.hasOwnProperty("coords")?[{gauss:{geoLocation:{origin:this.location.coords,offset:"1km",scale:"2km"}}}]:[],e}makeTemplateValues(e,t){const i={};return Object.values(t).forEach(t=>{const s=new RegExp(t.regex);let r=e.match(s)[0];t.hasOwnProperty("replace")&&(r=r.replace(new RegExp(t.replace.regex,"g"),t.replace.value)),i[t.name]=r.trim()}),i}}var Yh=xh;class jh{constructor(e){}initialize(){}addToQuery(e){return e}addFilter(e,t){const i=JSON.parse(e);if(i.query.hasOwnProperty("filtered")){const e=i.query.filtered.filter;if(e.hasOwnProperty("bool")){const i=e.bool;if(i.hasOwnProperty("must")){const e=i.must;if(Array.isArray(e))e.push(t);else{const s={};Object.assign(s,e),i.must=[s,t]}}else i.must=t}else{const s={};Object.assign(s,e);const r={bool:{must:[s,t]}};i.query.filtered.filter=r}return JSON.stringify(i)}const s={query:{filtered:{query:i.query,filter:t}}};return JSON.stringify(s)}handleResult(e){}clear(){}}var Nh=jh;const Fh=v.getLogger("vcs.vcm.widgets.search.middleware.Near");class Rh extends Nh{static get className(){return"vcs.vcm.widgets.search.middleware.Tags"}constructor(e){super(e),this.className=Rh.className,this.tags=[],this.activeTags=[],this.doHandle=!0,this.tagOrder=e.tagOrder?e.tagOrder:[],this.combineTagsWithOr=!!e.combineTagsWithOr,this.isActive=!1}addToQuery(e){const t=this._addTagAggregation(e);return this._filterByTags(t)}_addTagAggregation(e){const t=JSON.parse(e);return t.aggregations?t.aggregations.tagCount={terms:{field:"tags"}}:t.aggregations={tagCount:{terms:{field:"tags"}}},JSON.stringify(t)}_filterByTags(e){if(0===this.activeTags.length)return e;let t={};if(1===this.activeTags.length)t.term={tags:this.activeTags[0].key};else{const e=this.activeTags.map(e=>({term:{tags:e.key}}));t=this.combineTagsWithOr?{or:e}:{and:e}}return this.addFilter(e,t)}handleResult(e){if(this.doHandle)if(e.aggregations&&e.aggregations.tagCount){const t=e.aggregations.tagCount.buckets;if(t.length){const e=this.sortTags(t),i=e.filter((function(e){return this.activeTags.find(t=>t.key===e.key)}),this);this.clear(),e.forEach((function(e){this.tags.push(e)}),this),i.forEach((function(e){this.activeTags.push(e)}),this)}else this.clear()}else this.clear()}setHandle(e){Fh.deprecate("setHandle","access the doHandle property."),this.doHandle=e}sortTags(e){return e=this.tagOrder.length>0?e.sort((e,t)=>{let i=this.tagOrder.indexOf(e.key),s=this.tagOrder.indexOf(t.key);return i=i>-1?i:this.tagOrder.length+1,s=s>-1?s:this.tagOrder.length+1,i-s}):e.sort((e,t)=>e.key.toLocaleString()<t.key.toLocaleString()?-1:1),e}clear(){this.tags.splice(0,this.tags.length),this.activeTags.splice(0,this.activeTags.length),this.isActive=!1}}var Hh=Rh;const Gh=v.getLogger("vcs.vcm.widgets.search.middleware.Near");class zh extends Nh{static get className(){return"vcs.vcm.widgets.search.middleware.Near"}constructor(e){super(e),this.className=zh.className,this.fillColor=e.fillColor?e.fillColor:"rgba(85,110,255,0.4)",this.searchCenterIcon=e.searchCenterIcon?e.searchCenterIcon:null,this.pointId=null,this.cirleId=null,this.searchCenter=[0,0],this.searchDistance=500,this.isActive=!1,this.title=null}initialize(){const e=j.getInstance(),t=new ss({projection:{epsg:4326},altitudeMode:"clampToGround",allowPicking:!1,name:"_"+Object(c["c"])()});let i;e.addLayer(t),this.layerName=t.name,i=null!==this.searchCenterIcon?new ol.style.Icon({src:this.searchCenterIcon,scale:.5}):new ol.style.Circle({fill:new ol.style.Fill({color:"#000"}),stroke:new ol.style.Stroke({color:"rgba(1,1,1,0.0)",width:0}),radius:5}),t.setStyle(new ol.style.Style({image:i,fill:new ol.style.Fill({color:this.fillColor}),stroke:new ol.style.Stroke({width:0,color:"rgba(1,1,1,0.0)"})}));const s=new ol.Feature({geometry:new ol.geom.Point([0,0])}),r=new ol.Feature({geometry:new ol.geom.Circle([0,0]),radius:2e5}),n=t.addFeatures([s,r]);this.pointId=n[0],this.circleId=n[1]}addToQuery(e){if(this.isActive){const t={geo_distance:{distance:this.searchDistance,geoLocation:this.searchCenter}};return this.addFilter(e,t)}return e}async activate(e,t){this.searchCenter=e,t||(t=`${String(Math.round(100*e[1])/100)}N ${String(Math.round(100*e[0])/100)}E`),this.title=t,await this.showLayer();const i=j.getInstance(),s=i.getActiveMap(),r=s.getViewPoint();r.animate=!0;const n=r.groundPosition,a=this.searchCenter.slice();n&&n[2]&&(a[2]=n[2]);const{pitch:o}=r;(!o||o>-20)&&(r.pitch=-20),r.groundPosition=a,r.distance=2e3,r.cameraPosition=null,await s.gotoViewPoint(r),this.isActive=!0}setDistance(e){let t=Number(/^[0-9]+/.exec(e)[0]);const i=/\D+$/.exec(e);i&&"m"!==i[0]&&(t*=1e3),this.searchDistance=t,this.isActive&&this.showLayer()}getDistance(){return Gh.deprecate("getDistance","access the searchDistance property directly"),this.searchDistance}showLayer(){const e=j.getInstance().getLayerByName(this.layerName);return this.searchCenter?(e.updateGeometryOfFeature(this.pointId,new ol.geom.Point(this.searchCenter)),e.updateGeometryOfFeature(this.circleId,ol.geom.Polygon.circular(new ol.Sphere(6378137),this.searchCenter,this.searchDistance,128)),e.activate()):Promise.resolve()}hideLayer(){if(this.layerName){const e=j.getInstance().getLayerByName(this.layerName);e.deactivate()}}clear(){this.hideLayer(),this.isActive=!1,this.title=null}}var Bh=zh;const Vh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA3CAYAAACo29JGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo2RUM4Mzk3QUJERDQxMUU1QjJEN0FDNDY2NkM0MTA0RiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3Nzc1MkM2NkRCQTExMUU1QUUwQjhGQjIwQjM0ODRBNyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3Nzc1MkM2NURCQTExMUU1QUUwQjhGQjIwQjM0ODRBNyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2NjMwYzU0NC03NmE3LWEzNGMtOWQ0OC1jNGU5OTZkMGIxYWMiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpkYmYzYzlmNi1kYmEwLTExZTUtYjFiYi1iMWYzNDcxM2ZjNzQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4hNWn9AAAJk0lEQVR42txafWwUxxV/t3t3Pp8/LtgEG0zBJC20caJijN1CpSYEWqXBFqJNaRAUsI0cJFQI1P2DSoVgKtqmSexQsJQmjogaF5IUU1onsdoGqNQUCjU2Ul1RigOJC8R8nO2zfT77dm/7ZvXGGfbWt3t3Nm4z0mN9y87O++3vzZv33owTxr85UCQUma4S3XMIz2gkERKVrtp4KuIcR0BOEheJW7gnghRBKSQjKGESfk+bbHCyACQVxYOSQve5OARgInOcKVWQYZQQypAAWE3miyfSJAFQGl05U7LAnplpmpmkyBhnkgEcFIBGJhocNz8GJoOAeeiem1hzJfjRNAI5TGAU+nsApZ9AxmWupkpoWnR/h8MhkfLpBMxLgDwkMn928+bNs1esWDF/zpw5n8vKyvqM1+u91+l0pqKkKYoyiDIUDAZv+v3+rsuXL//72LFj7QcOHPhQGE4l8wwR0CABZECHUb+IiX6JgcOOMrHlQ8kkkCnEnA5q9erVOdu2bXusoKDgUQQzPV7aEOz1jo6O47W1tS2HDh3qFkAOEoNMAih9jEXUUbUCB2OB40ImxwDNQnkQpQjlqyhfY1JeXr6+s7Pzj5FIRNHGobH3sPex9/IxaLwiGn8W6eM06Bkfc/g1nMTOFDLFFHqxnJeX5z569OiTRUVF35EkyTXeiyWCDLe2tr65cuXKQ1evXh0hFgPEIDPRHsYq6qrEzRyZGwOSj/IQSgnKUvYlKyoqNvT29l7S7kJj47DxiMGlpMdDpJf+ocdiLparTycT4MCWsQHq6+t3hMPhQe0uNjYejvtDArhMADiL9JTi8aDME84kGy/mwBobG/eoqhrWJqGxcdn4AoPFpN9M0tdhFmEYm4u84j3kIRn1Ul1d3fzKyspdOL+cMAmNLUXoiRfj0tLR0tLSTXoqxJpqttDLJuaYRsDSyIm40ObzampqnpVl2QOT2BjAhQsXLr5+/fr7586dGxCAaUJsqpl5Swd5w2yULA6OeUVcf+p8Pt9n4/J2ff0Q/N0fIPTn0zDS3gFq9y2IBPpBykgHOfdecM8vAM/DXwbviq+DlJkRF8i+vr5LyOLT5EX7aS30o9wmb6oZwXHvOE1gTz5z5sy64uLitfGA6nvhJeh/qRG0oZA1G6keyHhqLfi2V4Hksw/y7NmzjSUlJa8Rc70E8CYt8qrRLFMIEA+tUnAhnbFp06YdFKFYtsE3fw83nqiC0IlTOBsUe1ric8Onz8HAa2+Bc0YOuAvm2eo2ffr0L3R1dZ1sb28fFAJxHo8qInMOYi2HXCtbtCWM+3bk5+cvsbEwQs+u5yHwYkPS8yrz6UqY8sz32QSzfPbKlSsnMH79CQHrodizm0w1IgseMkNgzbNu3boZGzZs2OqwsfT37q6FQN0r4+I0hk+34T8j4HlkkeWz6AfykYDj58+fHyBT5OkSYy/CFU+luXYPiRu9UUVhYeGTlqb4VjPc2viDMVJhGdK++Th4y5aB64G5IE/NAvWWH8L/vAjB5vdg8MjbqI55Ljr1lZ9D2rdLLQG2tbW9sWDBggYC1UtygwXXPIFkjOWSSTJP6cAo/Vepqak5sV6s3rwN14q+oTsRY/MsWQzZL+wC532zxp5uH3wEt7fvxjn61+gQCZ3LjL+/C/K07JjghoaGbmAWspbmnZ9M82NmmjxLdgkZtGPLli2zrYDpLvln9abA0tc/ATlNL8cEphOL/59z5Jf686Ze99l6S+ZQz2lMXyJJxCHxKpVbuAmlpaVftOPyB15vMmes9hl6tZ0qjKw/z/oZG3u/2cczNtR3vuA7RvFw5pxCQQfQA821TC5xgTauYw6XE7Kf36krHF+ZSdb7sf53OGF8PxvHqrGMX1irZV5xE8HxKhVg/DbT6oWhk6ei7nm/9Tg475+dWBkO+7H+dsYxNkFfSajzjIITq1SAE9Ryvo3840I0uOVLk1oGvKXLbI0T1c/rnSaAG622SQbE+m9WzLF6oXq1O+qe3ehirOZ+YK6tcaJYdzq9QjDiEME5Yjw8tkPpH4h231N8SYEz6282jgW40atkVgdUFCVoqUhGerQiPX3J1U1M+kvpaTbCU2VIqH2OXrlZRoTgU3x4bAeXFz0tRzDySKaZ9Zdn5toBFzTZYNEkwy5LhGqIlobufvDz0ctD85+SAmfW32wck5pnt0BSxAhOEZnz+/3/sXqh5+HowDZ45B09pEqkKZ0f6v3tjGNsgr7cAhmeiAiO77QAK3Fbul/MoFmieceiG1b0WBHUODdmMGXyV+/R+xsTWTaOVRP0VYXsICIWV/huCzQ3N7dbOhQMbNPXrIxedDEIvr1tN6uq2gOGH8K/vQaGjr8fHaPi++1k54K+YRFPrKzgdRaUxtTrBmYFCycwKzj7Dsg5Uy2zgszMzO+iU+EJa7+YFYhbR6PsXbhw4YSlx8R0JIvFkmbhGSp8rWQ53KqshuBvWyB86QpEegP6lf1m9699qdQUmB5SPfcjS2BcTwSmCawN8yoYj1QV2i7iNQh3XV3duwcPHlxllYmzhDLccRH6al+Onko4hwZ/87YucZUatlZC2qoyO2V/jenJk3gCFTLWUCQyzcRrKDufg8C+V5OvoWypgCk11XZrKCcxI9hrVUPRhGQvhcC6A4HAB2VlZcstq1+oSOqjXwEXRvahv5wBLTScUOiV/Ys9kPm9clvA2C5QdXX1j9va2hiQIDEWIGBhu3XL9cXFxWsmtm65Bnzbn4q3bvnrkpKSg7HqlnYrzi/6fL77E6o4Yz42WnHGIFivOKOj0CvOjyxKtOLcWVBQsNWq4gwmewWMvftQWOqu76Bu3LixPBwOD2j/A43pwfSBT3Zc55O+mWDYyjLOJR6C8TqEXpdgmw7Z2dn/QjNYQhv/k9LYlvL+/ft37t279yJ5xAGaa33EoBoLnBGgi36nsG2jefPmdbFtpMkAyIAdPnz4p1VVVX8j/foFJ9JLUQlYgQMhU+D1FfY7pamp6aPc3NyLhYWFiyZiH3zsCE0NNjQ01JSXl5+ijy0C66G/7e0df1r2xJM9zbC6qKho1QSdZlBaW1vfmJDTDJ/6cyifBCBxnSBa6vV6c+NlCrOQj3E9fW88TxBNyNkvVrtnJW7h7FeO0+n0sCoVq3eghFhpgJ/9YvnYvn37rM5+8QNuyZ39ihUtwZ2n9tIJ8P/PqT07cS6Yn7d0CbX6eM5bKkI+xk8lBOEun7c0Wyd5JsHNM5GTsuJ+NjfHYZikk7JmTIqMJXvGWU2EqYkCZ3xnvKfTuXmO6+n0/wowALmncfsG1yHoAAAAAElFTkSuQmCC";var Uh=Vh;class Wh{constructor(e){this.className=e.className,this.title=e.title?e.title:null,this.description=e.description?e.description:null,this.initialized=!1}initialize(){return!0}handleClickEvent(e){}destroy(){this.initialized=!1}}var qh=Wh;class Jh extends qh{static get className(){return"vcs.vcm.widgets.search.FeatureItem"}constructor(e){e.className=Jh.className,super(e),this.pointWGS84=e.pointWGS84||null,this.geometry=e.geometry||null,this.balloonContent=e.balloonContent||null,this.result=e.result||{},this.layerName=e.layerName,this.icon=e.icon||Uh,this.clearLayerOnClick=null==e.clearLayerOnClick||e.clearLayerOnClick,this._featureId=null,this.zoomDistance="number"===typeof e.zoomDistance?e.zoomDistance:2e3,this.initialize()}initialize(){const e=j.getInstance();if(super.initialize(),!this.initialized){if(!this.pointWGS84&&!this.geometry)return console.log("you need to specify a geometry or a point"),!1;if(!this.pointWGS84){const e=(new ol.format.GeoJSON).readFeature(this.geometry);if(!e)return!1;this.pointWGS84=ol.extent.getCenter(e.getGeometry().getExtent())}const t=this.layerName&&e.getLayerByName(this.layerName)instanceof ss;if(!t)return console.log("could not find the result layer vector layer: "+this.layerName),!1;this.initialized=!0}return!0}handleClickEvent(){if(this.initialized){const e=j.getInstance(),t=e.getActiveMap(),i=t.getViewPoint();i.animate=!0;const s=i.groundPosition,r=this.pointWGS84.slice();s&&s[2]&&(r[2]=s[2]),i.groundPosition=r,i.distance=this.zoomDistance,i.cameraPosition=null;const{pitch:n}=i;(!n||n>-20)&&(i.pitch=-20);const a=e.getLayerByName(this.layerName),o=this.getFeature();this.clearLayerOnClick&&a.removeAllFeatures(),a.addFeatures([o]),a.activate(),t.gotoViewPoint(i);const l=E.getInstance();l.getCurrentItem()&&l.getCurrentItem().id===o.getId()||l.setCurrentItem(o.getId(),o,a)}}getFeature(){if(this.initialized){const e=j.getInstance();if(null!=this._featureId){const t=e.getLayerByName(this.layerName),i=t.getFeatureById(this._featureId);if(i)return i}let t;if(this.geometry){const e=new ol.format.GeoJSON;t=e.readGeometry(this.geometry)}else t=new ol.geom.Point(this.pointWGS84);const i=new ol.Feature(Object.assign({},{geometry:t},this.result));return this._featureId=Object(c["c"])(),i.setId(this._featureId),this.balloonContent&&i.set("balloonContent",this.balloonContent),i}return null}destroy(){if(super.destroy(),null!=this._featureId){const e=j.getInstance(),t=e.getLayerByName(this.layerName);t.removeFeaturesById([this._featureId])}this._featureId=null}}var Kh=Jh;class Zh extends qh{static get className(){return"vcs.vcm.widgets.search.LayerItem"}constructor(e){e.className=Zh.className,super(e),this.slug=e.slug,this.initialize()}initialize(){if(super.initialize(),!this.initialized){if(!this.slug)return console.log("Could not find layer for LayerItem"),!1;const e=j.getInstance().getLayerByName(this.slug);if(!e)return console.log("Could not find layer for LayerItem"),!1;this.initialized=!0}return!0}isActive(){return j.getInstance().getLayerByName(this.slug).active}handleClickEvent(e){if(this.initialized){const t=j.getInstance().getLayerByName(this.slug);t&&(t.active||t.loading?(t.deactivate(),e()):t.activate().then(e))}}}var Qh=Zh;const Xh={[kh.className]:kh,[Yh.className]:Yh};class $h extends _a{static get className(){return"vcs.vcm.widgets.search.Search"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{autocomplete:!1,autocompleteRequest:void 0,fullAddressRequest:void 0,extendedSearches:void 0,searchImplementations:[kh.getDefaultOptions()],searchQueries:[{endpoints:[{searchImpl:"vcs.vcm.widgets.search.Nominatim"}],regex:".*"}],searchResultItems:{address:{zoomTo:!0,pointType:!0,geomProperty:"geometry",title:"",description:"<%= obj.fulladdress %>",balloonContent:["   <div class='balloon-content'>","       <p class='balloon-text'><span class='balloon-street'> <%= obj.fulladdress %></span><br></p>","   </div>"]},point:{pointType:!0,geomProperty:"point",title:"<%= obj.display_name %>",description:"<%= obj.licence %>",balloonContent:["   <h1 class='balloon-title'><%= obj.display_name %></h1>","   <div class='balloon-content'>","       <p class='balloon-text'><%= obj.licence %></p>","   </div>"]},geojson:{zoomTo:!0,pointType:!1,geomProperty:"geojson",pointProperty:"point",title:"<%= obj.display_name %>",description:"<%= obj.licence %>",balloonContent:["   <h1 class='balloon-title'><%= obj.display_name %></h1>","   <div class='balloon-content'>","       <p class='balloon-text'><%= obj.licence %></p>","   </div>"]}},style:{image:{src:Uh,scale:.5},fill:{color:"rgba(168, 192, 43, 0.6)"},stroke:{color:"rgb(168, 192, 32)",width:1.25}},highlightStyle:{image:{src:Uh,scale:.5},fill:{color:"rgba(168, 192, 43, 0.6)"},stroke:{color:"rgb(168, 192, 32)",width:1.25}},classificationType:void 0,showAllResults:!1})}constructor(e){e.className=$h.className,super(e);const t=$h.getDefaultOptions();this.autocomplete=Object(c["e"])(e.autocomplete,t.autocomplete),this.autocompleteRequest=e.autocompleteRequest||null,this.fullAddressRequest=e.fullAddressRequest||null,this.extendedSearches=e.extendedSearches||[],this.middleware=[],this.extendedSearches.forEach((function(t){if("string"===typeof t)"searchTags"===t?this.middleware.push(new Hh(e)):"searchNear"===t&&this.middleware.push(new Bh(e));else{let e;"vcs.vcm.widgets.search.middleware.Near"===t.type?e=new Bh(t):"vcs.vcm.widgets.search.middleware.Tags"===t.type&&(e=new Hh(t)),e&&e instanceof Nh&&this.middleware.push(e)}}),this),this.searchImplementations=[];const i=e.searchImplementations||t.searchImplementations;if(i)for(let n=0;n<i.length;n++){i[n].middleware=this.middleware;const e=Xh[i[n].type];if(!e){this.logger.warning("could not find search implementation with type "+i[n].type);continue}const t=new e(i[n]);t&&t instanceof Ch&&(t.searchWidget=this,this.searchImplementations.push(t))}this.searchQueries=e.searchQueries||t.searchQueries,this.searchQueries.reverse(),this.searchResultItems=e.searchResultItems||t.searchResultItems,Object.values(this.searchResultItems).forEach(e=>{Object.keys(e).forEach(t=>{if(["title","description","balloonContent"].indexOf(t)>-1){const i=e[t],s=Array.isArray(i)?i.join("\n"):i;e[t]=br()(s)}})}),this.currentResults=[],this.justSearched=!1;const s=t.style;e.resultIcon&&(s.image.src=e.resultIcon,this.logger.deprecate("resultIcon","use style instead."));const r=e.style||s;this.resultLayer=new ss({projection:{epsg:4326},style:r,highlightStyle:e.highlightStyle||r,name:"_searchResultVector",zCoordinateEyeOffset:-100,heightAboveGround:10,altitudeMode:"clampToGround",classificationType:e.classificationType||t.classificationType}),this.showAllResults=!!e.showAllResults}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;this.searchImplementations.forEach(e=>{e.initialize()}),this.middleware.forEach(e=>{e.initialize()}),this.framework.addLayer(this.resultLayer),this.initialized=!0;const t=this.framework.getWidgetByType("vcs.vcm.widgets.BalloonInfo");t&&!t.hasTypeForLayerName("_searchResultVector")&&t.addTypeForLayer("_searchResultVector",["<div class='balloon' id='myBalloon'>","    <%= balloonContent %>","   <div class='balloon-close-col'>","       <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>","   </div>","   <div class='dialog-image-balloon'></div>","   <div class='balloon-left-edge'></div>","</div>"],"balloonHeight + 30","70"),this.initializedFinished()}}search(e){return this.clearSearch(),new Promise(t=>{const i=this._handleSearchResults.bind(this,t);this._handleSearch(e,i)})}_handleSearch(e,t,i){let s;if(this.runningRequest&&this.runningRequest.cancel(),this.justSearched=!0,Number.isFinite(i)){if(!(i<this.searchQueries.length-1))return void t([]);s=this.searchQueries.slice(i+1).findIndex(t=>{const i=new RegExp(t.regex);return i.test(e)}),s=s+i+1}else s=this.searchQueries.findIndex(t=>{const i=new RegExp(t.regex);return i.test(e)});const r=this.searchQueries[s],n=this.searchImplementations.filter(e=>{const t=r.endpoints.findIndex(t=>t.searchImpl===e.className);return t>-1});if(0===n.length)return void t([]);const a=this.searchCascade.bind(this,e,r.cascade,s,t);n.forEach(t=>{t.search(e,r,a)})}searchCascade(e,t,i,s,r){0===r.length&&t?this._handleSearch(e,s,i):s(r)}_handleSearchResults(e,t){const i=this._getResultItems(t),s=i.map((function(e){return!!(e.initialized&&(this.currentResults.push(e),this.showAllResults&&e instanceof Kh))&&e.getFeature()}),this).filter(e=>e);this.showAllResults&&(this.resultLayer.addFeatures(s),this.resultLayer.activate()),e()}_getResultItems(e){let t;if(0===e.length)return[];const i=[];return e.forEach((function(e){const s=this.searchResultItems[e.type];if(!s&&!t)throw new Error("Got undefined result type");let r;if(t)r=e;else if(s.geomProperty){let t,i;if(s.pointType)i=e[s.geomProperty],t=!1;else{t=e[s.geomProperty];const r=new ol.format.GeoJSON,n=r.readGeometry(t);i=s.pointProperty&&e[s.pointProperty]?e[s.pointProperty]:ol.extent.getCenter(n.getExtent())}s.geomProperty&&e[s.geomProperty]&&delete e[s.geomProperty],s.pointProperty&&e[s.pointProperty]&&delete e[s.pointProperty],e.zoomTo=s.zoomTo,r=new Kh({geometry:t,result:e,balloonContent:s.balloonContent(e),title:s.title(e),pointWGS84:i,description:s.description(e),layerName:"_searchResultVector",clearLayerOnClick:!this.showAllResults,icon:Uh,zoomDistance:s.zoomTo})}else"layer"===e.type&&(r=new Qh({slug:e.slug,title:s.title(e),description:s.description(e)}));i.push(r)}),this),i}clearSearch(){this.runningRequest&&this.runningRequest.cancel(),this.resultLayer.removeAllFeatures(),this.currentResults.splice(0,this.currentResults.length),this.resultLayer.deactivate()}getAutocomplete(e,t){const i=JSON.parse(JSON.stringify(this.autocompleteRequest)),s=new RegExp(/\b[0-9]+/g),r=new RegExp(/\b[0-9]{5}\b/);if(s.test(e)&&null!==this.fullAddressRequest){const t=e.match(s);1===t.length&&r.test(e)||(i.query=Object.assign(i.query,this.fullAddressRequest))}const n=br()(JSON.stringify(i.query));this.runningRequest&&this.runningRequest.cancel();const a=w.getInstance().getLocaleAwareString(i.endPoint);return this.runningRequest=G.a.CancelToken.source(),new Promise((i,s)=>{G.a.post(a,n({query:e}),{cancelToken:this.runningRequest.token}).then(e=>{let s=e.data;s=s.suggest||s;let r=[];if(this.justSearched)return t&&(i(r),t(r)),void(this.justSearched=!1);s.fullAddressSuggest&&s.fullAddressSuggest[0].options.length>0&&s.fullAddressSuggest[0].options.forEach(e=>{r.push(e.text)}),0===r.length&&s.nameSuggest[0].options.length>0&&s.nameSuggest[0].options.forEach(e=>{r.push(e.text)}),r=r.filter((e,t,i)=>i.indexOf(e)===t),t&&t(r),i(r)}).catch(e=>{t&&t([]),i([])}).then(()=>{this.runningRequest=null})})}getConfigObject(){const e=super.getConfigObject();return e.autocomplete=this.autocomplete,e.autocompleteRequest=this.autocompleteRequest,e.searchImplementations=[],e.extendedSearches=this.extendedSearches,e.searchImplementations.push(new kh({}).getConfigObject()),e}}var ed=$h;class td extends se{constructor(e,t){super(),this.cb=t,this.scratchLayer=e,this._defaultActive=X.CLICK,this.coordinates=[],this.setActive()}pipe(e){if(!e.position.every(e=>0===e)){const t=e.position.slice();e.feature||2===this.coordinates.length||(t[2]+=1.6),this.coordinates.push(t),2===this.coordinates.length?(this.scratchLayer.addFeatures([new ol.Feature({geometry:new ol.geom.Point(t)}),new ol.Feature({geometry:new ol.geom.LineString(this.coordinates)})]),this.setActive(!1),this.cb(this.coordinates)):this.scratchLayer.addFeatures([new ol.Feature({geometry:new ol.geom.Point(t)})])}return Promise.resolve(e)}}var id=td;let sd,rd,nd;class ad extends _a{static get className(){return"vcs.vcm.widgets.AdvancedWalkMode"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{color:"#A8C02B"})}constructor(e){e.className=ad.className,super(e);const t=ad.getDefaultOptions();this.navigationControls=null,this.color=e.color||t.color,this.featureLayer=new ss({projection:{epsg:3857},name:"_advancedWalkMode",altitudeMode:"none"}),this.supportedMaps=["vcs.vcm.maps.Cesium"],this._removeInteraction=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.initialized=!0,this.initializedFinished();const t=new ol.style.Fill({color:this.color}),i=new ol.style.Stroke({color:this.color,width:2});this.featureLayer.setStyle(new ol.style.Style({image:new ol.style.Circle({fill:t,stroke:i,radius:5}),fill:t,stroke:i}))}return!0}isSupported(e){return!(!this.navigationControls&&this.framework.isInitialized()&&(this.navigationControls=this.framework.getWidgetByType("vcs.vcm.widgets.NavigationControls"),!this.navigationControls))&&super.isSupported(e)}activate(){this.featureLayer.activate(),this.navigationControls.navigationMode.values.walkmode&&this.navigationControls.navigationMode.activateOverviewMode(),this.active&&this.deactivate();const e=new id(this.featureLayer,this.calculateViewPoint.bind(this));this._removeInteraction=vs().addExclusiveInteraction(e,this.deactivate.bind(this)),super.activate()}deactivate(){this._removeInteraction&&this._removeInteraction(),this.featureLayer.getSource().clear(),this.featureLayer.deactivate(),super.deactivate()}calculateViewPoint(e){const[t,i]=e.map(e=>W.mercatorToWgs84(e));let s,r={};t[2]>i[2]?(r=t.slice(),r[2]=i[2]):(r=i.slice(),r[2]=t[2]),sd=Cesium.Cartesian3.fromDegrees(...t,Cesium.Ellipsoid.WGS84,sd),rd=Cesium.Cartesian3.fromDegrees(...i,Cesium.Ellipsoid.WGS84,rd),nd=Cesium.Cartesian3.fromDegrees(...r,Cesium.Ellipsoid.WGS84,nd),rd=Cesium.Cartesian3.subtract(rd,sd,new Cesium.Cartesian3),nd=Cesium.Cartesian3.subtract(nd,sd,new Cesium.Cartesian3),Cesium.Cartesian3.normalize(rd,rd),Cesium.Cartesian3.normalize(nd,nd),s=t[2]>i[2]?Cesium.Math.toDegrees(Math.acos(Cesium.Cartesian3.dot(rd,nd)))-90:Cesium.Math.toDegrees(Math.acos(Cesium.Cartesian3.dot(rd,nd)));const n={groundPosition:t,distance:0,animate:!0,heading:Yt(t,i),pitch:s},a=new me(n);this.navigationControls.navigationMode.activateFirstPersonMode(a,null,null,null,!0),setTimeout(this.deactivate.bind(this),1e3)}}var od=ad;class ld extends _a{static get className(){return"vcs.vcm.widgets.BalloonInfo"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{balloonTypes:[{template:["<div class='balloon' id='myBalloon'>","   <h1 class='balloon-title'><%= obj.title %></h1>","   <div class='balloon-content'>","       <%= obj.description %>","   </div>","   <div class='balloon-close-col'>","       <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>","   </div>","   <div class='dialog-image-balloon'></div>","   <div class='balloon-left-edge'></div>","</div>"],minTop:"balloonHeight + 70",minLeft:"70",layerTypes:["vcs.vcm.layer.Vector"],layerNames:[]}],excludedLayerNames:void 0})}constructor(e){e.className=ld.className,super(e);const t=ld.getDefaultOptions();this.balloonTypes=[],this.layerNamesToBalloonTypes={},this.layerTypesToBalloonTypes={};const i=e.balloonTypes||t.balloonTypes;i.forEach((e,t)=>{let i=e.template;"string"!==typeof e.template&&(i=e.template.join("\n")),this.balloonTypes.push({template:i,minTop:e.minTop?e.minTop:0,minLeft:e.minLeft?e.minLeft:0,layerNames:e.layerNames?e.layerNames:[],layerTypes:e.layerTypes?e.layerTypes:[]}),e.layerTypes&&e.layerTypes.forEach(e=>{this.layerTypesToBalloonTypes[e]=t}),e.layerNames&&e.layerNames.forEach(e=>{this.layerNamesToBalloonTypes[e]=t})}),this.balloon=null,this.excludedLayerNames=e.excludedLayerNames||[]}createBalloonForGenericFeature(e){this.clearBalloon();const t=e.layerName,i=e.layerClass;let s,r;if(this.excludedLayerNames.includes(t))return;if(null!=this.layerNamesToBalloonTypes[t])s=this.balloonTypes[this.layerNamesToBalloonTypes[t]];else{if(null==this.layerTypesToBalloonTypes[i])return;s=this.balloonTypes[this.layerTypesToBalloonTypes[i]]}const n=e.attributes||e,a={};Object.keys(n).forEach(e=>{/^olcs_/.test(e)||(a[e]=n[e])});try{r=br()(s.template)(a)}catch(l){return void this.logger.warning(`Could not render the template for layer: ${t}. Please verify that the balloon template is correct`)}const o=Object.assign(e,{balloonWidget:this,minTop:s.minTop,minLeft:s.minLeft,balloonContent:r});this.balloon=new Sr(o),this.balloon.initialize()}clearBalloon(){this.balloon&&(this.balloon.close(),this.balloon=null)}hasTypeForLayerName(e){return a(e,String),null!=this.layerNamesToBalloonTypes[e]}addTypeForLayer(e,t,i,s){Array.isArray(t)&&(t=t.join("")),a(e,String),a(t,String),o(s,String),o(i,String);const r={layerTypes:[],layerNames:[e],template:t,minTop:i||"balloonHeight + 30",minLeft:s||"70"},n=this.balloonTypes.length;this.balloonTypes.push(r),this.layerNamesToBalloonTypes[e]=n}getLink(e){this.balloon&&this.balloon.getLink(e)}dispose(){this.clearBalloon()}getBalloon(){return this.logger.deprecate("getBalloon","access the balloon property directly"),this.balloon}getConfigObject(){const e=super.getConfigObject();return e.balloonTypes=this.balloonTypes,e.balloonTypes.forEach(e=>{e.template&&(e.template=e.template.split("\n"))}),e.excludedLayerNames=this.excludedLayerNames,e}}var cd=ld;class ud extends _a{static get className(){return"vcs.vcm.widgets.Copyright"}constructor(e){e.className=ud.className,super(e),this.data={},this.headerLogoBox=e.headerLogoBox||null,Array.isArray(this.headerLogoBox)&&(this.headerLogoBox=this.headerLogoBox.join("\n")),this.headerTitle=e.headerTitle||null,Array.isArray(this.headerTitle)&&(this.headerTitle=this.headerTitle.join("\n")),this.footerLogoBox=e.footerLogoBox||null,Array.isArray(this.footerLogoBox)&&(this.footerLogoBox=this.footerLogoBox.join("\n")),this.showOverflow=!!e.showOverflow,this.layerItems=[],this.uiOptions={headerLogoBox:this.headerLogoBox,headerTitle:this.headerTitle,footerLogoBox:this.footerLogoBox}}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;this.updateLayers(),this.framework.subscribe(L.MAP_ACTIVATED,this.updateLayers.bind(this)),this.framework.subscribe(L.LAYER_CHANGED,this.layerChanged.bind(this)),this.initialized=!0,this.initializedFinished()}}updateLayers(){const e=this.framework.getLayers(),t=this.framework.getActiveMap();t&&(this.layerItems.splice(0),e.forEach((function(e){if(e.isSupported(t)&&e.active){const t=this.createLayerItem(e);t&&this.layerItems.push(t)}}),this))}layerChanged(e){const t=this.layerItems.findIndex(t=>t.layerName===e.name);if(e.active){if(-1===t){const t=this.createLayerItem(e);t&&this.layerItems.push(t)}}else t>-1&&this.layerItems.splice(t,1)}createLayerItem(e){const t=e.options.copyright;if(t&&t.provider&&""!==t.provider){t.layerName=e.name;let i="";return e.options.category&&(i+=e.options.category+" - "),e.options.title?i+=e.options.title:i+=e.name,t.title=i,t}return null}handleURLParameter(e){const t=e.headerTitle;null!=t&&(this.uiOptions.headerTitle=t)}getLink(e){this.headerTitle!==this.uiOptions.headerTitle&&e.addQueryParams({headerTitle:this.uiOptions.headerTitle})}}var hd=ud;class dd extends _a{static get className(){return"vcs.vcm.widgets.CreateLink"}constructor(e){e.className=dd.className,super(e)}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;this.initializedFinished()}}}var md=dd;const gd={AMBIENT_OCCLUSION:"ambientOcclusion",BLOOM:"bloom",BLACK_AND_WHITE:"blackAndWhite",BLUR:"blur",BRIGHTNESS:"brightness",DEPTH_OF_FIELD:"depthOfField",LENS_FLARE:"lensFlare",NIGHT_VISION:"nightVision",SILHOUTTE:"silhouette"};class pd{constructor(e,t){this._enabled=e.enabled,this.uniforms={},Object.keys(t).forEach(i=>{"color"===t[i].type?Object.defineProperty(this.uniforms,i,{get(){const t=e.uniforms[i].toBytes();return t[3]/=255,t},set(t){e.uniforms[i]=Cesium.Color.fromBytes(t[0],t[1],t[2],255*t[3],e.uniforms[i])}}):this.uniforms[i]=e.uniforms[i]}),this.uniformTypes=t,this.update=this._update.bind(this,e),this.setEnabled=this._setEnabled.bind(this,e)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.setEnabled()}_setEnabled(e){e.enabled=this._enabled}_update(e){Object.keys(this.uniforms).forEach(t=>{e.uniforms[t]=this.uniforms[t]})}static isSupported(e){return!0}}var fd=pd;class yd extends fd{static get type(){return gd.AMBIENT_OCCLUSION}constructor(e){super(e,{intensity:{type:"number"},bias:{type:"number"},lengthCap:{type:"number"},stepSize:{type:"number",step:.2},frustumLength:{type:"number",step:10},ambientOcclusionOnly:{type:"boolean"}}),this.uniforms.lengthCap=3,this.update()}static isSupported(e){return Cesium.PostProcessStageLibrary.isAmbientOcclusionSupported(e)}}var _d=yd;class vd extends fd{static get type(){return gd.BLOOM}constructor(e){super(e,{contrast:{type:"number",step:2},brightness:{type:"number"},delta:{type:"number"},sigma:{type:"number"},stepSize:{type:"number"},glowOnly:{type:"boolean"}})}}var Ld=vd;class Md extends fd{static get type(){return gd.BLACK_AND_WHITE}constructor(e){super(e,{gradations:{type:"number",step:1}})}static createStage(){return Cesium.PostProcessStageLibrary.createBlackAndWhiteStage()}}var bd=Md;class wd extends fd{static get type(){return gd.BLUR}constructor(e){super(e,{delta:{type:"number"},sigma:{type:"number"},stepSize:{type:"number"}})}static createStage(){return Cesium.PostProcessStageLibrary.createBlurStage()}}var Td=wd;class Sd extends fd{static get type(){return gd.BRIGHTNESS}constructor(e){super(e,{brightness:{type:"number"}})}static createStage(){return Cesium.PostProcessStageLibrary.createBrightnessStage()}}var Cd=Sd;class Ed extends fd{static get type(){return gd.DEPTH_OF_FIELD}constructor(e){super(e,{focalDistance:{type:"number",step:1},delta:{type:"number"},sigma:{type:"number"},stepSize:{type:"number"}})}static isSupported(e){return Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(e)}static createStage(){return Cesium.PostProcessStageLibrary.createDepthOfFieldStage()}}var Id=Ed;class kd extends fd{static get type(){return gd.LENS_FLARE}constructor(e){super(e,{intensity:{type:"number"},distortion:{type:"number",step:1},ghostDispersal:{type:"number"},haloWidth:{type:"number"},earthRadius:{type:"number",step:1e3}})}static createStage(){return Cesium.PostProcessStageLibrary.createLensFlareStage()}}var Dd=kd;class Od extends fd{static get type(){return gd.NIGHT_VISION}constructor(e){super(e,{})}static createStage(){return Cesium.PostProcessStageLibrary.createNightVisionStage()}}var Pd=Od;class Ad extends fd{static get type(){return gd.SILHOUTTE}constructor(e){super(e,{color:{type:"color"},length:{type:"number"}})}static isSupported(e){return Cesium.PostProcessStageLibrary.isSilhouetteSupported(e)}static createStage(){return Cesium.PostProcessStageLibrary.createSilhouetteStage()}}var xd=Ad;const Yd={[_d.type]:_d,[Ld.type]:Ld,[bd.type]:bd,[Td.type]:Td,[Cd.type]:Cd,[Id.type]:Id,[Dd.type]:Dd,[Pd.type]:Pd,[xd.type]:xd},jd=v.getLogger("vcs.vcm.widets.DisplayQuality");class Nd extends _a{static get className(){return"vcs.vcm.widgets.DisplayQuality"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{defaultQualityLevel:"medium",defaultMobileQualityLevel:"low",low:{sse:4,fxaa:!1,fog:{enabled:!0,density:9e-4,screenSpaceErrorFactor:6},resolutionScale:.9,layerSSEFactor:2},medium:{sse:2.333,fxaa:!1,fog:{enabled:!0,density:5e-4,screenSpaceErrorFactor:4},resolutionScale:1,layerSSEFactor:1.1},high:{sse:4/3,fxaa:!0,fog:{enabled:!1,density:0,screenSpaceErrorFactor:0},resolutionScale:1,layerSSEFactor:.5},showAdvancedSettings:!1,allowedPostRenderStages:[_d.type,Ld.type,bd.type,Td.type,Cd.type,Id.type,Pd.type,xd.type]})}constructor(e){e.className=Nd.className,super(e);const t=Nd.getDefaultOptions();this.defaultQualityLevel=e.defaultQualityLevel||t.defaultQualityLevel,this.defaultMobileQualityLevel=e.defaultMobileQualityLevel||t.defaultMobileQualityLevel,this.viewModel=null;const i={},s=e.low||{};i.low=Nd.createViewModel(t.low,s);const r=e.medium||{};i.medium=Nd.createViewModel(t.medium,r);const n=e.high||{};i.high=Nd.createViewModel(t.high,n),this.viewModelSettings=i,this.showAdvancedSettings=Object(c["e"])(e.showAdvancedSettings,t.showAdvancedSettings),this.sseLayerTypes=["vcs.vcm.layer.cesium.AbstractCesiumTilesetLayer","vcs.vcm.layer.TiledLayer","vcs.vcm.layer.FeatureStore"],this.supportedMaps=["vcs.vcm.maps.Cesium"],this.cesiumMap=null,this.layers=[],this.activePreset={preset:null},this.postProcessStages={};const a=e.allowedPostRenderStages||t.allowedPostRenderStages;a.forEach(e=>{this.postProcessStages[e]=null})}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.cesiumMap=this.framework.getMapByType("vcs.vcm.maps.Cesium");const t=this.cesiumMap.getScene(),i=t.postProcessStages;Object.keys(this.postProcessStages).forEach(e=>{Yd[e]&&Yd[e].isSupported(this.cesiumMap.getScene())?i[e]&&(this.postProcessStages[e]=new Yd[e](i[e])):delete this.postProcessStages[e]}),this.viewModel={sse:t.globe.maximumScreenSpaceError,fxaa:i.fxaa.enabled,fog:t.fog,resolutionScale:1},this.initializeLayers(),this.framework.subscribe(L.LAYER_ACTIVATED,this.layerActivated,this),this.framework.isMobile()?this.setPreset(this.defaultMobileQualityLevel):this.setPreset(this.defaultQualityLevel),this.initialized=!0,this.initializedFinished()}return!0}addPostProcessingStage(e){this.postProcessStages[e]&&jd.warning("trying to add existing stage");const t=Yd[e],i=this.cesiumMap.getScene();if(t&&t.isSupported(i)){const s=t.createStage();i.postProcessStages.add(s),this.postProcessStages[e]=new t(s)}else jd.error(`could not find ${e} or ${e} is not supported`)}static createViewModel(e,t){const i=new Cesium.Fog,s=Object.assign(e.fog,"object"===typeof t.fog?t.fog:{});i.enabled=!!s.enabled,i.density=Number(s.density),i.screenSpaceErrorFactor=Number(s.screenSpaceErrorFactor);const r=Object.assign(e,t);return{sse:Number(r.sse),fxaa:!!r.fxaa,fog:i,resolutionScale:Number(r.resolutionScale),layerSSEFactor:Number(r.layerSSEFactor)}}initializeLayers(){this.framework.getLayers().filter(e=>e instanceof Cn||e instanceof Us||e instanceof fa).forEach(e=>{const t=this.framework.isMobile()?e.screenSpaceErrorMobile:e.screenSpaceError;this.layers.push({layerName:e.name,sse:t,defaultSse:t})})}layerActivated(e){const t=this.layers.find(t=>t.layerName===e.name);t&&this.setLayerQuality(e.name)}setQuality(e){if(o(e,Boolean),e||(this.activePreset.preset=null),this.cesiumMap.initialized&&this.viewModel){const e=this.cesiumMap.getCesiumWidget();e.scene.globe.maximumScreenSpaceError=this.viewModel.sse,e.scene.postProcessStages.fxaa.enabled=this.viewModel.fxaa,e.resolutionScale=this.viewModel.resolutionScale,e.scene.fog.enabled=this.viewModel.fog.enabled,e.scene.fog.density=this.viewModel.fog.density,e.scene.fog.screenSpaceErrorFactor=this.viewModel.fog.screenSpaceErrorFactor}}setPreset(e){a(e,["high","medium","low"]),this.activePreset.preset=e;const t={};"high"===e?Object.assign(t,this.viewModelSettings.high):"medium"===e?Object.assign(t,this.viewModelSettings.medium):Object.assign(t,this.viewModelSettings.low),Object.assign(this.viewModel,t),this.layers.forEach(e=>{e.sse=e.defaultSse*t.layerSSEFactor,this.setLayerQuality(e.layerName)}),this.setQuality(!0)}setLayerQuality(e){a(e,String);const t=this.framework.getLayerByName(e);if(t&&t.active){const i=this.layers.find(t=>t.layerName===e);i&&t.setMaximumScreenSpaceError(i.sse)}}getConfigObject(){const e=super.getConfigObject();return e.low=this.viewModelSettings.low,e.medium=this.viewModelSettings.medium,e.high=this.viewModelSettings.high,e.defaultQualityLevel=this.defaultQualityLevel,e.showAdvancedSettings=this.showAdvancedSettings,e.allowedPostRenderStages=this.options.allowedPostRenderStages||[_d.type,Ld.type,bd.type,Td.type,Cd.type,Id.type,Pd.type,xd.type],e}}var Fd=Nd;function Rd(){return{image:{fill:{color:"rgba(255, 255, 255, 0.4)"},stroke:{color:"rgb(0, 0, 0)",width:1},radius:5},stroke:{color:"rgb(51, 153, 204)",width:2},fill:{color:"rgba(255, 255, 255, 0.4)"},text:{font:"bold 18px Arial, Helvetica, sans-serif",textBaseline:"bottom",fill:{color:"rgb(0, 0, 0)"},offsetY:-15,offsetX:0,stroke:{color:"rgb(255, 255, 255)",width:2}}}}const Hd=new et(Rd());class Gd extends _a{static get className(){return"vcs.vcm.widgets.Drawing"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{allowedGeometries:["Point","LineString","Polygon","BBox","Circle","Rectangle","Label"],allowEditMode:!0,allowSelectMode:!0,defaultMode:"create",hideAltitudeMode:!1,simpleStyleUi:!1,hideExport:!1,hideHelp:!1,style:Rd()})}constructor(e){e.className=Gd.className,super(e);const t=Gd.getDefaultOptions();this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers","vcs.vcm.maps.Oblique"],this.allowedGeometries=e.allowedGeometries||t.allowedGeometries,this.allowEditMode=Object(c["e"])(e.allowEditMode,t.allowEditMode),this.allowSelectMode=Object(c["e"])(e.allowSelectMode,t.allowSelectMode),this.defaultMode=null!=Ji[e.defaultMode]?e.defaultMode:t.defaultMode,this.editorOptions={hideAltitudeMode:Object(c["e"])(e.hideAltitudeMode,t.hideAltitudeMode),simpleStyleUi:Object(c["e"])(e.simpleStyleUi,t.simpleStyleUi),hideExport:Object(c["e"])(e.hideExport,t.hideExport),hideHelp:Object(c["e"])(e.hideHelp,t.hideHelp),showFeatureEditorUiInEditMode:!this.allowSelectMode&&this.allowEditMode},("select"===this.defaultMode&&!this.allowSelectMode||"edit"===this.defaultMode&&!this.allowEditMode)&&(this.defaultMode="create"),this.editingLayer=null}activate(){super.activate()}deactivate(){super.deactivate(),this.layerEditor.deactivate()}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.initialized=!0;const t=Hd.clone();this.options.style&&t.assign(new et(this.options.style)),this.editingLayer=new ss({altitudeMode:"clampToGround",projection:J,style:t,isDynamic:!0}),this.framework.addLayer(this.editingLayer),this.editingLayer.activate(),this.layerEditor=new Ql({geometryLayerEditor:{allowEditMode:this.allowEditMode,defaultMode:this.defaultMode,allowedGeometries:this.allowedGeometries},featureLayerEditor:{allowSelectMode:this.allowSelectMode},styleLayerEditor:{}}),this.layerEditor.initialize(),this.layerEditor.addEditingLayer(this.editingLayer),this.initializedFinished()}return!0}getConfigObject(){const e=super.getConfigObject(),t=Hd.clone();return this.options.style&&t.assign(new et(this.options.style)),Object(Hi["a"])(Object(Hi["a"])({},e),{},{allowedGeometries:this.allowedGeometries,allowSelectMode:this.allowSelectMode,allowEditMode:this.allowEditMode,defaultMode:this.defaultMode,simpleStyleUi:this.editorOptions.simpleStyleUi,hideHelp:this.editorOptions.hideHelp,hideExport:this.editorOptions.hideExport,hideAltitudeMode:this.editorOptions.hideAltitudeMode,style:t.getOptions()})}}var zd=Gd,Bd=i(566),Vd=i.n(Bd);function Ud(e){const t=e[ss.obliqueGeometry];if(t){const e=t.clone(),i=j.getInstance().getActiveMap();return ci(t,e,i.activeLayer.currentImage)}return Promise.resolve(null)}function Wd(e){return e<1e3?e+" kB":e<1e6?e/1e3+" MB":e/1e6+" GB"}var qd=i(585),Jd=i.n(qd),Kd=i(35),Zd=i(586),Qd=i.n(Zd);const Xd=new ol.Sphere(6378137);function $d(e,t){const i=e.clone();i.transform("EPSG:3857","EPSG:4326");const s=i.getType(),r=i.getCoordinates();if("Polygon"===s)return r.forEach(ks),Object(Kd["polygon"])(r,t);if("LineString"===s)return Object(Kd["lineString"])(r,t);if("Point"===s)return Object(Kd["point"])(r,t);if("Circle"===s){const e=Xd.haversineDistance(r[0],r[1]),i=Qd()(Object(Kd["point"])(r[0]),e);return i.properties=t||i.properties,i}if("MultiPolygon"===s)return r.forEach(e=>{e.forEach(ks)}),Object(Kd["multiPolygon"])(r);if("MultiPoint"===s)return Object(Kd["multiPoint"])(r);if("MultiLineString"===s)return Object(Kd["multiLineString"])(r);throw Error("unsupported geometry type "+s)}const em=v.getLogger("vcs.vcm.widgets.export.AbstractExportDataSource");class tm{constructor(e){this.title=e.title,this.url=e.baseUrl?e.baseUrl.replace(/\/$/,""):"",this.resultLayerName="_exportResultLayer",this.initialized=!1,this.results=[]}static validateOptions(e){try{o(e.baseUrl,String),a(e.title,[String,Object])}catch(t){return em.error(t.message),!1}return!0}initialize(){return Promise.resolve()}getResultLayer(){return j.getInstance().getLayerByName(this.resultLayerName)}async query(e){a(e,ol.Feature),this.initialized||await this.initialize(),this.clear();const t="vcs.vcm.maps.Oblique"===j.getInstance().getActiveMap().className?await Ud(e):e.getGeometry();if(t){const e=new Le(Object(Hi["a"])({coordinates:t.getExtent()},J.getConfigObject()));if(e.isValid()){const i=$d(t),s=(await this._getFeatureInExtent(e)).map(e=>{const t=$d(e.getGeometry());if(!Jd()(t,i)){const t=this._getResultFromFeature(e);return this.results.push(t),e}return null}).filter(e=>e),r=this.getResultLayer();r&&r.addFeatures(s)}}}clear(){this.results.splice(0);const e=this.getResultLayer();e&&e.removeAllFeatures()}_getResultFromFeature(e){throw new Error("Implementation Error")}async _getFeatureInExtent(e){return[]}}var im=tm;class sm{constructor(e){this.title=e.title,this.featureId=e.featureId,this.fileSize=e.fileSize}download(){return Promise.resolve()}}var rm=sm;i(576);function nm(e,t){const i=document.createElement("a");i.download=t,i.href=e,n["a"].hasSameOrigin(e)||(i.target="_blank"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}function am(e,t){window.navigator.msSaveBlob?window.navigator.msSaveOrOpenBlob(e,t):nm(URL.createObjectURL(e),t)}function om(e,t){window.navigator.msSaveBlob?am(new Blob([e]),t):nm("data:text/plain;charset=utf-8,"+encodeURIComponent(e),t)}function lm(e,t,i){null!=e.toBlob?e.toBlob(e=>{am(e,t)},i):window.navigator.msSaveBlob&&am(e.msToBlob(),t)}class cm extends rm{constructor(e){super(e),this.href=e.href}download(){return nm(this.href,""),Promise.resolve()}}var um=cm;const hm=v.getLogger("vcs.vcm.widgets.export.GeoJSONExportDataSource");class dm extends im{constructor(e){super(e),this.geojsonUrl=e.geojsonUrl,this.layerName=null}static validateOptions(e){const t=im.validateOptions(e);if(!t)return!1;try{a(e.geojsonUrl,String)}catch(i){return hm.error(i.message),!1}return!0}getLayer(){return this.layerName?j.getInstance().getLayerByName(this.layerName):null}async initialize(){if(this.initialized)return;let e;this.layerName?e=this.getLayer():(e=new Bn({url:this.geojsonUrl,altitudeMode:"clampToGround"}),this.layerName=e.name,j.getInstance().addLayer(e),e.initialize()),await e.fetchData(),this.initialized=!0}_getResultFromFeature(e){const t=e.getProperties();return new um({href:`${this.url}/${t.url.replace(/^\//,"")}`,title:t.url,featureId:e.getId(),fileSize:t.fileSize?Wd(t.fileSize):null})}async _getFeatureInExtent(e){const t=this.getLayer();return t?t.source.getFeaturesInExtent(e.extent):[]}}var mm=dm;function gm(e){return/jpe?g$/i.test(e)?"image/jpeg":/png$/i.test(e)?"image/png":/tiff?$/i.test(e)?"image/tiff":""}function pm(e,t="jpg",i,s){a(e,di["a"]),o(t,["jpg","jpeg","png","tif","tiff"]),o(i,Number),s&&a(s,{progress:Number});const r=e.view.clone();r.setImageName(e.name);const l=r.tileImageSource,c=l.getTileGrid(),u=l.getTileUrlFunction(),h=i?c.getResolutions().indexOf(i):c.getMaxZoom(),d=document.createElement("canvas"),m=c.getTileSize(h),g=e.size.slice();i&&(g[0]/=i,g[1]/=i),d.width=g[0],d.height=g[1];const p=d.getContext("2d"),f=[];let y=0;return c.forEachTileCoord([0,0,e.size[0],e.size[1]],h,e=>{const t=new Image;n["a"].hasSameOrigin(r.url)||(t.crossOrigin="anonymous"),f.push(new Promise((i,r)=>{t.onload=function(){p.drawImage(t,0,0,m[0],m[1],e[1]*m[0],g[1]-(e[2]+1)*m[1],m[0],m[1]),y+=1,s&&(s.progress=y/f.length),i()},t.onerror=r})),t.src=u(e)}),Promise.all(f).then(()=>{lm(d,`${e.name}.${t}`,gm(t))})}class fm extends rm{constructor(e){super(e),this.obliqueLayerName=e.obliqueLayerName,this.direction=e.direction,this.imageName=e.imageName,this.fileExtension=e.fileExtension,this.resolution=e.resolution,this.progress={progress:0}}download(){const e=j.getInstance().getLayerByName(this.obliqueLayerName),t=e.obliqueCollection.directions[this.direction.toString()].images[this.imageName];return pm(t,this.fileExtension,this.resolution,this.progress).then(()=>{this.progress.progress=0})}}var ym=fm;const _m=v.getLogger("vcs.vcm.widgets.export.ObliqueExportDataSource");class vm extends im{constructor(e){super(e),this.dedicatedSource=Object(c["e"])(e.dedicatedSource,!1),this.obliqueLayerName=e.obliqueLayerName,this.fileExtension=e.fileExtension||"jpg",this.viewDirectionFilter=null,this.resolution=e.resolution}static validateOptions(e){const t=im.validateOptions(e);if(!t)return!1;try{a(e.obliqueLayerName,String),a(j.getInstance().getLayerByName(e.obliqueLayerName),bi),o(e.fileExtension,String),o(e.resolution,Number)}catch(i){return _m.error(i.message),!1}return!0}async initialize(){if(this.initialized)return;const e=j.getInstance().getLayerByName(this.obliqueLayerName);await e.initialize(),this.initialized=!0}getUriForImage(e){return`${this.url}/${e}.${this.fileExtension}`}_getResultFromFeature(e){const t=e.getId();return this.dedicatedSource?new um({title:t,href:this.getUriForImage(t),featureId:t}):new ym({title:t,featureId:t,obliqueLayerName:this.obliqueLayerName,imageName:t,direction:e.get("direction"),fileExtension:this.fileExtension,resolution:this.resolution})}async _getFeatureInExtent(e){const t=j.getInstance().getLayerByName(this.obliqueLayerName),{obliqueCollection:i}=t;if(i.isTiled){const t=i.tileFootPrintsSource.getFeaturesInExtent(e.extent),s=t.map(e=>i.loadTile(e.getId()));await Promise.all(s)}const{directions:s}=i;if(!this.viewDirectionFilter){const t=Object.values(s).map(t=>t.footPrintsLayer.getSource().getFeaturesInExtent(e.extent));return[].concat(...t)}{const t=s[this.viewDirectionFilter];if(t)return t.footPrintsLayer.getSource().getFeaturesInExtent(e.extent)}return[]}}var Lm=vm;const Mm={GEOJSON:"geojson",OBLIQUE:"oblique"};function bm(e){return e.type===Mm.GEOJSON&&mm.validateOptions(e)?new mm(e):e.type===Mm.OBLIQUE&&Lm.validateOptions(e)?new Lm(e):null}const wm=[{type:"2D Shape",texture:!1,localCoordinates:!1,genericAttributes:!0},{type:"3D Shape - PolygonZ",texture:!1,localCoordinates:!1,genericAttributes:!0},{type:"3D Shape - Multipatch",texture:!1,localCoordinates:!1,genericAttributes:!0},{type:"ESRI FGDB",texture:!1,localCoordinates:!1,genericAttributes:!0},{type:"KMZ",texture:!0,localCoordinates:!1,genericAttributes:!1},{type:"CityGML",texture:!0,localCoordinates:!1,genericAttributes:!0},{type:"DXF",texture:!1,localCoordinates:!0,genericAttributes:!1},{type:"DWG",texture:!1,localCoordinates:!0,genericAttributes:!1},{type:"3DS",texture:!0,localCoordinates:!0,genericAttributes:!1},{type:"SketchUp",texture:!0,localCoordinates:!0,genericAttributes:!1},{type:"OBJ",texture:!0,localCoordinates:!0,genericAttributes:!1},{type:"VRML",texture:!0,localCoordinates:!0,genericAttributes:!1},{type:"COLLADA",texture:!0,localCoordinates:!0,genericAttributes:!1},{type:"3DPDF",texture:!0,localCoordinates:!1,genericAttributes:!1},{type:"FMEAR",texture:!0,localCoordinates:!1,genericAttributes:!1}];function Tm(e){return Array.isArray(e)?e.map(e=>"string"===typeof e?wm.find(t=>t.type===e):e).filter(e=>e):null}class Sm extends _a{static get className(){return"vcs.vcm.widgets.Export"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{showFreeFormCrsInput:!1,dataProjection:void 0,coordinateSystem:void 0,heightMode:"absolute",formats:wm.map(e=>e.type).sort(),lod:["LoD1","LoD2","LoD3","LoD4","haLoD"].sort(),citygmlclasses:["26","7","14","5","21","85","64","45","43","46","8","9","4"].sort(),appearanceThemes:["rgbTexture"],maxarea:2e6,securityToken:"",serverUrl:"http://fmeserver/fmedatadownload/Repository/workbench.fmw",dataSources:[],disableWarehouse:!1,classificationType:"both",allowTerrainExport:!0,style:Be()})}constructor(e){e.className=Sm.className,super(e);const t=Sm.getDefaultOptions();this.showFreeFormCrsInput=Object(c["e"])(e.showFreeFormCrsInput,t.showFreeFormCrsInput),this.dataProjection=e.dataProjection?new W(e.dataProjection):this.framework.projection;const i=this.dataProjection?this.dataProjection.epsg:"";this.coordinateSystem=e.coordinateSystem||i,this.heightMode=e.heightMode||t.heightMode;const s=e.formats&&Array.isArray(e.formats)?e.formats:t.formats;this.formatOptions=Tm(s),this.lodOptions=e.lod||t.lod,this.citygmlclassesOptions=e.citygmlclasses||t.citygmlclasses,this.appearanceThemesOptions=e.appearanceThemes||t.appearanceThemes,this.maxArea=Object(c["h"])(e.maxarea,t.maxarea),this.serverUrl=e.serverUrl||t.serverUrl,this.token=e.securityToken&&""!==e.securityToken?e.securityToken:null;const r=tt.clone();e.style&&r.assign(new et(e.style)),this._layerOptions={projection:J,name:"_exportLayer",classificationType:e.classificationType||t.classificationType,altitudeMode:"clampToGround",style:r},this.singleFeatureId=Object(c["c"])();const n=e.dataSources||t.dataSources;this.dataSources=n.map(e=>bm(e)).filter(e=>e),this.disableWarehouse=Object(c["e"])(e.disableWarehouse,t.disableWarehouse),this.allowTerrainExport=Object(c["e"])(e.allowTerrainExport,t.allowTerrainExport),this.terrainUrl=e.terrainUrl,this.terrainZoomLevel=Object(c["h"])(e.terrainZoomLevel,-1)}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;if(this.geometryLayer=new ss(this._layerOptions),this.resultLayer=new ss({projection:J,name:"_exportResultLayer",classificationType:"both",altitudeMode:"clampToGround",allowPicking:!1}),this.framework.addLayer(this.geometryLayer),this.framework.addLayer(this.resultLayer),this.layerEditor=new Rl({allowedGeometries:["Polygon","BBox"],defaultMode:"edit"}),this.layerEditor.initialize(),this.layerEditor.addEditingLayer(this.geometryLayer),!this.disableWarehouse&&null==this.token)return this.logger.warning("Could not authentificate FME: missing security token"),!1;this.initialized=!0,this.initializedFinished()}return!0}async validateFeature(e){const t="vcs.vcm.maps.Oblique"===this.framework.getActiveMap().className?await Ud(e):e.getGeometry();if(!t||"Polygon"!==t.getType())throw new Error("i18n_export_geometry_error");if(null!=this.maxArea){const e=ol.Sphere.getArea(t);if(e>this.maxArea)throw new Error("i18n_export_maxArea_error")}return!0}async prepareRequestAndSend(e,t,i){if(!this.token&&!i)throw new Error("i18n_export_authentification_error");if(!e.cityGmlClasses||0===e.cityGmlClasses.length)throw new Error("i18n_export_themclass_error");const s={COORD_SYS:e.crs||(Array.isArray(this.coordinateSystem)?this.coordinateSystem[0]:this.coordinateSystem),HEIGHT_MODE:this.heightMode,TOKEN:i||this.token,OPT_SERVICEMODE:"async"};if(s.EXPORT_FORMAT=e.format.type,s.THEM_CLASS=e.cityGmlClasses.map(e=>e.value),e.format.texture&&(s.TEXTURE=e.texture?"Yes":"No"),e.format.localCoordinates&&(s.LOCAL=e.localCoordinates?"Yes":"No"),e.format.genericAttributes&&(s.GENERIC_ATTRIB=e.genericAttributes?"Yes":"No"),s.APP_THEME=e.appearance||"none",s.LOD_SELECTION=e.level,s.TERRAIN="No",this.allowTerrainExport&&e.terrainExport&&"2D Shape"!==e.format.type){const e=this.framework.getLayers().find(e=>"vcs.vcm.layer.cesium.Terrain"===e.className&&e.active);if(this.terrainUrl)s.TERRAIN="Yes",s.LAYER_JSON=this.terrainUrl;else if(e){s.TERRAIN="Yes";const t=new Vd.a(window.location.href),i=new Vd.a(e.url,t).toString(),r=/layer.json/.test(i)?i:i+"/layer.json";s.LAYER_JSON=r}this.terrainZoomLevel>=0&&(s.ZOOM=this.terrainZoomLevel)}if(e.useFeatureGeometry){s.SELECTION="Polygon";const e=this.geometryLayer.getFeatureById(this.singleFeatureId);if(!e)throw new Error("i18n_export_geometry_error");await this.validateFeature(e);const t=e.getGeometry().clone();t.transform(J.proj,this.dataProjection.proj);const i=t.getCoordinates()[0];s.POLYGON=i.map(e=>{const[t,i]=e;return`${t},${i}`}).join(";")}else{const e=this.framework.getSelectBehavior();if(e.getSelectionSet().length<=0)throw new Error("i18n_export_feature_error");s.SELECTION="Einzelobjekte",s.GMLID=e.getSelectionSet()}if(!Object(c["d"])(e.email))throw new Error("i18n_export_email_error");s.OPT_REQUESTEREMAIL=e.email;const r=Object.keys(s).map(e=>`${e}=${encodeURIComponent(s[e])}`).join("&"),n=t||this.serverUrl;return G.a.post(n,r,{headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}})}getCitygmlClassOptions(){const e={26:"Building",7:"SolitaryVegetationObjects",5:"GenericCityObject",21:"CityFurniture",14:"ReliefFeature",85:"Tunnel",64:"Bridge",45:"Road",43:"Track",46:"Square",8:"Plant Cover",9:"WaterBody",4:"LandUse"},t={85:!0,45:!0,43:!0,46:!0,8:!0,9:!0,4:!0};return this.citygmlclassesOptions.map(i=>({value:i,title:e[i],citygmlOnly:t[i]})).filter(e=>e.title)}deactivate(){this.active&&(super.deactivate(),this.framework.getSelectBehavior().deactivateClickBehavior())}getConfigObject(){const e=super.getConfigObject();return e.formats=this.formatOptions,e.coordinateSystem=this.coordinateSystem,e.heightMode=this.heightMode,e.lod=this.lodOptions,e.citygmlclasses=this.citygmlclassesOptions,e.appearanceThemes=this.appearanceThemesOptions,e.maxarea=this.maxArea,e.serverUrl=this.serverUrl,e.securityToken=this.token,e}}var Cm=Sm;class Em extends _a{static get className(){return"vcs.vcm.widgets.FeatureList"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{layerTypes:void 0,layers:void 0,excludedLayers:void 0,headerTemplate:void 0,itemTemplate:["<div class='ui-listview-list-column-2 ui-listview-list-data-cell'>","<span class='ui-listview-list-data-cell-value'><%= data.feature.properties.name %>","<% if(data.feature.properties.website){ %>","<br><a href='<%= data.feature.properties.website %>' target='_blank'><%= data.feature.properties.website %></a>","<% } %>","</span>","</div>","<div class='ui-listview-list-column-3 ui-listview-list-data-cell'>","<span class='ui-listview-list-data-cell-value'><%= data.feature.properties.street %><br><%= data.feature.properties.zip %> <%= data.feature.properties.city %></span>","</div>"],layerTemplates:void 0,queryProperties:["name"]})}constructor(e){e.className=Em.className,super(e);const t=Em.getDefaultOptions();this.layers=new Set,this._setLayers(e.layerTypes,e.layers,e.excludedLayers),this.headerTemplate=e.headerTemplate?this._makeHeaderTemplate(e.headerTemplate):null,this.itemTemplate=e.itemTemplate||t.itemTemplate,Array.isArray(this.itemTemplate)&&(this.itemTemplate=this.itemTemplate.join("")),this.layerTemplateMap={},Array.isArray(e.layerTemplates)&&e.layerTemplates.forEach(this._setLayerTemplates,this),this.queryProperties=e.queryProperties||t.queryProperties,this.values={currentHeader:this.headerTemplate,query:!0}}initialize(){if(!this.initialized){const t=super.initialize();if(!t)return;var e=function e(t){t.children?t.children.forEach(e,this):this.layers.has(t.layerName)&&(t.hasFeatureListView=!0)};const i=this.framework.getWidgetsByType(ro.className)[0];i&&i.cluster.forEach(e,this),this.initialized=!0,this.initializedFinished()}}_setLayers(e,t,i){e&&this.framework.getLayers().filter(t=>e.includes(t.className)&&!/^_/.test(t.name)).forEach((function(e){this.layers.add(e.name)}),this),t&&t.forEach((function(e){this.layers.add(e)}),this),i&&i.forEach((function(e){this.layers.delete(e)}),this)}_setLayerTemplates(e){const t=e.layers;let i=e.itemTemplate;const s=e.headerTemplate;i=Array.isArray(i)?i.join(""):i;const r={item:i,header:s?this._makeHeaderTemplate(s):this.headerTemplate,queryProperties:e.queryProperties||this.queryProperties};t.filter((function(e){return this.layers.has(e)}),this).forEach((function(e){this.layerTemplateMap[e]=r}),this)}_makeHeaderTemplate(e){return Array.isArray(e)?e.join(""):("object"===typeof e&&(e=e,Object.keys(e).forEach(t=>{e[t]=Array.isArray(e[t])?e[t].join(""):e[t]})),e)}getItems(e){if(!this.layers.has(e))return this.logger.warning(`Could not render listview for layer ${e}. Please check your configuration.`),null;const t=this.framework.getLayerByName(e),i=t.getFeatures(),s=this.layerTemplateMap[e]?this.layerTemplateMap[e]:{item:this.itemTemplate,header:this.headerTemplate,queryProperties:this.queryProperties};this.values.currentHeader=s.header,this.values.query=!!s.queryProperties.length;const r=i.map(e=>{const t=e.getProperties();return delete t[e.getGeometryName()],{id:e.getId(),properties:t,query:s.queryProperties.reduce((function(t,i){var s=e.get(i);return null!=s?t+" "+s.toString():t}),"")}});return r.map((e,t)=>({template:br()(s.item)({data:{featureCount:t+1,feature:e}}),id:e.id,query:e.query}))}}var Im=Em;class km extends sn{static get measurementType(){return en.DISTANCE}constructor(e){e.type=e.type||km.measurementType,super(e),this.segmentDistance=[],this.values.distance="0",this.values.estimate=!1,this.label=this.addLabel(),this._createFeature({geometryType:"LineString",startPosition:e.startPosition})}geometryChangedCallback(e){const t=e.target.getCoordinates(),i=t.length;if(i>1&&(t[0][0]!==t[1][0]||t[0][1]!==t[1][1])){this.values.isValid=this.values.isValid||i>2,this.label.getGeometry().setCoordinates(t[i-1]);let e,s=Promise.resolve([]);if(this.map instanceof Ti){e=new Array(i);const r=t.map((t,i)=>Object(At["e"])(this.map.activeLayer.currentImage,t,{dataProjection:ol.proj.get("EPSG:4326")}).then(t=>{e[i]=t.coords,this.values.estimate=t.estimate}));s=Promise.all(r)}else{for(let e=0;e<i;e++)W.mercatorToWgs84(t[e],!0);e=t}return s.then(()=>{const t=this.calculateDistance(e);this.setValueAndLabel(t)})}return this.values.isValid&&this.parent.removeMeasurement(this),null}calculateDistance(e){const t=e.length;this.segmentDistance=new Array(t-1);let i=0;for(let s=1;s<t;s++)this.segmentDistance[s-1]=rn.haversineDistance(e[s-1],e[s]),i+=this.segmentDistance[s-1];return i}setValueAndLabel(e){this.values.distance=this.getValue(e),sn.setTextOnLabel(this.label,this.values.distance),this.label.changed()}}var Dm=km;class Om extends sn{static get measurementType(){return en.AREA}constructor(e){e.type=Om.measurementType,super(e),this.values.area="0",this.values.circumference="0",this.label=this.addLabel(),this._createFeature({geometryType:"Polygon",startPosition:e.startPosition})}geometryChangedCallback(e){const t=e.target,i=t.getCoordinates()[0],s=i.length;let r=0;if(s>2){this.values.isValid=this.values.isValid||s>3;for(let e=0;e<s;e++)W.mercatorToWgs84(i[e],!0),e&&(r+=rn.haversineDistance(i[e-1],i[e])),e===s-1&&(r+=rn.haversineDistance(i[e],i[0]));this.values.area=this.getValue(rn.geodesicArea(i),!0),this.values.circumference=this.getValue(r),sn.setTextOnLabel(this.label,this.values.area),this.label.setGeometry(t.getInteriorPoint())}else this.values.isValid&&this.parent.removeMeasurement(this)}}var Pm=Om;let Am=new Cesium.Cartographic,xm=new Cesium.Cartesian3;const Ym=[{key:"height",indices:[0,1]},{key:"horizontal",indices:[1,2]},{key:"distance",indices:[0,2]}],jm={horizontal:0,height:0,distance:0};class Nm extends sn{static get measurementType(){return en.VERTICAL_HEIGHT}constructor(e){e.type=Nm.measurementType,super(e),this.triangleFeature=new ol.Feature({geometry:Xr.LineString(),olcs_altitudeMode:"absolute"}),this.parent.featureLayer.addFeatures([this.triangleFeature]),this.triangleFeature[this.parent.geometryEditor.state.featureTypeSymbol]=0,this.featureIds.push(this.triangleFeature.getId()),this.cartesians=[new Cesium.Cartesian3,new Cesium.Cartesian3,new Cesium.Cartesian3],this.labels={height:this.addLabel(),horizontal:this.addLabel(),distance:this.addLabel()},this.values.height="0",this.values.horizontal="0",this.values.distance="0",this.values.alpha="0",this.values.beta="0",Object.values(this.labels).forEach(e=>{e.set("olcs_altitudeMode","absolute")}),this._createFeature({geometryType:"LineString",isAbsolute:!0,startPosition:e.startPosition})}geometryChangedCallback(e){const t=e.target,i=t.getCoordinates();if(!this.values.isValid&&i.length>2&&(this.values.isValid=!0),this.values.isValid){if(this.parent.geometryEditor.state.mode===Wi.CREATE&&this.parent.geometryEditor.setMode(Wi.EDIT),i.length<2)return void this.parent.removeMeasurement(this);const e=i[0][2]<i[1][2]?0:1,t=i[e].slice();t[2]=i[e?0:1][2];const s=[i[e],t,i[e?0:1]];this.triangleFeature.getGeometry().setCoordinates(s);for(let i=0;i<3;i++)W.mercatorToWgs84(s[i],!0),Cesium.Cartesian3.fromDegrees(s[i][0],s[i][1],s[i][2],void 0,this.cartesians[i]);for(let i=0;i<3;i++){const{key:e,indices:t}=Ym[i],s=Cesium.Cartesian3.distance(this.cartesians[t[0]],this.cartesians[t[1]]);xm=Cesium.Cartesian3.lerp(this.cartesians[t[0]],this.cartesians[t[1]],.5,xm),Am=Cesium.Cartographic.fromCartesian(xm,void 0,Am),jm[e]=s,this.values[e]=this.getValue(s),sn.setTextOnLabel(this.labels[e],this.values[e]),this.labels[e].getGeometry().setCoordinates(W.wgs84ToMercator([Cesium.Math.toDegrees(Am.longitude),Cesium.Math.toDegrees(Am.latitude),Am.height]))}const r=Cesium.Math.toDegrees(Math.asin(jm.horizontal/jm.distance)),n=90-r;this.values.alpha=r.toFixed(this.decimalPlaces)+"°",this.values.beta=n.toFixed(this.decimalPlaces)+"°"}}}var Fm=Nm;class Rm extends sn{static get measurementType(){return en.POINT}constructor(e){e.type=Rm.measurementType,super(e),this.values.x="0",this.values.y="0",this.values.z="0",this.values.estimate=!1,this.transformer=W.getTransformer(j.getInstance().projection,J),this.map instanceof Pt?this._callback=this.setCoords.bind(this,!0):this.map instanceof Di?(this._callback=this.setCoords.bind(this,!1),delete this.values.z):this.map instanceof Ti&&(this._callback=this.setFromObliqueCoords.bind(this)),this.geometryCreated=!!e.startPosition,this._createFeature({geometryType:"Point",isAbsolute:!0,addFeatureStyle:!0,startPosition:e.startPosition})}geometryChangedCallback(e){if(this._callback&&this.geometryCreated){const t=e.target.getCoordinates();this.values.isValid=!0,this._callback(t)}else this.geometryCreated=!0}setCoords(e,t){this.transformer(t,t,3),this.values.x=t[0].toFixed(this.decimalPlaces),this.values.y=t[1].toFixed(this.decimalPlaces);let i=`${this.values.x}, ${this.values.y}`;if(e){const e=this.getValue(t[2]);this.values.z=e,i=`${i}, ${e}`}this.feature[Xe].label=`(${i})`,this.feature.changed()}setFromObliqueCoords(e){return Object(At["e"])(this.map.activeLayer.currentImage,e,{dataProjection:J.proj}).then(e=>{this.values.estimate=e.estimate,this.setCoords(!e.estimate,e.coords)})}}var Hm=Rm;class Gm extends sn{static get measurementType(){return en.OBLIQUE_HEIGHT}constructor(e){e.type=Gm.measurementType,e.forceMove=!0,super(e),this.values.height="0",this.values.estimate=!1,this.map=this.map,this.startUndistorted=null,this.startDistorted=null,this.liftedUndistorted=null,this.measureVecGround=new Cesium.Cartesian3,this.measureVecOrientation=new Cesium.Cartesian3,this.set=!1,this.onHold=!1,this.selfCall=!1,this.label=this.addLabel(),this._createFeature({geometryType:"LineString",startPosition:e.startPosition})}geometryChangedCallback(e){if(this.selfCall)return void(this.selfCall=!1);if(this.onHold)return;const t=e.target.getCoordinates();if(this.values.isValid){if(this.parent.geometryEditor.state.mode===Wi.CREATE)return void this.parent.geometryEditor.setMode(Wi.EDIT);if(t.length<2)return void this.parent.removeMeasurement(this)}const i=this.map.activeLayer,{camera:s}=i.currentImage;if(this.set||2!==t.length){if(this.set){3!==t.length||this.values.isValid||(this.parent.geometryEditor.setMode(Wi.EDIT),this.values.isValid=!0);const e=s.radialDistortionCoordinate(t[1],!0),i=[[e[0],e[1]],[e[0]+1,e[1]]],r=Object(At["b"])(i,[this.startUndistorted,this.liftedUndistorted]),n=[r.x,r.y],a=s.radialDistortionCoordinate(n,!1),o=new Cesium.Cartesian3(n[0],n[1],0);let l=Cesium.Cartesian3.subtract(o,this.measureVecGround,new Cesium.Cartesian3);l=Cesium.Cartesian3.normalize(l,l);const c=Cesium.Cartesian3.dot(this.measureVecOrientation,l);let u;if(this.selfCall=!0,c<0||Number.isNaN(c))this.values.height=this.getValue(0),u=[this.startDistorted,this.startDistorted];else{const e=this.findVertical3DPositionRegardingPixel(n,this.startPointRealWorld);this.values.height=this.getValue(Jt(this.startPointRealWorld,e)),u=[this.startDistorted,a]}sn.setTextOnLabel(this.label,this.values.height),this.label.getGeometry().setCoordinates(u[1]),this.feature.getGeometry().setCoordinates(u),this.parent.geometryEditor.geometryEditor.vertices[0].getGeometry().setCoordinates(u[0]),this.parent.geometryEditor.geometryEditor.vertices[1].getGeometry().setCoordinates(u[1])}}else this.onHold=!0,this.startUndistorted=s.radialDistortionCoordinate(t[0],!0),this.startDistorted=t[0].slice(),this.measureVecGround=Cesium.Cartesian3.fromElements(this.startUndistorted[0],this.startUndistorted[1],0,this.measureVecGround),Object(At["e"])(i.currentImage,t[0]).then(e=>{this.startPointRealWorld=e.coords,this.values.estimate=e.estimate;const t=e.coords.slice();return t[2]+=10,Object(At["f"])(i.currentImage,t)}).then(e=>{this.liftedUndistorted=s.radialDistortionCoordinate(e.coords,!0);const t=Cesium.Cartesian3.fromElements(this.liftedUndistorted[0],this.liftedUndistorted[1],0);this.onHold=!1,this.set=!0,this.measureVecOrientation=Cesium.Cartesian3.subtract(t,this.measureVecGround,this.measureVecOrientation),this.measureVecOrientation=Cesium.Cartesian3.normalize(this.measureVecOrientation,this.measureVecOrientation),this.selfCall=!0,this.feature.getGeometry().setCoordinates([this.startDistorted,this.startDistorted])})}findVertical3DPositionRegardingPixel(e,t){const i=this.map.getCurrentImage();let s=new Cesium.Cartesian3(e[0],i.size[1]-e[1],1);s=Cesium.Matrix3.multiplyByVector(i.pToRealworld,s,s);let r=new Cesium.Cartesian3(0,0,1),n=Cesium.Cartesian3.cross(r,s,new Cesium.Cartesian3),a=Cesium.Cartesian3.fromArray(t);const o=Cesium.Cartesian3.subtract(i.projectionCenter,a,new Cesium.Cartesian3);let l=Cesium.Matrix3.fromRowMajorArray([r.x,s.x,n.x,r.y,s.y,n.y,r.z,s.z,n.z]);l=Cesium.Matrix3.inverse(l,l);const c=Cesium.Matrix3.multiplyByVector(l,o,new Cesium.Cartesian3);return n=Cesium.Cartesian3.multiplyByScalar(n,c.z,n),r=Cesium.Cartesian3.multiplyByScalar(r,c.x,r),r=Cesium.Cartesian3.add(r,n,r),a=Cesium.Cartesian3.add(a,r,a),[a.x,a.y,a.z]}}var zm=Gm;class Bm extends Dm{static get measurementType(){return en.OBLIQUE_DISTANCE}constructor(e){e.type=Bm.measurementType,super(e)}}var Vm=Bm;let Um=new Cesium.Cartesian3,Wm=new Cesium.Cartesian3;class qm extends sn{static get measurementType(){return en.CARTESIAN_DISTANCE}constructor(e){e.type=qm.measurementType,super(e),this.segmentDistance=[],this.values.distance="0",this.label=this.addLabel(),this.label.set("olcs_altitudeMode","absolute"),this._createFeature({geometryType:"LineString",startPosition:e.startPosition,isAbsolute:!0})}geometryChangedCallback(e){const t=e.target.getCoordinates(),i=t.length;if(i>1&&(t[0][0]!==t[1][0]||t[0][1]!==t[1][1])){this.values.isValid=this.values.isValid||i>2,this.label.getGeometry().setCoordinates(t[i-1]),this.segmentDistance=new Array(i-1);let e=0;W.mercatorToWgs84(t[0],!0),Um=Cesium.Cartesian3.fromDegrees(t[0][0],t[0][1],t[0][2],void 0,Um);for(let s=1;s<i;s++)W.mercatorToWgs84(t[s],!0),Wm=Cesium.Cartesian3.fromDegrees(t[s][0],t[s][1],t[s][2],void 0,Wm),this.segmentDistance[s-1]=Cesium.Cartesian3.distance(Um,Wm),e+=this.segmentDistance[s-1],Um=Wm.clone(Um);this.values.distance=this.getValue(e),sn.setTextOnLabel(this.label,this.values.distance),this.label.changed()}else this.values.isValid&&this.parent.removeMeasurement(this)}}var Jm=qm;let Km=new Cesium.Cartesian3,Zm=new Cesium.Cartesian3;class Qm extends sn{static get measurementType(){return en.CARTESIAN_AREA}constructor(e){e.type=Qm.measurementType,e.forceMove=!1,super(e),this.values.area="0",this.values.circumference="0",this.label=this.addLabel(),this.label.set("olcs_altitudeMode","absolute"),this.label.set("olcs_zCoordinateEyeOffset",-10),this._createFeature({geometryType:"Polygon",startPosition:e.startPosition,isAbsolute:!0})}geometryChangedCallback(e){const t=e.target,i=t.getCoordinates()[0],s=i.length;let r=0;if(this.values.isValid&&i.length<3)this.parent.removeMeasurement(this);else if(s>3||this.values.isValid){this.values.isValid=!0;const e=new Array(s),n=new Array(s);let a=i[0][2],o=0;for(let t=0;t<s;t++)a=i[t][2]>a?i[t][2]:a,W.mercatorToWgs84(i[t],!0),e[t]=Cesium.Cartesian3.fromDegrees(i[t][0],i[t][1],i[t][2]),n[t]=Cesium.Cartesian2.fromCartesian3(e[t]),t&&(o+=Cesium.Cartesian3.distance(e[t-1],e[t]));o+=Cesium.Cartesian3.distance(e[s-1],e[0]);const l=Cesium.PolygonPipeline.triangulate(n),c=l.length;for(let t=0;t<c;t+=3){const i=l[t],s=l[t+1],n=l[t+2];Km=Cesium.Cartesian3.subtract(e[i],e[s],Km),Zm=Cesium.Cartesian3.subtract(e[i],e[n],Zm),Km=Cesium.Cartesian3.cross(Km,Zm,Km),r+=Cesium.Cartesian3.magnitude(Km)/2}this.values.area=this.getValue(r,!0),this.values.circumference=this.getValue(o),sn.setTextOnLabel(this.label,this.values.area);const u=t.getInteriorPoint().getCoordinates();u[2]=a,this.label.getGeometry().setCoordinates(u)}}}var Xm=Qm;const $m={[Dm.measurementType]:Dm,[Pm.measurementType]:Pm,[Fm.measurementType]:Fm,[Hm.measurementType]:Hm,[zm.measurementType]:zm,[Vm.measurementType]:Vm,[Jm.measurementType]:Jm,[Xm.measurementType]:Xm};function eg(){return{image:{fill:{color:"rgba(244, 67, 54, 0.8)"},stroke:{color:"rgb(0, 0, 0)",width:1},radius:5},stroke:{color:"rgb(244, 67, 54)",width:3},fill:{color:"rgba(244, 67, 54, 0.8)"},text:{font:"bold 18px Arial, Helvetica, sans-serif",textBaseline:"bottom",fill:{color:"rgb(0, 0, 0)"},offsetY:-15,offsetX:0,stroke:{color:"rgb(255, 255, 255)",width:2}}}}const tg=new et(eg());class ig extends _a{static get className(){return"vcs.vcm.widgets.Measurement"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{style:eg(),decimalPlaces:1,allowedMeasurements:["distance","cartesianDistance","cartesianArea","area","point","verticalHeight","obliqueDistance","obliqueHeight"],useCartesianIn3D:!1})}constructor(e){e.className=e.className||ig.className,super(e);const t=ig.getDefaultOptions();this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"];const i=tg.clone();e.style&&i.assign(new et(e.style)),this.featureLayer=new ss({style:i,altitudeMode:"clampToGround",zCoordinateEyeOffset:-20}),this.geometryEditor=null,this.decimalPlaces=Object(c["h"])(e.decimalPlaces,t.decimalPlaces),this.allowedMeasurements=e.allowedMeasurements||t.allowedMeasurements,(this.allowedMeasurements.includes("obliqueDistance")||this.allowedMeasurements.includes("obliqueHeight"))&&this.supportedMaps.push("vcs.vcm.maps.Oblique"),this.supportedMeasurements=[],this.useCartesianIn3D=Object(c["e"])(e.useCartesianIn3D,t.useCartesianIn3D),this.measurements=new Map,this._defaultTransformOnMove=E.getInstance().transformGeometryOnMove,this._transformOnMove=this._defaultTransformOnMove,this.obliqueListener=null,this.state=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.geometryEditor=new Rl({allowedGeometries:["LineString","Polygon","Point"],defaultMode:"edit",dedicatedFeatureStyle:!1,pullPickedPosition:0}),this.state={activeMeasurementId:null,editorState:this.geometryEditor.state,measurementsSize:0},this.framework.addLayer(this.featureLayer),this.handleMapChangeEvent(this.framework.getActiveMap()),this.geometryEditor.initialize(),this.geometryEditor.addEditingLayer(this.featureLayer),this._transformOnMove=E.getInstance().transformGeometryOnMove,this.geometryEditor.selectFeatureInteraction.onSelect(this.onSelect.bind(this)),this.initialized=!0}return!0}handleMapChangeEvent(e){super.handleMapChangeEvent(e),this.active&&this.geometryEditor.setMode(Wi.NONE),this.supportedMeasurements.splice(0),this._transformOnMove=this._defaultTransformOnMove,this.clearMeasurements(),e instanceof Di?(this.supportedMeasurements.push(Dm.measurementType),this.supportedMeasurements.push(Hm.measurementType),this.supportedMeasurements.push(Pm.measurementType)):e instanceof Pt?(this.supportedMeasurements.push(Jm.measurementType),this.supportedMeasurements.push(Hm.measurementType),this.supportedMeasurements.push(Xm.measurementType),this.supportedMeasurements.push(Fm.measurementType),this.useCartesianIn3D||(this.supportedMeasurements.push(Dm.measurementType),this.supportedMeasurements.push(Pm.measurementType))):e instanceof Ti&&(this._transformOnMove=!1,this.obliqueListener||(this.obliqueListener=this.framework.subscribe("OBLIQUE_IMAGE_CHANGED",this.obliqueImageChangeHandler.bind(this))),this.supportedMeasurements.push(Vm.measurementType),this.supportedMeasurements.push(Hm.measurementType),this.supportedMeasurements.push(zm.measurementType))}checkObliqueMeasurementIsSupported(e,t){if(e.camera&&!this.supportedMeasurements.includes(t))this.supportedMeasurements.push(t);else if(!e.camera&&this.supportedMeasurements.includes(t)){const e=this.supportedMeasurements.indexOf(t);this.supportedMeasurements.splice(e,1)}}obliqueImageChangeHandler(e,t){this.checkObliqueMeasurementIsSupported(t,zm.measurementType),this.checkObliqueMeasurementIsSupported(t,Vm.measurementType),this.clearMeasurements()}activate(){return super.activate(),this.geometryEditor.activate(),this.featureLayer.activate()}deactivate(){super.deactivate(),this.geometryEditor.deactivate()}createMeasurement(e,t){if(this.state.activeMeasurementId){const e=this.measurements.get(this.state.activeMeasurementId);e.values.isValid||this.removeMeasurement(e)}const i=$m[e],s=new i({parent:this,startPosition:t,defaultTransformOnMove:this._transformOnMove});this.measurements.set(s.id,s),this.state.activeMeasurementId=s.id,this.state.measurementsSize=this.measurements.size,this._setTransformOnMove(s)}_setTransformOnMove(e){this.geometryEditor.state.transformGeometryOnMove=e&&null!==e.forceMove?e.forceMove:this._transformOnMove,this.geometryEditor.state.onlyAllowTranslation=e&&(e.values.type===Fm.measurementType||e.values.type===zm.measurementType)}removeMeasurement(e){e.destroy(),this.state.activeMeasurementId===e.id&&(this.state.activeMeasurementId=null),this.measurements.delete(e.id),this.state.measurementsSize=this.measurements.size}clearMeasurements(){this.measurements.forEach(e=>{e.destroy()}),this.measurements.clear(),this.state.measurementsSize=this.measurements.size,this.activeMeasurement=null,this.state.activeMeasurementId=null}onSelect(){if(this.geometryEditor.features.size){this.state.activeMeasurementId=this.geometryEditor.state.selectedFeatureId;const e=this.measurements.get(this.state.activeMeasurementId);this._setTransformOnMove(e)}else this.state.activeMeasurementId=null}getConfigObject(){const e=super.getConfigObject();return e.style=this.featureLayer.style.getOptions(),e.decimalPlaces=this.decimalPlaces,e.allowedMeasurements=this.allowedMeasurements,e}}var sg=ig;class rg extends sg{static get className(){return"vcs.vcm.widgets.SingleMeasurement"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},sg.getDefaultOptions()),{},{allowedMeasurements:["distance","cartesianDistance","verticalHeight","obliqueHeight"]})}constructor(e){e.className=rg.className,e.allowedMeasurements=e.allowedMeasurements||["distance","cartesianDistance","verticalHeight","obliqueHeight"],super(e),this.state=this.state,this.mapClickListener=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.state=this.state,this.state.activeSingleMeasurementType=null}return!0}createMeasurement(e,t){this.clearMeasurements(),super.createMeasurement(e,t),this.state.activeSingleMeasurementType=e,this.mapClickListener&&this.framework.unsubscribeByKey(this.mapClickListener),this.mapClickListener=this.framework.subscribeOnce("CLICKED",t=>{if(this.active){const i=this.framework.getActiveMap()instanceof Ti?t.obliqueParameters.pixel:W.wgs84ToMercator([t.longitude,t.latitude,t.height]);this.createMeasurement(e,i)}})}deactivate(){super.deactivate(),this.mapClickListener&&(this.framework.unsubscribeByKey(this.mapClickListener),this.mapClickListener=null),this.featureLayer.deactivate(),this.clearMeasurements()}}var ng=rg;const ag={north:"moveForward",south:"moveBackward",west:"moveLeft",east:"moveRight",increaseFOV:"increaseFOV",decreaseFOV:"decreaseFOV",up:"moveUp",down:"moveDown",tiltUp:"tiltUp",tiltDown:"tiltDown",rotateEast:"rotateEast",rotateWest:"rotateWest"};class og extends _a{static get className(){return"vcs.vcm.widgets.NavigationControls"}static get navigationModeFlags(){return ag}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{zoomFactor:2,moveFactor:1.5,tiltFactor:10,walkModeMoveFactor:1,animationDuration:.5,animation:!0,showZoomButtons:!0,showTiltButtons:!0,showCompass:!0,showHomeButton:!0,pedestrianMode:!0,pedestrianModeReferenceHeight:1.6,obliqueMoveImage:!0,obliqueMoveImageDirectionDeviation:Math.PI/4,timePerRotation:20})}constructor(e){e.className=og.className,super(e);const t=og.getDefaultOptions();this.zoomFactor=Object(c["g"])(e.zoomFactor,t.zoomFactor),this.moveFactor=Object(c["g"])(e.moveFactor,t.moveFactor),this.tiltFactor=Object(c["g"])(e.tiltFactor,t.tiltFactor),this.walkModeMoveFactor=Object(c["g"])(e.walkModeMoveFactor,t.walkModeMoveFactor),this.animationDuration=Object(c["g"])(e.animationDuration,t.animationDuration),this.animation=Object(c["e"])(e.animation,t.animation),this.showZoomButtons=Object(c["e"])(e.showZoomButtons,t.showZoomButtons),this.showTiltButtons=Object(c["e"])(e.showTiltButtons,t.showTiltButtons),this.showCompass=Object(c["e"])(e.showCompass,t.showCompass),this.showHomeButton=Object(c["e"])(e.showHomeButton,t.showHomeButton),this.pedestrianMode=Object(c["e"])(e.pedestrianMode,t.pedestrianMode),this.pedestrianModeReferenceHeight=Object(c["g"])(e.pedestrianModeReferenceHeight,t.pedestrianModeReferenceHeight),this.obliqueMoveImage=Object(c["e"])(e.obliqueMoveImage,t.obliqueMoveImage),this.obliqueMoveImageDirectionDeviation=Object(c["g"])(e.obliqueMoveImageDirectionDeviation,t.obliqueMoveImageDirectionDeviation),this.rotationPerFrame=Object(c["g"])(e.rotationPerFrame,.5),this.timePerRotation=Object(c["g"])(e.timePerRotation,t.timePerRotation),!e.timePerRotation&&e.rotationPerFrame&&(this.logger.deprecate("rotationPerFrame","use timePerRotation instead"),this.timePerRotation=6/this.rotationPerFrame),this.initializedForCesium=!1,this.initializedForOpenlayers=!1,this.initializedForOblique=!1,this.rotationActive=!1,this.tapedTwice=!1,this.navigationMode=fe.getInstance(),this.navigationMode.setOptions({referenceHeight:this.pedestrianModeReferenceHeight,moveFactor:this.walkModeMoveFactor}),this.mapClickListenerKey=null,this.values={heading:0,walkmode:!1,rotation:!1,pedestrianMode:this.pedestrianMode,referenceHeight:this.pedestrianModeReferenceHeight,active:!1},this.navigationMode.setValues(this.values),this._obliqueMoving=!1}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;document.addEventListener("keydown",this.keyDownListener.bind(this),!1),document.addEventListener("keyup",this.keyUpListener.bind(this),!1),this.mapChangedHandler(this.framework.getActiveMap()),this.framework.subscribe(L.MAP_ACTIVATED,this.mapChangedHandler.bind(this)),this.initialized=!0}}keyDownListener(e){if(!Object(c["b"])(e))switch(e.keyCode){case 38:this.moveButtonPressed("north");break;case 40:this.moveButtonPressed("south");break;case 37:this.moveButtonPressed("west");break;case 39:this.moveButtonPressed("east");break;case 107:this.zoomButtonPressed("zoomIn");break;case 109:this.zoomButtonPressed("zoomOut");break;case 33:this.tiltButtonPressed("tiltUp");break;case 34:this.tiltButtonPressed("tiltDown");break;case 36:this.rotateButtonPressed("rotateEast");break;case 35:this.rotateButtonPressed("rotateWest");break;case 87:this.moveButtonPressed("north");break;case 83:this.moveButtonPressed("south");break;case 65:this.moveButtonPressed("west");break;case 68:this.moveButtonPressed("east");break;default:break}}keyUpListener(e){if(!Object(c["b"])(e))switch(e.keyCode){case 38:this.moveButtonUp("north");break;case 40:this.moveButtonUp("south");break;case 37:this.moveButtonUp("west");break;case 39:this.moveButtonUp("east");break;case 107:this.fovButtonUp("zoomIn");break;case 109:this.fovButtonUp("zoomOut");break;case 33:this.tiltButtonUp("tiltUp");break;case 34:this.tiltButtonUp("tiltDown");break;case 36:this.rotateButtonUp("rotateEast");break;case 35:this.rotateButtonUp("rotateWest");break;case 87:this.moveButtonUp("north");break;case 83:this.moveButtonUp("south");break;case 65:this.moveButtonUp("west");break;case 68:this.moveButtonUp("east");break;default:break}}mapChangedHandler(e){e.initialized&&(e instanceof Pt?this.activateForCesium():e instanceof Di?this.activateForOpenlayers():e instanceof Ti&&this.activateForOblique())}activateForCesium(){if(!this.initializedForCesium){const e=this.framework.getActiveMap();this.cesiumViewer=e.getCesiumWidget(),this.cesiumScene=this.cesiumViewer.scene,this.cesiumCamera=this.cesiumScene.camera,this.cesiumPostRenderBind=this.postRenderHandlerCesium.bind(this),this.cesiumScene.postRender.addEventListener(this.cesiumPostRenderBind),this.initializedForCesium=!0}}postRenderHandlerCesium(){const e=Cesium.Math.toDegrees(this.cesiumCamera.heading);(!this.values.heading||this.values.heading<e-.5||this.values.heading>e+.5)&&(this.values.heading=e)}activateForOpenlayers(){this.initializedForOpenlayers||(this.ol3MapObject=this.framework.getActiveMap(),this.ol3Map=this.ol3MapObject.olMap,this.ol3Map.on("postrender",this.postRenderHandlerOpenlayers.bind(this)),this.initializedForOpenlayers=!0)}postRenderHandlerOpenlayers(){const e=this.framework.getActiveMap();if(e){const t=e.getViewPoint(!1);t&&(this.values.heading=t.heading)}}activateForOblique(){this.initializedForOblique||(this.framework.subscribe(L.OBLIQUE_IMAGE_CHANGED,this.obliqueImageChange,this),this.initializedForOblique=!0);const{activeLayer:e}=this.framework.getActiveMap();e&&e.currentImage&&this.obliqueImageChange(e)}obliqueImageChange(e,t){const i=t||e.currentImage,s={[u["a"].NORTH]:0,[u["a"].EAST]:90,[u["a"].SOUTH]:180,[u["a"].WEST]:270};this.values.heading=i.viewDirectionAngle?90-Cesium.Math.toDegrees(i.viewDirectionAngle):s[i.viewDirection]}computeNewGroundPosition(e,t){const i=t.groundPosition,s=this.calculateBearing(e,t.heading),r=t.distance/this.moveFactor,n=xt([i[0],i[1]],r,s);return n[2]=i[2],n}calculateBearing(e,t){let i;return i="north"===e?t:"east"===e?t+90:"south"===e?t+180:"west"===e?t+270:t,i%=360,i}computeNewCameraPosition(e,t){const i=t.cameraPosition,s=this.calculateBearing(e,t.heading),r=2e3/this.moveFactor,n=xt([i[0],i[1]],r,s);return n[2]=i[2],n}moveButtonPressed(e){if(this.navigationMode.navActive)this.navigationMode.flags[ag[e]]=!0;else{const t=this.framework.getActiveMap();if(this.obliqueMoveImage&&t instanceof Ti){if(this._obliqueMoving||!t.activeLayer)return;const{currentDirection:i}=t.activeLayer;this._obliqueMoving=!0,t.getViewPoint(null,!0).then(i=>{const s=i.heading,r=this.calculateBearing(e,s);return t.activeLayer.getImageIdInDirection(r,this.obliqueMoveImageDirectionDeviation)}).then(e=>e?i.setImageOnMap(e):e).catch(e=>{this.logger.warning(e.message)}).then(()=>{this._obliqueMoving=!1})}else t.getViewPoint(null,!0).then(i=>{i.groundPosition?(i.groundPosition=this.computeNewGroundPosition(e,i),i.cameraPosition=null):(i.cameraPosition=this.computeNewCameraPosition(e,i),i.groundPosition=null),i.animate=this.animation,i.duration=this.animationDuration,t.gotoViewPoint(i)})}}moveButtonUp(e){this.navigationMode.navActive&&(this.navigationMode.flags[ag[e]]=!1)}compassPointerClicked(e){this.navigationMode.navActive?this.navigationMode.heading=e:this.framework.getActiveMap().getViewPoint(!0,!0).then(t=>{t.heading=e,t.animate=!0,t.roll=0,t.groundPosition&&(t.cameraPosition=null),this.framework.getActiveMap().gotoViewPoint(t,1,0)})}compassPointerDown(){const e=this.framework.getActiveMap().getViewPoint();e.animate=!1,e.groundPosition&&(e.cameraPosition=null),this.compassPointerPressedViewpoint=e}compassPointerDragged(e){this.navigationMode.navActive?this.navigationMode.heading=e:this.compassPointerPressedViewpoint&&(this.compassPointerPressedViewpoint.heading=e,this.framework.getActiveMap().gotoViewPoint(this.compassPointerPressedViewpoint,1,0))}fovButtonPressed(e){this.navigationMode.navActive&&(this.navigationMode.flags[ag[e]]=!0)}fovButtonUp(e){this.navigationMode.navActive&&(this.navigationMode.flags[ag[e]]=!1)}zoomButtonPressed(e){this.navigationMode.navActive||this.framework.getActiveMap().getViewPoint(null,!0).then(t=>{t.distance="zoomIn"===e?t.distance/this.zoomFactor:t.distance*this.zoomFactor,t.animate=this.animation,t.duration=this.animationDuration,t.cameraPosition=null,this.framework.getActiveMap().gotoViewPoint(t)})}tiltButtonPressed(e){if(this.navigationMode.navActive)this.navigationMode.flags[ag[e]]=!0;else if(this.framework.getActiveMap()instanceof Pt){const t=this.framework.getActiveMap().getViewPoint(),i=t.pitch;let s=i;if(s="tiltUp"===e?i-this.tiltFactor:i+this.tiltFactor,s>-10&&(s=-10),s<-90&&(s=-90),t.pitch=s,t.animate=this.animation,t.duration=this.animationDuration,!t.groundPosition)return;t.cameraPosition=null,this.framework.getActiveMap().gotoViewPoint(t)}}tiltButtonUp(e){this.navigationMode.navActive&&(this.navigationMode.flags[ag[e]]=!1)}rotateButtonPressed(e){if(this.navigationMode.navActive)this.navigationMode.flags[ag[e]]=!0;else{const t=this.framework.getActiveMap();if(t instanceof Pt||t instanceof Di&&!t.fixedNorthOrientation){const t=this.framework.getActiveMap().getViewPoint(),i=t.heading;let s=i;if("rotateEast"===e?s+=10:s-=10,t.heading=s,t.animate=this.animation,!t.groundPosition)return;t.cameraPosition=null,this.framework.getActiveMap().gotoViewPoint(t,this.animationDuration,0)}}}rotateButtonUp(e){this.navigationMode.navActive&&(this.navigationMode.flags[ag[e]]=!1)}rotateCenterClicked(){const e=this.framework.getActiveMap();e instanceof Pt&&(this.rotationActive?this.navigationMode.navActive?(this.navigationMode.flags.rotation=!1,this.rotationActive=!1,this.values.rotation=!1):this.rotateAroundCenterPosition(e,!1):this.navigationMode.navActive?(this.navigationMode.flags.rotation=!0,this.rotationActive=!0,this.values.rotation=!0):this.rotateAroundCenterPosition(e,!0))}rotateAroundCenterPosition(e,t){const i=e.getCesiumWidget(),s=i.scene;if(t!==this.rotationActive)if(t){const e=this.framework.getActiveMap().getViewPoint();e.groundPosition&&(this.rotationActive=!0,this.values.rotation=!0,e.cameraPosition=null,this.cesiumRotateCenterBind=this.rotateCenter.bind(this,e),s.postRender.addEventListener(this.cesiumRotateCenterBind))}else this.cesiumRotateCenterBind&&(s.postRender.removeEventListener(this.cesiumRotateCenterBind),this.cesiumRotateCenterBind=null,this.rotationActive=!1,this.values.rotation=!1)}rotateCenter(e){let t=this.timeLastTick?this.cesiumViewer.clock.currentTime.secondsOfDay-this.timeLastTick.secondsOfDay:1/60;(t<=0||t>1)&&(t=1/60);const i=t/(1/60);this.timeLastTick=this.cesiumViewer.clock.currentTime;const s=360/(60*this.timePerRotation/i);e.heading=e.heading+s,this.framework.getActiveMap().gotoViewPoint(e)}getConfigObject(){const e=super.getConfigObject();return e.zoomFactor=this.zoomFactor,e.moveFactor=this.moveFactor,e.tiltFactor=this.tiltFactor,e.animationDuration=this.animationDuration,e.animation=this.animation,e.showZoomButtons=this.showZoomButtons,e.showTiltButtons=this.showTiltButtons,e.showHomeButton=this.showHomeButton,e.pedestrianMode=this.pedestrianMode,e.pedestrianModeReferenceHeight=this.pedestrianModeReferenceHeight,e.showCompass=this.showCompass,e.rotationPerFrame=this.rotationPerFrame,e.walkModeMoveFactor=this.walkModeMoveFactor,e}dispose(){document.removeEventListener("keyup",this.keyUpListener.bind(this),!1),document.removeEventListener("keydown",this.keyDownListener.bind(this),!1)}getValuesObject(){return this.logger.deprecate("getValuesObject","access the values property."),this.values}mapClicked(e){if(e&&e.longitude&&e.latitude&&e.height){const t=[e.longitude,e.latitude,e.height];t[2]+=Number.parseFloat(this.values.referenceHeight);const i=this.framework.getActiveMap().getViewPoint();i.animate=!0,i.groundPosition=t,i.cameraPosition=null,i.distance=0,i.pitch=0,i.roll=0,this.navigationMode.activateFirstPersonMode(i),this.framework.getMapContainer().style.cursor="auto",this.mapClickListenerKey=null}}activateNavigationMode(e){if(e)if(null==this.mapClickListenerKey){function t(e){const t=encodeURIComponent(e).replace(/%20/g," ").replace(/%3D/g,"=").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%22/g,"'");return"data:image/svg+xml,"+t}const e='<svg width="24" height="24" viewBox="0 0 93.646 93.646" xmlns="http://www.w3.org/2000/svg"><path d="M67.971,49.778l-9.378-10.345c-0.584-0.644-1.121-1.971-1.148-2.841L57.1,25.858v-0.311c0-1.654-1.346-3-3-3h-9.18h-3.648\n\t\tc-1.478,0-3.127,1.047-3.756,2.384l-12.358,26.25c-0.342,0.728-0.376,1.541-0.096,2.292c0.28,0.75,0.84,1.342,1.575,1.666\n\t\tl1.821,0.803c0.388,0.171,0.802,0.258,1.231,0.258h0c1.177,0,2.273-0.669,2.794-1.704l5.789-11.517v11.576\n\t\tc-0.024,0.067-0.059,0.128-0.081,0.196l-9.783,30.638c-0.407,1.276-0.283,2.619,0.35,3.781s1.693,1.994,2.987,2.343l0.654,0.177\n\t\tc0.428,0.116,0.872,0.175,1.318,0.175c2.251,0,4.296-1.481,4.974-3.603l9.141-28.628l3.242,7.941\n\t\tc0.791,1.937,1.645,5.329,1.865,7.409l1.551,14.621c0.249,2.341,2.1,4.04,4.402,4.04c0.377,0,0.76-0.046,1.137-0.137l0.659-0.16\n\t\tc2.624-0.635,4.478-3.331,4.133-6.008l-2.297-17.828c-0.292-2.265-1.269-5.812-2.178-7.907l-3.102-7.144\n\t\tc-0.04-0.093-0.097-0.177-0.143-0.267v-4.841l5.59,5.836c0.556,0.581,1.3,0.901,2.094,0.901c0.803,0,1.553-0.326,2.111-0.918\n\t\tl1.034-1.098C69.036,52.899,69.055,50.973,67.971,49.778z"/>\n\t<path d="M48.52,20.005c5.516,0,10.003-4.487,10.003-10.003C58.523,4.487,54.036,0,48.52,0c-5.515,0-10.001,4.487-10.001,10.002\n\t\tC38.518,15.518,43.005,20.005,48.52,20.005z"/></svg>';this.framework.getMapContainer().style.cursor=`url("${t(e)}"), pointer`,this.mapClickListenerKey=this.framework.subscribeOnceExclusive("MAP_CLICKED",this.mapClicked.bind(this),"walkMode",this.activateNavigationMode.bind(this,!0))}else this.framework.unsubscribeByKey(this.mapClickListenerKey),this.mapClickListenerKey=null,this.framework.getMapContainer().style.cursor="auto";else this.navigationMode.activateOverviewMode()}setReferenceHeight(e){this.values.referenceHeight=e}}var lg=og;class cg extends _a{static get className(){return"vcs.vcm.widgets.OverviewMap"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{containerId:"vcm_overviewmap_container",cameraIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA8CAYAAADxJz2MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDphMzhlODgyYy00ZGYzLTZkNGMtYWZhYy1hYTkwOTI3MjRiYjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEYxRkE1MDlENjRDMTFFNTlGRjhFMzM3RTA3MDJFMDciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEYxRkE1MDhENjRDMTFFNTlGRjhFMzM3RTA3MDJFMDciIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OGJiODg5ODItZGM0Zi0xNjQyLWEyZDYtODJkZTcxMGNhNjkwIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzY5MTdhNjAtZDYzYy0xMWU1LThjNTgtYTMwNjE0MWQwNTkyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Fn8KKQAABwVJREFUeNrsW0toHVUYPufOvb2madNaa2NS3682BTcKiQqx4qO0i7gKpHFhoCBoG8SVC124ExcW02yCiFCQ4iLgIhWJCE2pYI1J1VitNFhTIz5STdI2D2tucsf/N9/YcTKvM+fMbYT54eu9nTvnzMx3/veZSNu2RSbJJZdRkBGYEZgRmBGYSUZgRmBGYEZgJslkTUZBoEjXpxcsxTz9U0OYIfxFsAi2a5DtOjnpxU09RNS9SEPXiXN8kbCWUCWhgZsIf+Am3WYdh0BpkFipeG3v2LhjdM4pgyPmbMI5aT1hHeECIV+BVVXRLJ17kR6LSnqOl8AbCZNsue4BWzAB/1B0TapLpEyJmDTcR9SCL4C8K4Tf+Jh3wK2EecIsoWDIFE1qSxoExvV9JcQLttAxfC7lPSdNgMQlqKpUuJht6MZ15gsao7OgElxw0NhAGMXvzJHtNzGzfBPILBj2dyY00ZT2qURdJmsr4TxcnCNW0CR1IPJ3RGk74YWTPITU0BTTGYLj92pB3E/e38MusAP5zsUQTayELxIKrkRX04SP39sEDfxGdRLWvPsIUyAyl1LkTMPkpAErYNKugyUOgUzlC20mbIfq5lN4gDiBREfTdYjka9cTRlBkJL7AnZjo54C6OY2bNz2n6mKUEDTOEX7Qzaf4wg+AvMkYzYc0nLkp7Y6zUCVY3gxMV5ggkIPITkw6j6aDCZMySYYJTV9CSVtF+Bi+P1TyEb/brlX5itCI77kKpy3SIKEyQlFY+47HIc+PQOnJ+dzH2ZGOI6iMeVIb1crBpCbqdleky+/dRvgyLGhEERj1nse3SCq3olIpKnYyZMqEJFkIJ1m+hfAL4YyCRVlJzJCDSAs6ErMuf5im9kmFVphqX3ARNS4r0/sgU8ZQpshKJCo/fAor5m46mCidTJmxVLBCrv17YbpOV76cxITjCl9omPAgCuxCism0aZ8oPfkem+4JPJP0IU6C1EWTBLJ8Dad7ByqVotDrLqdR74ZdawFFwhgyDG8skB5XYayD4hbeCniGcJkw55MfphkM4vq+oPZUDSznHfhz6dN1klGmbGLn7GaQ+CNuLFfhiJpEg3mhbye87WpRxQ0cxglkeYjwuLja6r4W3ZW448pwOx8STuo+eN4QgSeRG25Hsl1IITdUMeOg30og77SHPD/ti/R/JjXQWYwXQN6kYvsrKtE1USpyFN2CWv6gx7eFER9KoGXQzPmGfiU8BqdsY/4kyAHu716EjfOex89QTdhIeAtNESNi+UQdHbmI6qQZ3/OuPMrvwXIRsGIej1oMlnsJ7xG+03i+FRzlfXKfuBMFqfanhHsI9/s0HUxFXZXx7PfuJnxuImjoNhPiyhHcNKc4F3w0PY2A4pcLLuIe2CreNfBcdhIfmETYH35P2IXccAmLlcRs44zxmrLTr6xBo+B1wrSG2WoFEWW/ALkMP/gEPi2NQBDlD60A4jll6UGLqhBQ50ZJLsQyZVoa6AjnhLyvynsqU3gIGUKIqrYF/WYjaHxEOKrpnuw02lmqfvYN1M0TCZJ31Y4L+716dFdeEjFb8ybSGFOmLH384Rn0D8vi6iZ9TlMDpc8xgVyPF+tVwqWUePv3WS2DjtWvm+HIJfjBXfiuQlTOExjCxhYQdd8UAa9iGPb3tkkCo87hDeo65IeTrgohqZ+zfPwed1g+EMut+TRK1xX1cSV8oFs7eb+1C4FlIqB/aAv1Xb4y/N55wosJC4DUfWBUqSdjnMf+j3f2Wlz+0PLxa+7PMDh+rwaL83LCOjdxZWQp1MEyomOSi6k1F2HCj4rltroISEOEy8zd//cGEvZ71xMOieUXgVQty5mzrKOBJt4yUDGNczC5HWgvOWSUQQhr0w3ooFThmFNTL7mIZeEdwgGUj0nbYXZCLRWWpk/TiWCfEZ4Uy2+9z2G+WhBWPHDgwK6urq5txWJx8/Dw8ATGrANmMReP5a3VV0KsJKhZauSFJ1lhAr1j7kJQYb+1trW19ZG2traNp06dkvv37y/39vbKwcFBMT09faWurq6qvb3d3rNnzxHkeX+CzOfE8qt3sTaBTEvSPza0E46RPqbMOdv6lpaWnYcPH97Q2NgoSqWS6OvrkwMDA3J+fl6SFlZNTU2J5uZmMTMz87SLvIMgz5m/7NGu1LOMfIUWKuxBjhFaScNK1dXVcm5uTpw9e5axYszs7Kyora2VII1fvz1ucIGveSmnI8fIbB9uaGiob2pqWlMoFMTIyMh/COzo6LBZOzs7Ow8NDQ1xo+DZtOvc/5twRD5KBJ2wbXtkdHS03NPT8w/4Ox1boMDyCbor21bLTctVRmItkuGqffv2Lezdu/d5STI+Pj7V3d1NSjnC25GvieUud0ZgiHC93LR7927enBL9/f2seYOEL1bbjf4twAD8sqEzJ5yLRwAAAABJRU5ErkJggg==",anchorPosition:[.5,.5],singleVectorObliqueResolutionFactor:2,activeOnStartup:!1,oblique:{showOnlyActiveTile:!1,unselectedStyle:{fill:{color:"rgba(255, 255, 255, 0.1)"},stroke:{color:"rgb(168, 192, 43)",width:1}},selectedStyle:{fill:{color:"rgba(255, 255, 255, 0.8)"},stroke:{color:"rgb(168, 192, 43)",width:3}}},layerName:void 0,minimumHeight:150})}constructor(e){e.className=cg.className,super(e);const t=cg.getDefaultOptions();this.initialized=!1,this.mapContainerId=e.containerId||t.containerId,this.imageStyle=new ol.style.Icon({src:e.cameraIcon||t.cameraIcon,anchor:e.anchorPosition||t.anchorPosition}),this.singleVectorObliqueResolutionFactor=Object(c["h"])(e.singleVectorObliqueResolutionFactor,t.singleVectorObliqueResolutionFactor),this.activeOnStartup=Object(c["e"])(e.activeOnStartup,t.activeOnStartup);const i=Object.assign({},t.oblique,e.oblique||{});this.showOnlyActiveObliqueTile=Object(c["e"])(i.showOnlyActiveTile,t.oblique.showOnlyActiveTile);const{unselectedStyle:s,selectedStyle:r}=i;this.unselectedObliqueTileStyle=new ol.style.Style({fill:s.fill?new ol.style.Fill(s.fill):null,stroke:s.stroke?new ol.style.Stroke(s.stroke):null}),this.selectedObliqueTileStyle=new ol.style.Style({fill:r.fill?new ol.style.Fill(r.fill):null,stroke:r.stroke?new ol.style.Stroke(r.stroke):null}),this.featureSet=!1,this.layerName=e.layerName||null,this.selectInteraction=null,this.layer=null,this.vectorSource=new ol.source.Vector({}),this.overviewMap=null,this.activeListener=null,this.oblique=!1,this.values={active:!1},this.initialized=!1,this._cachedViewPoint=null,this.minimumHeight=Object(c["h"])(e.minimumHeight,t.minimumHeight)}initialize(){if(!this.initialized){const t=super.initialize();if(!t||!this.layerName)return!1;this.layer=this.framework.getLayerByName(this.layerName);try{a(this.layer,[Qn,ra,aa,Kn])}catch(e){return!1}this.mapActivatedSubscribeKey=this.framework.subscribe(L.MAP_ACTIVATED,this.resetOverviewWidget.bind(this)),this.initialized=!0,this.initializedFinished()}return!0}resetOverviewWidget(){this.values.active&&(this.deactivate(),this.activate())}createMap(){const e=this.layer.getImplementationObject(Di.className),t=e.getOLLayer(),i=new ol.layer.Vector({source:this.vectorSource});return this.overviewMap=new ol.Map({target:this.mapContainerId,layers:[t,i],controls:[],interactions:[new ol.interaction.DragPan({kinetic:new ol.Kinetic(-.005,.05,100)})],renderer:"canvas"}),t.setVisible(!0),this.overviewMap.setSize([320,190]),new Promise(e=>{this.overviewMap.once("postrender",e)})}updateSize(){this.overviewMap&&(this.overviewMap.updateSize(),this.oblique||this.addCameraFeature())}activate(){this.values.active=!0;const e=this.overviewMap?Promise.resolve():this.createMap();e.then(()=>{super.activate(),this.overviewMap.once("postcompose",this.updateSize,this);const e=this.framework.getActiveMap();e instanceof Pt?this.initializeForCesium(e):e instanceof Di?this.initializeForOpenlayers(e):e instanceof Ti&&this.initializeForOblique(e)})}deactivate(){this.activeListener&&(this.activeListener(),this.activeListener=null),super.deactivate(),this.values.active=!1,this.vectorSource.clear(),this.featureSet=!1}initializeForCesium(e){if(e.initialized){const t=e.getCesiumWidget(),i=t.scene;this.addCameraFeature();const s=this._addNavigationListener(e),r=i.postRender.addEventListener(this.addCameraFeature,this);this.activeListener=()=>{r(),ol.Observable.unByKey(s)}}}initializeForOpenlayers(e){const{olMap:t}=e;this.addCameraFeature();const i=this._addNavigationListener(e),s=t.on("postrender",this.addCameraFeature,this);this.activeListener=()=>{ol.Observable.unByKey(s),ol.Observable.unByKey(i)}}initializeForOblique(e){this.vectorSource.clear();const t=[];t.push(new ol.interaction.MouseWheelZoom),t.push(new ol.interaction.PinchZoom),t.push(new ol.interaction.DragZoom),this.selectInteraction=new ol.interaction.Select({style:this.selectedObliqueTileStyle}),t.push(this.selectInteraction),t.forEach(e=>{this.overviewMap.addInteraction(e)});const i=this.overviewMap.on("singleclick",e=>{this.overviewMap.hasFeatureAtPixel(e.pixel)?this.overviewMap.forEachFeatureAtPixel(e.pixel,(t,i)=>{const s=t.getId().toString();return i===this.obliqueCollection.tileFootPrintsLayer?(this.obliqueCollection.loadTile(s).then(()=>{this.overviewMap.renderSync(),this.overviewMap.dispatchEvent(e)}),e.stopPropagation()):this.obliqueDirection.setImageOnMap(s),!0}):e.stopPropagation()});e.activeLayer&&(this.obliqueDirectionChange(e.activeLayer),this.obliqueImageChange(e.activeLayer),this.obliqueCollection=e.activeLayer.obliqueCollection,this.obliqueCollection.isTiled&&(this.obliqueCollection.tileFootPrintsLayer.setStyle(this.unselectedObliqueTileStyle),this.overviewMap.addLayer(this.obliqueCollection.tileFootPrintsLayer)));const s=[];s.push(this.framework.subscribe(L.LAYER_ACTIVATED,this.obliqueLayerActivated,this)),s.push(this.framework.subscribe(L.LAYER_DEACTIVATED,this.obliqueLayerDeactivated,this)),s.push(this.framework.subscribe(L.OBLIQUE_DIRECTION_CHANGED,this.obliqueDirectionChange,this)),s.push(this.framework.subscribe(L.OBLIQUE_IMAGE_CHANGED,this.obliqueImageChange,this)),this.activeListener=()=>{this.obliqueDirection&&this.overviewMap.removeLayer(this.obliqueDirection.footPrintsLayer),this.obliqueCollection.isTiled&&this.overviewMap.removeLayer(this.obliqueCollection.tileFootPrintsLayer),t.forEach(e=>{this.overviewMap.removeInteraction(e)}),s.forEach(e=>{this.framework.unsubscribeByKey(e)}),ol.Observable.unByKey(i),this.oblique=!1},this.oblique=!0}obliqueLayerDeactivated(e){e instanceof bi&&(this.selectInteraction.getFeatures().clear(),this.obliqueDirection&&this.overviewMap.removeLayer(this.obliqueDirection.footPrintsLayer),this.obliqueCollection.isTiled&&this.overviewMap.removeLayer(this.obliqueCollection.tileFootPrintsLayer))}obliqueLayerActivated(e){e instanceof bi&&(this.obliqueDirectionChange(e),this.obliqueImageChange(e),this.obliqueCollection=e.obliqueCollection,this.obliqueCollection.isTiled&&(this.obliqueCollection.tileFootPrintsLayer.setStyle(this.unselectedObliqueTileStyle),this.overviewMap.addLayer(this.obliqueCollection.tileFootPrintsLayer)))}obliqueDirectionChange(e,t){if(this.obliqueDirection&&this.overviewMap.removeLayer(this.obliqueDirection.footPrintsLayer),this.obliqueDirection=t||e.currentDirection,this.obliqueDirection){const e=this.obliqueDirection.footPrintsLayer;this.showOnlyActiveObliqueTile?e.setStyle(e=>{const{currentImage:t}=this.obliqueDirection;return t&&e.getId()===t.name?this.unselectedObliqueTileStyle:null}):e.setStyle(this.unselectedObliqueTileStyle),this.overviewMap.addLayer(e)}}obliqueImageChange(e,t){if(!this.obliqueDirection)return;const i=t||e.currentImage,s=this.selectInteraction.getFeatures();s.clear();const r=this.obliqueDirection.footPrintsLayer.getSource().getFeatureById(i.name);if(r){this.selectInteraction.getFeatures().push(r),this.overviewMap.getView().fit(r.getGeometry().getExtent());const e=this.overviewMap.getView().getResolution();this.overviewMap.getView().setResolution(e*this.singleVectorObliqueResolutionFactor)}}_detectChange(e,t,i){let s=!0;if(this.featureSet&&this._cachedViewPoint){const r=this._cachedViewPoint.position.some((t,i)=>e[i]!==t);s=r||this._cachedViewPoint.heading!==t||this._cachedViewPoint.distance!==i}return s&&(this._cachedViewPoint={position:e,heading:t,distance:i}),s}_addNavigationListener(e){return this.overviewMap.on("singleclick",t=>{const i=e.getViewPoint(),s=i.groundPosition[2]?i.groundPosition[2]:0;i.groundPosition=[...B(t.coordinate),s],i.cameraPosition=null,e.gotoViewPoint(i)})}addCameraFeature(){const e=this.framework.getActiveMap().getViewPoint();if(!e||!e.isValid())return;const t=e.groundPosition,i=e.cameraPosition||t,{heading:s}=e;let{distance:r}=e;!i[2]||r&&r<4*i[2]||(r=4*i[2]);const n=!this._detectChange(i,s,r);if(n)return;const a=fe.getInstance();if(a.values.walkmode&&(r=a.referenceHeight),r=r>this.minimumHeight?r:this.minimumHeight,null==s||null==r)return;let o;if(this.featureSet)o=this.vectorSource.getFeatureById("cameraFeature");else{const e=new ol.geom.Point([i[0],i[1]]);o=new ol.Feature({geometry:e}),o.setId("cameraFeature"),o.setStyle(new ol.style.Style({image:this.imageStyle})),this.vectorSource.addFeature(o),this.featureSet=!0}o.getGeometry().setCoordinates(W.wgs84ToMercator(i));const l=e.heading,c=Cesium.Math.toRadians(l);this.imageStyle.setRotation(c),e.heading=0,e.cameraPosition=i,e.groundPosition=null,e.distance=4*r,Di.prototype.gotoViewPoint.call({olMap:this.overviewMap},e)}getConfigObject(){const e=super.getConfigObject();return e.layerName=this.layerName,e.iconStyleObject={src:this.imageStyle.getSrc(),anchor:this.imageStyle.getAnchor()},e.minimumHeight=this.minimumHeight,e}dispose(){this.deactivate(),this.overviewMap&&(this.overviewMap.getLayers().forEach(e=>{this.overviewMap.removeLayer(e)}),this.overviewMap.setTarget(null),this.overviewMap=null),this.framework.unsubscribeByKey(this.mapActivatedSubscribeKey)}}var ug=cg,hg=i(567),dg=i.n(hg);function mg(e,t){return!e.active||e.cesium3DTileset.tilesLoaded?Promise.resolve():new Promise(i=>{let s;const r=e.cesium3DTileset.allTilesLoaded.addEventListener(()=>{s&&clearTimeout(s),r(),i()});null!=t&&(s=setTimeout(()=>{r(),i()},t))})}function gg(e,t){return e.tilesLoaded?Promise.resolve():new Promise(i=>{let s;const r=e.tileLoadProgressEvent.addEventListener(e=>{e<1&&(s&&clearTimeout(s),r(),i())});null!=t&&(s=setTimeout(()=>{r(),i()},t))})}function pg(e){return new Promise(t=>{const i=e.getLayers().getArray().filter(e=>e instanceof ol.layer.Tile&&e.getVisible()).map(e=>e.getSource()),s=i.length,r=new Array(3*s);let n,a=-1,o=0,l=null;function c(){o+=1}function u(){a+=1,l&&(clearTimeout(l),l=null),o<=a&&(l=setTimeout(()=>{ol.Observable.unByKey(r),t(n)},500))}e.once("postcompose",e=>{if(n=e.context.canvas,0===s)setTimeout(()=>{t(n)},500);else{for(let e=0;e<s;e++)r[e]=i[e].on("tileloadstart",c),r[e+1]=i[e].on("tileloadend",u),r[e+2]=i[e].on("tileloaderror",u);u()}}),e.renderSync()})}var fg=i(587),yg=i.n(fg);const _g={LANDSCAPE:"landscape",PORTRAIT:"portrait",BOTH:"both"},vg=v.getLogger("vcs.vcm.widgets.PDFCreator"),Lg=16777216,Mg=4194304;function bg(e,t){let i=e;if(Array.isArray(i)){if(4===i.length)return i;if(2===i.length)return[i[0],i[1],i[0],i[1]];i=i[0]}const s=Object(c["h"])(i,t);return new Array(4).fill(s)}class wg extends _a{static get className(){return"vcs.vcm.widgets.PDFCreator"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{formatList:["A5","A4","A3","A2"],orientationMode:_g.BOTH,defaultOrientation:_g.PORTRAIT,dpiList:[75,150,300,450,600],title:void 0,titleImage:void 0,copyrightText:void 0,showTitle:!0,showTitleImage:!0,showCopyright:!0,showComment:!1,showTitleInput:!1,showBalloons:!0,showNorthPoint:!0,showHeaderLine:!0,showScreenshotDownload:!1,projection:void 0,imageMimetype:"image/png",headerText:void 0,subText:void 0,aspectRatioLandscape:2.22222,aspectRatioPortrait:2.22222,titleImageRatio:.125,pageMargins:40,renderingWidthLandscape:1920,renderingWidthPortrait:1920,warningPixelCount:void 0,headerLineColor:void 0,footer:void 0,header:void 0,info:void 0,styles:{header:{fontSize:9,bold:!0,margin:[0,0,2,0]},subheader:{bold:!0,fontSize:8,margin:[0,10,0,2]},copyright:{fontSize:6,italics:!0,alignment:"right",padding:[10,10,10,10],margin:[0,-7,1.5,0],color:"#000000",background:"#eeeeee"},tableHeader:{bold:!0,fontSize:8,color:"black"},subheaderText:{fontSize:8}},northPointImage:yg.a,loadedTimeout:3e4,floatPrecision:2})}constructor(e){e.className=wg.className,super(e);const t=wg.getDefaultOptions();this.libraryPromise=null,this.formatList=e.formatList||t.formatList,this.orientationMode=Object(c["f"])(e.orientationMode,_g,t.orientationMode);let i=this.orientationMode;i===_g.BOTH&&(i=Object(c["f"])(e.defaultOrientation,_g,t.defaultOrientation)),i===_g.BOTH&&(i=_g.PORTRAIT),this.defaultOrientation=i,this.dpiList=e.dpiList||t.dpiList,this.title=e.title||null,this.titleImage=e.titleImage||null,this.copyrightText=e.copyrightText||null,this.showTitle=Object(c["e"])(e.showTitle,t.showTitle),this.showTitleImage=Object(c["e"])(e.showTitleImage,t.showTitleImage),this.showCopyright=Object(c["e"])(e.showCopyright,t.showCopyright),this.showComment=Object(c["e"])(e.showComment,t.showComment),this.showTitleInput=Object(c["e"])(e.showTitleInput,t.showTitleInput),this.showBalloons=Object(c["e"])(e.showBalloons,t.showBalloons),this.showNorthPoint=Object(c["e"])(e.showNorthPoint,t.showNorthPoint),this.showHeaderLine=Object(c["e"])(e.showHeaderLine,t.showHeaderLine),this.showScreenshotDownload=Object(c["e"])(e.showScreenshotDownload,t.showScreenshotDownload),this.coordinateProjection=e.projection?new W(e.projection):this.framework.projection,this.imageMimetype=e.imageMimetype||t.imageMimetype,this.headerText=e.headerText||null,this.subText=e.subText||null,this.aspectRatio={landscape:Object(c["g"])(e.aspectRatioLandscape,t.aspectRatioLandscape),portrait:Object(c["g"])(e.aspectRatioPortrait,t.aspectRatioPortrait)},this.titleImageRatio=Object(c["g"])(e.titleImageRatio,t.titleImageRatio),this.pageMargins=bg(e.pageMargins,t.pageMargins),this.defaultRenderingWidth={portrait:Object(c["h"])(e.renderingWidthPortrait,t.renderingWidthPortrait),landscape:Object(c["h"])(e.renderingWidthLandscape,t.renderingWidthLandscape)},this.warningPixelCount=Object(c["h"])(e.warningPixelCount,this.getPixelCount("A4","landscape",300)),this.headerLineColor=e.headerLineColor||null,this.headerLine={table:{widths:["*"],heights:[.1],body:[[{text:"",fillColor:this.headerLineColor,border:[!1,!1,!1,!1]}]]},layout:"noBorders"},this.footer=e.footer||{},this.header=e.header||{},this.info=e.info||{},this.styles=t.styles,e.styles&&"object"===typeof e.styles&&Object.assign(this.styles,e.styles),this.northPointImage=e.northPointImage||t.northPointImage,this.loadedTimeout=Object(c["h"])(e.loadedTimeout,t.loadedTimeout),this.floatPrecision=Object(c["h"])(e.floatPrecision,t.floatPrecision),this._cancelled=!1,this._reset=()=>{}}createTemplate(e,t,i,s,r){if(!dg.a[e])return vg.warning("Incorrect format"),{};const n=this.getImagePixel(e,t),a={pageSize:e,pageOrientation:t,content:[],images:{},pageMargins:this.pageMargins,info:this.info},o=this.copyrightText||wg.getCopyrightText();if(i.copyright=o,this.headerText){const e=wg.getJSONFromInput(this.headerText,i);Array.isArray(e)?a.content.push(...e):"object"!==typeof e&&"string"!==typeof e||a.content.push(e)}else{const e={columns:[]},t=this.title||s;e.columns.push({width:"*",text:this.showTitle?"\n"+t:"",style:"header"}),this.showTitleImage&&e.columns.push({width:n[1]*this.titleImageRatio*2+40,image:"titleImage",alignment:"right",margin:[0,0,0,4],fit:[n[1]*this.titleImageRatio*2,n[1]*this.titleImageRatio]}),a.content.push(e)}if(this.showHeaderLine){if(!this.headerLineColor){const e=wg.getHeaderBottomColorFromElements();this.headerLine.table.body[0][0].fillColor=e}a.content.push(this.headerLine)}if(a.content.push({image:"screenshot",fit:n}),this.showNorthPoint){const e=n[1]*this.titleImageRatio;a.content.push({image:"northPoint",width:e,absolutePosition:{x:this.pageMargins[0]+n[0]-10-e,y:this.pageMargins[1]+20+e}})}if(this.showCopyright&&o&&a.content.push({text:o,style:"copyright"}),a.content.push("\n"),this.subText){const{subText:e}=this,t=wg.getJSONFromInput(e,i);Array.isArray(t)?a.content.push(...t):"object"!==typeof t&&"string"!==typeof t||a.content.push(t)}return a.images={},this.showTitleImage&&(this.titleImage||r)&&(a.images.titleImage=this.titleImage||r),a.styles=this.styles,a.header=wg.getJSONFromInput(this.header,i),a.footer=wg.getJSONFromInput(this.footer,i),a}static removeMapSpecificContent(e){const t=j.getInstance().getActiveMap();Object(c["a"])(e,e=>{e&&(e.oblique||e.cesium||e.openlayers)&&(t instanceof Ti&&!e.oblique||t instanceof Pt&&!e.cesium||t instanceof Di&&!e.openlayers)&&(e.text="")})}static getJSONFromInput(e,t){let i=e;const s=j.getInstance().getLocale();null!=i[s]&&(i=i[s]);let r=i;if("string"===typeof r)try{r=JSON.parse(i)}catch(a){vg.warning(a.message)}null!=r[s]&&(r=r[s]);let n=JSON.stringify(r);n=wg.replaceTokensInString(n,t);try{r=JSON.parse(n)}catch(a){vg.warning(a.message),r=[]}return wg.removeMapSpecificContent(r),r}static replaceTokensInString(e,t){let i=e;const s=i.match(/\$\{(.*?)\}/g);return s&&Array.isArray(s)&&s.forEach(e=>{const s=e.substring(2,e.length-1),r=s.split(".");let n=t;for(let t=0;t<r.length;t++)n=n&&n[r[t]]?n[r[t]]:"";n=(""+n).replace(/\n/g,"\\n"),i=i.replace(new RegExp(`\\$\\{${s}\\}`,"g"),n)}),i}static viewpointToFixed(e,t=2){const i={heading:e.heading.toFixed(t),pitch:e.pitch.toFixed(t),roll:e.roll.toFixed(t)};return null!=e.distance&&(i.distance=e.distance.toFixed(t)),e.cameraPosition&&(i.cameraPosition=e.cameraPosition.map(e=>e.toFixed(t))),e.groundPosition&&(i.groundPosition=e.groundPosition.map(e=>e.toFixed(t))),i}collectAdditionalInformation(e){const t=j.getInstance().getActiveMap(),i=new Date;if(e.date=`${i.getUTCDate()}.${i.getUTCMonth()+1}.${i.getUTCFullYear()}`,t){t instanceof Ti&&(e.obliqueImage=t.getCurrentImage());const i=t.getViewPoint(!0,!0);return i.then(t=>{const i=q,s=t.clone();return s.groundPosition=s.groundPosition?this.coordinateProjection.transformFrom(i,s.groundPosition):s.groundPosition,s.cameraPosition=s.cameraPosition?this.coordinateProjection.transformFrom(i,s.cameraPosition):s.cameraPosition,e.projection=this.coordinateProjection,e.viewpoint=wg.viewpointToFixed(t,this.floatPrecision),e.transformedViewpoint=wg.viewpointToFixed(s,this.floatPrecision),e})}return Promise.resolve(e)}static getHeaderBottomColorFromElements(){const e=document.getElementsByTagName("header"),t=e.length>0?e[0]:null;if(t){const e=window.getComputedStyle(t);if(e){const t=e.getPropertyValue("border-bottom-color");if(t){const e=Ie(t);return Oe(e)}}}return"#a8c02b"}getTitleImage(){if(this.titleImage)return Promise.resolve(this.titleImage);const e=document.getElementsByClassName("logo-box"),t=e.length>0?e[0]:null;return t?(0===t.clientHeight&&(t.style.height="5.5rem"),window.html2canvas(t,{scale:3}).then(e=>e.toDataURL())):Promise.reject(new Error("Could get Image DOM"))}getTitle(){if(this.title)return Promise.resolve(this.title);const e=document.getElementsByClassName("vcm_copyright_headerTitle"),t=e.length>0?e[0]:null;return t?Promise.resolve(t.textContent):Promise.reject(new Error("Could get Title from DOM"))}rotateNorthArrow(e){return this.showNorthPoint?new Promise((t,i)=>{const s=this.northPointImage,r=document.createElement("canvas"),n=68,a=68;r.width=n,r.height=a;const o=r.getContext("2d"),l=new Image;l.onload=()=>{o.translate(n/2,a/2),o.rotate(-Cesium.Math.toRadians(e)),o.translate(-n/2,-a/2),o.drawImage(l,0,0),t(r.toDataURL())},l.onerror=()=>{i(new Error("could not load northArrow"))},l.src=s}):Promise.resolve("")}getPixelCount(e,t,i){const s=this.defaultRenderingWidth[t],r=this.getImageWidth(e,t),n=r/s,a=n*i/72;return s*a*(s/this.aspectRatio[t]*a)}getScale(e,t,i){const s=this.defaultRenderingWidth[t],r=this.getImageWidth(e,t),n=r/s,a=n*i/72,o=s*a*(s/this.aspectRatio[t]*a),l=j.getInstance().isIE11?Mg:Lg;if(o>l){const e=Math.sqrt(l/o);return Math.round(a*e*100)/100}return Math.round(100*a)/100}getImageWidth(e,t){const i=dg.a[e],s="portrait"===t?i[0]:i[1],r=s-this.pageMargins[0]-this.pageMargins[2];return r}static getCopyrightText(){const e=j.getInstance().getWidgetByType("vcs.vcm.widgets.Copyright");let t="";if(e){const{layerItems:i}=e,s={};i.forEach(e=>{const t=s[e.provider];if(t){const i=t.years.indexOf(e.year);-1===i&&(t.years.every(t=>Number(t)<Number(e.years))&&(t.url=e.url),t.years.push(e.year))}else s[e.provider]={years:[e.year],url:e.url}});let r=!0;return Object.keys(s).forEach(e=>{r?r=!1:t+=" | ",t+="© ",t+=e,t+=" ",t+=s[e].years.join(", ")}),t}return""}getImagePixel(e,t){const i=this.getImageWidth(e,t);return[i,i/this.aspectRatio[t]]}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.initialized=!0,this.initializedFinished()}return!0}_cancelCheck(){if(this._cancelled)throw new Error("cancelled")}cancelRunning(){this._cancelled=!0,this._reset(),this._reset=()=>{}}async createPDF(e,t,i,s){const r=await this._renderImage(e,t,i),n=r.toDataURL();return this.makePDF(n,e,t,s)}async createImage(e,t,i){const s=await this._renderImage(e,t,i);return lm(s,"screenshot.png",this.imageMimetype),!0}async _renderImage(e,t,i){a(e,String),a(t,["landscape","portrait"]),a(i,Number),this._cancelled=!1,this.libraryPromise||(this.libraryPromise=this.framework.loadLibraries(["lib/vcm_pdf_thirdparty.js"])),await this.libraryPromise,this._cancelCheck();let s=document.createElement("canvas");const r=this.defaultRenderingWidth[t],n=this.getScale(e,t,i),o=[r,r/this.aspectRatio[t]];s.width=o[0]*n,s.height=o[1]*n;const l=this.framework.getActiveMap();try{if(l instanceof Pt)this._reset=wg.prepareCesiumMap(l,o,n),s=await this.getImageFromCesium(l,s);else{if(!(l instanceof Di||l instanceof Ti))throw new Error("wrong Map");this._reset=wg.prepareOlMap(l,o,n),s=await this.getImageFromOpenlayers(l,s)}this._cancelCheck(),s=await this.copyBalloon(s,o,n),this._cancelCheck()}finally{this._reset(),this._reset=()=>{}}return s}static prepareCesiumMap(e,t,i){const s=e.getCesiumWidget(),{resolutionScale:r}=s;return wg.prepareMapForRender(e,t),s.resolutionScale=i,function(){s.resolutionScale=r,wg.prepareMapForRender(e)}}static prepareOlMap(e,t,i){wg.prepareMapForRender(e,t);const[s,r]=t,{olMap:n}=e,a=n.getSize(),o=n.getView().calculateExtent(a),l=[s*i,r*i];return n.setSize(l),n.getView().fit(o,{size:l,constrainResolution:!1}),n.set("vcs_scale",i,!0),function(){wg.prepareMapForRender(e),n.setSize(a),n.getView().fit(o,{size:a,constrainResolution:!1}),n.unset("vcs_scale",!0),n.renderSync()}}async copyBalloon(e,t,i){const s=document.getElementById("balloonContainer"),[r,n]=t;if(this.showBalloons&&s){const t=await window.html2canvas(s,{width:r,height:n,scale:i,backgroundColor:null}),a=e.getContext("2d"),o=a.getImageData(0,0,r*i,n*i),l=t.getContext("2d").getImageData(0,0,r*i,n*i);let c=!1;for(let e=0;e<o.data.length;e+=4)0!==l.data[e+3]&&(c=!0,o.data[e]=l.data[e],o.data[e+1]=l.data[e+1],o.data[e+2]=l.data[e+2],o.data[e+3]=l.data[e+3]);c&&a.putImageData(o,0,0)}return e}static prepareMapForRender(e,t){let i,s;t?([i,s]=t,i+="px",s+="px"):(i="auto",s="auto"),e.mapElement.style.width=i,e.mapElement.style.height=s,e.disableMovement(!!t)}async getImageFromCesium(e,t){const i=e.getCesiumWidget();i.render();const s=j.getInstance().getLayers().map(t=>{if(t.active){if(t instanceof Cn)return mg(t,this.loadedTimeout);if(t instanceof Us)return mg(t.getImplementation(e),this.loadedTimeout)}return!1}).filter(e=>e);return s.push(gg(i.scene.globe,this.loadedTimeout)),await Promise.all(s),this._cancelCheck(),new Promise((e,s)=>{const r=i.scene.postRender.addEventListener(()=>{if(r(),this._cancelled)s(new Error("cancelled"));else{const s=t.getContext("2d");s.drawImage(i.scene.canvas,0,0),e(t)}})})}getImageFromOpenlayers(e,t){const{olMap:i}=e;return pg(i).then(e=>{this._cancelCheck();const i=t.getContext("2d");return i.drawImage(e,0,0),t})}async makePDF(e,t,i,s){const r=j.getInstance().getActiveMap().getViewPoint(!1,!1),{heading:n}=r,a=await this.getTitle(),o=await this.getTitleImage(),l=await this.rotateNorthArrow(n),c=await this.collectAdditionalInformation(s),u=s.title||a;c.title=u;const h=this.createTemplate(t,i,c,u,o);return h.images.screenshot=e,this.showNorthPoint&&(h.images.northPoint=l),this._cancelCheck(),new Promise(e=>{window.pdfMake.createPdf(h).download("map.pdf",e)})}}var Tg=wg;class Sg extends se{constructor(e,t,i,s){super(),this.position=e,this.positionDecimalPlaces=i,this.targetTransform="EPSG:3857"!==t.epsg?W.getTransformer(t,J):null,this._defaultActive=s?X.CLICK|X.MOVE:X.CLICK,this.setActive()}pipe(e){if(!e.position.every(e=>0===e)){let t=e.position;this.targetTransform&&(t=this.targetTransform(e.position,t.slice(),3));let i=3;while(i--)this.position[i]=t[i].toFixed(this.positionDecimalPlaces)}return Promise.resolve(e)}}var Cg=Sg;class Eg extends _a{static get className(){return"vcs.vcm.widgets.PositionDisplay"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{template:void 0,projection:void 0,positionDecimalPlaces:2,onMove:!1})}constructor(e){e.className=Eg.className,super(e);const t=Eg.getDefaultOptions();this.position={0:null,1:null,2:null},this.template=e.template||null,this.obliqueImage={name:null,direction:null},this.interaction=new Cg(this.position,new W(e.projection),Object(c["h"])(e.positionDecimalPlaces,t.positionDecimalPlaces),Object(c["e"])(e.onMove,t.onMove))}initialize(){return this.initialized||(this.framework.subscribe(L.OBLIQUE_DIRECTION_CHANGED,this.obliqueImageChanged,this),this.framework.subscribe(L.OBLIQUE_IMAGE_CHANGED,this.obliqueImageChanged,this),this.framework.subscribe(L.LAYER_ACTIVATED,this.obliqueImageChanged,this),this.initialized=!0,vs().addPersistentInteraction(this.interaction),this.initializedFinished()),!0}obliqueImageChanged(e){if(e instanceof bi){const{currentImage:t}=e;this.obliqueImage.name=t.name,this.obliqueImage.direction=Object(u["b"])(t.viewDirection)}}getConfigObject(){const e=super.getConfigObject();return e.positionDecimalPlaces=this.interaction.positionDecimalPlaces,e.template=this.template,e.projection=this.options.projection,e}}var Ig=Eg;class kg extends _a{static get className(){return"vcs.vcm.widgets.Shadow"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{timezone:void 0,activateShadowsOnStartup:!1})}constructor(e){e.className=kg.className,super(e);const t=kg.getDefaultOptions();this.supportedMaps=["vcs.vcm.maps.Cesium"],this.currentTime=new Date,this.timezone=e.timezone||null,this.activateShadowsOnStartup=Object(c["e"])(e.activateShadowsOnStartup,t.activateShadowsOnStartup),this.values={active:this.active,date:this.currentTime.getTime()}}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.handleMapChangeEvent(this.framework.getActiveMap()),this.activateShadowsOnStartup&&this.toggleShadow(),this.initialized=!0}return!0}activate(){this.active||(super.activate(),this._widgetActivationListener=this.framework.subscribe(L.WIDGET_ACTIVATED,e=>{"vcs.vcm.widgets.viewshed.Viewshed"===e.className&&this.deactivate()}),this.map.getScene().shadowMap.enabled=!0,this.setCurrentTimeToMap(),this.values.active=this.active)}deactivate(){this.active&&(this.framework.unsubscribeByKey(this._widgetActivationListener),super.deactivate(),this.map.getScene().shadowMap.enabled=!1,this.map.setDay(this.map.defaultJDate),this.values.active=this.active)}handleURLParameter(e){e.shadowTime&&(this.setDate(new Date(e.shadowTime)),this.activate())}getLink(e){this.values.active&&e.addQueryParams({shadowTime:this.currentTime.getTime()})}toggleShadow(){this.active?this.deactivate():this.activate()}setMinutesOfDay(e){a(e,Number),this.currentTime.setHours(Math.floor(e/60)),this.currentTime.setMinutes(e%60),this.setDate(this.currentTime)}setDayOfYear(e){a(e,Number);const t=new Date(this.currentTime.getFullYear(),0,e);this.currentTime.setMonth(t.getMonth()),this.currentTime.setDate(t.getDate()),this.setDate(this.currentTime)}setDate(e){a(e,Date),this.currentTime=e,this.values.date=this.currentTime.getTime(),this.setCurrentTimeToMap()}setCurrentTimeToMap(){const e=Cesium.JulianDate.fromDate(this.currentTime);this.map.setDay(e)}handleMapChangeEvent(e){super.handleMapChangeEvent(e),e instanceof Pt&&(this.map=e)}getConfigObject(){const e=super.getConfigObject();return e.activateShadowsOnStartup=this.activateShadowsOnStartup,e.timezone=this.timezone,e}}var Dg=kg;class Og extends se{constructor(e){super(),this.cb=e,this._defaultActive=X.CLICKMOVE,this.paused=!1,this.coordinate=null,this.setActive()}pipe(e){return e.type&X.MOVE?e.position.every(e=>0===e)||this.cb(e.position):e.type&X.CLICK&&(this.paused?e.feature&&e.feature.id&&"transparentTerrainBox"===e.feature.id._id&&(this.paused=!1,this.setActive(X.CLICKMOVE)):(this.paused=!0,this.setActive(X.CLICK))),Promise.resolve(e)}}var Pg=Og,Ag=i(588),xg=i.n(Ag);let Yg=new Cesium.Matrix4;class jg extends _a{static get className(){return"vcs.vcm.widgets.TransparentTerrainMode"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{boxSize:[100,100,50],layerNames:void 0,color:void 0})}constructor(e){e.className=jg.className,super(e);const t=jg.getDefaultOptions(),i=e.boxSize||t.boxSize;let s;this.boxSize=Cesium.Cartesian3.fromArray(i),this.boxSize.z=-Math.abs(this.boxSize.z),this.clippingObject=new Ks({layerNames:e.layerNames,terrain:!0}),this.featureLayer=new Pn({name:"_transparentTerrain"}),this.position=new Cesium.Cartesian3,this.scene=null,this.supportedMaps=["vcs.vcm.maps.Cesium"],this._removeInteraction=null,this._listener=null,s=e.color?"string"===typeof e.color?Cesium.Color.fromCssColorString(e.color):Cesium.Color.fromBytes(...e.color):new Cesium.ImageMaterialProperty({image:xg.a,repeat:new Cesium.Cartesian2(Math.ceil(this.boxSize.x/20),Math.ceil(this.boxSize.y/20))}),this.material=s}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.scene=this.framework.getActiveMap().getScene(),this.framework.addLayer(this.featureLayer),this.initialized=!0}return!0}initClippingPlanes(){this.box=new Cesium.Entity({id:"transparentTerrainBox",position:new Cesium.CallbackProperty(()=>this.position,!1),box:new Cesium.BoxGraphics({dimensions:this.boxSize,material:this.material})}),this.featureLayer.addEntity(this.box),Yg=this.box.computeModelMatrix(Cesium.JulianDate.now()),this._updateClippingPlane()}_updateClippingPlane(){const e=this.boxSize.x/2,t=this.boxSize.y/2,i=Math.abs(this.boxSize.z);this.clippingObject.clippingPlaneCollection=new Cesium.ClippingPlaneCollection({modelMatrix:Yg,planes:[new Cesium.ClippingPlane(new Cesium.Cartesian3(1,0,0),-e),new Cesium.ClippingPlane(new Cesium.Cartesian3(-1,0,0),-e),new Cesium.ClippingPlane(new Cesium.Cartesian3(0,1,0),-t),new Cesium.ClippingPlane(new Cesium.Cartesian3(0,-1,0),-t),new Cesium.ClippingPlane(new Cesium.Cartesian3(0,0,-1),-i)],edgeWidth:1,edgeColor:Cesium.Color.WHITE,enabled:!0})}activate(){if(!this.active){this.featureLayer.activate(),super.activate();const e=this.scene.camera.positionCartographic.clone();e.height=0,this.position=Cesium.Cartographic.toCartesian(e,this.scene.globe.ellipsoid,this.position),this.initClippingPlanes(),Ln.getInstance().setExclusiveClippingObjects([this.clippingObject],()=>{this.deactivate()});const t=new Pg(this.translatePosition.bind(this));this._removeInteraction=vs().addExclusiveInteraction(t,this.deactivate.bind(this)),this._listener=this.framework.subscribe(L.WIDGET_ACTIVATED,e=>{"vcs.vcm.widgets.swipeTool.SwipeTool"===e.className&&this.deactivate()}),E.getInstance().activateClickBehavior()}}deactivate(){this.active&&(super.deactivate(),this._removeInteraction&&this._removeInteraction(),this._listener&&(this.framework.unsubscribeByKey(this._listener),this._listener=null),this.featureLayer.deactivate(),this.featureLayer.entities.removeAll(),Ln.getInstance().clearExclusiveClippingObjects(!0))}translatePosition(e){const[t,i,s]=W.mercatorToWgs84(e);this.position=Cesium.Cartesian3.fromDegrees(t,i,s+this.boxSize.z/2,Cesium.Ellipsoid.WGS84,this.position),Cesium.Matrix4.setTranslation(Yg,this.position,Yg),this._updateClippingPlane()}}var Ng=jg;function Fg(){const e=document.createElement("div");return e.className="vcm-swipe-element",e.style.position="absolute",e.style.left=100*wn().position+"%",e.style.top="0px",e.style.height="100%",e.style.zIndex="9999",e}class Rg{constructor(){this.element=Fg(),this.swipeEventHandler=new Cesium.ScreenSpaceEventHandler(this.element),this.swipeActive=!1,this.active=!1}activate(){this.active||(this._addElementToMap(),this.element.style.left=100*wn().position+"%",this.swipeEventHandler.setInputAction(()=>{this.swipeActive=!0},Cesium.ScreenSpaceEventType.LEFT_DOWN),this.swipeEventHandler.setInputAction(()=>{this.swipeActive=!1},Cesium.ScreenSpaceEventType.LEFT_UP),this.swipeEventHandler.setInputAction(this.onSwipingListener.bind(this),Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.active=!0)}deactivate(){this.active&&(this._removeElementFromMap(),this.swipeEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOWN),this.swipeEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_UP),this.swipeEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.active=!1)}handleMapChange(){this._removeElementFromMap(),this.active&&this._addElementToMap()}_addElementToMap(){j.getInstance().getActiveMap().mapElement.appendChild(this.element)}_removeElementFromMap(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)}onSwipingListener(e){if(this.swipeActive){const t=e.endPosition.x,i=(this.element.offsetLeft+t)/this.element.parentElement.offsetWidth;if(i>.01&&i<.99){const e=wn();e.position=i,this.element.style.left=100*e.position+"%"}}}}var Hg=Rg;class Gg extends _a{static get className(){return"vcs.vcm.widgets.swipeTool.SwipeTool"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{noUi:!1,hideSwipeElement:!1,layers:void 0,splitPosition:.5})}constructor(e){e.className=Gg.className,super(e);const t=Gg.getDefaultOptions();this.options=this.options,this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"],this.activeLayerState={},this._initialLayerState={},this._firstActivation=!0,this._initializedCesium=!1,this.noUi=Object(c["e"])(e.noUi,t.noUi),this.hideSwipeElement=Object(c["e"])(e.hideSwipeElement,t.hideSwipeElement),this.swipeElement=null,this._listeners=[],this._unsupportedLayerToActivate=new Set}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;if(this.options.splitPosition&&(wn().position=Object(c["g"])(this.options.splitPosition,Gg.getDefaultOptions().splitPosition)),this.swipeElement=new Hg,this.availableLayers=this.framework.getLayers().filter(e=>e instanceof Cn||e instanceof Un||e instanceof Kn),this.options.layers)if(Array.isArray(this.options.layers)){const e={};this.options.layers.forEach(({layerName:t,splitDirection:i})=>{e[t]=i}),this.assignConfig(e)}else this.assignConfig(this.options.layers);this.availableLayers.forEach(e=>{void 0===this.activeLayerState[e.name]&&(this.activeLayerState[e.name]=null)}),this.initialized=!0}return!0}handleMapChangeEvent(e){this._unsupportedLayerToActivate.size>0&&this._unsupportedLayerToActivate.forEach(t=>{t.isSupported(e)&&(t.activate(),this._unsupportedLayerToActivate.delete(t))}),super.handleMapChangeEvent(e),this.active&&(this.swipeElement.handleMapChange(),!this._initializedCesium&&e instanceof Pt&&Object.entries(this._initialLayerState).forEach(([e,t])=>{if("cesium3DTileset"===t.type){const i=this.framework.getLayerByName(e);i&&(t.active=i.active)}})),this._initializedCesium||(this._initializedCesium=e instanceof Pt)}activate(){this.active||(this.hideSwipeElement||this.swipeElement.activate(),this._setCurrentState(this._initialLayerState),this._initializedCesium||(this._initializedCesium=this.framework.getActiveMap()instanceof Pt),this._firstActivation&&(Object.entries(this._initialLayerState).forEach(([e,t])=>{null==this.activeLayerState[e]&&(this.activeLayerState[e]=Object.assign({},t))}),this._firstActivation=!1),this._applyState(this.activeLayerState),this._listeners.push(this.framework.subscribe(L.LAYER_CHANGED,this.handleLayerChanged,this)),this._listeners.push(this.framework.subscribe(L.SPLIT_DIRECTION_CHANGED,this.handleSplitDirectionChanged,this)),this._listeners.push(this.framework.subscribe(L.WIDGET_ACTIVATED,e=>{"vcs.vcm.widgets.ClippingTool"!==e.className&&"vcs.vcm.widgets.TransparentTerrainMode"!==e.className||this.deactivate()})),super.activate())}handleLayerChanged(e){null!=this.activeLayerState[e.name]&&(this.activeLayerState[e.name].active=e.active)}handleSplitDirectionChanged(e,t){null!=this.activeLayerState[e.name]&&(this.activeLayerState[e.name].splitDirection=t)}deactivate(){this.active&&(super.deactivate(),this._listeners.forEach(e=>{this.framework.unsubscribeByKey(e)}),this._listeners=[],this._applyState(this._initialLayerState),this.swipeElement.deactivate())}_applyState(e){this._unsupportedLayerToActivate.clear();const t=this.framework.getActiveMap();Object.entries(e).forEach(([e,i])=>{const s=this.framework.getLayerByName(e);s&&(s.splitDirection=i.splitDirection,i.active?s.isSupported(t)?s.activate():this._unsupportedLayerToActivate.add(s):s.deactivate())})}_setCurrentState(e){this.availableLayers.forEach(t=>{e[t.name]={active:t.active||t.loading,splitDirection:t.splitDirection,type:t instanceof Cn?"cesium3DTileset":"imagery"}}),this._unsupportedLayerToActivate.forEach(t=>{e[t.name]={active:!0,splitDirection:t.splitDirection,type:t instanceof Cn?"cesium3DTileset":"imagery"}})}assignConfig(e){a(e,Object),Object.entries(e).forEach(([e,t])=>{const i=this.availableLayers.find(t=>t.name===e);i&&(this.activeLayerState[e]={active:!0,splitDirection:t,type:i instanceof Cn?"cesium3DTileset":"imagery"})})}handleURLParameter(e){super.handleURLParameter(e),e.split&&(this.assignConfig(e.split.l),wn().position=e.split.p,this.hideSwipeElement=e.split.hE,this.activate())}getLink(e){if(this.active){const t={},i={l:t,p:wn().position,hE:!this.swipeElement.active};Object.entries(this.activeLayerState).forEach(([e,{active:i,splitDirection:s}])=>{i&&(t[e]=s)}),e.addQueryParams({split:JSON.stringify(i)})}}dispose(){super.dispose(),this._listeners.forEach(e=>{this.framework.unsubscribeByKey(e)}),this._listeners=[],this.swipeElement&&this.swipeElement.deactivate(),this.swipeElement=null,this.availableLayers=[],this.activeLayerState={},this._initialLayerState={},this._firstActivation=!0,this.initialized=!1,this.active=!1}}var zg=Gg;class Bg extends _a{static get className(){return"vcs.vcm.widgets.Flight"}constructor(e){e.className=Bg.className,super(e),this.supportedMaps=["vcs.vcm.maps.Cesium"],this.flightInstances=this.framework.getFlights()}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.initialized=!0,this.initializedFinished()}return!0}addFlight(e){this.flightInstances.push(e)}deleteFlight(e){const t=this.flightInstances.indexOf(e);this.flightInstances.splice(t,1)}}var Vg=Bg;class Ug extends se{constructor(e){super(),this.featureTypeSymbol=e.featureTypeSymbol,this.cb=e.cb,this._defaultActive=X.DRAGSTART|X.DRAGEND,this._defaultModificationKey=Q.ALT,this.setActive(!1)}pipe(e){return e.type&X.DRAGSTART&&e.feature&&e.feature[this.featureTypeSymbol]&qi.VERTEX?this._feature=!0:e.type&X.DRAGEND&&this._feature&&(this._feature=!1,this.cb()),Promise.resolve(e)}}var Wg=Ug;const qg=new Cesium.Cartesian3,Jg=new Cesium.Cartesian3,Kg=new Cesium.Cartesian3,Zg=new Cesium.Cartographic,Qg=new Cesium.Cartographic,Xg=new Cesium.Cartographic,$g=new Map;function ep(){return{image:{fill:{color:"rgba(168, 192, 43, 0.8)"},stroke:{color:"rgb(0, 0, 0)",width:1},radius:5},stroke:{color:"rgb(168, 192, 43)",width:3},fill:{color:"rgba(168, 192, 43, 0.8)"},text:{font:"bold 18px Arial, Helvetica, sans-serif",textBaseline:"bottom",offsetY:-15,offsetX:0,fill:{color:"rgb(0, 0, 0)"},stroke:{color:"rgb(255, 255, 255)",width:2}}}}class tp extends _a{static get className(){return"vcs.vcm.widgets.heightProfile.HeightProfile"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{style:ep(),maxNrOfPoints:5e4,maxCombinedMemoryUsage:1024,defaultResolution:2,allowSmallExport:!0})}constructor(e){e.className=tp.className,super(e);const t=tp.getDefaultOptions();this.style=new et(t.style),e.style&&this.style.assign(new et(e.style)),this.supportedMaps=["vcs.vcm.maps.Cesium"],this.maxNrOfPoints=Object(c["h"])(e.maxNrOfPoints,t.maxNrOfPoints),this.maxCombinedMemoryUsage=Object(c["h"])(e.maxCombinedMemoryUsage,t.maxCombinedMemoryUsage),this._cancelled=!1,this._geometryChangedCB=null;const i=Object(c["g"])(e.defaultResolution,t.defaultResolution);this.values={profilePoints:[],progress:0,running:!1,includeObjects:!0,resolution:i},this.allowSmallExport=Object(c["e"])(e.allowSmallExport,t.allowSmallExport),this._cachedProfile=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.featureLayer=new ss({projection:{epsg:3857},name:"_profile",style:this.style,altitudeMode:"clampToGround",classificationType:"both"}),this.framework.addLayer(this.featureLayer),this.geometryEditor=new Rl({allowedGeometries:["LineString"],defaultMode:"edit",dedicatedFeatureStyle:!1}),this.geometryEditor.initialize(),this.geometryEditor.addEditingLayer(this.featureLayer),this.geometryEditor.selectFeatureInteraction.onSelect(this._onSelect.bind(this)),this.geometryEditor.state.onlyAllowTranslation=!0,this.vertexChangedInteraction=new Wg({cb:this.calculateProfile.bind(this),featureTypeSymbol:this.geometryEditor.state.featureTypeSymbol}),this.initialized=!0,this.initializedFinished()}return!0}activate(){super.activate(),this.geometryEditor.activate(),this._cachedProfile&&this.geometryEditor.setMode(Wi.EDIT),this.featureLayer.activate();const e=this.framework.getLayers().filter(e=>e.active&&(e instanceof Cn||e instanceof Us));e.length>0&&e.forEach(t=>{let i;if(t instanceof Us){const e=t.getImplementation(this.framework.getActiveMap());({cesium3DTileset:i}=e)}else({cesium3DTileset:i}=t);$g.set(i,i.maximumMemoryUsage),i.maximumMemoryUsage=this.maxCombinedMemoryUsage/e.length})}deactivate(){super.deactivate(),this.cancel(),this._geometryChangedCB&&ol.Observable.unByKey(this._geometryChangedCB),this.geometryEditor.state.active&&(this.geometryEditor.interactionChain.removeInteraction(this.vertexChangedInteraction),this.vertexChangedInteraction.setActive(!1),this.geometryEditor.setMode(Wi.NONE),this.geometryEditor.deactivate()),this.featureLayer.deactivate(),$g.forEach((e,t)=>{t.maximumMemoryUsage=e})}cancel(){this._cancelled=!0,this._reset(),this._cachedProfile&&this.feature&&this.feature.getGeometry().setCoordinates(this._cachedProfile)}_reset(){this.values.running=!1,this.values.progress=0,this._cachedProfile||this.featureLayer.removeAllFeatures()}_onSelect(){this.geometryEditor.features.size?(this.geometryEditor.interactionChain.chain.includes(this.vertexChangedInteraction)||this.geometryEditor.interactionChain.addInteraction(this.vertexChangedInteraction),this.values.running?this.geometryEditor.selectFeatureInteraction.clearSelectionSet():this.vertexChangedInteraction.setActive()):(this.geometryEditor.interactionChain.removeInteraction(this.vertexChangedInteraction),this.vertexChangedInteraction.setActive(!1))}newProfile(){this._reset(),this.featureLayer.removeFeaturesById(["_start","_end"]),this.feature=this.geometryEditor.createFeature("LineString","_profileLine"),this.feature.set("olcs_classificationType","both"),this._geometryChangedCB=this.feature.getGeometry().on("change",this.geometryChangedCallback.bind(this)),this.geometryEditor.setModeAndSelectFeature(Wi.CREATE,this.feature)}geometryChangedCallback(e){const t=e.target.getCoordinates(),i=t.length;i>2&&(this.geometryEditor.setMode(Wi.EDIT),ol.Observable.unByKey(this._geometryChangedCB),this._geometryChangedCB=null,this.calculateProfile())}async calculateProfile(){this._cancelled=!1,this.geometryEditor.selectFeatureInteraction.clearSelectionSet(),this.values.running=!0,this.values.progress=0;const e=this.framework.getActiveMap(),t=e.getScene(),i=this.values.includeObjects?t.sampleHeightMostDetailed.bind(t):Cesium.sampleTerrainMostDetailed.bind(null,t.terrainProvider),s=this.feature.getGeometry().getCoordinates(),r=W.mercatorToWgs84(s[0]);Cesium.Cartographic.fromDegrees(r[0],r[1],null,Zg);const n=W.mercatorToWgs84(s[1]);Cesium.Cartographic.fromDegrees(n[0],n[1],null,Qg);const{surfaceDistance:a}=new Cesium.EllipsoidGeodesic(Zg,Qg);this._addLabels(s,a);let o=Math.floor(a/this.values.resolution);o>this.maxNrOfPoints&&(o=this.maxNrOfPoints,this.values.resolution=Number((a/this.maxNrOfPoints).toFixed(1)));const l=new Array(o);Cesium.Cartographic.toCartesian(Zg,null,qg),Cesium.Cartographic.toCartesian(Qg,null,Jg);for(let c=0;c<o;c++){let e;if(0===c?e=Zg:(Cesium.Cartesian3.lerp(qg,Jg,c*this.values.resolution/a,Kg),e=Cesium.Cartographic.fromCartesian(Kg,null,Xg)),await i([e]),l[c]=e.height,this._cancelled)break;this.values.progress=c/(o-1)}a/this.values.resolution-o>.01&&(await i([Qg]),l.push(Qg.height)),this._cancelled||(this._cachedProfile=this.feature.getGeometry().getCoordinates(),this.values.profilePoints=l.map((e,t)=>new Cesium.Cartesian2(t*this.values.resolution,e)),this.values.running=!1,this.values.progress=0)}_addLabels(e,t){const i=(e,t,i)=>{const s=new ol.Feature({geometry:new ol.geom.Point(e)});s.setId(t),s[ss.alreadyTransformedToMercator]=!0;const r=this.featureLayer.style.style.clone();return r.getText().setText(i),r.setImage(null),s.setStyle(r),s[this.geometryEditor.state.featureTypeSymbol]=qi.UNEDITABLE,s};this.featureLayer.removeFeaturesById(["_start","_end"]),this.featureLayer.addFeatures([i(e[0],"_start","0"),i(e[1],"_end",t.toFixed(1))])}isActiveTerrain(){const e=this.framework.getLayers(),t=e.find(e=>e instanceof Gn&&e.active);return!!t}}var ip=tp;class sp extends se{constructor(e,t){super(),this.clippingObjectEditor=e,this.vertical=t,this._defaultActive=X.CLICK,this._defaultModificationKey=Q.NONE,this.setActive()}async pipe(e){return e.position&&(e.stopPropagation=!0,this.clippingObjectEditor.feature=fn(W.mercatorToWgs84(e.position),this.vertical)),e}}var rp=sp;const np={};function ap(e){return np[e]}class op{constructor(e={}){this.id=bs()(),this.clippingObject=new Ks(e),this.editor=new xl({}),this.active=!1,this._reverse=Object(c["e"])(e.reverse,!1),this._createVerticalPlanes=Object(c["e"])(e.createVerticalPlanes,!0),this._createTopPlane=Object(c["e"])(e.createTopPlane,!0),this._createBottomPlane=Object(c["e"])(e.createBottomPlane,!0),this._createEndingPlanes=Object(c["e"])(e.createEndingPlanes,!0),this._createClippingFeatureInteraction=null,this._feature=null,this._olListeners=new Array(3),this.initialized=!1,this.modeChange=new Cesium.Event,this._mode=Wi.SELECT,np[this.id]=this}get createVerticalPlanes(){return this._createVerticalPlanes}set createVerticalPlanes(e){a(e,Boolean),this._createVerticalPlanes!==e&&(this._createVerticalPlanes=e,this._updateClippingPlaneCollection())}get createTopPlane(){return this._createTopPlane}set createTopPlane(e){a(e,Boolean),this._createTopPlane!==e&&(this._createTopPlane=e,this._updateClippingPlaneCollection())}get createBottomPlane(){return this._createBottomPlane}set createBottomPlane(e){a(e,Boolean),this._createBottomPlane!==e&&(this._createBottomPlane=e,this._updateClippingPlaneCollection())}get createEndingPlanes(){return this._createEndingPlanes}set createEndingPlanes(e){a(e,Boolean),this._createEndingPlanes!==e&&(this._createEndingPlanes=e,this._updateClippingPlaneCollection())}get reverse(){return this._reverse}set reverse(e){a(e,Boolean),this._reverse!==e&&(this._reverse=e,this._updateClippingPlaneCollection())}get feature(){return this._feature}set feature(e){if(o(e,ol.Feature),this._feature=e,this.initialized){const t=this.scratchLayer.getFeatureById("_clippingObject");if(t&&t!==e&&this.scratchLayer.removeAllFeatures(),e&&(e.setId("_clippingObject"),this.scratchLayer.addFeatures([e])),this.active){this.setMode(Wi.SELECT),this._setFeatureListeners();const{featureInteraction:e}=vs(),{active:t}=e;e.setActive(!1),this._updateClippingPlaneCollection(),this._postRenderListener&&this._postRenderListener(),this._postRenderListener=j.getInstance().getActiveMap().getScene().postRender.addEventListener(()=>{e.setActive(t),this._postRenderListener()})}}}get mode(){return this._mode}initialize(){this.initialized||(this.scratchLayer=new ss({projection:J.getConfigObject(),altitudeMode:"absolute"}),j.getInstance().addLayer(this.scratchLayer),this.editor.initialize(),this.editor.state.altitudeMode=Ki.ABSOLUTE,this.editor.addEditingLayer(this.scratchLayer),this.initialized=!0)}activate(){this.editor.state.active||(this.editor.activate(),this._mode&Wi.SELECT&&this._feature&&(this.editor.setMode(Wi.SELECT),this.editor.selectFeatureInteraction.selectFeature(this._feature))),this.active||(this.scratchLayer.activate(),this._setFeatureListeners(),this._updateClippingPlaneCollection(),this.active=!0)}deactivate(){this.active&&(this.editor.deactivate(),this.scratchLayer.deactivate(),this.active=!1,ol.Observable.unByKey(this._olListeners),this._olListeners=new Array(3),this._postRenderListener&&(this._postRenderListener(),this._postRenderListener=null))}setOptions(e){const t={reverse:[Boolean,void 0],createVerticalPlanes:[Boolean,void 0],createTopPlane:[Boolean,void 0],createBottomPlane:[Boolean,void 0],createEndingPlanes:[Boolean,void 0]};let i;a(e,t);const s=t=>{null!=e[t]&&this["_"+t]!==e[t]&&(this["_"+t]=e[t],i=!0)};Object.keys(t).forEach(s),i&&this._updateClippingPlaneCollection()}setMode(e,t){a(e,[Wi.SELECT,Wi.CREATE]),o(t,Boolean),this.activate(),this._createClippingFeatureInteraction&&(this.editor.interactionChain.removeInteraction(this._createClippingFeatureInteraction),this._createClippingFeatureInteraction=null),this.editor.setMode(e),e&Wi.CREATE&&(this._createClippingFeatureInteraction=new rp(this,t),this.editor.interactionChain.addInteraction(this._createClippingFeatureInteraction,0)),e&this._mode||(this._mode=e,this.modeChange.raiseEvent()),this._mode&Wi.SELECT&&this._feature&&this.editor.selectFeatureInteraction.selectFeature(this._feature)}_setFeatureListeners(){const e=()=>{ol.Observable.unByKey(this._olListeners[2]),this.feature.getGeometry()&&(this._olListeners[2]=this.feature.getGeometry().on("change",()=>{this._updateClippingPlaneCollection()}))};ol.Observable.unByKey(this._olListeners),this._olListeners=new Array(3),this.feature&&(this._olListeners[0]=this.feature.on("propertychange",()=>{this._updateClippingPlaneCollection()}),this._olListeners[1]=this.feature.on("change:geometry",()=>{e()}),e())}_updateClippingPlaneCollection(){this.feature&&this.feature.getGeometry()?this.clippingObject.clippingPlaneCollection=cn(this.feature,{reverse:this._reverse,createBottomPlane:this._createBottomPlane,createTopPlane:this._createTopPlane,createVerticalPlanes:this._createVerticalPlanes,createEndingPlanes:this._createEndingPlanes}):this.clippingObject.clippingPlaneCollection=new Cesium.ClippingPlaneCollection}destroy(){ol.Observable.unByKey(this._olListeners),this._olListeners=new Array(3),this._feature=null,this.clippingObject=null,this.editor.destroy(),this.initialized&&this.scratchLayer.dispose(),delete np[this.id],this._postRenderListener&&(this._postRenderListener(),this._postRenderListener=null)}}var lp=op;class cp extends _a{static get className(){return"vcs.vcm.widgets.ClippingTool"}constructor(e){e.className=cp.className,super(e),this.supportedMaps=["vcs.vcm.maps.Cesium"],this.availableLayerNames=[],this.layerChangedListener=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.clippingEditor=new lp,this.clippingEditor.initialize(),this.initialized=!0}return!0}activate(){this.active||(this.clippingEditor.activate(),this.availableLayerNames.splice(0),this.framework.getLayers().filter(e=>e.active&&e instanceof Cn).forEach(e=>{this.availableLayerNames.push(e.name)}),this.layerChangedListener=this.framework.subscribe(L.LAYER_CHANGED,e=>{if(e instanceof Cn)if(e.active)this.availableLayerNames.push(e.name);else{const t=this.availableLayerNames.indexOf(e.name);t>-1&&this.availableLayerNames.splice(t,1)}}),this.widgetChangedListener=this.framework.subscribe(L.WIDGET_ACTIVATED,e=>{"vcs.vcm.widgets.swipeTool.SwipeTool"===e.className&&this.deactivate()}),this._syncLayers(this.availableLayerNames),Ln.getInstance().setExclusiveClippingObjects([this.clippingEditor.clippingObject],this.deactivate.bind(this)),super.activate())}deactivate(){this.active&&(this.framework.unsubscribeByKey(this.layerChangedListener),this.framework.unsubscribeByKey(this.widgetChangedListener),this.clippingEditor.deactivate(),Ln.getInstance().clearExclusiveClippingObjects(!0),super.deactivate())}_syncLayers(e){const{clippingObject:t}=this.clippingEditor,i=new Set(t.layerNames);e.forEach(e=>{i.has(e)?i.delete(e):t.addLayer(e)}),i.forEach(e=>{t.removeLayer(e)})}handleURLParameter(e){const t=e.clip;if(t){this.activate();const e=new ol.Feature({olcs_altitudeMode:"absolute"});t.e&&e.set("olcs_extrudedHeight",t.e);const i="number"===typeof t.c[0][0]?new ol.geom.LineString(t.c,"XYZ"):new ol.geom.Polygon(t.c,"XYZ");i[ss.alreadyTransformedToMercator]=!0,e.setGeometry(i),this._syncLayers(t.l),this.clippingEditor.feature=e,this.clippingEditor.setOptions(yn(e,!!t.i)),this.clippingEditor.reverse=!!t.r,this.clippingEditor.clippingObject.terrain=!!t.t,t.a||this.clippingEditor.deactivate()}}getLink(e){if(this.active&&this.clippingEditor.feature){const t="LineString"===this.clippingEditor.feature.getGeometry().getType(),i=t?this.clippingEditor.createEndingPlanes:this.clippingEditor.createVerticalPlanes,s={c:this.clippingEditor.feature.getGeometry().getCoordinates(),i:i?0:1,a:this.clippingEditor.active?1:0,r:this.clippingEditor.reverse?1:0,t:this.clippingEditor.clippingObject.terrain?1:0,l:this.clippingEditor.clippingObject.layerNames},r=this.clippingEditor.feature.get("olcs_extrudedHeight");r&&(s.e=r),e.addQueryParams({clip:s})}}dispose(){this.deactivate(),this.clippingEditor.destroy()}}var up=cp;class hp extends _a{static get className(){return"vcs.vcm.widgets.MultiView"}constructor(e){e.className=hp.className,e.supportedMaps=["vcs.vcm.maps.Oblique"],super(e),this.maps={},this.values={active:this.active,activeDirection:u["a"].NORTH,availableDirections:[]},this._activeLayer=null,this._running=!1,this._directionChangeListener=null,this._layerChangedListener=null,this._postRenderListener=null,this._clone=null}activate(){if(!this.active){super.activate(),Object.values(u["a"]).forEach(e=>{this.maps[e]=new ol.Map({controls:[],interactions:[]})});const e=this.framework.getActiveMap();e.initializedPromise.then(()=>{this._setObliqueLayer(e.activeLayer),this._layerChangedListener=this.framework.subscribe(L.LAYER_ACTIVATED,this._setObliqueLayer.bind(this)),this._directionChangeListener=this.framework.subscribe(L.OBLIQUE_DIRECTION_CHANGED,this._setDirection.bind(this)),this._postRenderListener=e.olMap.on("postrender",this._postRenderHandler.bind(this)),this.values.active=this.active})}}_setObliqueLayer(e){if(e instanceof bi){if(this._activeLayer){const{directions:e}=this._activeLayer.obliqueCollection;Object.keys(e).forEach(t=>{t!==this.values.activeDirection.toString()&&e[t].deactivate()})}this.values.availableDirections=Object.values(e.obliqueCollection.directions).map(e=>e.direction),this._activeLayer=e,this._setDirection(this._activeLayer,this._activeLayer.currentDirection)}}_setDirection(e,t){const i=e.computeViewpoint();this.values.activeDirection=t.direction;const{directions:s}=e.obliqueCollection;Object.keys(s).forEach(e=>{e!==this.values.activeDirection.toString()&&(s[e].suppressPublish=!0,s[e].activateWithViewPoint(this.maps[e],i))}),this._clone&&this._clone.deactivate(),this._clone=new fi({direction:t.direction,projection:t.projection,terrainProvider:t.terrainProvider,images:t.images,layer:t.layer,footPrintFeatures:[],rTreeItems:[]}),this._clone.suppressPublish=!0,Object.defineProperty(this._clone,"currentView",{get(){return this._currentView},set(e){e?this._originalView&&this._originalView===e||(this._originalView=e,this._currentView=e.clone()):(this._originalView=null,this._currentView=null)}}),this._clone.rTree=t.rTree,this._clone.activateWithViewPoint(this.maps[t.direction],i)}_postRenderHandler(){this.active&&!this._running&&(this._running=!0,this._activeLayer.computeViewpoint(!0).then(e=>{if(e){const{directions:t}=this._activeLayer.obliqueCollection;Object.keys(t).forEach(i=>{i!==this.values.activeDirection.toString()&&t[i].setViewPoint(e,!0)}),this._clone.setViewPoint(e,!0)}this._running=!1}).catch(e=>{this.logger.error(e),this._running=!1}))}deactivate(){if(this.active){if(super.deactivate(),this._directionChangeListener&&(this.framework.unsubscribeByKey(this._directionChangeListener),this._directionChangeListener=null),this._layerChangedListener&&(this.framework.unsubscribeByKey(this._layerChangedListener),this._layerChangedListener=null),this._postRenderListener&&(ol.Observable.unByKey(this._postRenderListener),this._postRenderListener=null),this._activeLayer){const{directions:e}=this._activeLayer.obliqueCollection;Object.keys(e).forEach(t=>{t!==this.values.activeDirection.toString()&&e[t].deactivate()}),this._activeLayer=null}this._clone&&this._clone.deactivate(),Object.keys(this.maps).forEach(e=>{this.maps[e].setTarget(null),delete this.maps[e]}),this.values.active=this.active}}dispose(){super.dispose(),this.deactivate()}}var dp=hp,mp=i(494),gp=i.n(mp);class pp{constructor(e,t,i){this.type=t||null,this.id=e||null,this.featureType=i||null,this.attributes=[],this.parts=[],this.featureIds=[]}reset(){const e=this.attributes.filter(e=>!e.new&&(e.reset(),!0));e.length<this.attributes.length&&(this.attributes.splice(0),this.attributes.push(...e)),this.parts.forEach(e=>{e.reset()})}getChangedAttributes(){return this.attributes.filter(e=>e.changed).concat(...this.parts.map(e=>e.getChangedAttributes()))}clear(){this.id=null,this.type=null,this.featureType=null,this.attributes.splice(0),this.parts.forEach(e=>{e.clear()}),this.parts.splice(0)}updated(){const e=this.attributes.filter(e=>!e.deleted&&(e.updated(),!0));e.length<this.attributes.length&&(this.attributes.splice(0),this.attributes.push(...e)),this.parts.forEach(e=>{e.updated()})}}var fp=pp;const yp={};function _p(e){return yp[e]}class vp{constructor(e){this.id=gp()(),this.selectedFeatureId=null,this.root=new fp,this.layerNames=e.layerNames||[],yp[this.id]=this}initialize(){}async activate(){this.active=!0}deactivate(){this.active=!1}setFeature(e){return this.clear(),this.selectedFeatureId=e,Promise.resolve()}update(){return Promise.resolve()}reset(){}clear(){this.selectedFeatureId=null,this.root.clear()}}var Lp=vp;class Mp{constructor(e,t,i,s,r){this.key=e,this.name=s||this.key,this._value=t,this._originalValue=t,this._deleted=!1,this.changed=!1,this.new=!1,this.targetReference=r;const n="number"===typeof t?cc.DOUBLE:cc.STRING;this.type=i||n}get value(){return this._value}set value(e){this.changed=this._originalValue!==e,this._value=e}get deleted(){return this._deleted}set deleted(e){this.changed=e,this._deleted=e}clone(){return new Mp(this.key,this._value,this.type,this.name)}reset(){this.value=this._originalValue,this._deleted=!1}updated(){this._originalValue=this._value,this.changed=!1,this._deleted=!1,this.new=!1}}var bp=Mp;function wp(e){return"BuildingPart"===e.type?`bldg:consistsOfBuildingPart/bldg:BuildingPart[@gml:id="${e.id}"]`:"BridgePart"===e.type?`brid:consistsOfBridgePart/brid:BridgePart[@gml:id="${e.id}"]`:"TunnelPart"===e.type?`tun:consistsOfTunnelPart/tun:TunnelPart[@gml:id="${e.id}"]`:""}class Tp extends fp{constructor(e){super(e.id,e.type,e.featureType),this.parentFeatureType=e.parentFeatureType,this.parents=[]}getChangedAttributes(){return super.getChangedAttributes().map(e=>{const t=wp(this);return e.targetReference=e.targetReference?`${t}/${e.targetReference}`:t,e})}}var Sp=Tp;class Cp extends fp{constructor(e){super(e.id,e.type,e.featureType),this.attributes=e.attributes||this.attributes,this.parentFeatureType=e.parentFeatureType}getChangedAttributes(){return super.getChangedAttributes().map(e=>(e.targetReference=`${this.parentFeatureType.featurePrefix}:boundedBy/${this.parentFeatureType.featurePrefix}:${this.type}[@gml:id="${this.id}"]`,e))}}var Ep=Cp;const Ip={WFS:"http://www.opengis.net/wfs/2.0",VCS:"http://www.virtualcitysystems.de/wfs/2.0"};function kp(e){let t;return t=window.ActiveXObject?e.xml:(new XMLSerializer).serializeToString(e),t}function Dp(e,t){const i=document.createElementNS(Ip.WFS,"Property"),s=document.createElementNS(Ip.WFS,"ValueReference");s.setAttribute("action","remove");const r=t.targetReference?`${t.targetReference}/${t.key}`:t.key;let n;s.innerHTML=r.replace(/\/gen:value$/,""),i.appendChild(s),e.firstChild.childNodes.forEach(e=>{"Filter"===e.nodeName&&(n=e)}),e.firstChild.insertBefore(i,n)}function Op(e,t,i){const s=document.createElementNS(Ip.WFS,"Native");s.setAttribute("vendorId","VCS"),s.setAttribute("safeToIgnore","false");const r=document.createElementNS(Ip.VCS,"vcs:InsertComplexProperty");function n(e){const t=document.createElementNS(Ip.VCS,"vcs:Property"),i=document.createElementNS(Ip.VCS,"vcs:Value");t.appendChild(i);const s=document.createElementNS(ru.gen,e.key.match(/^(gen:\w+)/g)[0]);s.setAttribute("name",e.name.replace(/^gen:/,"")),i.appendChild(s);const n=document.createElementNS(ru.gen,"gen:value");if(n.innerHTML=e.type===cc.DATE?e.value.toISOString().split("T")[0]:e.value,s.appendChild(n),e.targetReference){const i=document.createElementNS(Ip.VCS,"vcs:TargetReference");i.innerHTML=e.targetReference,t.appendChild(i)}r.appendChild(t)}r.setAttribute("typeName",`${i.featurePrefix}:${i.featureType}`),r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+i.featurePrefix,i.featureNs),s.appendChild(r),t.forEach(n);let a=null;if(e.firstChild.childNodes.forEach(e=>{"Filter"===e.nodeName&&(a=e)}),!a)throw new Error("could not create filter node");r.appendChild(a.cloneNode(!0)),e.appendChild(s)}function Pp(e){const t=document.createElementNS(Ip.WFS,"GetFeature");t.setAttribute("service","WFS"),t.setAttribute("version","2.0.0"),t.setAttribute("outputFormat","application/json");const i=document.createElementNS(Ip.WFS,"StoredQuery");i.setAttribute("id","urn:ogc:def:query:OGC-WFS::GetFeatureById"),t.appendChild(i);const s=document.createElementNS(Ip.WFS,"Parameter");return s.setAttribute("name","id"),s.innerHTML=e,i.appendChild(s),t}const Ap=lu.filter(e=>"storeyHeightsAboveGround"!==e&&"storeyHeightsBelowGround"!==e),xp=th(nu,Ap,[]).concat(ih(au,Ap,[])).concat(sh(ou,Ap,[])),Yp={stringAttribute:new Ec([]),doubleAttribute:new Ic([]),intAttribute:new kc([]),uriAttribute:new Dc([]),dateAttribute:new Oc([])},jp=new gt({declarativeStyle:{strokeColor:'color("#000000")',color:{conditions:[["${highlighted}===true",'color("rgba(255, 79, 66, 0.8)")'],["${selected}===true",'color("rgba(57, 170, 76, 0.4)")'],["true",'color("rgba(250, 250, 250, 0.2)")']]}}});function Np(e,t,i){return Object.entries(e).filter(([e])=>"type"!==e&&"id"!==e).map(([e,s])=>{const r=t?t.allowedProperties.find(t=>t.id===e):null;if(r)return new bp(r.valueReference,s,r.dataType,`${r.prefix}:${r.id}`);const n=i?i[e]:null;if(n&&Yp[n]){const t=Yp[n];return new bp(t.valueReference.replace("token",e),s,t.dataType,"gen:"+e)}return new bp(e,s)})}class Fp extends Lp{constructor(e){super(e),this.url=e.wfsServiceUrl,e.wfsToken&&(this.url=`${this.url}?token=${e.wfsToken}`),this.featureLayer=new ss({projection:e.wfsProjection,name:this.id,altitudeMode:"absolute",style:jp}),this.parts=[]}initialize(){j.getInstance().addLayer(this.featureLayer)}activate(){return super.activate().then(()=>(this.selectedFeatureId&&Lt().hideObjects([this.selectedFeatureId]),this.featureLayer.activate()))}deactivate(){super.deactivate(),this.selectedFeatureId&&Lt().showObjects([this.selectedFeatureId]),this.featureLayer.deactivate()}getFeature(e){const t=Pp(e);let i=kp(t);return i=i.replace(/__--__/g,":"),G.a.post(this.url,i).then(({data:e})=>e)}_handleSurfaces(e,t,i,s){let r=[];return e.geometry&&e.geometry.forEach(e=>{let n;if("Solid"===e.type)n=e.boundaries[0];else{if("MultiSurface"!==e.type)return;n=e.boundaries}const a=n.map(e=>{const i=e.map(e=>e.map(e=>t[e].slice()));return new ol.Feature({geometry:new ol.geom.Polygon(i,"XYZ")})});if(this.featureLayer.addFeatures(a),e.semantics){const t=e.semantics.surfaces.map(e=>{const t=xp.find(t=>t.featureType===e.type);return new Ep({id:e.id||gp()(),type:e.type,attributes:Np(e,t,s),parentFeatureType:i,featureType:t})});let n=[];"Solid"===e.type?n=e.semantics.values[0]:"MultiSurface"===e.type&&(n=e.semantics.values),n.forEach((e,i)=>{if(null!=e){const s=t[e];s.featureIds.push(a[i].getId()),a[i].set("surfaceId",s.id)}}),r=r.concat(t)}}),r}_handlePart(e,t,i,s,r){const n=xp.find(e=>e.featureType===i.type);e.id=t,e.type=i.type,e.featureType=n,e.attributes.push(...Np(i.attributes,n,r)),i.parents&&(e.parents=i.parents);const a=this._handleSurfaces(i,s,n,r);e.parts.push(...a),e!==this.root&&e.featureIds.push(...[].concat(...e.parts.map(e=>e.featureIds)))}setFeature(e){if(this.parts.find(t=>t.id===e||t.featureIds.includes(e)))return Promise.resolve();const t=Lt();return this.featureLayer.removeAllFeatures(),this.selectedFeatureId&&t.hiddenObjects[this.selectedFeatureId]&&t.showObjects([this.selectedFeatureId]),super.setFeature(e).then(async()=>{if(this.selectedFeatureId){this.root.clear();const{CityObjects:i,vertices:s,CityGMLMetadata:r}=await this.getFeature(e);t.hideObjects([e]);const n={};Object.entries(i).forEach(([t,i])=>{const a=r?r.genericAttributeTypes:{};if(t===e)this._handlePart(this.root,e,i,s,a),n[this.root.id]=this.root;else{const e=new Sp({parentFeatureType:this.root.featureType});this._handlePart(e,t,i,s,a),n[e.id]=e}});const a=n.length?Object.values(n):[];a.length>1&&a.forEach(e=>{e.parents&&e.parents.length&&e.parents.forEach(t=>{const i=n[t];i&&(e.parentFeatureType=i.featureType,i.parts.push(e)),i!==this.root&&i.featureIds.push(...[].concat(...i.parts.map(e=>e.featureIds)))})})}})}update(){const{featureType:e}=this.root,t=this.root.getChangedAttributes();if(0===t.length)return Promise.resolve();const i=new ol.Feature,s={},r=new Set,n=[],a=[],o=t.filter(e=>{if(e.new&&/gen:/.test(e.key))return n.push(e),!1;if(e.deleted)return a.push(e),!1;const t=e.targetReference?`${e.targetReference}/${e.key}`:e.key;s[t]=e.type===cc.DATE?e.value.toISOString().split("T")[0]:e.value;const i=t.match(/[^\/@]([\w\d])+:/g);return i&&i.forEach(e=>{r.add(e.replace(":",""))}),!0});i.setProperties(s),i.setId(this.selectedFeatureId);const l=(new ol.format.WFS2).writeTransaction([],[i],[],{featureNS:e.featureNs,featurePrefix:e.featurePrefix,featureType:e.featureType,nativeElements:[]});return a.forEach(e=>{r.add("vcs"),r.add("gen"),r.add("gml"),Dp(l,e)}),n.length&&(r.add("vcs"),r.add("gen"),r.add("gml"),Op(l,n,e),o.length||a.length||l.removeChild(l.firstChild)),r.delete(e.featurePrefix),r.forEach(e=>{const t=ru[e];t&&l.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,t)}),G.a.post(this.url,kp(l)).then(()=>{this.root.updated()})}reset(){this.root.reset()}clear(){const e=Lt();this.featureLayer.removeAllFeatures(),this.selectedFeatureId&&e.hiddenObjects[this.selectedFeatureId]&&e.showObjects([this.selectedFeatureId]),super.clear()}}var Rp=Fp;class Hp extends _a{static get className(){return"vcs.vcm.widgets.AttributeEditor"}constructor(e){e.className=Hp.className,super(e),this.supportedMaps=["vcs.vcm.maps.Cesium"],this.editor=new Rp(e)}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.editor.initialize(),this.initialized=!0,this.initializedFinished()}return!0}}var Gp=Hp;const zp=new Cesium.Cartesian3,Bp=new Cesium.Matrix3,Vp=new Cesium.Quaternion,Up=new Cesium.Color,Wp=[1,1e5];class qp{constructor(e){this._outlinePrimitives=[],this._planesPrimitives=[],this.show="undefined"===typeof e.show||e.show,this._camera=e.camera,this._color=e.color||Cesium.Color.YELLOW,this.allowPicking="undefined"===typeof e.allowPicking||e.allowPicking,this.id=e.id||{}}update(e){if(!this.show)return;const t=this._planesPrimitives,i=this._outlinePrimitives;let s,r;if(0===t.length){const e=this._camera,s=e.frustum,r=s.clone(),n=Wp;n[0]=this._camera.frustum.near,n[1]=this._camera.frustum.far;const a=e.positionWC,o=e.directionWC,l=e.upWC;let c=e.rightWC;c=Cesium.Cartesian3.negate(c,zp);const u=Bp;Cesium.Matrix3.setColumn(u,0,c,u),Cesium.Matrix3.setColumn(u,1,l,u),Cesium.Matrix3.setColumn(u,2,o,u);const h=Cesium.Quaternion.fromRotationMatrix(u,Vp);t.length=1,i.length=1,r.near=n[0],r.far=n[1],t[0]=new Cesium.Primitive({allowPicking:this.allowPicking,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.FrustumGeometry({origin:a,orientation:h,frustum:r,_drawNearPlane:!0}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromAlpha(this._color,.1,Up))},id:this.id,pickPrimitive:this}),appearance:new Cesium.PerInstanceColorAppearance({translucent:!0,flat:!0}),asynchronous:!1}),i[0]=new Cesium.Primitive({allowPicking:this.allowPicking,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.FrustumOutlineGeometry({origin:a,orientation:h,frustum:r,_drawNearPlane:!0}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new Cesium.PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})}for(r=t.length,s=0;s<r;++s)i[s].update(e),t[s].update(e)}destroy(){const e=this._planesPrimitives.length;for(let t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return Cesium.destroyObject(this)}}Cesium.VcsCameraPrimitve=qp;var Jp=qp;const Kp=new Cesium.Color,Zp=new Cesium.Matrix4;class Qp extends Jp{constructor(e){super(e),this.spot=e.spot}update(e){if(this.show)if(this.spot)super.update(e);else{const t=this._planesPrimitives,i=this._outlinePrimitives;0===t.length&&(Cesium.Transforms.eastNorthUpToFixedFrame(this._camera.positionWC,null,Zp),t[0]=new Cesium.Primitive({allowPicking:this.allowPicking,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.SphereGeometry({radius:2}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromAlpha(this._color,.1,Kp))},modelMatrix:Zp}),appearance:new Cesium.PerInstanceColorAppearance({translucent:!0,flat:!0}),asynchronous:!1}),i[0]=new Cesium.Primitive({allowPicking:this.allowPicking,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.SphereOutlineGeometry({radius:2}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(this._color)},modelMatrix:Zp}),appearance:new Cesium.PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1}));const{length:s}=t;for(let r=0;r<s;++r)i[r].update(e),t[r].update(e)}}}var Xp=Qp;const $p=new Cesium.Cartesian3,ef=new Cesium.Cartesian3;class tf{constructor(e,t){this.active=!1,this._spot=!1,this._position=null,this._heightOffset=1.8,this._showPrimitive=!0,this._viewshedOptions=t,this._cesiumProperties=e;const i=this._cesiumProperties.getShadowCamera();this._fov=i.frustum.fov,this._distance=i.frustum.far,this._hpr=new Cesium.HeadingPitchRoll(i.heading,i.pitch,i.roll),this._updatePrimitiveBounce=null,this._updateBounce=null}get spot(){return this._spot}set spot(e){a(e,Boolean),this._spot!==e&&(this._spot=e,this._spot&&this._position&&this.lookAt([this._position[0]+.001,this._position[1],this._position[2]+this._heightOffset]),this._update(),this._updatePrimitive())}get position(){return this._position}set position(e){this._position=e,this._position&&(Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]+this._heightOffset,null,this._cesiumProperties.getShadowCamera().position),this._cesiumProperties.getShadowMap()||this._update(),this._updatePrimitive())}get headingPitchRoll(){return this._hpr}set headingPitchRoll(e){this._hpr=e,this._cesiumProperties.getShadowCamera().setView({orientation:this._hpr}),this._updatePrimitive()}get distance(){return this._distance}set distance(e){a(e,Number),this._distance=e,this._cesiumProperties.getShadowCamera().frustum.far=e,this._update(),this.spot&&this._updatePrimitive()}get fov(){return this._fov}set fov(e){a(e,Number),this._fov=e,this._cesiumProperties.getShadowCamera().frustum.fov=e,this._update(),this._updatePrimitive()}get heightOffset(){return this._heightOffset}set heightOffset(e){a(e,Number),this._heightOffset!==e&&(this._heightOffset=e,this.position=this.position)}get showPrimitive(){return this._showPrimitive}set showPrimitive(e){a(e,Boolean),this._showPrimitive!==e&&(this._showPrimitive=e,this._updatePrimitive())}lookAt(e){if(this.position){const t=this._cesiumProperties.getShadowCamera();Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2],null,ef),Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(ef,t.position,ef),ef),t.setView({orientation:{direction:ef,up:Cesium.Cartesian3.normalize(t.position,$p)}}),this._hpr.heading=t.heading,this._hpr.pitch=t.pitch,this._hpr.roll=t.roll,this._updatePrimitive()}}getCurrentViewpoint(){if(this.position){const e=this._cesiumProperties.getShadowCamera();return new me({cameraPosition:[this.position[0],this.position[1],this.position[2]+this._heightOffset],heading:Cesium.Math.toDegrees(e.heading),pitch:Cesium.Math.toDegrees(e.pitch),roll:Cesium.Math.toDegrees(e.roll)})}return null}activate(){this.active=!0,this._update(),this._updatePrimitive()}deactivate(){this.active=!1,this._updatePrimitive(),this._cesiumProperties.setShadowMap(null)}destroy(){this.deactivate(),this._cesiumProperties.destroy(),this.destroyed=!0}_update(){this._updateBounce||(this._updateBounce=window.setTimeout(()=>{this.active&&this._position&&this._cesiumProperties.setShadowMap({enabled:!0,isPointLight:!this.spot,softShadows:!0,fromLightSource:!0,cascadesEnabled:!this.spot,pointLightRadius:this.distance,maximumDistance:200,size:2048},this._viewshedOptions),this._updateBounce=null},60))}_updatePrimitive(){if(this.active&&this._showPrimitive&&this._position){if(this._updatePrimitiveBounce)return;this._updatePrimitiveBounce=window.setTimeout(()=>{this._cesiumProperties.setPrimitive(this.spot),this._updatePrimitiveBounce=null},60)}else this._cesiumProperties.removePrimitive(),this._updatePrimitiveBounce&&(window.clearTimeout(this._updatePrimitiveBounce),this._updatePrimitiveBounce=null)}}function sf(e,t={}){let i,s;const r=new Cesium.Camera(e);r.frustum.fov=Cesium.Math.PI/3,r.frustum.near=1,r.frustum.aspectRatio=1,r.frustum.far=300;const n={getShadowCamera(){return r},getShadowMap(){return s},setShadowMap(t,i={}){t?(s=new Cesium.ShadowMap(Object(Hi["a"])({context:e.context,lightCamera:r},t)),s.viewshed=i,e.shadowMap=s):s&&(s.destroy(),s=null)},setPrimitive(t){this.removePrimitive(),i=new Xp({camera:r,allowPicking:!1,spot:t}),e.primitives.add(i)},removePrimitive(){i&&(e.primitives.remove(i),i.destroy(),i=null)},destroy(){i&&(e.primitives.remove(i),i.destroy(),i=null),s&&(s.destroy(),s=null)}};return new tf(n,t)}class rf extends _a{static get className(){return"vcs.vcm.widgets.viewshed.Viewshed"}static getDefaultOptions(){return Object(Hi["a"])(Object(Hi["a"])({},_a.getDefaultOptions()),{},{shadowColor:"rgba(51, 51, 51, 0.1)",visibleColor:"rgba(255, 153, 0, 0.5)"})}constructor(e){e.className=rf.className,super(e),this.supportedMaps=["vcs.vcm.maps.Cesium"],this._viewshedOptions={},e.shadowColor&&(this._viewshedOptions.shadowColor=Cesium.Color.fromCssColorString(e.shadowColor)),e.visibleColor&&(this._viewshedOptions.visibleColor=Cesium.Color.fromCssColorString(e.visibleColor)),this._shadowMapCache=null,this.viewshed=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;const t=this.framework.getActiveMap().getScene();this.viewshed=sf(t,this._viewshedOptions)}return!0}activate(){if(!this.active){super.activate(),this._widgetActivationListener=this.framework.subscribe(L.WIDGET_ACTIVATED,e=>{"vcs.vcm.widgets.Shadow"===e.className&&this.deactivate()});const e=this.framework.getActiveMap().getScene();this._shadowMapCache=e.shadowMap,this.viewshed.activate()}}deactivate(){if(this.active){this.framework.unsubscribeByKey(this._widgetActivationListener),super.deactivate(),this.viewshed.deactivate();const e=this.framework.getMapByType("vcs.vcm.maps.Cesium").getScene();e.shadowMap=this._shadowMapCache}}getLink(e){if(this.active&&this.viewshed.position){const t={p:this.viewshed.position,hpr:[this.viewshed.headingPitchRoll.heading,this.viewshed.headingPitchRoll.pitch,this.viewshed.headingPitchRoll.roll],f:this.viewshed.fov,d:this.viewshed.distance,h:this.viewshed.heightOffset,s:this.viewshed.spot?1:0,sP:this.viewshed.showPrimitive?1:0};e.addQueryParams({vs:JSON.stringify(t)})}}handleURLParameter(e){super.handleURLParameter(e);const t=e.vs;t&&(this.viewshed.showPrimitive=1===t.sP,this.viewshed.fov=t.f,this.viewshed.distance=t.d,this.viewshed.heightOffset=t.h,this.viewshed.spot=1===t.s,this.viewshed.position=t.p,this.viewshed.headingPitchRoll=new Cesium.HeadingPitchRoll(...t.hpr),this.activate())}dispose(){super.dispose(),this.deactivate(),this.viewshed.destroy(),this._shadowMapCache=null}}var nf=rf;i(570);let af;function of(e,t,i){const s=E.getInstance(),r=e.slLayer;if(r===i.name){const r=e.slId?e.slId.toString():Object(c["c"])();let n=null;const a=e.slPos;if(a){const e=a.split(",");n={longitude:parseFloat(e[0]),latitude:parseFloat(e[1]),height:parseFloat(e[2])}}if(i instanceof ss){let t=i.getFeatureById(r);n&&t?(t.set("clickedPosition",n),s.setCurrentItem(r,t,i)):n&&(t=new ol.Feature({}),t.setProperties(e.slAt||{}),t.clickedPosition=n,s.setCurrentItem(r,t,i))}else if(n){const t=e.slAt||{},a={attributes:t,clickedPosition:n};s.setCurrentItem(r,a,i)}else s.setCurrentItem(r,null,i);null!=af&&t.unsubscribeByKey(af)}}function lf(e,t){null!=e.slLayer&&(af=e.slLayer.startsWith("_searchResultVector")?t.subscribe(L.MAP_ACTIVATED,()=>{const i=t.getLayerByName("_searchResultVector");i&&of(e,t,i)}):t.subscribe(L.LAYER_ACTIVATED,of.bind(null,e,t)))}function cf(e,t){const i=n["a"].parse(window.location.href).getQueryParams();if(null!=i.startingmap&&(t.startingmap=i.startingmap),null==i.groundPosition&&null==i.cameraPosition||(t.startViewPoint=me.parseURLparameter(i)),i.verbose&&(v.enabled=i.verbose),lf(i,t),null!=i.allowSoftwareRendering){const t=e.maps.find(e=>"vcs.vcm.maps.Cesium"===e.type);t&&(t.allowSoftwareRendering=!0)}if(null!=i.layerToActivate){i.layerToActivate=Array.isArray(i.layerToActivate)?i.layerToActivate:[i.layerToActivate];let e=null;i.layerToActivate.forEach(i=>{const s=t.getLayerByName(i);s&&s instanceof bi&&!e&&(e=s,s.isDefaultObliqueLayer=!0)}),e&&t.getLayers().forEach(t=>{t instanceof bi&&t!==e&&(t.isDefaultObliqueLayer=!1)})}return i}function uf(e,t){let i,s,r;if(null!=e.layerToActivate){const n=e.layerToActivate;i=Array.isArray(n)?n:[n];for(let e=0;e<i.length;e++)s=i[e],r=t.getLayerByName(s),!r||r instanceof bi||r.activate()}if(null!=e.layerToDeactivate){const n=e.layerToDeactivate;i=Array.isArray(n)?n:[n];for(let e=0;e<i.length;e++)s=i[e],r=t.getLayerByName(s),!r||r instanceof bi||r.deactivate()}(e["reset-token"]||e["verify-token"])&&Bo.getInstance().handleURLParameter(e),Object.values(t.widgets).forEach(t=>t.handleURLParameter(e)),Object.values(t.maps).forEach(t=>t.handleURLParameter(e)),Object.values(t.layers).forEach(t=>t.handleURLParameter(e)),w.getInstance().handleURLParameter(e),fe.getInstance().handleURLParameter(e)}function hf(e,t){function i(e,t){Object.keys(t).forEach(s=>{const r=t[s];"object"!==typeof r||Array.isArray(r)||"object"!==typeof e[s]?e[s]=r:i(e[s],r)})}"object"===typeof e&&("object"===typeof e.ui&&i(t.config,{ui:e.ui}),Object.keys(e).filter(e=>/^ui_/.test(e)).forEach(s=>{let r={};const n=e[s],a=s.split("_");a.reverse().forEach((e,t)=>{const i={};i[e]=t?r:n,r=i}),i(t.config,r)}))}L.FRAMEWORK_INITIALIZED="FRAMEWORK_INITIALIZED";const df={[Pt.className]:Pt,[Di.className]:Di,[Ti.className]:Ti},mf=v.getLogger();function gf(e){return/maps/.test(e)?df[e]:/layer/.test(e)?Object.values(s).find(t=>t.className===e):/widgets/.test(e)?Object.values(r).find(t=>t.className===e):null}function pf(e){if(!e.type)return mf.warning("ObjectCreation failed: could not find type in options "+e),null;const t=gf(e.type);if(!t)return mf.warning("ObjectCreation failed: could not find javascript class of type "+e.type),null;let i=null;try{i=new t(e)}catch(s){mf.warning("Error: "+s),i=null}return i||(mf.warning("ObjectCreation failed: could not create new Object"),null)}function ff(e){const t=j.getInstance(),i=pf(e);i&&i instanceof Et?(i[j.configContentSymbol]=!0,t.addLayer(i)&&mf.info(`Loaded layer of type :${e.type} with name: ${e.name}`)):mf.warning("Could not load Layer")}function yf(e){const t=j.getInstance(),i=pf(e);i&&i instanceof ue?t.addMap(i)&&mf.info(`Loaded map of type :${e.type} with name: ${e.name}`):mf.warning("Could not load map")}function _f(e){const t=j.getInstance();if(/Oblique\w+Measurement$/.test(e.type)){mf.warning(`Widget of type ${e.type} is deprecated. Use ${sg.className} or ${ng.className} instead`);const i="vcs.vcm.widgets.ObliqueHeightMeasurement"===e.type?en.OBLIQUE_HEIGHT:en.OBLIQUE_DISTANCE;let s=t.getWidgetByType(sg.className);if(s||(s=t.getWidgetByType(ng.className)),s)return void(s.allowedMeasurements.includes(i)||s.allowedMeasurements.push(i));e.type=ng.className,e.allowedMeasurements=[i]}const i=pf(e);i&&i instanceof _a?t.addWidget(i)&&(mf.info(`Loaded widget of type :${e.type} with name: ${e.name}`),i.initialize()):mf.warning("Could not load widget")}function vf(e){if(!e.name&&!e.id)return void mf.warning("styles need a name. please reconfigure the styles section.");let t;if(e.type===Me.DECLARATIVE||e.declarativeStyle){if(t=new gt(e),!t.cesiumStyle.ready)return void mf.warning(`declarative style: ${e.name} has errors in the declarative style section and cannot be used`)}else t=new et(e);t?(t[j.configContentSymbol]=!0,j.getInstance().addStyle(t),mf.info(`added ${t.className} with name ${t.name}`)):mf.warning("could not create style item: "+e.name)}const Lf=["vcs.vcm.widgets.legend.Legend","vcs.vcm.widgets.BalloonInfo","vcs.vcm.widgets.Measurement","vcs.vcm.widgets.SingleMeasurement","vcs.vcm.widgets.Planning"];function Mf(e,t){let i=t.selectBehavior||null;E.getInstance(i),i=i||{};let s=i.excludedPickPositionEvents;s&&(s=Array.isArray(s)?s:[s]),i.excludedPickPositionEvents=s?s.map(e=>{const t=Object.keys(X).find(t=>t===e);return t?X[t]:null}).filter(e=>e).reduce((e,t)=>e|t,0):0,e.isIE11&&(i.pickTranslucent=i.pickTranslucent||!1,i.excludedPickPositionEvents=i.excludedPickPositionEvents||X.MOVE|X.DRAG),i.excludedPickPositionEvents&&(vs().featureInteraction.excludedPickPositionEvents=i.excludedPickPositionEvents),null!=i.pickTranslucent&&(vs().featureInteraction.pickTranslucent=i.pickTranslucent)}function bf(e){const t=j.getInstance();if(e.logLevel&&(v.enabled=e.logLevel),O.projection=new W(e.projection),t.mapcontainer=document.getElementById(e.mapcontainer),!t.mapcontainer)return void alert("Could not find Container Element with id "+e.mapcontainer);t.addElementsToMapContainer(),Array.isArray(e.styles)&&e.styles.forEach(vf),Array.isArray(e.flights)&&e.flights.forEach(e=>{t.addFlight(new el(e))}),e.style&&(mf.deprecate("style","use styles instead."),Array.isArray(e.style)&&e.style.forEach(vf));for(const o in e.layers){const t=e.layers[o];ff(t)}for(const o in e.viewpoints){const i=e.viewpoints[o];t.addViewPoint(new me(i))}e.startViewPoint&&(t.startViewPoint=t.getViewPointByName(e.startViewPoint)),t.libraryBasePath=e.libraryBasePath||"",t.baseUrl=e.baseUrl||"",e.availableLocales=e.availableLocales||["de","en"],t.config=e,w.getInstance().initialize(e),t.handleUiPlugins(e.ui),Mf(t,e);const i=cf(e,t);Array.isArray(e.maps)||(mf.deprecate(".maps Object","Write an array, consistent with the other config keys (layers, widgets etc.)"),e.maps=Object.values(e.maps)),e.maps.forEach(e=>{yf(e)});let s=t.getMapByName(t.startingmap);if(!s)for(const o in t.maps)t.maps[o].options.startingmap&&(s=t.maps[o]);let r=Promise.resolve();s&&(r=t.activateMap(s.name,t.startViewPoint));const n=e.widgets?e.widgets.sort((e,t)=>{const i=Lf;let s=i.indexOf(e.type),r=i.indexOf(t.type);return s=s>-1?s:i.length+1,r=r>-1?r:i.length+1,s-r}):[];n.forEach(_f),hf(i,t),r.then(()=>{uf(i,t)});const a=document.getElementById("vcs_loading");a&&a.parentNode.removeChild(a),vs(),t.publish(L.FRAMEWORK_INITIALIZED),t.setInitialized(!0)}function wf(e){const t=j.getInstance();t.getLogger().info(`Sending request to load JSON config file [${e}]`),G.a.get(e).then(e=>{bf(e.data)}).catch(e=>{mf.log(e)})}function Tf(){_s.destroy(),E.dispose(),j.getInstance().dispose()}class Sf extends oe{constructor(e){super(e),this.commonLayer=e.commonLayer,this.active=!1,this.initialized=!1}isActive(){return this.logger.deprecate("isActive","access the active property instead."),this.active}initialize(){return Promise.reject(new Error("implementation error"))}dispose(){this.initialized=!1}show(){this.active=!0}hide(){this.active=!1}isInitialized(){return this.logger.deprecate("isInitialized","access the initialized property"),this.initialized}mapActivated(e){return Promise.resolve()}mapDeactivated(e){return Promise.resolve()}updateStyle(e){}}var Cf=Sf;class Ef extends Cf{static get className(){return"vcs.vcm.layer.cesium.VectorLayer"}constructor(e){e.className=e.className?e.className:Ef.className,super(e),this._removePostRenderHandler=()=>{},this.commonLayer=this.commonLayer}initialize(){if(!this.initialized){this.olLayer=new ol.layer.Vector({renderOrder:null,visible:!1,source:this.commonLayer.getSource(),style:this.commonLayer.style.style,name:this.commonLayer.name,zIndex:this.commonLayer.zIndex,olcs_altitudeMode:this.commonLayer.altitudeMode,olcs_storeyHeight:this.commonLayer.storeyHeight,olcs_skirt:this.commonLayer.skirt,olcs_heightAboveGround:this.commonLayer.heightAboveGround,olcs_scaleByDistance:this.commonLayer.scaleByDistance,olcs_zCoordinateEyeOffset:this.commonLayer.zCoordinateEyeOffset,olcs_classificationType:this.commonLayer.classificationType,layerName:this.commonLayer.name});const{minResolution:e,maxResolution:t}=this.commonLayer;e&&this.olLayer.setMinResolution(e),t&&this.olLayer.setMaxResolution(t),this.initialized=!0}return Promise.resolve()}createSynchronization(e){if(this.commonLayer.visibility&&!this.alreadySynchronized&&e.initialized){const t=e.getSynchronizer(this);this.counterPart=t.createSingleLayerCounterparts(this.olLayer)[0],t.addCesiumObject(this.counterPart),this.alreadySynchronized=!0}}mapActivated(e){return e instanceof Pt&&this.active&&!this.alreadySynchronized&&this.createSynchronization(e),Promise.resolve()}mapDeactivated(e){if(e instanceof Pt&&this.counterPart&&this.commonLayer.isDynamic){const t=e.getSynchronizer(this);t.destroySingleLayerCounterparts(this.counterPart),this.alreadySynchronized=!1}return Promise.resolve()}show(){if(!this.active){super.show();const e=this.framework.getActiveMap();this.createSynchronization(e);const t=this.commonLayer.visibility;this.olLayer.setVisible(t),e.initialized&&(this._removePostRenderHandler(),this._removePostRenderHandler=e.getScene().postRender.addEventListener(this.commonLayer.postRenderStyling.bind(this.commonLayer)))}}hide(){this.active&&(super.hide(),this.olLayer.setVisible(!1),this._removePostRenderHandler(),this.commonLayer.FVlastUpdated=0)}updateStyle(e){if(this.initialized){if(this.olLayer.setStyle(this.commonLayer.style.style),e)return;const t=this.olLayer.getSource().getFeatures();t.forEach(e=>{e.changed()})}}setVisibility(e){this.initialized&&this.olLayer.setVisible(e)}}ue.registerSpecificLayerImpl(Pt.className,ss.className,Ef),ue.registerSpecificLayerImpl(Pt.className,fa.className,Ef);var If=Ef;class kf extends If{static get className(){return"vcs.vcm.layer.cesium.AsyncVectorImplementation"}constructor(e){e.className=kf.className,super(e),this.commonLayer=this.commonLayer}initialize(){return super.initialize().then(()=>this.commonLayer.fetchData())}}ue.registerSpecificLayerImpl(Pt.className,ta.className,kf),ue.registerSpecificLayerImpl(Pt.className,Bn.className,kf);var Df=kf;class Of extends In{static get className(){return"vcs.vcm.layer.cesium.CesiumTilesetLayerImpl"}constructor(e){const{cesiumTilesetLayerOptions:t}=e.commonLayer,i={className:Of.className,name:e.commonLayer.name};super(Object.assign({},i,t)),this.commonLayer=e.commonLayer,this._style=this.commonLayer.style}initialize(){return super.initialize().then(()=>{this.cesium3DTileset[Et.vcsLayerNameSymbol]=this.commonLayer.name,this.cesium3DTileset[Bs]=!0})}show(){this.active||(super.show(),this._state=wt.ACTIVE)}hide(){this.active&&(super.hide(),this._state=wt.INACTIVE)}mapActivated(e){return Promise.resolve()}mapDeactivated(e){return Promise.resolve()}updateStyle(e){this.setStyle(this.commonLayer.style,e)}determineHighlightStyle(){return this.commonLayer.highlightStyle?this.commonLayer.highlightStyle:E.getInstance()._currentItemHighlightColor}objectClickedHandler(e,t,i){return!!this.commonLayer.allowPicking&&super.objectClickedHandler(e,t,i||this.commonLayer)}getGenericFeatureFromClickedObject(e){const t=super.getGenericFeatureFromClickedObject(e);return t.layerName=this.commonLayer.name,t.layerClass=this.commonLayer.className,t}}ue.registerSpecificLayerImpl(Pt.className,Us.className,Of);var Pf=Of;class Af extends Cf{constructor(e){super(e),this.commonLayer=this.commonLayer,this.cesiumLayer=null}updateSplitDirection(){this.initialized&&(this.cesiumLayer.splitDirection=this.commonLayer.splitDirection)}show(){if(!this.active){const e=this.framework.getActiveMap();if(e&&e instanceof Pt&&e.initialized&&this.cesiumLayer){super.show();const{imageryLayers:t}=e.getScene();if(!t.contains(this.cesiumLayer)){const{index:i}=this.commonLayer;this.cesiumLayer.VCMLayerIndex=i;let s=t.length;for(let e=0;e<t.length;e++){const r=t.get(e),n=r.VCMLayerIndex;if(i<n){s=e;break}}e.getScene().imageryLayers.add(this.cesiumLayer,s)}this.cesiumLayer.show=!0}}}hide(){this.active&&(super.hide(),this.cesiumLayer&&(this.cesiumLayer.show=!1))}dispose(){const e=this.framework.getMapByType("vcs.vcm.maps.Cesium");e&&e instanceof Pt&&e.initialized&&e.getScene().imageryLayers.contains(this.cesiumLayer)&&e.getScene().imageryLayers.remove(this.cesiumLayer,!0),this.cesiumLayer=null,this.initialized=!1,this.active=!1}updateOpacity(){this.initialized&&this.cesiumLayer&&(this.cesiumLayer.alpha=this.commonLayer.opacity)}}var xf=Af;class Yf extends xf{static get className(){return"vcs.vcm.layer.cesium.OpenStreetMapLayer"}constructor(e){e.className=Yf.className,super(e)}initialize(){if(!this.initialized){this.cesiumImageryProvider=new Cesium.OpenStreetMapImageryProvider({maximumLevel:19});const e={alpha:this.commonLayer.opacity,splitDirection:this.commonLayer.splitDirection};this.cesiumLayer=new Cesium.ImageryLayer(this.cesiumImageryProvider,e),this.initialized=!0}return Promise.resolve()}}ue.registerSpecificLayerImpl(Pt.className,Kn.className,Yf);var jf=Yf;class Nf extends xf{static get className(){return"vcs.vcm.layer.cesium.singleImageLayer"}constructor(e){e.className=Nf.className,super(e),this.commonLayer=this.commonLayer,this.currentExtent=null}initialize(){return this.initialized||this.updateLayer(),Promise.resolve()}mapActivated(e){return super.mapActivated(e).then(()=>{this.currentExtent&&!this.currentExtent.every((e,t)=>this.commonLayer.imageExtent[t]===e)&&this.updateLayer()})}updateLayer(){const{active:e}=this;this.initialized&&this.dispose();const t={url:this.commonLayer.url,credit:this.commonLayer.credit},i=this.commonLayer.imageExtent;i&&(this.currentExtent=i.slice(),t.rectangle=Cesium.Rectangle.fromDegrees(i[0],i[1],i[2],i[3]));const s=new Cesium.SingleTileImageryProvider(t),r={rectangle:t.rectangle,alpha:this.commonLayer.opacity,defaultAlpha:1,splitDirection:this.commonLayer.splitDirection};this.cesiumLayer=new Cesium.ImageryLayer(s,r),this.initialized=!0,e&&this.show()}}ue.registerSpecificLayerImpl(Pt.className,qn.className,Nf);var Ff=Nf;class Rf extends xf{static get className(){return"vcs.vcm.layer.cesium.TMSBaseLayer"}constructor(e){e.className=Rf.className,super(e)}initialize(){if(!this.initialized){const e={url:this.commonLayer.url,fileExtension:this.commonLayer.format,maximumLevel:this.commonLayer.maxLevel,minimumLevel:this.commonLayer.minLevel,show:!1};if(this.commonLayer.extent.isValid()){const t=this.commonLayer.extent.getCoordinatesInProjection(q);e.rectangle=Cesium.Rectangle.fromDegrees(t[0],t[1],t[2],t[3])}"geographic"===this.commonLayer.tilingSchema&&(e.tilingScheme=new Cesium.GeographicTilingScheme);const t=new Cesium.TileMapServiceImageryProvider(e),i={alpha:this.commonLayer.opacity,splitDirection:this.commonLayer.splitDirection};this.cesiumLayer=new Cesium.ImageryLayer(t,i),this.initialized=!0}return Promise.resolve()}setOpacity(e){this.cesiumLayer.alpha=e}}ue.registerSpecificLayerImpl(Pt.className,Qn.className,Rf);var Hf=Rf;class Gf extends If{static get className(){return"vcs.vcm.layer.cesium.VectorClusterLayer"}constructor(e){e.className=Gf.className,super(e),this.commonLayer=this.commonLayer}initialize(){return super.initialize().then(()=>{this.olLayer&&this.olLayer.set("olcs_zCoordinateEyeOffset",this.commonLayer.zCoordinateEyeOffset)})}createSynchronization(e){if(!this.alreadySynchronized&&e.initialized){const t=e.clusterSynchronizer,i=t.createSingleLayerCounterparts(this.olLayer)[0];this.clusterDataSource=i.getDataSource(),this.clusterDataSource.clustering.clusterLabels=!1,this.clusterDataSource.clustering.clusterPoints=!1,e.getClusterDatasources().add(this.clusterDataSource);const{clusterConverter:s}=e;s.setLayerStyle(this.olLayer,this.commonLayer.cesiumStyleFunction.bind(this.commonLayer)),this.alreadySynchronized=!0}}}ue.registerSpecificLayerImpl(Pt.className,$n.className,Gf);var zf=Gf;class Bf extends xf{static get className(){return"vcs.vcm.layer.cesium.WMSLayer"}constructor(e){e.className=Bf.className,super(e)}initialize(){return this.initialized||(this.commonLayer.setCommonSource(),this.updateLayer()),Promise.resolve()}show(){this.active||(super.show(),this.commonLayer.featureInfo&&this.commonLayer.activateFeatureInfo(!0))}hide(){this.active&&(super.hide(),this.commonLayer.featureInfo&&this.commonLayer.activateFeatureInfo(!1))}updateLayer(){const{active:e}=this;this.initialized&&this.dispose();const t=Object(Hi["a"])({},this.commonLayer.parameters);this.commonLayer.highResolution&&(t.width=2*this.commonLayer.tileSize[0],t.height=2*this.commonLayer.tileSize[1]);const i={url:this.commonLayer.url,layers:this.commonLayer.layers.join(","),minimumLevel:this.commonLayer.minLevel,maximumLevel:this.commonLayer.maxLevel,show:!1,parameters:t,tileWidth:this.commonLayer.tileSize[0],tileHeight:this.commonLayer.tileSize[1]};if(this.commonLayer.extent&&this.commonLayer.extent.isValid()){const e=this.commonLayer.extent.getCoordinatesInProjection(q);e&&(i.rectangle=Cesium.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]))}"mercator"===this.commonLayer.tilingSchema&&(i.tilingScheme=new Cesium.WebMercatorTilingScheme);const s=new Cesium.WebMapServiceImageryProvider(i),r={alpha:this.commonLayer.opacity,splitDirection:this.commonLayer.splitDirection};this.cesiumLayer=new Cesium.ImageryLayer(s,r),this.initialized=!0,e&&this.show()}}ue.registerSpecificLayerImpl(Pt.className,ra.className,Bf);var Vf=Bf;class Uf extends xf{static get className(){return"vcs.vcm.layer.cesium.WMTSLayer"}constructor(e){e.className=Uf.className,super(e)}initialize(){if(!this.initialized){let{url:e}=this.commonLayer;e=-1!==e.indexOf("{Layer}")?e.replace("{Layer}",this.commonLayer.layer):e;const t=this.commonLayer.extent.getCoordinatesInProjection(q),i={url:e,layer:this.commonLayer.layer,style:this.commonLayer.wmtsStyle,format:this.commonLayer.format,tileMatrixSetID:this.commonLayer.tileMatrixSetID,maximumLevel:this.commonLayer.maxLevel,rectangle:Cesium.Rectangle.fromDegrees(t[0],t[1],t[2],t[3]),tileWidth:this.commonLayer.tileSize[0],tileHeight:this.commonLayer.tileSize[1]},s={};if((this.commonLayer.numberOfLevelZeroTilesX>1||this.commonLayer.numberOfLevelZeroTilesY>1)&&(s.numberOfLevelZeroTilesX=this.commonLayer.numberOfLevelZeroTilesX,s.numberOfLevelZeroTilesY=this.commonLayer.numberOfLevelZeroTilesY),"geographic"===this.commonLayer.tilingSchema?i.tilingScheme=new Cesium.GeographicTilingScheme(s):i.tilingScheme=new Cesium.WebMercatorTilingScheme(s),this.commonLayer.matrixIds)this.commonLayer.matrixIds.length===this.commonLayer.maxLevel+1?i.tileMatrixLabels=this.commonLayer.matrixIds:this.logger.info("matrixIDs must have the same length as maxZoom");else if(""!==this.commonLayer.tileMatrixPrefix){const e=[];for(let t=0;t<this.commonLayer.maxLevel+1;t++)e[t]=String(this.commonLayer.tileMatrixPrefix)+String(t);i.tileMatrixLabels=e}const r=new Cesium.WebMapTileServiceImageryProvider(i),n={alpha:this.commonLayer.opacity,splitDirection:this.commonLayer.splitDirection};this.cesiumLayer=new Cesium.ImageryLayer(r,n),this.initialized=!0}return Promise.resolve()}}ue.registerSpecificLayerImpl(Pt.className,aa.className,Uf);var Wf=Uf;class qf extends If{static get className(){return"vcs.vcm.layer.cesium.Wsv"}constructor(e){e.className=qf.className,super(e)}}ue.registerSpecificLayerImpl(Pt.className,ha.className,qf);var Jf=qf;function Kf(e,t){let i=null,s=!1;const r=e.getArray(),n=r.length;for(let a=0;a<n;a++){const e=r[a];if(e===t){s=!0;break}const n=e.VCMLayerIndex;t.VCMLayerIndex<n&&null===i&&(i=a)}s||(null===i&&(i=n),e.insertAt(i,t))}class Zf extends Cf{constructor(e){super(e),this.olLayer=null}initialize(){return this.initialized||(this.olLayer=this.getOLLayer(),this.initialized=!0),Promise.resolve()}show(){if(!this.active){super.show();const e=this.framework.getActiveMap(),t=e.olMap.getLayers();this.olLayer.VCMLayerIndex=this.commonLayer.index,Kf(t,this.olLayer);const i=null==this.commonLayer.visibility||this.commonLayer.visibility;this.olLayer.setVisible(i)}}hide(){this.active&&(super.hide(),this.olLayer.setVisible(!1))}dispose(){if(this.olLayer){const e=this.framework.getMapByType("vcs.vcm.maps.Openlayers");e.olMap.removeLayer(this.olLayer)}this.olLayer=null,this.initialized=!1,this.active=!1}getOLLayer(){throw new Error}}var Qf=Zf;class Xf extends Cf{static get className(){return"vcs.vcm.layer.oblique.VectorLayer"}constructor(e){e.className=e.className?e.className:Xf.className,super(e),this.commonLayer=this.commonLayer,this.obliqueSource=new ol.source.Vector({}),this.featureListeners={},this.frameworkListeners=[],this.sourceListener=[],this.currentExtent=null,this.fetchedFeaturesForImageName=null,this._postComposeListener=null,this.FVlastUpdated=0,this.featureVisibility=this.commonLayer.featureVisibility,this.globalHider=this.commonLayer.globalHider,this.visibility=this.commonLayer.visibility,this.synchronizeEvent=new Cesium.Event,this._synchronizing=!1}get synchronizing(){return this._synchronizing}initialize(){return this.initializedPromise||(this.obliqueMap=this.framework.getActiveMap(),this.initializedPromise=this.obliqueMap.initializedPromise.then(()=>{if(this.obliqueMap.initialized){this.olMap=this.obliqueMap.olMap,this.olLayer=new ol.layer.Vector({renderOrder:null,visible:!1,source:this.obliqueSource,style:this.commonLayer.style.style,name:this.commonLayer.name,zIndex:this.commonLayer.zIndex,layerName:this.commonLayer.name});const{minResolution:e,maxResolution:t}=this.commonLayer;e&&this.olLayer.setMinResolution(e),t&&this.olLayer.setMaxResolution(t),this.initialized=!0}return Promise.resolve()})),this.initializedPromise}updateStyle(){this.initialized&&this.olLayer.setStyle(this.commonLayer.style.style)}getFeatureById(e){return this.obliqueSource.getFeatureById(e+"_OBLIQUE")}show(){this.initialized&&!this.active&&(super.show(),this.olLayer.VCMLayerIndex=this.commonLayer.index,Kf(this.olMap.getLayers(),this.olLayer),this.olLayer.setVisible(this.commonLayer.visibility),null===this._postComposeListener&&(this._postComposeListener=this.olMap.on("postcompose",this.commonLayer.postRenderStyling.bind(this))),this.fetchFeaturesInView())}setVisibility(e){this.initialized&&this.olLayer.setVisible(e),this.visibility=e}static setNewGeometry(e,t){const i=e.getGeometry().clone();t.setGeometry(e.getGeometry()[ss.alreadyTransformedToImage]?i:ri(i)),e.getGeometry()[ss.alreadyTransformedToImage]&&t.getGeometry().setProperties(e.getGeometry().getProperties(),!1),e[ss.obliqueGeometry]=t.getGeometry()}addFeature(e){if(this.active||(this.fetchedFeaturesForImageName=null),this.active&&this.currentExtent&&this.framework.getActiveMap()instanceof Ti){if(e[ss.doNotTransform]&&!e.getGeometry()[ss.alreadyTransformedToImage])return Promise.resolve();if(!e.getGeometry()[ss.alreadyTransformedToImage]&&!e.getGeometry().intersectsExtent(this.currentExtent))return Promise.resolve();const t=e.getId()+"_OBLIQUE";if(this.obliqueSource.getFeatureById(t))return Promise.resolve();const i=new ol.Feature({});return i.setId(t),i[ss.originalFeatureSymbol]=e,Xf.setNewGeometry(e,i),i.setStyle(e.getStyle()),this._setFeatureListeners(e,i),this.updateGeometry(e,i).then(()=>{this.obliqueSource.addFeature(i)})}return Promise.resolve()}_setFeatureListeners(e,t){this.featureListeners[t.getId()]=new Array(3),this.featureListeners[t.getId()][0]=e.on("change:geometry",()=>{ol.Observable.unByKey(this.featureListeners[t.getId()][2]),Xf.setNewGeometry(e,t),this.updateGeometry(e,t),this.featureListeners[t.getId()][2]=e.getGeometry().on("change",this.updateGeometry.bind(this,e,t))}),this.featureListeners[t.getId()][1]=e.on("change",()=>{t.setStyle(e.getStyle())}),this.featureListeners[t.getId()][2]=e.getGeometry().on("change",this.updateGeometry.bind(this,e,t))}updateGeometry(e,t){const i=e.getGeometry();if(!i[ss.alreadyTransformedToImage]){const e=t.getGeometry();return li(i,e,this.obliqueMap.activeLayer.currentImage).then(()=>{delete e[ss.imageGeometryChanged],this.featureListeners[t.getId()].push(e.once("change",()=>{e[ss.imageGeometryChanged]=!0}))})}return t.getGeometry().setCoordinates(e.getGeometry().getCoordinates()),t.getGeometry()[ss.imageGeometryChanged]=!0,Promise.resolve()}synchronizeGeometriesAndClearSource(){return this._synchronizing=!0,this.synchronizeEvent.raiseEvent(this._synchronizing),Object.keys(this.featureListeners).forEach(e=>{ol.Observable.unByKey(this.featureListeners[e]),delete this.featureListeners[e]}),this.synchronizeGeometries(!1).then(()=>{this.obliqueSource.clear(!0),this.fetchedFeaturesForImageName=null,this._synchronizing=!1,this.synchronizeEvent.raiseEvent(this._synchronizing),this.FVlastUpdated=0})}synchronizeGeometries(e=!0){const t=[];return this.obliqueSource.forEachFeature(i=>{const s=i[ss.originalFeatureSymbol];if(!s[ss.doNotTransform]&&i.getGeometry()[ss.imageGeometryChanged]){this.featureListeners[i.getId()]&&(ol.Observable.unByKey(this.featureListeners[i.getId()]),delete this.featureListeners[i.getId()]);const r=i.getGeometry()instanceof ol.geom.Circle,n=ui(s),a=ui(i);t.push(ci(a,n,this.obliqueMap.activeLayer.obliqueCollection.getImageByName(this.fetchedFeaturesForImageName)).then(()=>(delete n[ss.alreadyTransformedToImage],delete a[ss.imageGeometryChanged],e&&(r&&Xf.setNewGeometry(s,i),this._setFeatureListeners(s,i)),Promise.resolve())))}}),Promise.all(t)}fetchFeaturesInView(){return new Promise(e=>{this.active&&this.fetchedFeaturesForImageName!==this.obliqueMap.getCurrentImage().name&&(this.currentExtent=this.obliqueMap.getExtentOfCurrentImage().getCoordinatesInProjection(J),this.commonLayer.source.forEachFeatureInExtent(this.currentExtent,e=>{this.addFeature(e)}),this.commonLayer.source.forEachFeature(e=>{e.getGeometry()[ss.alreadyTransformedToImage]&&this.addFeature(e)}),this.fetchedFeaturesForImageName=this.obliqueMap.getCurrentImage().name),e()})}removeFeature(e){const t=this.obliqueSource.getFeatureById(e.getId()+"_OBLIQUE");if(t){const e=t.getId(),i=this.featureListeners[e];i&&(ol.Observable.unByKey(i),delete this.featureListeners[e]),this.obliqueSource.removeFeature(t)}}hide(){this.active&&(super.hide(),this.olMap.removeLayer(this.olLayer),null!=this._postComposeListener&&(ol.Observable.unByKey(this._postComposeListener),this._postComposeListener=null),this.FVlastUpdated=0)}dispose(){if(this.olLayer){const e=this.framework.getMapByType("vcs.vcm.maps.Oblique");e.olMap.removeLayer(this.olLayer)}this.olLayer=null,this.initialized=!1,this.active=!1,ol.Observable.unByKey(this.sourceListener),this.sourceListener=[],this.frameworkListeners.forEach(this.framework.unsubscribeByKey,this.framework),this.frameworkListeners=[],this.obliqueSource.clear(!0)}mapActivated(e){return this.sourceListener.push(this.commonLayer.source.on("addfeature",e=>{this.addFeature(e.feature)})),this.sourceListener.push(this.commonLayer.source.on("removefeature",e=>{this.removeFeature(e.feature)})),this.sourceListener.push(this.commonLayer.source.on("changefeature",e=>{const t=e.feature.getId()+"_OBLIQUE";this.featureListeners[t]||this.addFeature(e.feature)})),this.frameworkListeners.push(this.framework.subscribe(L.OBLIQUE_IMAGE_CHANGED,()=>{this.synchronizeGeometriesAndClearSource().then(()=>{this.fetchFeaturesInView()})})),this.fetchFeaturesInView()}mapDeactivated(e){return ol.Observable.unByKey(this.sourceListener),this.sourceListener=[],this.frameworkListeners.forEach(this.framework.unsubscribeByKey,this.framework),this.frameworkListeners=[],this.synchronizeGeometriesAndClearSource()}}ue.registerSpecificLayerImpl(Ti.className,ss.className,Xf),ue.registerSpecificLayerImpl(Ti.className,fa.className,Xf);var $f=Xf;class ey extends $f{static get className(){return"vcs.vcm.layer.oblique.AsyncVectorImplementation"}constructor(e){e.className=ey.className,super(e),this.commonLayer=this.commonLayer}initialize(){return super.initialize().then(this.commonLayer.fetchData.bind(this.commonLayer))}}ue.registerSpecificLayerImpl(Ti.className,ta.className,ey),ue.registerSpecificLayerImpl(Ti.className,Bn.className,ey),ue.registerSpecificLayerImpl(Ti.className,ha.className,ey);var ty=ey;class iy extends $f{constructor(e){super(e),this.clusterSource=new ol.source.Cluster({source:this.obliqueSource})}initialize(){return super.initialize().then(()=>{this.clusterSource.setDistance(this.commonLayer.clusterSource.getDistance()),this.olLayer.setSource(this.clusterSource)})}show(){this.initialized&&!this.active&&(null===this._postComposeListener&&(this._postComposeListener=this.olMap.on("postcompose",this.commonLayer.postRenderStyling.bind(this.commonLayer))),super.show())}mapActivated(e){const t=()=>{this.synchronizeGeometriesAndClearSource().then(()=>{this.fetchFeaturesInView()})};return this.sourceListener.push(this.commonLayer.source.on("change",t)),this.frameworkListeners.push(this.framework.subscribe(L.OBLIQUE_IMAGE_CHANGED,t)),this.fetchFeaturesInView()}}ue.registerSpecificLayerImpl(Ti.className,$n.className,iy);var sy=iy;class ry extends Qf{static get className(){return"vcs.vcm.layer.openlayers.VectorLayer"}constructor(e){e.className=e.className?e.className:ry.className,super(e),this.commonLayer=this.commonLayer,this._postComposeListener=null,this.olLayer=null}updateStyle(){this.initialized&&this.olLayer.setStyle(this.commonLayer.style.style)}getOLLayer(){const e=new ol.layer.Vector({renderOrder:null,visible:!1,source:this.commonLayer.getSource(),style:this.commonLayer.style.style,zIndex:this.commonLayer.zIndex,name:this.commonLayer.name}),t=this.commonLayer.maxResolution,i=this.commonLayer.minResolution;return t&&e.setMinResolution(t),i&&e.setMaxResolution(i),e}show(){if(!this.active){super.show();const e=this.framework.getActiveMap();null===this._postComposeListener&&(this._postComposeListener=e.olMap.on("postcompose",this.commonLayer.postRenderStyling.bind(this.commonLayer)))}}hide(){this.active&&(super.hide(),null!=this._postComposeListener&&(ol.Observable.unByKey(this._postComposeListener),this._postComposeListener=null),this.commonLayer.FVlastUpdated=0)}setVisibility(e){this.initialized&&this.olLayer.setVisible(e)}}ue.registerSpecificLayerImpl(Di.className,ss.className,ry),ue.registerSpecificLayerImpl(Di.className,ha.className,ry),ue.registerSpecificLayerImpl(Di.className,fa.className,ry);var ny=ry;class ay extends ny{constructor(e){super(e),this.commonLayer=this.commonLayer}initialize(){return this.commonLayer.fetchData().then(()=>super.initialize())}}ue.registerSpecificLayerImpl(Di.className,ta.className,ay),ue.registerSpecificLayerImpl(Di.className,Bn.className,ay),ue.registerSpecificLayerImpl(Di.className,Us.className,ay);var oy=ay;class ly extends Qf{constructor(e){super(e),this.commonLayer=this.commonLayer}initialize(){return super.initialize().then(()=>{this.updateSplitDirection()})}updateOpacity(){this.initialized&&this.olLayer.setOpacity(this.commonLayer.opacity)}updateSplitDirection(){if(this.initialized){const{splitDirection:e}=this.commonLayer;e===Cesium.ImagerySplitDirection.NONE&&this._splitDirectionListeners?(ol.Observable.unByKey(this._splitDirectionListeners),this._splitDirectionListeners=null):e===Cesium.ImagerySplitDirection.NONE||this._splitDirectionListeners||(this._splitDirectionListeners=[],this._splitDirectionListeners.push(this.olLayer.on("precompose",this._splitPreCompose.bind(this))),this._splitDirectionListeners.push(this.olLayer.on("postcompose",e=>{e.context.restore()})))}}_splitPreCompose(e){const{context:t}=e,i=t.canvas.width*wn().position;t.save(),t.beginPath();const{splitDirection:s}=this.commonLayer;s===Cesium.ImagerySplitDirection.LEFT?t.rect(0,0,i,t.canvas.height):t.rect(i,0,t.canvas.width-i,t.canvas.height),t.clip()}}var cy=ly;class uy extends cy{static get className(){return"vcs.vcm.layer.openlayers.OpenStreetMapLayer"}constructor(e){e.className=uy.className,super(e)}getOLLayer(){return new ol.layer.Tile({opacity:this.commonLayer.opacity,source:new ol.source.OSM})}}ue.registerSpecificLayerImpl(Di.className,Kn.className,uy);var hy=uy;class dy extends cy{static get className(){return"vcs.vcm.layer.openlayers.SingleImageLayer"}constructor(e){e.className=dy.className,super(e),this.commonLayer=this.commonLayer}initialize(){return this.initialized||this.updateLayer(),Promise.resolve()}getOLLayer(){return this.initialized||this.initialize(),this.olLayer}updateLayer(){const{active:e}=this;this.initialized&&this.dispose();const t={attributions:this.commonLayer.credit,url:this.commonLayer.url,projection:"EPSG:4326",imageExtent:this.commonLayer.imageExtent};n["a"].hasSameOrigin(this.commonLayer.url)||(t.crossOrigin="anonymous"),this.olLayer=new ol.layer.Image({source:new ol.source.ImageStatic(t),opacity:this.commonLayer.opacity}),this.initialized=!0,e&&this.show(),this.updateSplitDirection()}}ue.registerSpecificLayerImpl(Di.className,qn.className,dy);var my=dy;class gy extends cy{static get className(){return"vcs.vcm.layer.openlayers.TMSBaseLayer"}constructor(e){e.className=gy.className,super(e)}getOLLayer(){const e={tileUrlFunction:e=>{const t=this.commonLayer.url.replace(/\/$/,""),i=`${t}/{z}/{x}/{y}.${this.commonLayer.format}`,s=(1<<e[0])- -e[2];return i.replace("{z}",e[0].toString()).replace("{x}",e[1].toString()).replace("{y}",s.toString())},tileSize:[this.commonLayer.tileWidth,this.commonLayer.tileHeight],minZoom:this.commonLayer.minLevel,maxZoom:this.commonLayer.maxLevel,wrapX:!1};n["a"].hasSameOrigin(this.commonLayer.url)||(e.crossOrigin="anonymous"),"geographic"===this.commonLayer.tilingSchema&&(e.projection="EPSG:4326");const t={source:new ol.source.XYZ(e),opacity:this.commonLayer.opacity};return this.commonLayer.extent.isValid()&&(t.extent=this.commonLayer.extent.getCoordinatesInProjection(J)),new ol.layer.Tile(t)}}ue.registerSpecificLayerImpl(Di.className,Qn.className,gy);var py=gy;class fy extends ny{static get className(){return"vcs.vcm.layer.openlayers.VectorClusterLayer"}constructor(e){e.className=fy.className,super(e)}}ue.registerSpecificLayerImpl(Di.className,$n.className,fy);var yy=fy;class _y extends cy{static get className(){return"vcs.vcm.layer.openlayers.WMSLayer"}constructor(e){e.className=_y.className,super(e)}show(){this.active||(super.show(),this.commonLayer.featureInfo&&this.commonLayer.activateFeatureInfo(!0))}hide(){this.active&&(super.hide(),this.commonLayer.featureInfo&&this.commonLayer.activateFeatureInfo(!1))}getOLLayer(){return this.commonLayer.setCommonSource(),new ol.layer.Tile({renderOrder:null,visible:!1,source:this.commonLayer.wmsSource,opacity:this.commonLayer.opacity})}updateLayer(){return!0}}ue.registerSpecificLayerImpl(Di.className,ra.className,_y);var vy=_y;class Ly extends cy{static get className(){return"vcs.vcm.layer.openlayers.WMTSLayer"}constructor(e){e.className=Ly.className,super(e)}getOLLayer(){let e=J;"geographic"===this.commonLayer.tilingSchema&&(e=q);const t=e.proj.getExtent();let i=ol.extent.getWidth(t)/this.commonLayer.tileSize[0];this.commonLayer.numberOfLevelZeroTilesX>1&&(i/=this.commonLayer.numberOfLevelZeroTilesX),"geographic"===this.commonLayer.tilingSchema&&(i=ol.extent.getWidth(t)/(2*this.commonLayer.tileSize[0]));const s=this.commonLayer.maxLevel+1,r=new Array(s);let a=new Array(s);for(let n=0;n<s;++n)r[n]=i/2**n,a[n]=String(this.commonLayer.tileMatrixPrefix)+String(n);this.commonLayer.matrixIds&&(this.commonLayer.matrixIds.length===s?({matrixIds:a}=this.commonLayer):this.logger.info("matrixIDs must have the same length as maxZoom"));const o=this.commonLayer.extent.getCoordinatesInProjection(e),l={origin:ol.extent.getTopLeft(t),extent:o,resolutions:r,matrixIds:a,minZoom:this.commonLayer.minLevel,tileSize:this.commonLayer.tileSize};if(this.commonLayer.numberOfLevelZeroTilesX>1||this.commonLayer.numberOfLevelZeroTilesY>1){const e=[];let{numberOfLevelZeroTilesX:t,numberOfLevelZeroTilesY:i}=this.commonLayer;for(let r=0;r<=s;r++)e.push([t,-i]),t*=2,i*=2;l.sizes=e}const c=new ol.tilegrid.WMTS(l),u=this.commonLayer.url.indexOf("{")>=0?"REST":"KVP",h={tileGrid:c,requestEncoding:u,layer:this.commonLayer.layer,style:this.commonLayer.wmtsStyle,format:this.commonLayer.format,matrixSet:this.commonLayer.tileMatrixSetID,url:this.commonLayer.url};return n["a"].hasSameOrigin(this.commonLayer.url)||(h.crossOrigin="anonymous"),"geographic"===this.commonLayer.tilingSchema&&(h.projection="EPSG:4326"),Object.assign(h,this.commonLayer.olOptions),new ol.layer.Tile({opacity:this.commonLayer.opacity,source:new ol.source.WMTS(h)})}}ue.registerSpecificLayerImpl(Di.className,aa.className,Ly);var My=Ly;function by(e,t){const i=j.getInstance(),s=i.getActiveMap(),r={};r.lang=i.getLocale(),r.layerToActivate=[],r.layerToDeactivate=[],i.getLayers().filter(e=>e[j.configContentSymbol]&&e.isSupported(s)).forEach(e=>{e.active!==e.activeOnStartup&&(e.active?r.layerToActivate.push(e.name):r.layerToDeactivate.push(e.name))}),r.layerToActivate.length||delete r.layerToActivate,r.layerToDeactivate.length||delete r.layerToDeactivate,delete e.queryParams.epsg,t&&(r.epsg=i.projection.epsg.match(/\d+/)[0]),e.addQueryParams(r);const n=i.getSelectBehavior();return n&&n.getLink(e),fe.getInstance().getLink(e),s.getLink(e).then(()=>e.toString()).catch(()=>e.toString())}function wy(e){const t=j.getInstance(),i=n["a"].parse(window.location.href);if(t.baseUrl){const e=n["a"].parse(t.baseUrl);i.base=e.base,i.path=e.path}const s=t.getWidgets();for(let r=0;r<s.length;r++)s[r].getLink(i);return by(i,e)}const Ty=v.getLogger("vcs.vcm.util.flight.FlightPlayer");class Sy{constructor(){this.destinationSpline=null,this.quaternionSpline=null,this.values={playing:!1,paused:!1,multiplier:1,activeInstance:null,repeat:!1,valid:!1},this.clock={startTime:0,endTime:0,currentTime:0,times:[],currentSystemTime:null},this._postRenderHandler=null,this._flightInstanceChangeHandler=null,this.screenSpaceCameraController=null,this.readyPromise=Promise.resolve(),j.getInstance().subscribe("MAP_ACTIVATED",()=>{this.stop()})}setActiveFlightInstance(e){a(e,el),this.values.playing&&this.stop(),this.values.activeInstance=e;const t=fe.getInstance();return t.values.walkmode&&t.activateOverviewMode(),this.readyPromise=e.ready.then(()=>{this.values.activeInstance===e&&(this._flightInstanceChangeHandler&&(this._flightInstanceChangeHandler(),this._flightInstanceChangeHandler=null),this.changeHandler(),this._flightInstanceChangeHandler=e.changed.addEventListener(this.changeHandler.bind(this)))}),this.readyPromise}clearActiveFlight(){this.values.playing&&this.stop(),this._flightInstanceChangeHandler&&(this._flightInstanceChangeHandler(),this._flightInstanceChangeHandler=null),this.values.activeInstance=null}async play(e){if(o(e,el),!e&&!this.values.activeInstance){const e="Player cannot play without activeInstance, provide a flightInstance or call setActiveInstance";throw Ty.error(e),new Error(e)}if(this._postRenderHandler&&(this._postRenderHandler(),this._postRenderHandler=null),e&&this.values.activeInstance!==e&&(await this.setActiveFlightInstance(e),this.values.activeInstance!==e))return;const t=j.getInstance().getActiveMap();if(t instanceof Pt){const e=t.getScene();this.screenSpaceCameraController=e.screenSpaceCameraController,this._postRenderHandler=e.postRender.addEventListener(this._cesiumPostRender.bind(this))}this.clock.currentSystemTime=null,this.values.playing=!0}_cesiumPostRender(e){const t=Date.now()/1e3;this.clock.currentSystemTime||(this.clock.currentSystemTime=t);const i=t-this.clock.currentSystemTime;if(this.clock.currentSystemTime=t,this.values.paused)return void(this.screenSpaceCameraController&&(this.screenSpaceCameraController.enableInputs=!0));if(this.clock.currentTime+=i*this.values.multiplier,this.clock.currentTime>this.clock.endTime){if(!this.values.repeat)return void this.stop();this.clock.currentTime-=this.clock.endTime}else if(this.clock.currentTime<this.clock.startTime){if(!this.values.repeat)return void(this.clock.currentTime=this.clock.startTime);this.clock.currentTime=this.clock.endTime+this.clock.currentTime}const s={destination:this.destinationSpline.evaluate(this.clock.currentTime),orientation:Cesium.HeadingPitchRoll.fromQuaternion(this.quaternionSpline.evaluate(this.clock.currentTime))};e.camera.setView(s),this.screenSpaceCameraController&&(this.screenSpaceCameraController.enableInputs=!1)}stop(){this._postRenderHandler&&(this._postRenderHandler(),this._postRenderHandler=null),this.screenSpaceCameraController&&(this.screenSpaceCameraController.enableInputs=!0),this.values.playing=!1,this.values.paused=!1,this.clock.currentTime=0,this.clock.currentSystemTime=null}goToTime(e){if(this.values.activeInstance&&this.values.activeInstance.isValid()){if(e>this.clock.endTime)Ty.warning(`time: ${e} out of range`);else if(this.clock.currentTime=e,this.clock.currentSystemTime=null,!this.values.playing||this.values.playing&&this.values.paused){const e=j.getInstance().getActiveMap();if(e instanceof Pt){const t={destination:this.destinationSpline.evaluate(this.clock.currentTime),orientation:Cesium.HeadingPitchRoll.fromQuaternion(this.quaternionSpline.evaluate(this.clock.currentTime))};e.getScene().camera.setView(t)}}}else Ty.warning("cannot go to time on missing or invalid flight")}forward(){const e=this.clock.currentTime,t=this.clock.times.find(t=>t>e)||this.clock.times[this.clock.times.length-1];this.goToTime(t)}backward(){const e=this.clock.currentTime;let t=this.clock.times.findIndex(t=>t>=e)-1;this.backedBefore&&(t-=1,clearTimeout(this.backedBeforeTimeout)),t<0&&(t=0);const i=this.clock.times[t];this.goToTime(i),this.backedBefore=!0,this.backedBeforeTimeout=setTimeout(()=>{this.backedBefore=!1},700)}changeHandler(){this.values.activeInstance&&(this.values.valid=this.values.activeInstance.isValid(),this.values.valid&&this._updateSplines())}_updateSplines(){const{loop:e,viewpoints:t}=this.values.activeInstance,i=e?t.length+1:t.length,s=new Array(i),r=new Array(i),n=new Array(i);t.forEach((e,i)=>{if(s[i]=Cesium.Cartesian3.fromDegrees(e.cameraPosition[0],e.cameraPosition[1],e.cameraPosition[2]),r[i]=Cesium.Quaternion.fromHeadingPitchRoll(Cesium.HeadingPitchRoll.fromDegrees(e.heading,e.pitch,e.roll)),i>0){const e=t[i-1];e.duration||(e.duration=Cesium.Cartesian3.distance(s[i-1],s[i])/300||1),n[i]=n[i-1]+e.duration}else n[i]=0}),e&&(s[i-1]=Cesium.Cartesian3.fromDegrees(t[0].cameraPosition[0],t[0].cameraPosition[1],t[0].cameraPosition[2]),r[i-1]=Cesium.Quaternion.fromHeadingPitchRoll(Cesium.HeadingPitchRoll.fromDegrees(t[0].heading,t[0].pitch,t[0].roll)),t[i-2].duration||(t[i-2].duration=Cesium.Cartesian3.distance(s[i-2],s[i-1])/300||1),n[i-1]=n[i-2]+t[i-2].duration),this.destinationSpline=this.values.activeInstance.interpolation===Xo.SPLINE?new Cesium.CatmullRomSpline({times:n,points:s}):new Cesium.LinearSpline({times:n,points:s}),this.quaternionSpline=new Cesium.QuaternionSpline({times:n,points:r}),this.clock.endTime=n[i-1],this.clock.times=n,this.values.repeat=e}}let Cy;function Ey(){return Cy||(Cy=new Sy),Cy}const Iy=v.getLogger("vcs.vcm.util.flight.FlightVisualizer");let ky=null;const Dy=new Cesium.Cartographic;class Oy{constructor(){this.extent=ol.extent.createEmpty(),this.flightLayer=new ss({projection:q,name:"_scratchFlightLayer",style:{declarativeStyle:{labelText:"${title}",image:"false",color:'color("#333333")',strokeWidth:"2"}},altitudeMode:"absolute"}),this._primitives=new Cesium.PrimitiveCollection,this.activeInstance=null,this._flightInstanceChangeHandler=null,this._mapActivatedListener=j.getInstance().subscribe("MAP_ACTIVATED",()=>{this.hide()})}_createFeatures(){this.flightLayer.removeAllFeatures();const e=j.getInstance().getMapByType(Pt.className);if(!e)return void Iy.error("could not find a cesium map!");const t=e.getScene();this._primitives.removeAll();const i=this.activeInstance.viewpoints.map((e,i)=>{const s=new Cesium.Camera(t);return s.frustum.far=200,s.frustum.near=10,s.setView({destination:Cesium.Cartesian3.fromDegrees(e.cameraPosition[0],e.cameraPosition[1],e.cameraPosition[2]),orientation:Cesium.HeadingPitchRoll.fromDegrees(e.heading,e.pitch,e.roll)}),this._primitives.add(new Cesium.VcsCameraPrimitve({camera:s,allowPicking:!1})),new ol.Feature({geometry:new ol.geom.Point(e.cameraPosition,"XYZ"),title:e.name||`${w.getInstance().getSingleMessage("i18n_viewpointeditor_number")} ${i+1}`,duration:e.duration})});if(this.activeInstance.isValid()){const e=[],t=Ey();if(t.values.activeInstance===this.activeInstance){if(this.activeInstance.interpolation===Xo.SPLINE){const i=i=>{Cesium.Cartographic.fromCartesian(t.destinationSpline.evaluate(i),null,Dy),e.push([Cesium.Math.toDegrees(Dy.longitude),Cesium.Math.toDegrees(Dy.latitude),Dy.height])},{endTime:s}=t.clock,r=s/.2>500?s/500:.2;for(let e=0;e<s;e+=r)i(e);i(s)}else i.forEach(t=>{e.push(t.getGeometry().getCoordinates())}),this.activeInstance.loop&&e.push(e[0]);const s=new ol.Feature({geometry:new ol.geom.LineString(e),title:"Flight Path"});s.setId("flightPathGeom"),i.push(s)}this.flightLayer.addFeatures(i);const s=this.flightLayer.getSource().getExtent();this.extent=B(s,s,2)}}_makeDirty(){this.flightLayer.active&&this._createFeatures()}visualizeFlight(e){a(e,el);const t=j.getInstance().getMapByType(Pt.className);if(!t)return Iy.error("could not find a cesium map!"),Promise.reject(new Error("could not find cesium map"));const i=Ey();return i.values.activeInstance!==e&&i.setActiveFlightInstance(e),i.readyPromise.then(()=>{if(i.values.activeInstance!==e)return;this._flightInstanceChangeHandler&&(this._flightInstanceChangeHandler(),this._flightInstanceChangeHandler=null),this._flightInstanceChangeHandler=e.changed.addEventListener(this._makeDirty.bind(this)),this.activeInstance=e,this._createFeatures(),this.flightLayer.activate();const s=t.getScene();this._primitives.show=!0,s.primitives.contains(this._primitives)||s.primitives.add(this._primitives)})}hide(){this.flightLayer.deactivate(),this._primitives.show=!1}dispose(){j.getInstance().unsubscribeByKey(this._mapActivatedListener),this.flightLayer.dispose(),this._primitives.destroy(),ky=null}zoomToExtent(){if(!this.activeInstance||!this.activeInstance.isValid()||ol.extent.isEmpty(this.extent))return;const e=me.createViewPointFromExtent(this.extent),t=j.getInstance();t.getActiveMap().gotoViewPoint(e)}}function Py(){return ky||(ky=new Oy),ky}let Ay;class xy{constructor(){this.editor=new Ql({featureLayerEditor:{},geometryLayerEditor:{defaultMode:"select",allowedGeometries:["Point"]}}),this.feature=null,this.properties=null,this.planningComment=null,this._modeChangeListener=null,this._new=!1}initialize(){this.editor.initialize()}activate(e){o(e,Ko),this.editor.activate(),e&&this.setPlanningComment(e)}deactivate(){this.editor.deactivate(),this.clear()}setPlanningComment(e){a(e,Ko),this.planningComment=e;const t=e.getLayer();this.editor.activeLayer=t,this.editor.getFeatureLayerEditor().activeLayer=t,this.editor.getGeometryLayerEditor().activeLayer=t}edit(e){a(e,String),a(this.planningComment,Ko);const t=this.planningComment.getLayer().getFeatureById(e);if(!t)throw new Error("cannot find feature with id: "+e);this._setFeature(t),this.planningComment.lookAt(e),this.editor.setMode(Wi.SELECT),this.editor.selectFeatureInteraction.selectFeature(t),this._new=!1}setCommentType(e){a(e,Object.values(qo)),a(this.planningComment,Ko),a(this.feature,ol.Feature),this.properties.commentType=e,this.feature.set("commentType",this.properties.commentType)}create(e){const t=this.editor.getGeometryLayerEditor().createFeature("Point");this._setFeature(t),this.planningComment.getLayer().addFeatures([t]),this._modeChangeListener&&this._modeChangeListener(),this.editor.getGeometryLayerEditor().setModeAndSelectFeature(Wi.CREATE,t),this._modeChangeListener=this.editor.modeChange.addEventListener(()=>{this._modeChangeListener(),this._modeChangeListener=null,e&&e()}),this._new=!0}_setFeature(e){this._clearFeature();const{featureTypeSymbol:t}=this.editor.state;e[t]=qi.EDITABLE;const i=e.getProperties();delete i.geometry,i.commentType=i.commentType||qo.DEFAULT,this.properties=i,this.feature=e}save(){try{a(this.feature,ol.Feature),a(this.properties,{title:String,description:String,commentType:Object.values(qo)})}catch(e){return Promise.reject(e)}return this.feature.set("title",this.properties.title,!0),this.feature.set("description",this.properties.description,!0),this.feature.set("commentType",this.properties.commentType,!0),this._new?this.planningComment.addComment(this.feature):this.planningComment.editComment(this.feature)}reset(){if(this.feature){if(this._new)this.planningComment.getLayer().removeFeaturesById([this.feature.getId()]);else{const e=this.planningComment.comments.find(e=>e.id===this.feature.getId());this.feature.setProperties(e.properties,!0),this.feature.setGeometry(new ol.geom.Point(W.wgs84ToMercator(e.geometry.coordinates)))}this._clearFeature()}}_clearFeature(){if(this.feature){const{featureTypeSymbol:e}=this.editor.state;delete this.feature[e]}this.feature=null,this.properties=null,this._new=!1}clear(){this.planningComment=null,this._clearFeature(),this._modeChangeListener&&(this._modeChangeListener(),this._modeChangeListener=null)}destroy(){this.clear(),this.editor.destroy(),Ay&&(Ay=void 0)}}function Yy(){return Ay||(Ay=new xy,Ay.initialize()),Ay}class jy extends qh{static get className(){return"vcs.vcm.widgets.search.ErrorItem"}constructor(){super({className:jy.className})}}var Ny=jy;class Fy extends se{constructor(e){super(),this.viewshed=e,this.finished=new Cesium.Event,this._defaultActive=X.CLICKMOVE,this.setActive()}async pipe(e){if(e.position)if(e.type&X.MOVE)this._position?this.viewshed.spot&&this.viewshed.lookAt(W.mercatorToWgs84(e.position)):this.viewshed.position=W.mercatorToWgs84(e.position);else{if(!this._position&&(this.viewshed.position=W.mercatorToWgs84(e.position),this.viewshed.spot))return this._position=!0,e;this.viewshed.spot&&this.viewshed.lookAt(W.mercatorToWgs84(e.position)),this.setActive(!1),this.finished.raiseEvent(),e.stopPropagation=!0}return e}setActive(e){super.setActive(e),this.active?(vs().featureInteraction.setActive(X.CLICKMOVE),vs().featureInteraction.pickPosition=X.CLICKMOVE,this._position=!1):vs().featureInteraction.setActive()}}var Ry=Fy;ol.geom.Circle.prototype.getCoordinates=function(){return[this.getCenter(),this.getLastCoordinate()]},ol.geom.Circle.prototype.setCoordinates=function(e,t){a(e,[[Number]]),a(e.length,2);const i=t||this.getLayout(),s=/XYM?/.test(i)?qt:Jt;this.setCenterAndRadius(e[0],s(...e),t)},ol.geom.Circle.prototype.rotate=function(e,t){},ol.geom.GeometryCollection.prototype.getCoordinates=function(){return this.getGeometries().map(e=>e.getCoordinates())},ol.geom.GeometryCollection.prototype.setCoordinates=function(e,t){a(e,Array),a(e.length,this.getGeometries().length),this.setGeometries(this.getGeometries().map((i,s)=>(i.setCoordinates(e[s],t),i)))},ol.geom.GeometryCollection.prototype.getLayout=function(){const e=this.getGeometries()[0];return e?e.getLayout():"XYZ"};i(630),i(631),i(632),i(633);const Hy={};window["vcs"]=Hy,Hy.Url=n["a"],Hy.check=a,Hy.checkMaybe=o,Hy.deepForEach=c["a"],Hy.eventCannotBeFromMap=c["b"],Hy.isEmail=c["d"],Hy.oblique={},Hy.oblique.viewDirectionNames=u["c"],Hy.parseBoolean=c["e"],Hy.parseEnumValue=c["f"],Hy.parseFloat=c["g"],Hy.parseInt=c["h"],Hy.vcm={},Hy.vcm.ExclusiveManager={},Hy.vcm.ExclusiveManager.getInstance=R,Hy.vcm.Framework=j,Hy.vcm.Framework.dispose=Tf,Hy.vcm.Framework.getObjectFromOptions=pf,Hy.vcm.Framework.init=bf,Hy.vcm.Framework.loadConfig=wf,Hy.vcm.NavigationMode=fe,Hy.vcm.SelectBehavior=E,Hy.vcm.cityGML={},Hy.vcm.cityGML.AllFeatureTypes=nu,Hy.vcm.cityGML.AllProperties=lu,Hy.vcm.cityGML.AllPropertiesDateGeneric=mu,Hy.vcm.cityGML.AllPropertiesDateNonGeneric=hu,Hy.vcm.cityGML.AllPropertiesValueGeneric=uu,Hy.vcm.cityGML.AllPropertiesValueNonGeneric=cu,Hy.vcm.cityGML.AllPropertiesYearNonGeneric=du,Hy.vcm.cityGML.AllSecondLevelFeatureTypes=au,Hy.vcm.cityGML.AllSemanticSurfaceFeatureTypes=ou,Hy.vcm.cityGML.Namespaces=ru,Hy.vcm.cityGML.TopLevelObjectClassIds=gu,Hy.vcm.cityGML.feature={},Hy.vcm.cityGML.feature.createFeatureTypes=th,Hy.vcm.cityGML.property={},Hy.vcm.cityGML.property.DataType=cc,Hy.vcm.cityGML.property.Property={},Hy.vcm.cityGML.property.Property.comparisons=hc,Hy.vcm.event={},Hy.vcm.event.EventType=L,Hy.vcm.i18n=w,Hy.vcm.interaction={},Hy.vcm.interaction.AbstractInteraction=se,Hy.vcm.interaction.BitCounter=Z,Hy.vcm.interaction.EventHandler={},Hy.vcm.interaction.EventHandler.getInstance=vs,Hy.vcm.interaction.EventType=X,Hy.vcm.interaction.InteractionChain=ne,Hy.vcm.interaction.ModificationKeyType=Q,Hy.vcm.interaction.PointerKeyType=$,Hy.vcm.layer={},Hy.vcm.layer.AbstractRasterLayer=Un,Hy.vcm.layer.CommonLayer=Vi,Hy.vcm.layer.CommonLayerImpl=Cf,Hy.vcm.layer.FeatureStore=fa,Hy.vcm.layer.FeatureStore.featureStoreState=Ts,Hy.vcm.layer.GeoJSON=Bn,Hy.vcm.layer.GeoJSON.getEPSGCodeFromGeojson=Ps,Hy.vcm.layer.GeoJSON.parseGeoJSON=Fs,Hy.vcm.layer.GeoJSON.updateLegacyFeature=As,Hy.vcm.layer.GeoJSON.writeGeoJSON=Hs,Hy.vcm.layer.GlobalHider={},Hy.vcm.layer.GlobalHider.getInstance=Lt,Hy.vcm.layer.Layer=Et,Hy.vcm.layer.OpenStreetMap=Kn,Hy.vcm.layer.SingleImage=qn,Hy.vcm.layer.TMSBase=Qn,Hy.vcm.layer.TiledLayer=Us,Hy.vcm.layer.Vector=ss,Hy.vcm.layer.VectorCluster=$n,Hy.vcm.layer.WFS=ta,Hy.vcm.layer.WMTS=aa,Hy.vcm.layer.WSV=ha,Hy.vcm.layer.Wms=ra,Hy.vcm.layer.cesium={},Hy.vcm.layer.cesium.AbstractCesiumTilesetLayer=Cn,Hy.vcm.layer.cesium.AsyncVectorImplementation=Df,Hy.vcm.layer.cesium.Buildings=Dn,Hy.vcm.layer.cesium.CesiumTilesetLayer=In,Hy.vcm.layer.cesium.CesiumTilesetLayerImpl=Pf,Hy.vcm.layer.cesium.Czml=xn,Hy.vcm.layer.cesium.Entities=Pn,Hy.vcm.layer.cesium.Gltf=jn,Hy.vcm.layer.cesium.ImageryLayer=xf,Hy.vcm.layer.cesium.OpenStreetMapLayer=jf,Hy.vcm.layer.cesium.PointCloud=Rn,Hy.vcm.layer.cesium.SingleImageLayer=Ff,Hy.vcm.layer.cesium.TMSBaseLayer=Hf,Hy.vcm.layer.cesium.Terrain=Gn,Hy.vcm.layer.cesium.VectorClusterLayer=zf,Hy.vcm.layer.cesium.VectorLayer=If,Hy.vcm.layer.cesium.WMSLayer=Vf,Hy.vcm.layer.cesium.WMTSLayer=Wf,Hy.vcm.layer.cesium.Wsv=Jf,Hy.vcm.layer.oblique={},Hy.vcm.layer.oblique.AsyncVectorImplementation=ty,Hy.vcm.layer.oblique.ObliqueLayer=bi,Hy.vcm.layer.oblique.VectorClusterLayer=sy,Hy.vcm.layer.oblique.VectorLayer=$f,Hy.vcm.layer.openlayers={},Hy.vcm.layer.openlayers.AsyncVectorImplementation=oy,Hy.vcm.layer.openlayers.Layer=Qf,Hy.vcm.layer.openlayers.OpenStreetMapLayer=hy,Hy.vcm.layer.openlayers.SingleImageLayer=my,Hy.vcm.layer.openlayers.TMSBaseLayer=py,Hy.vcm.layer.openlayers.VectorClusterLayer=yy,Hy.vcm.layer.openlayers.VectorLayer=ny,Hy.vcm.layer.openlayers.WMSLayer=vy,Hy.vcm.layer.openlayers.WMTSLayer=My,Hy.vcm.maps={},Hy.vcm.maps.Cesium=Pt,Hy.vcm.maps.Oblique=Ti,Hy.vcm.maps.Openlayers=Di,Hy.vcm.util={},Hy.vcm.util.Balloon=Sr,Hy.vcm.util.CreateLink={},Hy.vcm.util.CreateLink.getLink=by,Hy.vcm.util.CreateLink.makeLink=wy,Hy.vcm.util.Extent=Le,Hy.vcm.util.IconManager=ca,Hy.vcm.util.Logger=v,Hy.vcm.util.Login=Bo,Hy.vcm.util.Projection=W,Hy.vcm.util.SplitScreen={},Hy.vcm.util.SplitScreen.getInstance=wn,Hy.vcm.util.ViewPoint=me,Hy.vcm.util.attributeEditor={},Hy.vcm.util.attributeEditor.AbstractAttributeEditor=Lp,Hy.vcm.util.attributeEditor.Attribute=bp,Hy.vcm.util.attributeEditor.AttributeEditorFeature=fp,Hy.vcm.util.attributeEditor.Part=Sp,Hy.vcm.util.attributeEditor.Surface=Ep,Hy.vcm.util.attributeEditor.WfstAttributeEditor=Rp,Hy.vcm.util.attributeEditor.getAttributeEditorById=_p,Hy.vcm.util.clipping={},Hy.vcm.util.clipping.ClippingObject=Ks,Hy.vcm.util.clipping.ClippingObjectEditor=lp,Hy.vcm.util.clipping.ClippingObjectManager=Ln,Hy.vcm.util.clipping.copyClippingPlanesToCollection=un,Hy.vcm.util.clipping.createClippingFeature=fn,Hy.vcm.util.clipping.createClippingPlaneCollection=cn,Hy.vcm.util.clipping.getClippingObjectEditorById=ap,Hy.vcm.util.clipping.getClippingOptions=yn,Hy.vcm.util.downloadBlob=am,Hy.vcm.util.downloadCanvas=lm,Hy.vcm.util.downloadText=om,Hy.vcm.util.downloadURI=nm,Hy.vcm.util.editor={},Hy.vcm.util.editor.AltitudeModeNames=Zi,Hy.vcm.util.editor.CircleGeometryEditor=Vr,Hy.vcm.util.editor.ClassificationType=Qi,Hy.vcm.util.editor.ClassificationTypeNames=Xi,Hy.vcm.util.editor.CompositeLayerEditor=Ql,Hy.vcm.util.editor.FeatureLayerEditor=xl,Hy.vcm.util.editor.GeometryLayerEditor=Rl,Hy.vcm.util.editor.LineGeometryEditor=Gr,Hy.vcm.util.editor.ModeNames=Ji,Hy.vcm.util.editor.MultiGeometryEditor=Qr,Hy.vcm.util.editor.PointGeometryEditor=Dr,Hy.vcm.util.editor.RectangleGeometryEditor=gr,Hy.vcm.util.editor.StyleLayerEditor=Jl,Hy.vcm.util.editor.circleFromCenterRadius=ni,Hy.vcm.util.editor.convertGeometryToPolygon=ri,Hy.vcm.util.editor.getEditorById=To,Hy.vcm.util.editor.getFeatureHeights=ei,Hy.vcm.util.flight={},Hy.vcm.util.flight.FlightInstance=el,Hy.vcm.util.flight.FlightPlayer={},Hy.vcm.util.flight.FlightPlayer.getInstance=Ey,Hy.vcm.util.flight.FlightVisualizer={},Hy.vcm.util.flight.FlightVisualizer.getInstance=Py,Hy.vcm.util.flight.exportFlightAsGeoJson=Zo,Hy.vcm.util.flight.flightInterpolations=Xo,Hy.vcm.util.flight.parseFlightOptionsFromGeoJson=Qo,Hy.vcm.util.mercatorProjection=J,Hy.vcm.util.style={},Hy.vcm.util.style.DeclarativeStyleItem=gt,Hy.vcm.util.style.PatternType=Se,Hy.vcm.util.style.StyleItem=we,Hy.vcm.util.style.StyleType=Me,Hy.vcm.util.style.VectorStyleItem=et,Hy.vcm.util.style.VectorStyleItem.defaultVectorStyle=tt,Hy.vcm.util.style.VectorStyleItem.fromCesiumColor=it,Hy.vcm.util.style.combineFont=xe,Hy.vcm.util.style.createPattern=De,Hy.vcm.util.style.getShapeFromOptions=We,Hy.vcm.util.style.getStringColor=ke,Hy.vcm.util.style.hexToOlColor=Ce,Hy.vcm.util.style.olColorToHex=Oe,Hy.vcm.util.style.parseColor=Ie,Hy.vcm.util.style.parseFont=Ae,Hy.vcm.util.style.shapeCategory=Je,Hy.vcm.util.style.validateHexColor=Pe,Hy.vcm.util.style.vectorStyleSymbol=Xe,Hy.vcm.util.wgs84Projection=q,Hy.vcm.widgets={},Hy.vcm.widgets.AdvancedWalkMode=od,Hy.vcm.widgets.AttributeEditor=Gp,Hy.vcm.widgets.BalloonInfo=cd,Hy.vcm.widgets.ClippingTool=up,Hy.vcm.widgets.Copyright=hd,Hy.vcm.widgets.CreateLink=md,Hy.vcm.widgets.DisplayQuality=Fd,Hy.vcm.widgets.Drawing=zd,Hy.vcm.widgets.Drawing.defaultDrawingStyle=Hd,Hy.vcm.widgets.FeatureList=Im,Hy.vcm.widgets.Flight=Vg,Hy.vcm.widgets.Locator=Ah,Hy.vcm.widgets.Locator.LocatorShow=Dh,Hy.vcm.widgets.Measurement=sg,Hy.vcm.widgets.Measurement.defaultMeasurementStyle=tg,Hy.vcm.widgets.MultiView=dp,Hy.vcm.widgets.NavigationControls=lg,Hy.vcm.widgets.OverviewMap=ug,Hy.vcm.widgets.PDFCreator=Tg,Hy.vcm.widgets.PDFCreator.OrientationMode=_g,Hy.vcm.widgets.PositionDisplay=Ig,Hy.vcm.widgets.Query=Th,Hy.vcm.widgets.Shadow=Dg,Hy.vcm.widgets.SingleMeasurement=ng,Hy.vcm.widgets.TransparentTerrainMode=Ng,Hy.vcm.widgets.WFSObject=bh,Hy.vcm.widgets.WFSObject.AllLogicalRelations=Lh,Hy.vcm.widgets.WFSObject.AllLogicalRelationsDoubleValue=vh,Hy.vcm.widgets.WFSObject.AllLogicalRelationsSingleValue=_h,Hy.vcm.widgets.WFSObject.AllSpatialFilters=Mh,Hy.vcm.widgets.displayQuality={},Hy.vcm.widgets.displayQuality.PostProcessStageType=gd,Hy.vcm.widgets.export={},Hy.vcm.widgets.export.AbstractExportDataSource=im,Hy.vcm.widgets.export.AbstractExportResult=rm,Hy.vcm.widgets.export.Export=Cm,Hy.vcm.widgets.export.FileExportResult=um,Hy.vcm.widgets.export.GeoJSONExportDataSource=mm,Hy.vcm.widgets.export.ObliqueExportDataSource=Lm,Hy.vcm.widgets.export.ObliqueExportResult=ym,Hy.vcm.widgets.export.downloadObliqueImage=pm,Hy.vcm.widgets.heightProfile={},Hy.vcm.widgets.heightProfile.HeightProfile=ip,Hy.vcm.widgets.legend={},Hy.vcm.widgets.legend.AbstractGroupItem=Ta,Hy.vcm.widgets.legend.ClusterItem=Ca,Hy.vcm.widgets.legend.FlightInstanceItem=Za,Hy.vcm.widgets.legend.GroupItem=Na,Hy.vcm.widgets.legend.GroupLayerItem=Ya,Hy.vcm.widgets.legend.LayerItem=Pa,Hy.vcm.widgets.legend.Legend=ro,Hy.vcm.widgets.legend.PlanningClusterItem=qa,Hy.vcm.widgets.legend.PlanningClusterItem.getPlanningClusterItem=Ja,Hy.vcm.widgets.legend.PlanningInstanceItem=Ba,Hy.vcm.widgets.legend.PluginItem=Ra,Hy.vcm.widgets.legend.StyledLayerItem=$a,Hy.vcm.widgets.legend.TreeItem=ba,Hy.vcm.widgets.legend.ViewpointItem=Ga,Hy.vcm.widgets.measurement={},Hy.vcm.widgets.measurement.MeasurementType=en,Hy.vcm.widgets.planning={},Hy.vcm.widgets.planning.Planning=sc,Hy.vcm.widgets.planning.PlanningComment={},Hy.vcm.widgets.planning.PlanningComment.commentTypes=qo,Hy.vcm.widgets.planning.PlanningCommentEditor={},Hy.vcm.widgets.planning.PlanningCommentEditor.getInstance=Yy,Hy.vcm.widgets.planning.PlanningInstance=hl,Hy.vcm.widgets.planning.PlanningObject=lo,Hy.vcm.widgets.planning.PlanningObject.Status=ao,Hy.vcm.widgets.planning.PlanningObject.Type=no,Hy.vcm.widgets.planning.PlanningObjectDrawing=Oo,Hy.vcm.widgets.planning.PlanningObjectFeatureStore=No,Hy.vcm.widgets.planning.PlanningObjectGltf=mo,Hy.vcm.widgets.planning.PlanningObjectImage=po,Hy.vcm.widgets.planning.PlanningObjectProcessing=xo,Hy.vcm.widgets.planning.PlanningObjectTiled=ll,Hy.vcm.widgets.query={},Hy.vcm.widgets.query.filter={},Hy.vcm.widgets.query.filter.CombinationFilter=lh,Hy.vcm.widgets.query.filter.Filter=nh,Hy.vcm.widgets.query.filter.GeometryFilter=dh,Hy.vcm.widgets.query.filter.PropertyFilter=gh,Hy.vcm.widgets.search={},Hy.vcm.widgets.search.Elasticsearch=Yh,Hy.vcm.widgets.search.ErrorItem=Ny,Hy.vcm.widgets.search.FeatureItem=Kh,Hy.vcm.widgets.search.LayerItem=Qh,Hy.vcm.widgets.search.Nominatim=kh,Hy.vcm.widgets.search.ResultItem=qh,Hy.vcm.widgets.search.Search=ed,Hy.vcm.widgets.search.middleware={},Hy.vcm.widgets.search.middleware.Near=Bh,Hy.vcm.widgets.search.middleware.Tags=Hh,Hy.vcm.widgets.swipeTool={},Hy.vcm.widgets.swipeTool.SwipeTool=zg,Hy.vcm.widgets.viewshed={},Hy.vcm.widgets.viewshed.Viewshed=nf,Hy.vcm.widgets.viewshed.ViewshedInteraction=Ry,Hy.vcm.widgets.viewshed.createViewshedInstance=sf}]);