ulogger-server/js/dist/bundle.js
Bartek Fabiszewski ee63a492f5 Update js bundle
2020-12-26 23:26:12 +01:00

2 lines
240 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(){var t,e,n={6012:function(t,e,n){t.exports=n(3241)},5424:function(t,e,n){t.exports=n(3579)},4375:function(t,e,n){t.exports=n(3399)},7245:function(t,e,n){t.exports=n(7605)},5901:function(t,e,n){t.exports=n(7768)},6824:function(t,e,n){t.exports=n(8687)},1467:function(t,e,n){t.exports=n(6127)},5206:function(t,e,n){t.exports=n(6894)},5281:function(t,e,n){t.exports=n(6553)},2717:function(t,e,n){t.exports=n(1830)},2609:function(t,e,n){t.exports=n(4721)},4696:function(t,e,n){t.exports=n(5162)},5877:function(t,e,n){t.exports=n(6845)},1060:function(t,e,n){t.exports=n(9886)},509:function(t,e,n){t.exports=n(2939)},7526:function(t,e,n){t.exports=n(4205)},6235:function(t,e,n){t.exports=n(7772)},222:function(t,e,n){t.exports=n(4396)},589:function(t,e,n){t.exports=n(4242)},1624:function(t,e,n){t.exports=n(6841)},540:function(t,e,n){t.exports=n(1997)},9989:function(t,e,n){t.exports=n(9990)},9733:function(t,e,n){t.exports=n(8430)},8409:function(t,e,n){t.exports=n(4682)},9540:function(t,e,n){t.exports=n(8645)},2706:function(t,e,n){t.exports=n(9536)},543:function(t,e,n){t.exports=n(5227)},6544:function(t,e,n){t.exports=n(2556)},6206:function(t,e,n){t.exports=n(4823)},8396:function(t,e,n){t.exports=n(2255)},6130:function(t,e,n){t.exports=n(1209)},6330:function(t,e,n){t.exports=n(1483)},6950:function(t,e,n){t.exports=n(2162)},2554:function(t,e,n){t.exports=n(1665)},457:function(t,e,n){t.exports=n(8173)},7112:function(t,e,n){t.exports=n(263)},5244:function(t,e,n){t.exports=n(5204)},4061:function(t,e,n){t.exports=n(6017)},8889:function(t,e,n){t.exports=n(8945)},6142:function(t,e,n){t.exports=n(830)},1858:function(t,e,n){t.exports=n(343)},9533:function(t,e,n){t.exports=n(8993)},7828:function(t,e,n){t.exports=n(688)},8975:function(t,e,n){t.exports=n(1422)},8680:function(t,e,n){t.exports=n(9259)},5726:function(t,e,n){t.exports=n(8327)},3668:function(t,e,n){t.exports=n(6438)},61:function(t,e,n){t.exports=n(5365)},6460:function(t,e,n){t.exports=n(4338)},1685:function(t,e,n){t.exports=n(2538)},215:function(t,e,n){t.exports=n(499)},2829:function(t,e,n){t.exports=n(488)},6538:function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},8838:function(t,e,n){var r=n(457);t.exports=function(t){if(r(t))return t}},7558:function(t,e,n){var r=n(457),i=n(6538);t.exports=function(t){if(r(t))return i(t)}},7107:function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},552:function(t,e,n){var r=n(61);function i(t,e,n,i,o,a,s){try{var l=t[a](s),u=l.value}catch(t){return void n(t)}l.done?e(u):r.resolve(u).then(i,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new r((function(r,o){var a=t.apply(e,n);function s(t){i(a,r,o,s,l,"next",t)}function l(t){i(a,r,o,s,l,"throw",t)}s(void 0)}))}}},5161:function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},7365:function(t,e,n){var r=n(4061),i=n(6460),o=n(6682),a=n(7662);function s(e,n,l){return a()?t.exports=s=i:t.exports=s=function(t,e,n){var i=[null];i.push.apply(i,e);var a=new(r(Function).apply(t,i));return n&&o(a,n.prototype),a},s.apply(null,arguments)}t.exports=s},6580:function(t,e,n){var r=n(8975);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r(t,i.key,i)}}t.exports=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}},5327:function(t,e,n){var r=n(8680),i=n(1685),o=n(3230);function a(e,n,s){return"undefined"!=typeof Reflect&&i?t.exports=a=i:t.exports=a=function(t,e,n){var i=o(t,e);if(i){var a=r(i,e);return a.get?a.get.call(n):a.value}},a(e,n,s||e)}t.exports=a},5349:function(t,e,n){var r=n(5726),i=n(3668);function o(e){return t.exports=o=i?r:function(t){return t.__proto__||r(t)},o(e)}t.exports=o},9224:function(t,e,n){var r=n(7828),i=n(6682);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=r(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}},5510:function(t,e,n){var r=n(8889);t.exports=function(t){var e;return-1!==r(e=Function.toString.call(t)).call(e,"[native code]")}},7662:function(t,e,n){var r=n(6460);t.exports=function(){if("undefined"==typeof Reflect||!r)return!1;if(r.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(r(Date,[],(function(){}))),!0}catch(t){return!1}}},1860:function(t,e,n){var r=n(2554),i=n(1858),o=n(215);t.exports=function(t){if(void 0!==o&&i(Object(t)))return r(t)}},2659:function(t,e,n){var r=n(5244),i=n(1858),o=n(215);t.exports=function(t,e){if(void 0!==o&&i(Object(t))){var n=[],a=!0,s=!1,l=void 0;try{for(var u,c=r(t);!(a=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);a=!0);}catch(t){s=!0,l=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw l}}return n}}},1914:function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},4421:function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},4607:function(t,e,n){var r=n(1862),i=n(7107);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},6682:function(t,e,n){var r=n(3668);function i(e,n){return t.exports=i=r||function(t,e){return t.__proto__=e,t},i(e,n)}t.exports=i},3482:function(t,e,n){var r=n(8838),i=n(2659),o=n(6154),a=n(1914);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||a()}},3230:function(t,e,n){var r=n(5349);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},8174:function(t,e,n){var r=n(7558),i=n(1860),o=n(6154),a=n(4421);t.exports=function(t){return r(t)||i(t)||o(t)||a()}},1862:function(t,e,n){var r=n(2829),i=n(215);function o(e){return t.exports=o="function"==typeof i&&"symbol"==typeof r?function(t){return typeof t}:function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":typeof t},o(e)}t.exports=o},6154:function(t,e,n){var r=n(2554),i=n(6142),o=n(6538);t.exports=function(t,e){var n;if(t){if("string"==typeof t)return o(t,e);var a=i(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?r(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?o(t,e):void 0}}},8894:function(t,e,n){var r=n(7828),i=n(9533),o=n(5349),a=n(6682),s=n(5510),l=n(7365);function u(e){var n="function"==typeof i?new i:void 0;return t.exports=u=function(t){if(null===t||!s(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return l(t,arguments,o(this).constructor)}return e.prototype=r(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),a(e,t)},u(e)}t.exports=u},7448:function(t,e,n){t.exports=n(6760)},5826:function(t,e,n){var r,i,o;o=this,r=[n(274)],void 0===(i=function(t){return o.returnExportsGlobal=function(t){return function(t){"use strict";var e={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipTitle:!1},n={axisX:e,axisY:e},r=function(t){return t instanceof Function?t():t},i=function(t){return t instanceof Function?t():t};t.plugins=t.plugins||{},t.plugins.ctAxisTitle=function(e){return e=t.extend({},n,e),function(n){n.on("created",(function(n){if(!e.axisX.axisTitle&&!e.axisY.axisTitle)throw new Error("ctAxisTitle plugin - You must provide at least one axis title");if(!n.axisX&&!n.axisY)throw new Error("ctAxisTitle plugin can only be used on charts that have at least one axis");var o,a,s,l=t.normalizePadding(n.options.chartPadding);if(e.axisX.axisTitle&&n.axisX&&(o=n.axisX.axisLength/2+n.options.axisY.offset+l.left,a=l.top,"end"===n.options.axisY.position&&(o-=n.options.axisY.offset),"end"===n.options.axisX.position&&(a+=n.axisY.axisLength),(s=new t.Svg("text")).addClass(i(e.axisX.axisClass)),s.text(r(e.axisX.axisTitle)),s.attr({x:o+e.axisX.offset.x,y:a+e.axisX.offset.y,"text-anchor":e.axisX.textAnchor}),n.svg.append(s,!0)),e.axisY.axisTitle&&n.axisY){o=0,a=n.axisY.axisLength/2+l.top,"start"===n.options.axisX.position&&(a+=n.options.axisX.offset),"end"===n.options.axisY.position&&(o=n.axisX.axisLength);var u="rotate("+(e.axisY.flipTitle?-90:90)+", "+o+", "+a+")";(s=new t.Svg("text")).addClass(i(e.axisY.axisClass)),s.text(r(e.axisY.axisTitle)),s.attr({x:o+e.axisY.offset.x,y:a+e.axisY.offset.y,transform:u,"text-anchor":e.axisY.textAnchor}),n.svg.append(s,!0)}}))}}}(t),t.plugins.ctAxisTitle}(t)}.apply(e,r))||(t.exports=i)},274:function(t,e,n){var r,i;function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}i=this,void 0===(r=function(){return i.Chartist=function(){var t={version:"0.11.4"};return function(t,e){"use strict";var n=t.window,r=t.document;e.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},e.noop=function(t){return t},e.alphaNumerate=function(t){return String.fromCharCode(97+t%26)},e.extend=function(t){var n,r,i;for(t=t||{},n=1;n<arguments.length;n++)for(var a in r=arguments[n])"object"!==o(i=r[a])||null===i||i instanceof Array?t[a]=i:t[a]=e.extend(t[a],i);return t},e.replaceAll=function(t,e,n){return t.replace(new RegExp(e,"g"),n)},e.ensureUnit=function(t,e){return"number"==typeof t&&(t+=e),t},e.quantity=function(t){if("string"==typeof t){var e=/^(\d+)\s*(.*)$/g.exec(t);return{value:+e[1],unit:e[2]||void 0}}return{value:t}},e.querySelector=function(t){return t instanceof Node?t:r.querySelector(t)},e.times=function(t){return Array.apply(null,new Array(t))},e.sum=function(t,e){return t+(e||0)},e.mapMultiply=function(t){return function(e){return e*t}},e.mapAdd=function(t){return function(e){return e+t}},e.serialMap=function(t,n){var r=[],i=Math.max.apply(null,t.map((function(t){return t.length})));return e.times(i).forEach((function(e,i){var o=t.map((function(t){return t[i]}));r[i]=n.apply(null,o)})),r},e.roundWithPrecision=function(t,n){var r=Math.pow(10,n||e.precision);return Math.round(t*r)/r},e.precision=8,e.escapingMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"},e.serialize=function(t){return null==t?t:("number"==typeof t?t=""+t:"object"===o(t)&&(t=JSON.stringify({data:t})),Object.keys(e.escapingMap).reduce((function(t,n){return e.replaceAll(t,n,e.escapingMap[n])}),t))},e.deserialize=function(t){if("string"!=typeof t)return t;t=Object.keys(e.escapingMap).reduce((function(t,n){return e.replaceAll(t,e.escapingMap[n],n)}),t);try{t=void 0!==(t=JSON.parse(t)).data?t.data:t}catch(t){}return t},e.createSvg=function(t,n,r,i){var o;return n=n||"100%",r=r||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter((function(t){return t.getAttributeNS(e.namespaces.xmlns,"ct")})).forEach((function(e){t.removeChild(e)})),(o=new e.Svg("svg").attr({width:n,height:r}).addClass(i))._node.style.width=n,o._node.style.height=r,t.appendChild(o._node),o},e.normalizeData=function(t,n,r){var i,o={raw:t,normalized:{}};return o.normalized.series=e.getDataArray({series:t.series||[]},n,r),i=o.normalized.series.every((function(t){return t instanceof Array}))?Math.max.apply(null,o.normalized.series.map((function(t){return t.length}))):o.normalized.series.length,o.normalized.labels=(t.labels||[]).slice(),Array.prototype.push.apply(o.normalized.labels,e.times(Math.max(0,i-o.normalized.labels.length)).map((function(){return""}))),n&&e.reverseData(o.normalized),o},e.safeHasProperty=function(t,e){return null!==t&&"object"===o(t)&&t.hasOwnProperty(e)},e.isDataHoleValue=function(t){return null==t||"number"==typeof t&&isNaN(t)},e.reverseData=function(t){t.labels.reverse(),t.series.reverse();for(var e=0;e<t.series.length;e++)"object"===o(t.series[e])&&void 0!==t.series[e].data?t.series[e].data.reverse():t.series[e]instanceof Array&&t.series[e].reverse()},e.getDataArray=function(t,n,r){function i(t){if(e.safeHasProperty(t,"value"))return i(t.value);if(e.safeHasProperty(t,"data"))return i(t.data);if(t instanceof Array)return t.map(i);if(!e.isDataHoleValue(t)){if(r){var n={};return"string"==typeof r?n[r]=e.getNumberOrUndefined(t):n.y=e.getNumberOrUndefined(t),n.x=t.hasOwnProperty("x")?e.getNumberOrUndefined(t.x):n.x,n.y=t.hasOwnProperty("y")?e.getNumberOrUndefined(t.y):n.y,n}return e.getNumberOrUndefined(t)}}return t.series.map(i)},e.normalizePadding=function(t,e){return e=e||0,"number"==typeof t?{top:t,right:t,bottom:t,left:t}:{top:"number"==typeof t.top?t.top:e,right:"number"==typeof t.right?t.right:e,bottom:"number"==typeof t.bottom?t.bottom:e,left:"number"==typeof t.left?t.left:e}},e.getMetaData=function(t,e){var n=t.data?t.data[e]:t[e];return n?n.meta:void 0},e.orderOfMagnitude=function(t){return Math.floor(Math.log(Math.abs(t))/Math.LN10)},e.projectLength=function(t,e,n){return e/n.range*t},e.getAvailableHeight=function(t,n){return Math.max((e.quantity(n.height).value||t.height())-(n.chartPadding.top+n.chartPadding.bottom)-n.axisX.offset,0)},e.getHighLow=function(t,n,r){var i={high:void 0===(n=e.extend({},n,r?n["axis"+r.toUpperCase()]:{})).high?-Number.MAX_VALUE:+n.high,low:void 0===n.low?Number.MAX_VALUE:+n.low},o=void 0===n.high,a=void 0===n.low;function s(t){if(void 0!==t)if(t instanceof Array)for(var e=0;e<t.length;e++)s(t[e]);else{var n=r?+t[r]:+t;o&&n>i.high&&(i.high=n),a&&n<i.low&&(i.low=n)}}return(o||a)&&s(t),(n.referenceValue||0===n.referenceValue)&&(i.high=Math.max(n.referenceValue,i.high),i.low=Math.min(n.referenceValue,i.low)),i.high<=i.low&&(0===i.low?i.high=1:i.low<0?i.high=0:(i.high>0||(i.high=1),i.low=0)),i},e.isNumeric=function(t){return null!==t&&isFinite(t)},e.isFalseyButZero=function(t){return!t&&0!==t},e.getNumberOrUndefined=function(t){return e.isNumeric(t)?+t:void 0},e.isMultiValue=function(t){return"object"===o(t)&&("x"in t||"y"in t)},e.getMultiValue=function(t,n){return e.isMultiValue(t)?e.getNumberOrUndefined(t[n||"y"]):e.getNumberOrUndefined(t)},e.rho=function(t){if(1===t)return t;function e(t,n){return t%n==0?n:e(n,t%n)}function n(t){return t*t+1}var r,i=2,o=2;if(t%2==0)return 2;do{i=n(i)%t,o=n(n(o))%t,r=e(Math.abs(i-o),t)}while(1===r);return r},e.getBounds=function(t,n,r,i){var o,a,s,l=0,u={high:n.high,low:n.low};u.valueRange=u.high-u.low,u.oom=e.orderOfMagnitude(u.valueRange),u.step=Math.pow(10,u.oom),u.min=Math.floor(u.low/u.step)*u.step,u.max=Math.ceil(u.high/u.step)*u.step,u.range=u.max-u.min,u.numberOfSteps=Math.round(u.range/u.step);var c=e.projectLength(t,u.step,u)<r,f=i?e.rho(u.range):0;if(i&&e.projectLength(t,1,u)>=r)u.step=1;else if(i&&f<u.step&&e.projectLength(t,f,u)>=r)u.step=f;else for(;;){if(c&&e.projectLength(t,u.step,u)<=r)u.step*=2;else{if(c||!(e.projectLength(t,u.step/2,u)>=r))break;if(u.step/=2,i&&u.step%1!=0){u.step*=2;break}}if(l++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var h=2221e-19;function d(t,e){return t===(t+=e)&&(t*=1+(e>0?h:-h)),t}for(u.step=Math.max(u.step,h),a=u.min,s=u.max;a+u.step<=u.low;)a=d(a,u.step);for(;s-u.step>=u.high;)s=d(s,-u.step);u.min=a,u.max=s,u.range=u.max-u.min;var p=[];for(o=u.min;o<=u.max;o=d(o,u.step)){var v=e.roundWithPrecision(o);v!==p[p.length-1]&&p.push(v)}return u.values=p,u},e.polarToCartesian=function(t,e,n,r){var i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}},e.createChartRect=function(t,n,r){var i=!(!n.axisX&&!n.axisY),o=i?n.axisY.offset:0,a=i?n.axisX.offset:0,s=t.width()||e.quantity(n.width).value||0,l=t.height()||e.quantity(n.height).value||0,u=e.normalizePadding(n.chartPadding,r);s=Math.max(s,o+u.left+u.right),l=Math.max(l,a+u.top+u.bottom);var c={padding:u,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return i?("start"===n.axisX.position?(c.y2=u.top+a,c.y1=Math.max(l-u.bottom,c.y2+1)):(c.y2=u.top,c.y1=Math.max(l-u.bottom-a,c.y2+1)),"start"===n.axisY.position?(c.x1=u.left+o,c.x2=Math.max(s-u.right,c.x1+1)):(c.x1=u.left,c.x2=Math.max(s-u.right-o,c.x1+1))):(c.x1=u.left,c.x2=Math.max(s-u.right,c.x1+1),c.y2=u.top,c.y1=Math.max(l-u.bottom,c.y2+1)),c},e.createGrid=function(t,n,r,i,o,a,s,l){var u={};u[r.units.pos+"1"]=t,u[r.units.pos+"2"]=t,u[r.counterUnits.pos+"1"]=i,u[r.counterUnits.pos+"2"]=i+o;var c=a.elem("line",u,s.join(" "));l.emit("draw",e.extend({type:"grid",axis:r,index:n,group:a,element:c},u))},e.createGridBackground=function(t,e,n,r){var i=t.elem("rect",{x:e.x1,y:e.y2,width:e.width(),height:e.height()},n,!0);r.emit("draw",{type:"gridBackground",group:t,element:i})},e.createLabel=function(t,n,i,o,a,s,l,u,c,f,h){var d,p={};if(p[a.units.pos]=t+l[a.units.pos],p[a.counterUnits.pos]=l[a.counterUnits.pos],p[a.units.len]=n,p[a.counterUnits.len]=Math.max(0,s-10),f){var v=r.createElement("span");v.className=c.join(" "),v.setAttribute("xmlns",e.namespaces.xhtml),v.innerText=o[i],v.style[a.units.len]=Math.round(p[a.units.len])+"px",v.style[a.counterUnits.len]=Math.round(p[a.counterUnits.len])+"px",d=u.foreignObject(v,e.extend({style:"overflow: visible;"},p))}else d=u.elem("text",p,c.join(" ")).text(o[i]);h.emit("draw",e.extend({type:"label",axis:a,index:i,group:u,element:d,text:o[i]},p))},e.getSeriesOption=function(t,e,n){if(t.name&&e.series&&e.series[t.name]){var r=e.series[t.name];return r.hasOwnProperty(n)?r[n]:e[n]}return e[n]},e.optionsProvider=function(t,r,i){var o,a,s=e.extend({},t),l=[];function u(t){var l=o;if(o=e.extend({},s),r)for(a=0;a<r.length;a++)n.matchMedia(r[a][0]).matches&&(o=e.extend(o,r[a][1]));i&&t&&i.emit("optionsChanged",{previousOptions:l,currentOptions:o})}function c(){l.forEach((function(t){t.removeListener(u)}))}if(!n.matchMedia)throw"window.matchMedia not found! Make sure you're using a polyfill.";if(r)for(a=0;a<r.length;a++){var f=n.matchMedia(r[a][0]);f.addListener(u),l.push(f)}return u(),{removeMediaQueryListeners:c,getCurrentOptions:function(){return e.extend({},o)}}},e.splitIntoSegments=function(t,n,r){var i={increasingX:!1,fillHoles:!1};r=e.extend({},i,r);for(var o=[],a=!0,s=0;s<t.length;s+=2)void 0===e.getMultiValue(n[s/2].value)?r.fillHoles||(a=!0):(r.increasingX&&s>=2&&t[s]<=t[s-2]&&(a=!0),a&&(o.push({pathCoordinates:[],valueData:[]}),a=!1),o[o.length-1].pathCoordinates.push(t[s],t[s+1]),o[o.length-1].valueData.push(n[s/2]));return o}}(this||n.g,t),function(t,e){"use strict";e.Interpolation={},e.Interpolation.none=function(t){var n={fillHoles:!1};return t=e.extend({},n,t),function(n,r){for(var i=new e.Svg.Path,o=!0,a=0;a<n.length;a+=2){var s=n[a],l=n[a+1],u=r[a/2];void 0!==e.getMultiValue(u.value)?(o?i.move(s,l,!1,u):i.line(s,l,!1,u),o=!1):t.fillHoles||(o=!0)}return i}},e.Interpolation.simple=function(t){var n={divisor:2,fillHoles:!1};t=e.extend({},n,t);var r=1/Math.max(1,t.divisor);return function(n,i){for(var o,a,s,l=new e.Svg.Path,u=0;u<n.length;u+=2){var c=n[u],f=n[u+1],h=(c-o)*r,d=i[u/2];void 0!==d.value?(void 0===s?l.move(c,f,!1,d):l.curve(o+h,a,c-h,f,c,f,!1,d),o=c,a=f,s=d):t.fillHoles||(o=c=s=void 0)}return l}},e.Interpolation.cardinal=function(t){var n={tension:1,fillHoles:!1};t=e.extend({},n,t);var r=Math.min(1,Math.max(0,t.tension)),i=1-r;return function n(o,a){var s=e.splitIntoSegments(o,a,{fillHoles:t.fillHoles});if(s.length){if(s.length>1){var l=[];return s.forEach((function(t){l.push(n(t.pathCoordinates,t.valueData))})),e.Svg.Path.join(l)}if(o=s[0].pathCoordinates,a=s[0].valueData,o.length<=4)return e.Interpolation.none()(o,a);for(var u,c=(new e.Svg.Path).move(o[0],o[1],!1,a[0]),f=0,h=o.length;h-2*!u>f;f+=2){var d=[{x:+o[f-2],y:+o[f-1]},{x:+o[f],y:+o[f+1]},{x:+o[f+2],y:+o[f+3]},{x:+o[f+4],y:+o[f+5]}];u?f?h-4===f?d[3]={x:+o[0],y:+o[1]}:h-2===f&&(d[2]={x:+o[0],y:+o[1]},d[3]={x:+o[2],y:+o[3]}):d[0]={x:+o[h-2],y:+o[h-1]}:h-4===f?d[3]=d[2]:f||(d[0]={x:+o[f],y:+o[f+1]}),c.curve(r*(-d[0].x+6*d[1].x+d[2].x)/6+i*d[2].x,r*(-d[0].y+6*d[1].y+d[2].y)/6+i*d[2].y,r*(d[1].x+6*d[2].x-d[3].x)/6+i*d[2].x,r*(d[1].y+6*d[2].y-d[3].y)/6+i*d[2].y,d[2].x,d[2].y,!1,a[(f+2)/2])}return c}return e.Interpolation.none()([])}},e.Interpolation.monotoneCubic=function(t){var n={fillHoles:!1};return t=e.extend({},n,t),function n(r,i){var o=e.splitIntoSegments(r,i,{fillHoles:t.fillHoles,increasingX:!0});if(o.length){if(o.length>1){var a=[];return o.forEach((function(t){a.push(n(t.pathCoordinates,t.valueData))})),e.Svg.Path.join(a)}if(r=o[0].pathCoordinates,i=o[0].valueData,r.length<=4)return e.Interpolation.none()(r,i);var s,l,u=[],c=[],f=r.length/2,h=[],d=[],p=[],v=[];for(s=0;s<f;s++)u[s]=r[2*s],c[s]=r[2*s+1];for(s=0;s<f-1;s++)p[s]=c[s+1]-c[s],v[s]=u[s+1]-u[s],d[s]=p[s]/v[s];for(h[0]=d[0],h[f-1]=d[f-2],s=1;s<f-1;s++)0===d[s]||0===d[s-1]||d[s-1]>0!=d[s]>0?h[s]=0:(h[s]=3*(v[s-1]+v[s])/((2*v[s]+v[s-1])/d[s-1]+(v[s]+2*v[s-1])/d[s]),isFinite(h[s])||(h[s]=0));for(l=(new e.Svg.Path).move(u[0],c[0],!1,i[0]),s=0;s<f-1;s++)l.curve(u[s]+v[s]/3,c[s]+h[s]*v[s]/3,u[s+1]-v[s]/3,c[s+1]-h[s+1]*v[s]/3,u[s+1],c[s+1],!1,i[s+1]);return l}return e.Interpolation.none()([])}},e.Interpolation.step=function(t){var n={postpone:!0,fillHoles:!1};return t=e.extend({},n,t),function(n,r){for(var i,o,a,s=new e.Svg.Path,l=0;l<n.length;l+=2){var u=n[l],c=n[l+1],f=r[l/2];void 0!==f.value?(void 0===a?s.move(u,c,!1,f):(t.postpone?s.line(u,o,!1,a):s.line(i,c,!1,f),s.line(u,c,!1,f)),i=u,o=c,a=f):t.fillHoles||(i=o=a=void 0)}return s}}}(this||n.g,t),function(t,e){"use strict";e.EventEmitter=function(){var t=[];function e(e,n){t[e]=t[e]||[],t[e].push(n)}function n(e,n){t[e]&&(n?(t[e].splice(t[e].indexOf(n),1),0===t[e].length&&delete t[e]):delete t[e])}function r(e,n){t[e]&&t[e].forEach((function(t){t(n)})),t["*"]&&t["*"].forEach((function(t){t(e,n)}))}return{addEventHandler:e,removeEventHandler:n,emit:r}}}(this||n.g,t),function(t,e){"use strict";function n(t){var e=[];if(t.length)for(var n=0;n<t.length;n++)e.push(t[n]);return e}function r(t,n){var r=n||this.prototype||e.Class,i=Object.create(r);e.Class.cloneDefinitions(i,t);var o=function(){var t,n=i.constructor||function(){};return t=this===e?Object.create(i):this,n.apply(t,Array.prototype.slice.call(arguments,0)),t};return o.prototype=i,o.super=r,o.extend=this.extend,o}function i(){var t=n(arguments),e=t[0];return t.splice(1,t.length-1).forEach((function(t){Object.getOwnPropertyNames(t).forEach((function(n){delete e[n],Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))})),e}e.Class={extend:r,cloneDefinitions:i}}(this||n.g,t),function(t,e){"use strict";var n=t.window;function r(t,n,r){return t&&(this.data=t||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),n&&(this.options=e.extend({},r?this.options:this.defaultOptions,n),this.initializeTimeoutId||(this.optionsProvider.removeMediaQueryListeners(),this.optionsProvider=e.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter))),this.initializeTimeoutId||this.createChart(this.optionsProvider.getCurrentOptions()),this}function i(){return this.initializeTimeoutId?n.clearTimeout(this.initializeTimeoutId):(n.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this}function o(t,e){return this.eventEmitter.addEventHandler(t,e),this}function a(t,e){return this.eventEmitter.removeEventHandler(t,e),this}function s(){n.addEventListener("resize",this.resizeListener),this.optionsProvider=e.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.addEventHandler("optionsChanged",function(){this.update()}.bind(this)),this.options.plugins&&this.options.plugins.forEach(function(t){t instanceof Array?t[0](this,t[1]):t(this)}.bind(this)),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=void 0}function l(t,n,r,i,o){this.container=e.querySelector(t),this.data=n||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.defaultOptions=r,this.options=i,this.responsiveOptions=o,this.eventEmitter=e.EventEmitter(),this.supportsForeignObject=e.Svg.isSupported("Extensibility"),this.supportsAnimations=e.Svg.isSupported("AnimationEventsAttribute"),this.resizeListener=function(){this.update()}.bind(this),this.container&&(this.container.__chartist__&&this.container.__chartist__.detach(),this.container.__chartist__=this),this.initializeTimeoutId=setTimeout(s.bind(this),0)}e.Base=e.Class.extend({constructor:l,optionsProvider:void 0,container:void 0,svg:void 0,eventEmitter:void 0,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:r,detach:i,on:o,off:a,version:e.version,supportsForeignObject:!1})}(this||n.g,t),function(t,e){"use strict";var n=t.document;function r(t,r,i,o,a){t instanceof Element?this._node=t:(this._node=n.createElementNS(e.namespaces.svg,t),"svg"===t&&this.attr({"xmlns:ct":e.namespaces.ct})),r&&this.attr(r),i&&this.addClass(i),o&&(a&&o._node.firstChild?o._node.insertBefore(this._node,o._node.firstChild):o._node.appendChild(this._node))}function i(t,n){return"string"==typeof t?n?this._node.getAttributeNS(n,t):this._node.getAttribute(t):(Object.keys(t).forEach(function(n){if(void 0!==t[n])if(-1!==n.indexOf(":")){var r=n.split(":");this._node.setAttributeNS(e.namespaces[r[0]],n,t[n])}else this._node.setAttribute(n,t[n])}.bind(this)),this)}function o(t,n,r,i){return new e.Svg(t,n,r,this,i)}function a(){return this._node.parentNode instanceof SVGElement?new e.Svg(this._node.parentNode):null}function s(){for(var t=this._node;"svg"!==t.nodeName;)t=t.parentNode;return new e.Svg(t)}function l(t){var n=this._node.querySelector(t);return n?new e.Svg(n):null}function u(t){var n=this._node.querySelectorAll(t);return n.length?new e.Svg.List(n):null}function c(){return this._node}function f(t,r,i,o){if("string"==typeof t){var a=n.createElement("div");a.innerHTML=t,t=a.firstChild}t.setAttribute("xmlns",e.namespaces.xmlns);var s=this.elem("foreignObject",r,i,o);return s._node.appendChild(t),s}function h(t){return this._node.appendChild(n.createTextNode(t)),this}function d(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this}function p(){return this._node.parentNode.removeChild(this._node),this.parent()}function v(t){return this._node.parentNode.replaceChild(t._node,this._node),t}function m(t,e){return e&&this._node.firstChild?this._node.insertBefore(t._node,this._node.firstChild):this._node.appendChild(t._node),this}function y(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]}function g(t){return this._node.setAttribute("class",this.classes(this._node).concat(t.trim().split(/\s+/)).filter((function(t,e,n){return n.indexOf(t)===e})).join(" ")),this}function b(t){var e=t.trim().split(/\s+/);return this._node.setAttribute("class",this.classes(this._node).filter((function(t){return-1===e.indexOf(t)})).join(" ")),this}function x(){return this._node.setAttribute("class",""),this}function w(){return this._node.getBoundingClientRect().height}function k(){return this._node.getBoundingClientRect().width}function S(t,n,r){return void 0===n&&(n=!0),Object.keys(t).forEach(function(i){function o(t,n){var o,a,s,l={};t.easing&&(s=t.easing instanceof Array?t.easing:e.Svg.Easing[t.easing],delete t.easing),t.begin=e.ensureUnit(t.begin,"ms"),t.dur=e.ensureUnit(t.dur,"ms"),s&&(t.calcMode="spline",t.keySplines=s.join(" "),t.keyTimes="0;1"),n&&(t.fill="freeze",l[i]=t.from,this.attr(l),a=e.quantity(t.begin||0).value,t.begin="indefinite"),o=this.elem("animate",e.extend({attributeName:i},t)),n&&setTimeout(function(){try{o._node.beginElement()}catch(e){l[i]=t.to,this.attr(l),o.remove()}}.bind(this),a),r&&o._node.addEventListener("beginEvent",function(){r.emit("animationBegin",{element:this,animate:o._node,params:t})}.bind(this)),o._node.addEventListener("endEvent",function(){r&&r.emit("animationEnd",{element:this,animate:o._node,params:t}),n&&(l[i]=t.to,this.attr(l),o.remove())}.bind(this))}t[i]instanceof Array?t[i].forEach(function(t){o.bind(this)(t,!1)}.bind(this)):o.bind(this)(t[i],n)}.bind(this)),this}e.Svg=e.Class.extend({constructor:r,attr:i,elem:o,parent:a,root:s,querySelector:l,querySelectorAll:u,getNode:c,foreignObject:f,text:h,empty:d,remove:p,replace:v,append:m,classes:y,addClass:g,removeClass:b,removeAllClasses:x,height:w,width:k,animate:S}),e.Svg.isSupported=function(t){return n.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+t,"1.1")};var E={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQuad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]};function A(t){var n=this;this.svgElements=[];for(var r=0;r<t.length;r++)this.svgElements.push(new e.Svg(t[r]));Object.keys(e.Svg.prototype).filter((function(t){return-1===["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(t)})).forEach((function(t){n[t]=function(){var r=Array.prototype.slice.call(arguments,0);return n.svgElements.forEach((function(n){e.Svg.prototype[t].apply(n,r)})),n}}))}e.Svg.Easing=E,e.Svg.List=e.Class.extend({constructor:A})}(this||n.g,t),function(t,e){"use strict";var n={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},r={accuracy:3};function i(t,n,r,i,o,a){var s=e.extend({command:o?t.toLowerCase():t.toUpperCase()},n,a?{data:a}:{});r.splice(i,0,s)}function o(t,e){t.forEach((function(r,i){n[r.command.toLowerCase()].forEach((function(n,o){e(r,n,i,o,t)}))}))}function a(t,n){this.pathElements=[],this.pos=0,this.close=t,this.options=e.extend({},r,n)}function s(t){return void 0!==t?(this.pos=Math.max(0,Math.min(this.pathElements.length,t)),this):this.pos}function l(t){return this.pathElements.splice(this.pos,t),this}function u(t,e,n,r){return i("M",{x:+t,y:+e},this.pathElements,this.pos++,n,r),this}function c(t,e,n,r){return i("L",{x:+t,y:+e},this.pathElements,this.pos++,n,r),this}function f(t,e,n,r,o,a,s,l){return i("C",{x1:+t,y1:+e,x2:+n,y2:+r,x:+o,y:+a},this.pathElements,this.pos++,s,l),this}function h(t,e,n,r,o,a,s,l,u){return i("A",{rx:+t,ry:+e,xAr:+n,lAf:+r,sf:+o,x:+a,y:+s},this.pathElements,this.pos++,l,u),this}function d(t){var r=t.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce((function(t,e){return e.match(/[A-Za-z]/)&&t.push([]),t[t.length-1].push(e),t}),[]);"Z"===r[r.length-1][0].toUpperCase()&&r.pop();var i=r.map((function(t){var r=t.shift(),i=n[r.toLowerCase()];return e.extend({command:r},i.reduce((function(e,n,r){return e[n]=+t[r],e}),{}))})),o=[this.pos,0];return Array.prototype.push.apply(o,i),Array.prototype.splice.apply(this.pathElements,o),this.pos+=i.length,this}function p(){var t=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(function(e,r){var i=n[r.command.toLowerCase()].map(function(e){return this.options.accuracy?Math.round(r[e]*t)/t:r[e]}.bind(this));return e+r.command+i.join(",")}.bind(this),"")+(this.close?"Z":"")}function v(t,e){return o(this.pathElements,(function(n,r){n[r]*="x"===r[0]?t:e})),this}function m(t,e){return o(this.pathElements,(function(n,r){n[r]+="x"===r[0]?t:e})),this}function y(t){return o(this.pathElements,(function(e,n,r,i,o){var a=t(e,n,r,i,o);(a||0===a)&&(e[n]=a)})),this}function g(t){var n=new e.Svg.Path(t||this.close);return n.pos=this.pos,n.pathElements=this.pathElements.slice().map((function(t){return e.extend({},t)})),n.options=e.extend({},this.options),n}function b(t){var n=[new e.Svg.Path];return this.pathElements.forEach((function(r){r.command===t.toUpperCase()&&0!==n[n.length-1].pathElements.length&&n.push(new e.Svg.Path),n[n.length-1].pathElements.push(r)})),n}function x(t,n,r){for(var i=new e.Svg.Path(n,r),o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.pathElements.length;s++)i.pathElements.push(a.pathElements[s]);return i}e.Svg.Path=e.Class.extend({constructor:a,position:s,remove:l,move:u,line:c,curve:f,arc:h,scale:v,translate:m,transform:y,parse:d,stringify:p,clone:g,splitByCommand:b}),e.Svg.Path.elementDescriptions=n,e.Svg.Path.join=x}(this||n.g,t),function(t,e){"use strict";t.window,t.document;var n={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};function r(t,e,r,i){this.units=t,this.counterUnits=t===n.x?n.y:n.x,this.chartRect=e,this.axisLength=e[t.rectEnd]-e[t.rectStart],this.gridOffset=e[t.rectOffset],this.ticks=r,this.options=i}function i(t,n,r,i,o){var a=i["axis"+this.units.pos.toUpperCase()],s=this.ticks.map(this.projectValue.bind(this)),l=this.ticks.map(a.labelInterpolationFnc);s.forEach(function(u,c){var f,h={x:0,y:0};f=s[c+1]?s[c+1]-u:Math.max(this.axisLength-u,30),e.isFalseyButZero(l[c])&&""!==l[c]||("x"===this.units.pos?(u=this.chartRect.x1+u,h.x=i.axisX.labelOffset.x,"start"===i.axisX.position?h.y=this.chartRect.padding.top+i.axisX.labelOffset.y+(r?5:20):h.y=this.chartRect.y1+i.axisX.labelOffset.y+(r?5:20)):(u=this.chartRect.y1-u,h.y=i.axisY.labelOffset.y-(r?f:0),"start"===i.axisY.position?h.x=r?this.chartRect.padding.left+i.axisY.labelOffset.x:this.chartRect.x1-10:h.x=this.chartRect.x2+i.axisY.labelOffset.x+10),a.showGrid&&e.createGrid(u,c,this,this.gridOffset,this.chartRect[this.counterUnits.len](),t,[i.classNames.grid,i.classNames[this.units.dir]],o),a.showLabel&&e.createLabel(u,f,c,l,this,a.offset,h,n,[i.classNames.label,i.classNames[this.units.dir],"start"===a.position?i.classNames[a.position]:i.classNames.end],r,o))}.bind(this))}e.Axis=e.Class.extend({constructor:r,createGridAndLabels:i,projectValue:function(t,e,n){throw new Error("Base axis can't be instantiated!")}}),e.Axis.units=n}(this||n.g,t),function(t,e){"use strict";function n(t,n,r,i){var o=i.highLow||e.getHighLow(n,i,t.pos);this.bounds=e.getBounds(r[t.rectEnd]-r[t.rectStart],o,i.scaleMinSpace||20,i.onlyInteger),this.range={min:this.bounds.min,max:this.bounds.max},e.AutoScaleAxis.super.constructor.call(this,t,r,this.bounds.values,i)}function r(t){return this.axisLength*(+e.getMultiValue(t,this.units.pos)-this.bounds.min)/this.bounds.range}t.window,t.document,e.AutoScaleAxis=e.Axis.extend({constructor:n,projectValue:r})}(this||n.g,t),function(t,e){"use strict";function n(t,n,r,i){var o=i.highLow||e.getHighLow(n,i,t.pos);this.divisor=i.divisor||1,this.ticks=i.ticks||e.times(this.divisor).map(function(t,e){return o.low+(o.high-o.low)/this.divisor*e}.bind(this)),this.ticks.sort((function(t,e){return t-e})),this.range={min:o.low,max:o.high},e.FixedScaleAxis.super.constructor.call(this,t,r,this.ticks,i),this.stepLength=this.axisLength/this.divisor}function r(t){return this.axisLength*(+e.getMultiValue(t,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}t.window,t.document,e.FixedScaleAxis=e.Axis.extend({constructor:n,projectValue:r})}(this||n.g,t),function(t,e){"use strict";function n(t,n,r,i){e.StepAxis.super.constructor.call(this,t,r,i.ticks,i);var o=Math.max(1,i.ticks.length-(i.stretch?1:0));this.stepLength=this.axisLength/o}function r(t,e){return this.stepLength*e}t.window,t.document,e.StepAxis=e.Axis.extend({constructor:n,projectValue:r})}(this||n.g,t),function(t,e){"use strict";t.window,t.document;var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,showGridBackground:!1,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};function r(t){var r=e.normalizeData(this.data,t.reverseData,!0);this.svg=e.createSvg(this.container,t.width,t.height,t.classNames.chart);var i,o,a=this.svg.elem("g").addClass(t.classNames.gridGroup),s=this.svg.elem("g"),l=this.svg.elem("g").addClass(t.classNames.labelGroup),u=e.createChartRect(this.svg,t,n.padding);i=void 0===t.axisX.type?new e.StepAxis(e.Axis.units.x,r.normalized.series,u,e.extend({},t.axisX,{ticks:r.normalized.labels,stretch:t.fullWidth})):t.axisX.type.call(e,e.Axis.units.x,r.normalized.series,u,t.axisX),o=void 0===t.axisY.type?new e.AutoScaleAxis(e.Axis.units.y,r.normalized.series,u,e.extend({},t.axisY,{high:e.isNumeric(t.high)?t.high:t.axisY.high,low:e.isNumeric(t.low)?t.low:t.axisY.low})):t.axisY.type.call(e,e.Axis.units.y,r.normalized.series,u,t.axisY),i.createGridAndLabels(a,l,this.supportsForeignObject,t,this.eventEmitter),o.createGridAndLabels(a,l,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&e.createGridBackground(a,u,t.classNames.gridBackground,this.eventEmitter),r.raw.series.forEach(function(n,a){var l=s.elem("g");l.attr({"ct:series-name":n.name,"ct:meta":e.serialize(n.meta)}),l.addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(a)].join(" "));var c=[],f=[];r.normalized.series[a].forEach(function(t,s){var l={x:u.x1+i.projectValue(t,s,r.normalized.series[a]),y:u.y1-o.projectValue(t,s,r.normalized.series[a])};c.push(l.x,l.y),f.push({value:t,valueIndex:s,meta:e.getMetaData(n,s)})}.bind(this));var h={lineSmooth:e.getSeriesOption(n,t,"lineSmooth"),showPoint:e.getSeriesOption(n,t,"showPoint"),showLine:e.getSeriesOption(n,t,"showLine"),showArea:e.getSeriesOption(n,t,"showArea"),areaBase:e.getSeriesOption(n,t,"areaBase")},d=("function"==typeof h.lineSmooth?h.lineSmooth:h.lineSmooth?e.Interpolation.monotoneCubic():e.Interpolation.none())(c,f);if(h.showPoint&&d.pathElements.forEach(function(r){var s=l.elem("line",{x1:r.x,y1:r.y,x2:r.x+.01,y2:r.y},t.classNames.point).attr({"ct:value":[r.data.value.x,r.data.value.y].filter(e.isNumeric).join(","),"ct:meta":e.serialize(r.data.meta)});this.eventEmitter.emit("draw",{type:"point",value:r.data.value,index:r.data.valueIndex,meta:r.data.meta,series:n,seriesIndex:a,axisX:i,axisY:o,group:l,element:s,x:r.x,y:r.y})}.bind(this)),h.showLine){var p=l.elem("path",{d:d.stringify()},t.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:r.normalized.series[a],path:d.clone(),chartRect:u,index:a,series:n,seriesIndex:a,seriesMeta:n.meta,axisX:i,axisY:o,group:l,element:p})}if(h.showArea&&o.range){var v=Math.max(Math.min(h.areaBase,o.range.max),o.range.min),m=u.y1-o.projectValue(v);d.splitByCommand("M").filter((function(t){return t.pathElements.length>1})).map((function(t){var e=t.pathElements[0],n=t.pathElements[t.pathElements.length-1];return t.clone(!0).position(0).remove(1).move(e.x,m).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,m)})).forEach(function(e){var s=l.elem("path",{d:e.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:r.normalized.series[a],path:e.clone(),series:n,seriesIndex:a,axisX:i,axisY:o,chartRect:u,index:a,group:l,element:s})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:o.bounds,chartRect:u,axisX:i,axisY:o,svg:this.svg,options:t})}function i(t,r,i,o){e.Line.super.constructor.call(this,t,r,n,e.extend({},n,i),o)}e.Line=e.Base.extend({constructor:i,createChart:r})}(this||n.g,t),function(t,e){"use strict";t.window,t.document;var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};function r(t){var r,i;t.distributeSeries?(r=e.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y")).normalized.series=r.normalized.series.map((function(t){return[t]})):r=e.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y"),this.svg=e.createSvg(this.container,t.width,t.height,t.classNames.chart+(t.horizontalBars?" "+t.classNames.horizontalBars:""));var o=this.svg.elem("g").addClass(t.classNames.gridGroup),a=this.svg.elem("g"),s=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==r.normalized.series.length){var l=e.serialMap(r.normalized.series,(function(){return Array.prototype.slice.call(arguments).map((function(t){return t})).reduce((function(t,e){return{x:t.x+(e&&e.x)||0,y:t.y+(e&&e.y)||0}}),{x:0,y:0})}));i=e.getHighLow([l],t,t.horizontalBars?"x":"y")}else i=e.getHighLow(r.normalized.series,t,t.horizontalBars?"x":"y");i.high=+t.high||(0===t.high?0:i.high),i.low=+t.low||(0===t.low?0:i.low);var u,c,f,h,d,p=e.createChartRect(this.svg,t,n.padding);c=t.distributeSeries&&t.stackBars?r.normalized.labels.slice(0,1):r.normalized.labels,t.horizontalBars?(u=h=void 0===t.axisX.type?new e.AutoScaleAxis(e.Axis.units.x,r.normalized.series,p,e.extend({},t.axisX,{highLow:i,referenceValue:0})):t.axisX.type.call(e,e.Axis.units.x,r.normalized.series,p,e.extend({},t.axisX,{highLow:i,referenceValue:0})),f=d=void 0===t.axisY.type?new e.StepAxis(e.Axis.units.y,r.normalized.series,p,{ticks:c}):t.axisY.type.call(e,e.Axis.units.y,r.normalized.series,p,t.axisY)):(f=h=void 0===t.axisX.type?new e.StepAxis(e.Axis.units.x,r.normalized.series,p,{ticks:c}):t.axisX.type.call(e,e.Axis.units.x,r.normalized.series,p,t.axisX),u=d=void 0===t.axisY.type?new e.AutoScaleAxis(e.Axis.units.y,r.normalized.series,p,e.extend({},t.axisY,{highLow:i,referenceValue:0})):t.axisY.type.call(e,e.Axis.units.y,r.normalized.series,p,e.extend({},t.axisY,{highLow:i,referenceValue:0})));var v=t.horizontalBars?p.x1+u.projectValue(0):p.y1-u.projectValue(0),m=[];f.createGridAndLabels(o,s,this.supportsForeignObject,t,this.eventEmitter),u.createGridAndLabels(o,s,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&e.createGridBackground(o,p,t.classNames.gridBackground,this.eventEmitter),r.raw.series.forEach(function(n,i){var o,s,l=i-(r.raw.series.length-1)/2;o=t.distributeSeries&&!t.stackBars?f.axisLength/r.normalized.series.length/2:t.distributeSeries&&t.stackBars?f.axisLength/2:f.axisLength/r.normalized.series[i].length/2,(s=a.elem("g")).attr({"ct:series-name":n.name,"ct:meta":e.serialize(n.meta)}),s.addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(i)].join(" ")),r.normalized.series[i].forEach(function(a,c){var y,g,b,x;if(x=t.distributeSeries&&!t.stackBars?i:t.distributeSeries&&t.stackBars?0:c,y=t.horizontalBars?{x:p.x1+u.projectValue(a&&a.x?a.x:0,c,r.normalized.series[i]),y:p.y1-f.projectValue(a&&a.y?a.y:0,x,r.normalized.series[i])}:{x:p.x1+f.projectValue(a&&a.x?a.x:0,x,r.normalized.series[i]),y:p.y1-u.projectValue(a&&a.y?a.y:0,c,r.normalized.series[i])},f instanceof e.StepAxis&&(f.options.stretch||(y[f.units.pos]+=o*(t.horizontalBars?-1:1)),y[f.units.pos]+=t.stackBars||t.distributeSeries?0:l*t.seriesBarDistance*(t.horizontalBars?-1:1)),b=m[c]||v,m[c]=b-(v-y[f.counterUnits.pos]),void 0!==a){var w={};w[f.units.pos+"1"]=y[f.units.pos],w[f.units.pos+"2"]=y[f.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(w[f.counterUnits.pos+"1"]=v,w[f.counterUnits.pos+"2"]=y[f.counterUnits.pos]):(w[f.counterUnits.pos+"1"]=b,w[f.counterUnits.pos+"2"]=m[c]),w.x1=Math.min(Math.max(w.x1,p.x1),p.x2),w.x2=Math.min(Math.max(w.x2,p.x1),p.x2),w.y1=Math.min(Math.max(w.y1,p.y2),p.y1),w.y2=Math.min(Math.max(w.y2,p.y2),p.y1);var k=e.getMetaData(n,c);g=s.elem("line",w,t.classNames.bar).attr({"ct:value":[a.x,a.y].filter(e.isNumeric).join(","),"ct:meta":e.serialize(k)}),this.eventEmitter.emit("draw",e.extend({type:"bar",value:a,index:c,meta:k,series:n,seriesIndex:i,axisX:h,axisY:d,chartRect:p,group:s,element:g},w))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:u.bounds,chartRect:p,axisX:h,axisY:d,svg:this.svg,options:t})}function i(t,r,i,o){e.Bar.super.constructor.call(this,t,r,n,e.extend({},n,i),o)}e.Bar=e.Base.extend({constructor:i,createChart:r})}(this||n.g,t),function(t,e){"use strict";t.window,t.document;var n={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:e.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};function r(t,e,n){var r=e.x>t.x;return r&&"explode"===n||!r&&"implode"===n?"start":r&&"implode"===n||!r&&"explode"===n?"end":"middle"}function i(t){var i,o,a,s,l,u=e.normalizeData(this.data),c=[],f=t.startAngle;this.svg=e.createSvg(this.container,t.width,t.height,t.donut?t.classNames.chartDonut:t.classNames.chartPie),o=e.createChartRect(this.svg,t,n.padding),a=Math.min(o.width()/2,o.height()/2),l=t.total||u.normalized.series.reduce((function(t,e){return t+e}),0);var h=e.quantity(t.donutWidth);"%"===h.unit&&(h.value*=a/100),a-=t.donut&&!t.donutSolid?h.value/2:0,s="outside"===t.labelPosition||t.donut&&!t.donutSolid?a:"center"===t.labelPosition?0:t.donutSolid?a-h.value/2:a/2,s+=t.labelOffset;var d={x:o.x1+o.width()/2,y:o.y2+o.height()/2},p=1===u.raw.series.filter((function(t){return t.hasOwnProperty("value")?0!==t.value:0!==t})).length;u.raw.series.forEach(function(t,e){c[e]=this.svg.elem("g",null,null)}.bind(this)),t.showLabel&&(i=this.svg.elem("g",null,null)),u.raw.series.forEach(function(n,o){if(0!==u.normalized.series[o]||!t.ignoreEmptyValues){c[o].attr({"ct:series-name":n.name}),c[o].addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(o)].join(" "));var v=l>0?f+u.normalized.series[o]/l*360:0,m=Math.max(0,f-(0===o||p?0:.2));v-m>=359.99&&(v=m+359.99);var y,g,b,x=e.polarToCartesian(d.x,d.y,a,m),w=e.polarToCartesian(d.x,d.y,a,v),k=new e.Svg.Path(!t.donut||t.donutSolid).move(w.x,w.y).arc(a,a,0,v-f>180,0,x.x,x.y);t.donut?t.donutSolid&&(b=a-h.value,y=e.polarToCartesian(d.x,d.y,b,f-(0===o||p?0:.2)),g=e.polarToCartesian(d.x,d.y,b,v),k.line(y.x,y.y),k.arc(b,b,0,v-f>180,1,g.x,g.y)):k.line(d.x,d.y);var S=t.classNames.slicePie;t.donut&&(S=t.classNames.sliceDonut,t.donutSolid&&(S=t.classNames.sliceDonutSolid));var E=c[o].elem("path",{d:k.stringify()},S);if(E.attr({"ct:value":u.normalized.series[o],"ct:meta":e.serialize(n.meta)}),t.donut&&!t.donutSolid&&(E._node.style.strokeWidth=h.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:u.normalized.series[o],totalDataSum:l,index:o,meta:n.meta,series:n,group:c[o],element:E,path:k.clone(),center:d,radius:a,startAngle:f,endAngle:v}),t.showLabel){var A,L;A=1===u.raw.series.length?{x:d.x,y:d.y}:e.polarToCartesian(d.x,d.y,s,f+(v-f)/2),L=u.normalized.labels&&!e.isFalseyButZero(u.normalized.labels[o])?u.normalized.labels[o]:u.normalized.series[o];var M=t.labelInterpolationFnc(L,o);if(M||0===M){var T=i.elem("text",{dx:A.x,dy:A.y,"text-anchor":r(d,A,t.labelDirection)},t.classNames.label).text(""+M);this.eventEmitter.emit("draw",{type:"label",index:o,group:i,element:T,text:""+M,x:A.x,y:A.y})}}f=v}}.bind(this)),this.eventEmitter.emit("created",{chartRect:o,svg:this.svg,options:t})}function o(t,r,i,o){e.Pie.super.constructor.call(this,t,r,n,e.extend({},n,i),o)}e.Pie=e.Base.extend({constructor:o,createChart:i,determineAnchorPosition:r})}(this||n.g,t),t}()}.apply(e,[]))||(t.exports=r)},9831:function(t,e,n){n(2496),n(9419);var r=n(6035);t.exports=r.Array.from},8187:function(t,e,n){n(5815);var r=n(6035);t.exports=r.Array.isArray},9147:function(t,e,n){n(1402);var r=n(638);t.exports=r("Array").concat},8915:function(t,e,n){n(501);var r=n(638);t.exports=r("Array").every},3842:function(t,e,n){n(2386);var r=n(638);t.exports=r("Array").filter},2166:function(t,e,n){n(5057);var r=n(638);t.exports=r("Array").find},6261:function(t,e,n){n(1900);var r=n(638);t.exports=r("Array").forEach},566:function(t,e,n){n(9346);var r=n(638);t.exports=r("Array").indexOf},2688:function(t,e,n){n(9778);var r=n(638);t.exports=r("Array").map},421:function(t,e,n){n(7939);var r=n(638);t.exports=r("Array").reduce},5059:function(t,e,n){n(9962);var r=n(638);t.exports=r("Array").reverse},7586:function(t,e,n){n(791);var r=n(638);t.exports=r("Array").slice},8868:function(t,e,n){n(4985);var r=n(638);t.exports=r("Array").sort},4063:function(t,e,n){n(3374);var r=n(638);t.exports=r("Array").splice},1495:function(t,e,n){n(1875);var r=n(638);t.exports=r("Function").bind},3249:function(t,e,n){var r=n(1495),i=Function.prototype;t.exports=function(t){var e=t.bind;return t===i||t instanceof Function&&e===i.bind?r:e}},2079:function(t,e,n){var r=n(9147),i=Array.prototype;t.exports=function(t){var e=t.concat;return t===i||t instanceof Array&&e===i.concat?r:e}},1805:function(t,e,n){var r=n(8915),i=Array.prototype;t.exports=function(t){var e=t.every;return t===i||t instanceof Array&&e===i.every?r:e}},2258:function(t,e,n){var r=n(3842),i=Array.prototype;t.exports=function(t){var e=t.filter;return t===i||t instanceof Array&&e===i.filter?r:e}},5294:function(t,e,n){var r=n(2166),i=Array.prototype;t.exports=function(t){var e=t.find;return t===i||t instanceof Array&&e===i.find?r:e}},7076:function(t,e,n){var r=n(566),i=Array.prototype;t.exports=function(t){var e=t.indexOf;return t===i||t instanceof Array&&e===i.indexOf?r:e}},3692:function(t,e,n){var r=n(2688),i=Array.prototype;t.exports=function(t){var e=t.map;return t===i||t instanceof Array&&e===i.map?r:e}},6826:function(t,e,n){var r=n(421),i=Array.prototype;t.exports=function(t){var e=t.reduce;return t===i||t instanceof Array&&e===i.reduce?r:e}},9878:function(t,e,n){var r=n(5059),i=Array.prototype;t.exports=function(t){var e=t.reverse;return t===i||t instanceof Array&&e===i.reverse?r:e}},4485:function(t,e,n){var r=n(7586),i=Array.prototype;t.exports=function(t){var e=t.slice;return t===i||t instanceof Array&&e===i.slice?r:e}},633:function(t,e,n){var r=n(8868),i=Array.prototype;t.exports=function(t){var e=t.sort;return t===i||t instanceof Array&&e===i.sort?r:e}},3095:function(t,e,n){var r=n(4063),i=Array.prototype;t.exports=function(t){var e=t.splice;return t===i||t instanceof Array&&e===i.splice?r:e}},1599:function(t,e,n){var r=n(8734),i=String.prototype;t.exports=function(t){var e=t.trim;return"string"==typeof t||t===i||t instanceof String&&e===i.trim?r:e}},3658:function(t,e,n){n(4802);var r=n(6035);r.JSON||(r.JSON={stringify:JSON.stringify}),t.exports=function(t,e,n){return r.JSON.stringify.apply(null,arguments)}},1523:function(t,e,n){n(8453),n(5345),n(2496),n(1782);var r=n(6035);t.exports=r.Map},9490:function(t,e,n){n(9588);var r=n(6035);t.exports=r.Math.trunc},7854:function(t,e,n){n(2458),t.exports=Math.pow(2,-52)},2852:function(t,e,n){n(8854);var r=n(6035);t.exports=r.Number.isSafeInteger},3192:function(t,e,n){n(4851);var r=n(6035).Object;t.exports=function(t,e){return r.create(t,e)}},2807:function(t,e,n){n(4137);var r=n(6035).Object,i=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(i.sham=!0)},4180:function(t,e,n){n(9817);var r=n(6035);t.exports=r.Object.entries},9739:function(t,e,n){n(6467);var r=n(6035).Object,i=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(i.sham=!0)},5759:function(t,e,n){n(5465);var r=n(6035);t.exports=r.Object.getPrototypeOf},5553:function(t,e,n){n(4933);var r=n(6035);t.exports=r.Object.keys},7866:function(t,e,n){n(6592);var r=n(6035);t.exports=r.Object.setPrototypeOf},316:function(t,e,n){n(4558);var r=n(6035);t.exports=r.parseFloat},7648:function(t,e,n){n(9456);var r=n(6035);t.exports=r.parseInt},7647:function(t,e,n){n(4233),n(5345),n(357),n(9891),n(1323),n(9393),n(2496),n(1782);var r=n(6035);t.exports=r.Promise},700:function(t,e,n){n(5801);var r=n(6035);t.exports=r.Reflect.construct},836:function(t,e,n){n(2879);var r=n(6035);t.exports=r.Reflect.get},5293:function(t,e,n){n(4046),n(5345),n(2496),n(1782);var r=n(6035);t.exports=r.Set},8734:function(t,e,n){n(5753);var r=n(638);t.exports=r("String").trim},6493:function(t,e,n){n(1402),n(5345),n(6713),n(1160),n(3902),n(8353),n(8186),n(7059),n(6398),n(8578),n(3318),n(9544),n(2125),n(6121),n(7223),n(5737),n(5948),n(3837),n(3397),n(9297);var r=n(6035);t.exports=r.Symbol},9647:function(t,e,n){n(7059),n(2496),n(1782);var r=n(7905);t.exports=r.f("iterator")},1665:function(t,e,n){var r=n(9831);t.exports=r},8173:function(t,e,n){var r=n(8187);t.exports=r},263:function(t,e,n){n(1782),n(2496);var r=n(1520);t.exports=r},5204:function(t,e,n){n(1782),n(2496);var r=n(7829);t.exports=r},6017:function(t,e,n){var r=n(3249);t.exports=r},8945:function(t,e,n){var r=n(7076);t.exports=r},830:function(t,e,n){var r=n(4485);t.exports=r},343:function(t,e,n){n(1782),n(2496);var r=n(4651);t.exports=r},8993:function(t,e,n){var r=n(1523);n(7009),n(8104),n(3279),n(1189),n(8180),n(1121),n(7879),n(5336),n(5677),n(3285),n(6272),n(2647),n(8796),n(6857),n(2645),n(9639),n(3357),n(5653),n(4694),n(671),t.exports=r},688:function(t,e,n){var r=n(3192);t.exports=r},1422:function(t,e,n){var r=n(2807);t.exports=r},9259:function(t,e,n){var r=n(9739);t.exports=r},8327:function(t,e,n){var r=n(5759);t.exports=r},6438:function(t,e,n){var r=n(7866);t.exports=r},5365:function(t,e,n){var r=n(7647);n(4024),n(9389),n(1898),n(9975),t.exports=r},4338:function(t,e,n){var r=n(700);t.exports=r},2538:function(t,e,n){var r=n(836);t.exports=r},499:function(t,e,n){var r=n(6493);n(1634),n(8251),n(5777),n(9181),n(8472),t.exports=r},488:function(t,e,n){var r=n(9647);t.exports=r},2680:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},2605:function(t,e,n){var r=n(9574);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},8695:function(t){t.exports=function(){}},9730:function(t){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},6879:function(t,e,n){var r=n(9574);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},7813:function(t,e,n){"use strict";var r=n(4496).forEach,i=n(74),o=n(6414),a=i("forEach"),s=o("forEach");t.exports=a&&s?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},4769:function(t,e,n){"use strict";var r=n(490),i=n(4267),o=n(1905),a=n(7336),s=n(1547),l=n(592),u=n(1520);t.exports=function(t){var e,n,c,f,h,d,p=i(t),v="function"==typeof this?this:Array,m=arguments.length,y=m>1?arguments[1]:void 0,g=void 0!==y,b=u(p),x=0;if(g&&(y=r(y,m>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(e=s(p.length));e>x;x++)d=g?y(p[x],x):p[x],l(n,x,d);else for(h=(f=b.call(p)).next,n=new v;!(c=h.call(f)).done;x++)d=g?o(f,y,[c.value,x],!0):c.value,l(n,x,d);return n.length=x,n}},9760:function(t,e,n){var r=n(7816),i=n(1547),o=n(2005),a=function(t){return function(e,n,a){var s,l=r(e),u=i(l.length),c=o(a,u);if(t&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},4496:function(t,e,n){var r=n(490),i=n(5769),o=n(4267),a=n(1547),s=n(2757),l=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,c=4==t,f=6==t,h=7==t,d=5==t||f;return function(p,v,m,y){for(var g,b,x=o(p),w=i(x),k=r(v,m,3),S=a(w.length),E=0,A=y||s,L=e?A(p,S):n||h?A(p,0):void 0;S>E;E++)if((d||E in w)&&(b=k(g=w[E],E,x),t))if(e)L[E]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return E;case 2:l.call(L,g)}else switch(t){case 4:return!1;case 7:l.call(L,g)}return f?-1:u||c?c:L}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},8555:function(t,e,n){var r=n(8790),i=n(2735),o=n(6952),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},74:function(t,e,n){"use strict";var r=n(8790);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},6414:function(t,e,n){var r=n(41),i=n(8790),o=n(8061),a=Object.defineProperty,s={},l=function(t){throw t};t.exports=function(t,e){if(o(s,t))return s[t];e||(e={});var n=[][t],u=!!o(e,"ACCESSORS")&&e.ACCESSORS,c=o(e,0)?e[0]:l,f=o(e,1)?e[1]:void 0;return s[t]=!!n&&!i((function(){if(u&&!r)return!0;var t={length:-1};u?a(t,1,{enumerable:!0,get:l}):t[1]=1,n.call(t,c,f)}))}},7393:function(t,e,n){var r=n(2680),i=n(4267),o=n(5769),a=n(1547),s=function(t){return function(e,n,s,l){r(n);var u=i(e),c=o(u),f=a(u.length),h=t?f-1:0,d=t?-1:1;if(s<2)for(;;){if(h in c){l=c[h],h+=d;break}if(h+=d,t?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:f>h;h+=d)h in c&&(l=n(l,c[h],h,u));return l}};t.exports={left:s(!1),right:s(!0)}},2757:function(t,e,n){var r=n(9574),i=n(8984),o=n(2735)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},1905:function(t,e,n){var r=n(6879),i=n(9368);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){throw i(t),e}}},9069:function(t,e,n){var r=n(2735)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},8154:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},5885:function(t,e,n){var r=n(2401),i=n(8154),o=n(2735)("toStringTag"),a="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:a?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},7424:function(t,e,n){"use strict";var r=n(6879),i=n(2680);t.exports=function(){for(var t,e=r(this),n=i(e.delete),o=!0,a=0,s=arguments.length;a<s;a++)t=n.call(e,arguments[a]),o=o&&t;return!!o}},4719:function(t,e,n){"use strict";var r=n(2680),i=n(490),o=n(9335);t.exports=function(t){var e,n,a,s,l=arguments.length,u=l>1?arguments[1]:void 0;return r(this),(e=void 0!==u)&&r(u),null==t?new this:(n=[],e?(a=0,s=i(u,l>2?arguments[2]:void 0,2),o(t,(function(t){n.push(s(t,a++))}))):o(t,n.push,{that:n}),new this(n))}},7743:function(t){"use strict";t.exports=function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}},1088:function(t,e,n){"use strict";var r=n(6445).f,i=n(4045),o=n(4675),a=n(490),s=n(9730),l=n(9335),u=n(5329),c=n(6619),f=n(41),h=n(5697).fastKey,d=n(975),p=d.set,v=d.getterFor;t.exports={getConstructor:function(t,e,n,u){var c=t((function(t,r){s(t,c,e),p(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=r&&l(r,t[u],{that:t,AS_ENTRIES:n})})),d=v(e),m=function(t,e,n){var r,i,o=d(t),a=y(t,e);return a?a.value=n:(o.last=a={index:i=h(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},y=function(t,e){var n,r=d(t),i=h(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return o(c.prototype,{clear:function(){for(var t=d(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=this,n=d(e),r=y(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),f?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=d(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),o(c.prototype,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return m(this,0===t?0:t,e)}}:{add:function(t){return m(this,t=0===t?0:t,t)}}),f&&r(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(t,e,n){var r=e+" Iterator",i=v(e),o=v(r);u(t,e,(function(t,e){p(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(e)}}},943:function(t,e,n){"use strict";var r=n(1301),i=n(4569),o=n(5697),a=n(8790),s=n(8444),l=n(9335),u=n(9730),c=n(9574),f=n(6482),h=n(6445).f,d=n(4496).forEach,p=n(41),v=n(975),m=v.set,y=v.getterFor;t.exports=function(t,e,n){var v,g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),x=g?"set":"add",w=i[t],k=w&&w.prototype,S={};if(p&&"function"==typeof w&&(b||k.forEach&&!a((function(){(new w).entries().next()})))){v=e((function(e,n){m(u(e,v,t),{type:t,collection:new w}),null!=n&&l(n,e[x],{that:e,AS_ENTRIES:g})}));var E=y(t);d(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in k)||b&&"clear"==t||s(v.prototype,t,(function(n,r){var i=E(this).collection;if(!e&&b&&!c(n))return"get"==t&&void 0;var o=i[t](0===n?0:n,r);return e?this:o}))})),b||h(v.prototype,"size",{configurable:!0,get:function(){return E(this).collection.size}})}else v=n.getConstructor(e,t,g,x),o.REQUIRED=!0;return f(v,t,!1,!0),S[t]=v,r({global:!0,forced:!0},S),b||n.setStrong(v,t,g),v}},5949:function(t,e,n){var r=n(8790);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6745:function(t,e,n){"use strict";var r=n(3327).IteratorPrototype,i=n(4045),o=n(3196),a=n(6482),s=n(8830),l=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,u,!1,!0),s[u]=l,t}},8444:function(t,e,n){var r=n(41),i=n(6445),o=n(3196);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},3196:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},592:function(t,e,n){"use strict";var r=n(809),i=n(6445),o=n(3196);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},5329:function(t,e,n){"use strict";var r=n(1301),i=n(6745),o=n(6066),a=n(2370),s=n(6482),l=n(8444),u=n(1120),c=n(2735),f=n(1567),h=n(8830),d=n(3327),p=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,m=c("iterator"),y="keys",g="values",b="entries",x=function(){return this};t.exports=function(t,e,n,c,d,w,k){i(n,e,c);var S,E,A,L=function(t){if(t===d&&P)return P;if(!v&&t in O)return O[t];switch(t){case y:case g:case b:return function(){return new n(this,t)}}return function(){return new n(this)}},M=e+" Iterator",T=!1,O=t.prototype,_=O[m]||O["@@iterator"]||d&&O[d],P=!v&&_||L(d),I="Array"==e&&O.entries||_;if(I&&(S=o(I.call(new t)),p!==Object.prototype&&S.next&&(f||o(S)===p||(a?a(S,p):"function"!=typeof S[m]&&l(S,m,x)),s(S,M,!0,!0),f&&(h[M]=x))),d==g&&_&&_.name!==g&&(T=!0,P=function(){return _.call(this)}),f&&!k||O[m]===P||l(O,m,P),h[e]=P,d)if(E={values:L(g),keys:w?P:L(y),entries:L(b)},k)for(A in E)(v||T||!(A in O))&&u(O,A,E[A]);else r({target:e,proto:!0,forced:v||T},E);return E}},7025:function(t,e,n){var r=n(6035),i=n(8061),o=n(7905),a=n(6445).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},41:function(t,e,n){var r=n(8790);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2167:function(t,e,n){var r=n(4569),i=n(9574),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},4317:function(t){t.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}},4352:function(t,e,n){var r=n(3265);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},478:function(t,e,n){var r=n(8154),i=n(4569);t.exports="process"==r(i.process)},3265:function(t,e,n){var r=n(5972);t.exports=r("navigator","userAgent")||""},6952:function(t,e,n){var r,i,o=n(4569),a=n(3265),s=o.process,l=s&&s.versions,u=l&&l.v8;u?i=(r=u.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},638:function(t,e,n){var r=n(6035);t.exports=function(t){return r[t+"Prototype"]}},667:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1301:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(4569),o=n(2435).f,a=n(3730),s=n(6035),l=n(490),u=n(8444),c=n(8061),f=function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,h,d,p,v,m,y,g,b=t.target,x=t.global,w=t.stat,k=t.proto,S=x?i:w?i[b]:(i[b]||{}).prototype,E=x?s:s[b]||(s[b]={}),A=E.prototype;for(d in e)n=!a(x?d:b+(w?".":"#")+d,t.forced)&&S&&c(S,d),v=E[d],n&&(m=t.noTargetGet?(g=o(S,d))&&g.value:S[d]),p=n&&m?m:e[d],n&&r(v)===r(p)||(y=t.bind&&n?l(p,i):t.wrap&&n?f(p):k&&"function"==typeof p?l(Function.call,p):p,(t.sham||p&&p.sham||v&&v.sham)&&u(y,"sham",!0),E[d]=y,k&&(c(s,h=b+"Prototype")||u(s,h,{}),s[h][d]=p,t.real&&A&&!A[d]&&u(A,d,p)))}},8790:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9132:function(t,e,n){var r=n(8790);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},490:function(t,e,n){var r=n(2680);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},5024:function(t,e,n){"use strict";var r=n(2680),i=n(9574),o=[].slice,a={},s=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?s(e,r.length,r):e.apply(t,r)};return i(e.prototype)&&(a.prototype=e.prototype),a}},5972:function(t,e,n){var r=n(6035),i=n(4569),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},1520:function(t,e,n){var r=n(5885),i=n(8830),o=n(2735)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},7829:function(t,e,n){var r=n(6879),i=n(1520);t.exports=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},2447:function(t,e,n){var r=n(1567),i=n(7829);t.exports=r?i:function(t){return Map.prototype.entries.call(t)}},4569:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==("undefined"==typeof globalThis?"undefined":r(globalThis))&&globalThis)||i("object"==("undefined"==typeof window?"undefined":r(window))&&window)||i("object"==("undefined"==typeof self?"undefined":r(self))&&self)||i("object"==(void 0===n.g?"undefined":r(n.g))&&n.g)||function(){return this}()||Function("return this")()},8061:function(t){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},5583:function(t){t.exports={}},9538:function(t,e,n){var r=n(4569);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},1140:function(t,e,n){var r=n(5972);t.exports=r("document","documentElement")},3899:function(t,e,n){var r=n(41),i=n(8790),o=n(2167);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},5769:function(t,e,n){var r=n(8790),i=n(8154),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},8304:function(t,e,n){var r=n(9047),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},5697:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(5583),o=n(9574),a=n(8061),s=n(6445).f,l=n(158),u=n(9132),c=l("meta"),f=0,h=Object.isExtensible||function(){return!0},d=function(t){s(t,c,{value:{objectID:"O"+ ++f,weakData:{}}})},p=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==r(t)?t:("string"==typeof t?"S":"P")+t;if(!a(t,c)){if(!h(t))return"F";if(!e)return"E";d(t)}return t[c].objectID},getWeakData:function(t,e){if(!a(t,c)){if(!h(t))return!0;if(!e)return!1;d(t)}return t[c].weakData},onFreeze:function(t){return u&&p.REQUIRED&&h(t)&&!a(t,c)&&d(t),t}};i[c]=!0},975:function(t,e,n){var r,i,o,a=n(3693),s=n(4569),l=n(9574),u=n(8444),c=n(8061),f=n(9047),h=n(3674),d=n(5583),p=s.WeakMap;if(a){var v=f.state||(f.state=new p),m=v.get,y=v.has,g=v.set;r=function(t,e){return e.facade=t,g.call(v,t,e),e},i=function(t){return m.call(v,t)||{}},o=function(t){return y.call(v,t)}}else{var b=h("state");d[b]=!0,r=function(t,e){return e.facade=t,u(t,b,e),e},i=function(t){return c(t,b)?t[b]:{}},o=function(t){return c(t,b)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},7336:function(t,e,n){var r=n(2735),i=n(8830),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},8984:function(t,e,n){var r=n(8154);t.exports=Array.isArray||function(t){return"Array"==r(t)}},3730:function(t,e,n){var r=n(8790),i=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==u||n!=l&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},5903:function(t,e,n){var r=n(9574),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},4651:function(t,e,n){var r=n(5885),i=n(2735),o=n(8830),a=i("iterator");t.exports=function(t){var e=Object(t);return void 0!==e[a]||"@@iterator"in e||o.hasOwnProperty(r(e))}},9574:function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return"object"===e(t)?null!==t:"function"==typeof t}},1567:function(t){t.exports=!0},9335:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(6879),o=n(7336),a=n(1547),s=n(490),l=n(1520),u=n(9368),c=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var f,h,d,p,v,m,y,g=n&&n.that,b=!(!n||!n.AS_ENTRIES),x=!(!n||!n.IS_ITERATOR),w=!(!n||!n.INTERRUPTED),k=s(e,g,1+b+w),S=function(t){return f&&u(f),new c(!0,t)},E=function(t){return b?(i(t),w?k(t[0],t[1],S):k(t[0],t[1])):w?k(t,S):k(t)};if(x)f=t;else{if("function"!=typeof(h=l(t)))throw TypeError("Target is not iterable");if(o(h)){for(d=0,p=a(t.length);p>d;d++)if((v=E(t[d]))&&v instanceof c)return v;return new c(!1)}f=h.call(t)}for(m=f.next;!(y=m.call(f)).done;){try{v=E(y.value)}catch(t){throw u(f),t}if("object"==r(v)&&v&&v instanceof c)return v}return new c(!1)}},9368:function(t,e,n){var r=n(6879);t.exports=function(t){var e=t.return;if(void 0!==e)return r(e.call(t)).value}},3327:function(t,e,n){"use strict";var r,i,o,a=n(6066),s=n(8444),l=n(8061),u=n(2735),c=n(1567),f=u("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),c||l(r,f)||s(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},8830:function(t){t.exports={}},9874:function(t,e,n){"use strict";var r=n(6879);t.exports=function(t,e){var n=r(this),i=n.has(t)&&"update"in e?e.update(n.get(t),t,n):e.insert(t,n);return n.set(t,i),i}},3268:function(t,e,n){"use strict";var r=n(6879);t.exports=function(t,e){var n,i=r(this),o=arguments.length>2?arguments[2]:void 0;if("function"!=typeof e&&"function"!=typeof o)throw TypeError("At least one callback required");return i.has(t)?(n=i.get(t),"function"==typeof e&&(n=e(n),i.set(t,n))):"function"==typeof o&&(n=o(),i.set(t,n)),n}},3853:function(t,e,n){var r,i,o,a,s,l,u,c,f=n(4569),h=n(2435).f,d=n(912).set,p=n(4352),v=n(478),m=f.MutationObserver||f.WebKitMutationObserver,y=f.document,g=f.process,b=f.Promise,x=h(f,"queueMicrotask"),w=x&&x.value;w||(r=function(){var t,e;for(v&&(t=g.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?a():o=void 0,t}}o=void 0,t&&t.enter()},!p&&!v&&m&&y?(s=!0,l=y.createTextNode(""),new m(r).observe(l,{characterData:!0}),a=function(){l.data=s=!s}):b&&b.resolve?(u=b.resolve(void 0),c=u.then,a=function(){c.call(u,r)}):a=v?function(){g.nextTick(r)}:function(){d.call(f,r)}),t.exports=w||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},6495:function(t,e,n){var r=n(4569);t.exports=r.Promise},7873:function(t,e,n){var r=n(8790);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},8437:function(t,e,n){var r=n(8790),i=n(2735),o=n(1567),a=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[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"!==n||"x"!==new URL("http://x",void 0).host}))},3693:function(t,e,n){var r=n(4569),i=n(8304),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i(o))},8532:function(t,e,n){"use strict";var r=n(2680),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},1187:function(t,e,n){var r=n(4569),i=n(9394).trim,o=n(4931),a=r.parseFloat,s=1/a(o+"-0")!=-1/0;t.exports=s?function(t){var e=i(String(t)),n=a(e);return 0===n&&"-"==e.charAt(0)?-0:n}:a},887:function(t,e,n){var r=n(4569),i=n(9394).trim,o=n(4931),a=r.parseInt,s=/^[+-]?0[Xx]/,l=8!==a(o+"08")||22!==a(o+"0x16");t.exports=l?function(t,e){var n=i(String(t));return a(n,e>>>0||(s.test(n)?16:10))}:a},4045:function(t,e,n){var r,i=n(6879),o=n(931),a=n(667),s=n(5583),l=n(1140),u=n(2167),c=n(3674),f=c("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"</"+"script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;p=r?function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=u("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=i(t),n=new h,h.prototype=null,n[f]=t):n=p(),void 0===e?n:o(n,e)}},931:function(t,e,n){var r=n(41),i=n(6445),o=n(6879),a=n(2518);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=r.length,l=0;s>l;)i.f(t,n=r[l++],e[n]);return t}},6445:function(t,e,n){var r=n(41),i=n(3899),o=n(6879),a=n(809),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},2435:function(t,e,n){var r=n(41),i=n(665),o=n(3196),a=n(7816),s=n(809),l=n(8061),u=n(3899),c=Object.getOwnPropertyDescriptor;e.f=r?c:function(t,e){if(t=a(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(l(t,e))return o(!i.f.call(t,e),t[e])}},3720:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(7816),o=n(9792).f,a={}.toString,s="object"==("undefined"==typeof window?"undefined":r(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==a.call(t)?function(t){try{return o(t)}catch(t){return s.slice()}}(t):o(i(t))}},9792:function(t,e,n){var r=n(4839),i=n(667).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},8440:function(t,e){e.f=Object.getOwnPropertySymbols},6066:function(t,e,n){var r=n(8061),i=n(4267),o=n(3674),a=n(5949),s=o("IE_PROTO"),l=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},4839:function(t,e,n){var r=n(8061),i=n(7816),o=n(9760).indexOf,a=n(5583);t.exports=function(t,e){var n,s=i(t),l=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;e.length>l;)r(s,n=e[l++])&&(~o(u,n)||u.push(n));return u}},2518:function(t,e,n){var r=n(4839),i=n(667);t.exports=Object.keys||function(t){return r(t,i)}},665:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2370:function(t,e,n){var r=n(6879),i=n(2605);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},8227:function(t,e,n){var r=n(41),i=n(2518),o=n(7816),a=n(665).f,s=function(t){return function(e){for(var n,s=o(e),l=i(s),u=l.length,c=0,f=[];u>c;)n=l[c++],r&&!a.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}};t.exports={entries:s(!0),values:s(!1)}},1127:function(t,e,n){"use strict";var r=n(2401),i=n(5885);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},6035:function(t){t.exports={}},9409:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},513:function(t,e,n){var r=n(6879),i=n(9574),o=n(8532);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},4675:function(t,e,n){var r=n(1120);t.exports=function(t,e,n){for(var i in e)n&&n.unsafe&&t[i]?t[i]=e[i]:r(t,i,e[i],n);return t}},1120:function(t,e,n){var r=n(8444);t.exports=function(t,e,n,i){i&&i.enumerable?t[e]=n:r(t,e,n)}},7339:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},4723:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},4430:function(t,e,n){var r=n(4569),i=n(8444);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},6619:function(t,e,n){"use strict";var r=n(5972),i=n(6445),o=n(2735),a=n(41),s=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},6482:function(t,e,n){var r=n(2401),i=n(6445).f,o=n(8444),a=n(8061),s=n(1127),l=n(2735)("toStringTag");t.exports=function(t,e,n,u){if(t){var c=n?t:t.prototype;a(c,l)||i(c,l,{configurable:!0,value:e}),u&&!r&&o(c,"toString",s)}}},3674:function(t,e,n){var r=n(7450),i=n(158),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},9047:function(t,e,n){var r=n(4569),i=n(4430),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},7450:function(t,e,n){var r=n(1567),i=n(9047);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.1",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6723:function(t,e,n){var r=n(6879),i=n(2680),o=n(2735)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},2997:function(t,e,n){var r=n(8305),i=n(7339),o=function(t){return function(e,n){var o,a,s=String(i(e)),l=r(n),u=s.length;return l<0||l>=u?t?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):o:t?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},2640:function(t,e,n){var r=n(8790),i=n(4931);t.exports=function(t){return r((function(){return!!i[t]()||"…"!="…"[t]()||i[t].name!==t}))}},9394:function(t,e,n){var r=n(7339),i="["+n(4931)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},912:function(t,e,n){var r,i,o,a=n(4569),s=n(8790),l=n(490),u=n(1140),c=n(2167),f=n(4352),h=n(478),d=a.location,p=a.setImmediate,v=a.clearImmediate,m=a.process,y=a.MessageChannel,g=a.Dispatch,b=0,x={},w="onreadystatechange",k=function(t){if(x.hasOwnProperty(t)){var e=x[t];delete x[t],e()}},S=function(t){return function(){k(t)}},E=function(t){k(t.data)},A=function(t){a.postMessage(t+"",d.protocol+"//"+d.host)};p&&v||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return x[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(b),b},v=function(t){delete x[t]},h?r=function(t){m.nextTick(S(t))}:g&&g.now?r=function(t){g.now(S(t))}:y&&!f?(o=(i=new y).port2,i.port1.onmessage=E,r=l(o.postMessage,o,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&d&&"file:"!==d.protocol&&!s(A)?(r=A,a.addEventListener("message",E,!1)):r=w in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),k(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:p,clear:v}},2005:function(t,e,n){var r=n(8305),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},7816:function(t,e,n){var r=n(5769),i=n(7339);t.exports=function(t){return r(i(t))}},8305:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},1547:function(t,e,n){var r=n(8305),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},4267:function(t,e,n){var r=n(7339);t.exports=function(t){return Object(r(t))}},809:function(t,e,n){var r=n(9574);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},2401:function(t,e,n){var r={};r[n(2735)("toStringTag")]="z",t.exports="[object z]"===String(r)},158:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},5699:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(7873);t.exports=i&&!Symbol.sham&&"symbol"==r(Symbol.iterator)},7905:function(t,e,n){var r=n(2735);e.f=r},2735:function(t,e,n){var r=n(4569),i=n(7450),o=n(8061),a=n(158),s=n(7873),l=n(5699),u=i("wks"),c=r.Symbol,f=l?c:c&&c.withoutSetter||a;t.exports=function(t){return o(u,t)||(s&&o(c,t)?u[t]=c[t]:u[t]=f("Symbol."+t)),u[t]}},4931:function(t){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},4233:function(t,e,n){"use strict";var r=n(1301),i=n(6066),o=n(2370),a=n(4045),s=n(8444),l=n(3196),u=n(9335),c=function(t,e){var n=this;if(!(n instanceof c))return new c(t,e);o&&(n=o(new Error(void 0),i(n))),void 0!==e&&s(n,"message",String(e));var r=[];return u(t,r.push,{that:r}),s(n,"errors",r),n};c.prototype=a(Error.prototype,{constructor:l(5,c),message:l(5,""),name:l(5,"AggregateError")}),r({global:!0},{AggregateError:c})},1402:function(t,e,n){"use strict";var r=n(1301),i=n(8790),o=n(8984),a=n(9574),s=n(4267),l=n(1547),u=n(592),c=n(2757),f=n(8555),h=n(2735),d=n(6952),p=h("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",y=d>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),g=f("concat"),b=function(t){if(!a(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!y||!g},{concat:function(t){var e,n,r,i,o,a=s(this),f=c(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(b(o=-1===e?a:arguments[e])){if(h+(i=l(o.length))>v)throw TypeError(m);for(n=0;n<i;n++,h++)n in o&&u(f,h,o[n])}else{if(h>=v)throw TypeError(m);u(f,h++,o)}return f.length=h,f}})},501:function(t,e,n){"use strict";var r=n(1301),i=n(4496).every,o=n(74),a=n(6414),s=o("every"),l=a("every");r({target:"Array",proto:!0,forced:!s||!l},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},2386:function(t,e,n){"use strict";var r=n(1301),i=n(4496).filter,o=n(8555),a=n(6414),s=o("filter"),l=a("filter");r({target:"Array",proto:!0,forced:!s||!l},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},5057:function(t,e,n){"use strict";var r=n(1301),i=n(4496).find,o=n(8695),a=n(6414),s="find",l=!0,u=a(s);s in[]&&Array(1).find((function(){l=!1})),r({target:"Array",proto:!0,forced:l||!u},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},1900:function(t,e,n){"use strict";var r=n(1301),i=n(7813);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},9419:function(t,e,n){var r=n(1301),i=n(4769);r({target:"Array",stat:!0,forced:!n(9069)((function(t){Array.from(t)}))},{from:i})},9346:function(t,e,n){"use strict";var r=n(1301),i=n(9760).indexOf,o=n(74),a=n(6414),s=[].indexOf,l=!!s&&1/[1].indexOf(1,-0)<0,u=o("indexOf"),c=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:l||!u||!c},{indexOf:function(t){return l?s.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},5815:function(t,e,n){n(1301)({target:"Array",stat:!0},{isArray:n(8984)})},598:function(t,e,n){"use strict";var r=n(7816),i=n(8695),o=n(8830),a=n(975),s=n(5329),l="Array Iterator",u=a.set,c=a.getterFor(l);t.exports=s(Array,"Array",(function(t,e){u(this,{type:l,target:r(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},9778:function(t,e,n){"use strict";var r=n(1301),i=n(4496).map,o=n(8555),a=n(6414),s=o("map"),l=a("map");r({target:"Array",proto:!0,forced:!s||!l},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},7939:function(t,e,n){"use strict";var r=n(1301),i=n(7393).left,o=n(74),a=n(6414),s=n(6952),l=n(478),u=o("reduce"),c=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!u||!c||!l&&s>79&&s<83},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},9962:function(t,e,n){"use strict";var r=n(1301),i=n(8984),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},791:function(t,e,n){"use strict";var r=n(1301),i=n(9574),o=n(8984),a=n(2005),s=n(1547),l=n(7816),u=n(592),c=n(2735),f=n(8555),h=n(6414),d=f("slice"),p=h("slice",{ACCESSORS:!0,0:0,1:2}),v=c("species"),m=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!d||!p},{slice:function(t,e){var n,r,c,f=l(this),h=s(f.length),d=a(t,h),p=a(void 0===e?h:e,h);if(o(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return m.call(f,d,p);for(r=new(void 0===n?Array:n)(y(p-d,0)),c=0;d<p;d++,c++)d in f&&u(r,c,f[d]);return r.length=c,r}})},4985:function(t,e,n){"use strict";var r=n(1301),i=n(2680),o=n(4267),a=n(8790),s=n(74),l=[],u=l.sort,c=a((function(){l.sort(void 0)})),f=a((function(){l.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:c||!f||!h},{sort:function(t){return void 0===t?u.call(o(this)):u.call(o(this),i(t))}})},3374:function(t,e,n){"use strict";var r=n(1301),i=n(2005),o=n(8305),a=n(1547),s=n(4267),l=n(2757),u=n(592),c=n(8555),f=n(6414),h=c("splice"),d=f("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,v=Math.min,m=9007199254740991,y="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!h||!d},{splice:function(t,e){var n,r,c,f,h,d,g=s(this),b=a(g.length),x=i(t,b),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=b-x):(n=w-2,r=v(p(o(e),0),b-x)),b+n-r>m)throw TypeError(y);for(c=l(g,r),f=0;f<r;f++)(h=x+f)in g&&u(c,f,g[h]);if(c.length=r,n<r){for(f=x;f<b-r;f++)d=f+n,(h=f+r)in g?g[d]=g[h]:delete g[d];for(f=b;f>b-r+n;f--)delete g[f-1]}else if(n>r)for(f=b-r;f>x;f--)d=f+n-1,(h=f+r-1)in g?g[d]=g[h]:delete g[d];for(f=0;f<n;f++)g[f+x]=arguments[f+2];return g.length=b-r+n,c}})},1875:function(t,e,n){n(1301)({target:"Function",proto:!0},{bind:n(5024)})},4802:function(t,e,n){var r=n(1301),i=n(5972),o=n(8790),a=i("JSON","stringify"),s=/[\uD800-\uDFFF]/g,l=/^[\uD800-\uDBFF]$/,u=/^[\uDC00-\uDFFF]$/,c=function(t,e,n){var r=n.charAt(e-1),i=n.charAt(e+1);return l.test(t)&&!u.test(i)||u.test(t)&&!l.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},f=o((function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")}));a&&r({target:"JSON",stat:!0,forced:f},{stringify:function(t,e,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(s,c):r}})},3837:function(t,e,n){var r=n(4569);n(6482)(r.JSON,"JSON",!0)},8453:function(t,e,n){"use strict";var r=n(943),i=n(1088);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},3397:function(){},9588:function(t,e,n){var r=n(1301),i=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?o:i)(t)}})},2458:function(t,e,n){n(1301)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},8854:function(t,e,n){var r=n(1301),i=n(5903),o=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},4851:function(t,e,n){n(1301)({target:"Object",stat:!0,sham:!n(41)},{create:n(4045)})},4137:function(t,e,n){var r=n(1301),i=n(41);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(6445).f})},9817:function(t,e,n){var r=n(1301),i=n(8227).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},6467:function(t,e,n){var r=n(1301),i=n(8790),o=n(7816),a=n(2435).f,s=n(41),l=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},5465:function(t,e,n){var r=n(1301),i=n(8790),o=n(4267),a=n(6066),s=n(5949);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},4933:function(t,e,n){var r=n(1301),i=n(4267),o=n(2518);r({target:"Object",stat:!0,forced:n(8790)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},6592:function(t,e,n){n(1301)({target:"Object",stat:!0},{setPrototypeOf:n(2370)})},5345:function(){},4558:function(t,e,n){var r=n(1301),i=n(1187);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},9456:function(t,e,n){var r=n(1301),i=n(887);r({global:!0,forced:parseInt!=i},{parseInt:i})},9891:function(t,e,n){"use strict";var r=n(1301),i=n(2680),o=n(8532),a=n(9409),s=n(9335);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=o.f(e),r=n.resolve,l=n.reject,u=a((function(){var n=i(e.resolve),o=[],a=0,l=1;s(t,(function(t){var i=a++,s=!1;o.push(void 0),l++,n.call(e,t).then((function(t){s||(s=!0,o[i]={status:"fulfilled",value:t},--l||r(o))}),(function(t){s||(s=!0,o[i]={status:"rejected",reason:t},--l||r(o))}))})),--l||r(o)}));return u.error&&l(u.value),n.promise}})},1323:function(t,e,n){"use strict";var r=n(1301),i=n(2680),o=n(5972),a=n(8532),s=n(9409),l=n(9335),u="No one promise resolved";r({target:"Promise",stat:!0},{any:function(t){var e=this,n=a.f(e),r=n.resolve,c=n.reject,f=s((function(){var n=i(e.resolve),a=[],s=0,f=1,h=!1;l(t,(function(t){var i=s++,l=!1;a.push(void 0),f++,n.call(e,t).then((function(t){l||h||(h=!0,r(t))}),(function(t){l||h||(l=!0,a[i]=t,--f||c(new(o("AggregateError"))(a,u)))}))})),--f||c(new(o("AggregateError"))(a,u))}));return f.error&&c(f.value),n.promise}})},9393:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6495),a=n(8790),s=n(5972),l=n(6723),u=n(513),c=n(1120);r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=l(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then((function(){return n}))}:t,n?function(n){return u(e,t()).then((function(){throw n}))}:t)}}),i||"function"!=typeof o||o.prototype.finally||c(o.prototype,"finally",s("Promise").prototype.finally)},357:function(t,e,n){"use strict";var r,i,o,a,s=n(1301),l=n(1567),u=n(4569),c=n(5972),f=n(6495),h=n(1120),d=n(4675),p=n(6482),v=n(6619),m=n(9574),y=n(2680),g=n(9730),b=n(8304),x=n(9335),w=n(9069),k=n(6723),S=n(912).set,E=n(3853),A=n(513),L=n(9538),M=n(8532),T=n(9409),O=n(975),_=n(3730),P=n(2735),I=n(478),C=n(6952),j=P("species"),D="Promise",R=O.get,U=O.set,N=O.getterFor(D),z=f,V=u.TypeError,B=u.document,F=u.process,H=c("fetch"),q=M.f,G=q,X=!!(B&&B.createEvent&&u.dispatchEvent),Y="function"==typeof PromiseRejectionEvent,Z="unhandledrejection",W=_(D,(function(){if(!(b(z)!==String(z))){if(66===C)return!0;if(!I&&!Y)return!0}if(l&&!z.prototype.finally)return!0;if(C>=51&&/native code/.test(z))return!1;var t=z.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[j]=e,!(t.then((function(){}))instanceof e)})),J=W||!w((function(t){z.all(t).catch((function(){}))})),$=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},Q=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;E((function(){for(var r=t.value,i=1==t.state,o=0;n.length>o;){var a,s,l,u=n[o++],c=i?u.ok:u.fail,f=u.resolve,h=u.reject,d=u.domain;try{c?(i||(2===t.rejection&&nt(t),t.rejection=1),!0===c?a=r:(d&&d.enter(),a=c(r),d&&(d.exit(),l=!0)),a===u.promise?h(V("Promise-chain cycle")):(s=$(a))?s.call(a,f,h):f(a)):h(r)}catch(t){d&&!l&&d.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&tt(t)}))}},K=function(t,e,n){var r,i;X?((r=B.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Y&&(i=u["on"+t])?i(r):t===Z&&L("Unhandled promise rejection",n)},tt=function(t){S.call(u,(function(){var e,n=t.facade,r=t.value;if(et(t)&&(e=T((function(){I?F.emit("unhandledRejection",r,n):K(Z,n,r)})),t.rejection=I||et(t)?2:1,e.error))throw e.value}))},et=function(t){return 1!==t.rejection&&!t.parent},nt=function(t){S.call(u,(function(){var e=t.facade;I?F.emit("rejectionHandled",e):K("rejectionhandled",e,t.value)}))},rt=function(t,e,n){return function(r){t(e,r,n)}},it=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Q(t,!0))},ot=function t(e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===n)throw V("Promise can't be resolved itself");var i=$(n);i?E((function(){var r={done:!1};try{i.call(n,rt(t,r,e),rt(it,r,e))}catch(t){it(r,t,e)}})):(e.value=n,e.state=1,Q(e,!1))}catch(t){it({done:!1},t,e)}}};W&&(z=function(t){g(this,z,D),y(t),r.call(this);var e=R(this);try{t(rt(ot,e),rt(it,e))}catch(t){it(e,t)}},(r=function(t){U(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(z.prototype,{then:function(t,e){var n=N(this),r=q(k(this,z));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=I?F.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Q(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=R(t);this.promise=t,this.resolve=rt(ot,e),this.reject=rt(it,e)},M.f=q=function(t){return t===z||t===o?new i(t):G(t)},l||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(t,e){var n=this;return new z((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return A(z,H.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:W},{Promise:z}),p(z,D,!1,!0),v(D),o=c(D),s({target:D,stat:!0,forced:W},{reject:function(t){var e=q(this);return e.reject.call(void 0,t),e.promise}}),s({target:D,stat:!0,forced:l||W},{resolve:function(t){return A(l&&this===o?z:this,t)}}),s({target:D,stat:!0,forced:J},{all:function(t){var e=this,n=q(e),r=n.resolve,i=n.reject,o=T((function(){var n=y(e.resolve),o=[],a=0,s=1;x(t,(function(t){var l=a++,u=!1;o.push(void 0),s++,n.call(e,t).then((function(t){u||(u=!0,o[l]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,i=T((function(){var i=y(e.resolve);x(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},5801:function(t,e,n){var r=n(1301),i=n(5972),o=n(2680),a=n(6879),s=n(9574),l=n(4045),u=n(5024),c=n(8790),f=i("Reflect","construct"),h=c((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),d=!c((function(){f((function(){}))})),p=h||d;r({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(d&&!h)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var i=n.prototype,c=l(s(i)?i:Object.prototype),p=Function.apply.call(t,c,e);return s(p)?p:c}})},2879:function(t,e,n){var r=n(1301),i=n(9574),o=n(6879),a=n(8061),s=n(2435),l=n(6066);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,u,c=arguments.length<3?e:arguments[2];return o(e)===c?e[n]:(r=s.f(e,n))?a(r,"value")?r.value:void 0===r.get?void 0:r.get.call(c):i(u=l(e))?t(u,n,c):void 0}})},9297:function(){},4046:function(t,e,n){"use strict";var r=n(943),i=n(1088);t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},2496:function(t,e,n){"use strict";var r=n(2997).charAt,i=n(975),o=n(5329),a="String Iterator",s=i.set,l=i.getterFor(a);o(String,"String",(function(t){s(this,{type:a,string:String(t),index:0})}),(function(){var t,e=l(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},5753:function(t,e,n){"use strict";var r=n(1301),i=n(9394).trim;r({target:"String",proto:!0,forced:n(2640)("trim")},{trim:function(){return i(this)}})},1160:function(t,e,n){n(7025)("asyncIterator")},3902:function(){},8353:function(t,e,n){n(7025)("hasInstance")},8186:function(t,e,n){n(7025)("isConcatSpreadable")},7059:function(t,e,n){n(7025)("iterator")},6713:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(1301),o=n(4569),a=n(5972),s=n(1567),l=n(41),u=n(7873),c=n(5699),f=n(8790),h=n(8061),d=n(8984),p=n(9574),v=n(6879),m=n(4267),y=n(7816),g=n(809),b=n(3196),x=n(4045),w=n(2518),k=n(9792),S=n(3720),E=n(8440),A=n(2435),L=n(6445),M=n(665),T=n(8444),O=n(1120),_=n(7450),P=n(3674),I=n(5583),C=n(158),j=n(2735),D=n(7905),R=n(7025),U=n(6482),N=n(975),z=n(4496).forEach,V=P("hidden"),B="Symbol",F=j("toPrimitive"),H=N.set,q=N.getterFor(B),G=Object.prototype,X=o.Symbol,Y=a("JSON","stringify"),Z=A.f,W=L.f,J=S.f,$=M.f,Q=_("symbols"),K=_("op-symbols"),tt=_("string-to-symbol-registry"),et=_("symbol-to-string-registry"),nt=_("wks"),rt=o.QObject,it=!rt||!rt.prototype||!rt.prototype.findChild,ot=l&&f((function(){return 7!=x(W({},"a",{get:function(){return W(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=Z(G,e);r&&delete G[e],W(t,e,n),r&&t!==G&&W(G,e,r)}:W,at=function(t,e){var n=Q[t]=x(X.prototype);return H(n,{type:B,tag:t,description:e}),l||(n.description=e),n},st=c?function(t){return"symbol"==r(t)}:function(t){return Object(t)instanceof X},lt=function(t,e,n){t===G&&lt(K,e,n),v(t);var r=g(e,!0);return v(n),h(Q,r)?(n.enumerable?(h(t,V)&&t[V][r]&&(t[V][r]=!1),n=x(n,{enumerable:b(0,!1)})):(h(t,V)||W(t,V,b(1,{})),t[V][r]=!0),ot(t,r,n)):W(t,r,n)},ut=function(t,e){v(t);var n=y(e),r=w(n).concat(dt(n));return z(r,(function(e){l&&!ct.call(n,e)||lt(t,e,n[e])})),t},ct=function(t){var e=g(t,!0),n=$.call(this,e);return!(this===G&&h(Q,e)&&!h(K,e))&&(!(n||!h(this,e)||!h(Q,e)||h(this,V)&&this[V][e])||n)},ft=function(t,e){var n=y(t),r=g(e,!0);if(n!==G||!h(Q,r)||h(K,r)){var i=Z(n,r);return!i||!h(Q,r)||h(n,V)&&n[V][r]||(i.enumerable=!0),i}},ht=function(t){var e=J(y(t)),n=[];return z(e,(function(t){h(Q,t)||h(I,t)||n.push(t)})),n},dt=function(t){var e=t===G,n=J(e?K:y(t)),r=[];return z(n,(function(t){!h(Q,t)||e&&!h(G,t)||r.push(Q[t])})),r};(u||(O((X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=C(t),n=function t(n){this===G&&t.call(K,n),h(this,V)&&h(this[V],e)&&(this[V][e]=!1),ot(this,e,b(1,n))};return l&&it&&ot(G,e,{configurable:!0,set:n}),at(e,t)}).prototype,"toString",(function(){return q(this).tag})),O(X,"withoutSetter",(function(t){return at(C(t),t)})),M.f=ct,L.f=lt,A.f=ft,k.f=S.f=ht,E.f=dt,D.f=function(t){return at(j(t),t)},l&&(W(X.prototype,"description",{configurable:!0,get:function(){return q(this).description}}),s||O(G,"propertyIsEnumerable",ct,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:X}),z(w(nt),(function(t){R(t)})),i({target:B,stat:!0,forced:!u},{for:function(t){var e=String(t);if(h(tt,e))return tt[e];var n=X(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!st(t))throw TypeError(t+" is not a symbol");if(h(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),i({target:"Object",stat:!0,forced:!u,sham:!l},{create:function(t,e){return void 0===e?x(t):ut(x(t),e)},defineProperty:lt,defineProperties:ut,getOwnPropertyDescriptor:ft}),i({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ht,getOwnPropertySymbols:dt}),i({target:"Object",stat:!0,forced:f((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(m(t))}}),Y)&&i({target:"JSON",stat:!0,forced:!u||f((function(){var t=X();return"[null]"!=Y([t])||"{}"!=Y({a:t})||"{}"!=Y(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=e,(p(e)||void 0!==t)&&!st(t))return d(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!st(e))return e}),i[1]=e,Y.apply(null,i)}});X.prototype[F]||T(X.prototype,F,X.prototype.valueOf),U(X,B),I[V]=!0},8578:function(t,e,n){n(7025)("matchAll")},6398:function(t,e,n){n(7025)("match")},3318:function(t,e,n){n(7025)("replace")},9544:function(t,e,n){n(7025)("search")},2125:function(t,e,n){n(7025)("species")},6121:function(t,e,n){n(7025)("split")},7223:function(t,e,n){n(7025)("toPrimitive")},5737:function(t,e,n){n(7025)("toStringTag")},5948:function(t,e,n){n(7025)("unscopables")},4024:function(t,e,n){n(4233)},3279:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(7424);r({target:"Map",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},1189:function(t,e,n){"use strict";n(1301)({target:"Map",proto:!0,real:!0,forced:n(1567)},{emplace:n(9874)})},8180:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(490),s=n(2447),l=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{every:function(t){var e=o(this),n=s(e),r=a(t,arguments.length>1?arguments[1]:void 0,3);return!l(n,(function(t,n,i){if(!r(n,t,e))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},1121:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(5972),a=n(6879),s=n(2680),l=n(490),u=n(6723),c=n(2447),f=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{filter:function(t){var e=a(this),n=c(e),r=l(t,arguments.length>1?arguments[1]:void 0,3),i=new(u(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){r(n,t,e)&&h.call(i,t,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},5336:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(490),s=n(2447),l=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{findKey:function(t){var e=o(this),n=s(e),r=a(t,arguments.length>1?arguments[1]:void 0,3);return l(n,(function(t,n,i){if(r(n,t,e))return i(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},7879:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(490),s=n(2447),l=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{find:function(t){var e=o(this),n=s(e),r=a(t,arguments.length>1?arguments[1]:void 0,3);return l(n,(function(t,n,i){if(r(n,t,e))return i(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},7009:function(t,e,n){n(1301)({target:"Map",stat:!0},{from:n(4719)})},5677:function(t,e,n){"use strict";var r=n(1301),i=n(9335),o=n(2680);r({target:"Map",stat:!0},{groupBy:function(t,e){var n=new this;o(e);var r=o(n.has),a=o(n.get),s=o(n.set);return i(t,(function(t){var i=e(t);r.call(n,i)?a.call(n,i).push(t):s.call(n,i,[t])})),n}})},3285:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2447),s=n(4723),l=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{includes:function(t){return l(a(o(this)),(function(e,n,r){if(s(n,t))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},6272:function(t,e,n){"use strict";var r=n(1301),i=n(9335),o=n(2680);r({target:"Map",stat:!0},{keyBy:function(t,e){var n=new this;o(e);var r=o(n.set);return i(t,(function(t){r.call(n,e(t),t)})),n}})},2647:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2447),s=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{keyOf:function(t){return s(a(o(this)),(function(e,n,r){if(n===t)return r(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},8796:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(5972),a=n(6879),s=n(2680),l=n(490),u=n(6723),c=n(2447),f=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{mapKeys:function(t){var e=a(this),n=c(e),r=l(t,arguments.length>1?arguments[1]:void 0,3),i=new(u(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){h.call(i,r(n,t,e),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},6857:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(5972),a=n(6879),s=n(2680),l=n(490),u=n(6723),c=n(2447),f=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{mapValues:function(t){var e=a(this),n=c(e),r=l(t,arguments.length>1?arguments[1]:void 0,3),i=new(u(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){h.call(i,t,r(n,t,e))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},2645:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2680),s=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{merge:function(t){for(var e=o(this),n=a(e.set),r=0;r<arguments.length;)s(arguments[r++],n,{that:e,AS_ENTRIES:!0});return e}})},8104:function(t,e,n){n(1301)({target:"Map",stat:!0},{of:n(7743)})},9639:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2680),s=n(2447),l=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{reduce:function(t){var e=o(this),n=s(e),r=arguments.length<2,i=r?void 0:arguments[1];if(a(t),l(n,(function(n,o){r?(r=!1,i=o):i=t(i,o,n,e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw TypeError("Reduce of empty map with no initial value");return i}})},3357:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(490),s=n(2447),l=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{some:function(t){var e=o(this),n=s(e),r=a(t,arguments.length>1?arguments[1]:void 0,3);return l(n,(function(t,n,i){if(r(n,t,e))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},671:function(t,e,n){"use strict";n(1301)({target:"Map",proto:!0,real:!0,forced:n(1567)},{updateOrInsert:n(3268)})},5653:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2680);r({target:"Map",proto:!0,real:!0,forced:i},{update:function(t,e){var n=o(this),r=arguments.length;a(e);var i=n.has(t);if(!i&&r<3)throw TypeError("Updating absent value");var s=i?n.get(t):a(r>2?arguments[2]:void 0)(t,n);return n.set(t,e(s,t,n)),n}})},4694:function(t,e,n){"use strict";n(1301)({target:"Map",proto:!0,real:!0,forced:n(1567)},{upsert:n(3268)})},9389:function(t,e,n){n(9891)},9975:function(t,e,n){n(1323)},1898:function(t,e,n){"use strict";var r=n(1301),i=n(8532),o=n(9409);r({target:"Promise",stat:!0},{try:function(t){var e=i.f(this),n=o(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}})},1634:function(t,e,n){n(7025)("asyncDispose")},8251:function(t,e,n){n(7025)("dispose")},5777:function(t,e,n){n(7025)("observable")},9181:function(t,e,n){n(7025)("patternMatch")},8472:function(t,e,n){n(7025)("replaceAll")},1782:function(t,e,n){n(598);var r=n(4317),i=n(4569),o=n(5885),a=n(8444),s=n(8830),l=n(2735)("toStringTag");for(var u in r){var c=i[u],f=c&&c.prototype;f&&o(f)!==l&&a(f,l,u),s[u]=s.Array}},5074:function(t,e,n){var r=n(1301),i=n(4569),o=n(3265),a=[].slice,s=function(t){return function(e,n){var r=arguments.length>2,i=r?a.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(o)},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})},964:function(t,e,n){"use strict";n(598);var r=n(1301),i=n(5972),o=n(8437),a=n(1120),s=n(4675),l=n(6482),u=n(6745),c=n(975),f=n(9730),h=n(8061),d=n(490),p=n(5885),v=n(6879),m=n(9574),y=n(4045),g=n(3196),b=n(7829),x=n(1520),w=n(2735),k=i("fetch"),S=i("Headers"),E=w("iterator"),A="URLSearchParams",L="URLSearchParamsIterator",M=c.set,T=c.getterFor(A),O=c.getterFor(L),_=/\+/g,P=Array(4),I=function(t){return P[t-1]||(P[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},C=function(t){try{return decodeURIComponent(t)}catch(e){return t}},j=function(t){var e=t.replace(_," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(I(n--),C);return e}},D=/[!'()~]|%20/g,R={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},U=function(t){return R[t]},N=function(t){return encodeURIComponent(t).replace(D,U)},z=function(t,e){if(e)for(var n,r,i=e.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),t.push({key:j(r.shift()),value:j(r.join("="))}))},V=function(t){this.entries.length=0,z(this.entries,t)},B=function(t,e){if(t<e)throw TypeError("Not enough arguments")},F=u((function(t,e){M(this,{type:L,iterator:b(T(t).entries),kind:e})}),"Iterator",(function(){var t=O(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),H=function(){f(this,H,A);var t,e,n,r,i,o,a,s,l,u=arguments.length>0?arguments[0]:void 0,c=this,d=[];if(M(c,{type:A,entries:d,updateURL:function(){},updateSearchParams:V}),void 0!==u)if(m(u))if("function"==typeof(t=x(u)))for(n=(e=t.call(u)).next;!(r=n.call(e)).done;){if((a=(o=(i=b(v(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:a.value+"",value:s.value+""})}else for(l in u)h(u,l)&&d.push({key:l,value:u[l]+""});else z(d,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},q=H.prototype;s(q,{append:function(t,e){B(arguments.length,2);var n=T(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){B(arguments.length,1);for(var e=T(this),n=e.entries,r=t+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){B(arguments.length,1);for(var e=T(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){B(arguments.length,1);for(var e=T(this).entries,n=t+"",r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){B(arguments.length,1);for(var e=T(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){B(arguments.length,1);for(var n,r=T(this),i=r.entries,o=!1,a=t+"",s=e+"",l=0;l<i.length;l++)(n=i[l]).key===a&&(o?i.splice(l--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var t,e,n,r=T(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(t=o[n],e=0;e<n;e++)if(i[e].key>t.key){i.splice(e,0,t);break}e===n&&i.push(t)}r.updateURL()},forEach:function(t){for(var e,n=T(this).entries,r=d(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new F(this,"keys")},values:function(){return new F(this,"values")},entries:function(){return new F(this,"entries")}},{enumerable:!0}),a(q,E,q.entries),a(q,"toString",(function(){for(var t,e=T(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(N(t.key)+"="+N(t.value));return n.join("&")}),{enumerable:!0}),l(H,A),r({global:!0,forced:!o},{URLSearchParams:H}),o||"function"!=typeof k||"function"!=typeof S||r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,r,i=[t];return arguments.length>1&&(m(e=arguments[1])&&(n=e.body,p(n)===A&&((r=e.headers?new S(e.headers):new S).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=y(e,{body:g(0,String(n)),headers:g(0,r)}))),i.push(e)),k.apply(this,i)}}),t.exports={URLSearchParams:H,getState:T}},3241:function(t,e,n){var r=n(9831);t.exports=r},3579:function(t,e,n){var r=n(8187);t.exports=r},8536:function(t,e,n){var r=n(6261);t.exports=r},3399:function(t,e,n){var r=n(3249);t.exports=r},7605:function(t,e,n){var r=n(2079);t.exports=r},7768:function(t,e,n){var r=n(1805);t.exports=r},8687:function(t,e,n){var r=n(2258);t.exports=r},6127:function(t,e,n){var r=n(5294);t.exports=r},6894:function(t,e,n){n(1782);var r=n(8536),i=n(5885),o=Array.prototype,a={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===o||t instanceof Array&&e===o.forEach||a.hasOwnProperty(i(t))?r:e}},6553:function(t,e,n){var r=n(7076);t.exports=r},1830:function(t,e,n){var r=n(3692);t.exports=r},4721:function(t,e,n){var r=n(6826);t.exports=r},5162:function(t,e,n){var r=n(9878);t.exports=r},6845:function(t,e,n){var r=n(4485);t.exports=r},9886:function(t,e,n){var r=n(633);t.exports=r},2939:function(t,e,n){var r=n(3095);t.exports=r},4205:function(t,e,n){var r=n(1599);t.exports=r},7772:function(t,e,n){var r=n(3658);t.exports=r},4396:function(t,e,n){var r=n(9490);t.exports=r},4242:function(t,e,n){var r=n(7854);t.exports=r},6841:function(t,e,n){var r=n(2852);t.exports=r},1997:function(t,e,n){var r=n(2807);t.exports=r},9990:function(t,e,n){var r=n(4180);t.exports=r},8430:function(t,e,n){var r=n(9739);t.exports=r},4682:function(t,e,n){var r=n(5553);t.exports=r},8645:function(t,e,n){var r=n(316);t.exports=r},9536:function(t,e,n){var r=n(7648);t.exports=r},5227:function(t,e,n){var r=n(7647);t.exports=r},2556:function(t,e,n){var r=n(700);t.exports=r},4823:function(t,e,n){n(5074);var r=n(6035);t.exports=r.setInterval},2255:function(t,e,n){n(5074);var r=n(6035);t.exports=r.setTimeout},1209:function(t,e,n){var r=n(5293);t.exports=r},1483:function(t,e,n){var r=n(6493);t.exports=r},2162:function(t,e,n){var r=n(1228);t.exports=r},1228:function(t,e,n){n(964);var r=n(6035);t.exports=r.URLSearchParams},6760:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=function(t){"use strict";var e,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r=h;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===v){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=L(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=f(t,e,n);if("normal"===l.type){if(r=n.done?v:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=v,n.method="throw",n.arg=l.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function y(){}function g(){}function b(){}var x={};x[a]=function(){return this};var w=Object.getPrototypeOf,k=w&&w(w(_([])));k&&k!==n&&i.call(k,a)&&(x=k);var S=b.prototype=y.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(o,a,s,l){var u=f(t[o],t,a);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"===r(h)&&i.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,l)}),(function(t){n("throw",t,s,l)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,l)}))}l(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}}function L(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=f(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function _(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:P}}function P(){return{value:e,done:!0}}return g.prototype=S.constructor=b,b.constructor=g,g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},E(A.prototype),A.prototype[s]=function(){return this},t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(S),u(S,l,"Generator"),S[a]=function(){return this},S.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}("object"===r(t=n.nmd(t))?t.exports:{});try{regeneratorRuntime=i}catch(t){Function("r","regeneratorRuntime = r")(i)}}},r={};function i(t){if(r[t])return r[t].exports;var e=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.loaded=!0,e.exports}i.m=n,i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.f={},i.e=function(t){return Promise.all(Object.keys(i.f).reduce((function(e,n){return i.f[n](t,e),e}),[]))},i.u=function(t){return t+".bundle.js"},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t={},e="ulogger-server:",i.l=function(n,r,o){if(t[n])t[n].push(r);else{var a,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var c=l[u];if(c.getAttribute("src")==n||c.getAttribute("data-webpack")==e+o){a=c;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",e+o),a.src=n),t[n]=[r];var f=function(e,r){a.onerror=a.onload=null,clearTimeout(h);var i=t[n];if(delete t[n],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(t){return t(r)})),e)return e(r)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),s&&document.head.appendChild(a)}},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},i.p="js/dist/",function(){var t={179:0};i.f.j=function(e,n){var r=i.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,i){r=t[e]=[n,i]}));n.push(r[2]=o);var a=i.p+i.u(e),s=new Error;i.l(a,(function(n){if(i.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+e)}};var e=function(e,n){for(var r,o,a=n[0],s=n[1],l=n[2],u=0,c=[];u<a.length;u++)o=a[u],i.o(t,o)&&t[o]&&c.push(t[o][0]),t[o]=0;for(r in s)i.o(s,r)&&(i.m[r]=s[r]);for(l&&l(i),e&&e(n);c.length;)c.shift()()},n=self.webpackChunkulogger_server=self.webpackChunkulogger_server||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),function(){"use strict";var t=i(7245),e=i.n(t),n=i(543),r=i.n(n),o=i(8396),a=i.n(o),s=i(5161),l=i.n(s),u=i(6580),c=i.n(u),f=i(5244),h=i.n(f),d=i(7112),p=i.n(d),v=i(6330),m=i.n(v),y=i(6012),g=i.n(y),b=i(5877),x=i.n(b),w=i(6235),k=i.n(w),S=i(1862),E=i.n(S),A=i(5424),L=i.n(A),M=i(6950),T=i.n(M);function O(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return _(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var P=function(){function t(){l()(this,t)}return c()(t,null,[{key:"post",value:function(t,e,n){var r=n||{};return r.method="POST",this.ajax(t,e,r)}},{key:"get",value:function(t,e,n){var r=n||{};return r.method="GET",this.ajax(t,e,r)}},{key:"ajax",value:function(t,n,i){var o=this,a=[];n=n||{};var s=(i=i||{}).method||"GET",l=new XMLHttpRequest;return new(r())((function(r,i){var u;if(l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE){var t="",e=!0;if(200===l.status)try{var n=JSON.parse(l.responseText);n&&(n.error?n.message&&(t=n.message):(r&&"function"==typeof r&&r(n),e=!1))}catch(e){t=e.message}else t="HTTP error ".concat(l.status);e&&i&&"function"==typeof i&&i(new Error(t))}},n instanceof HTMLFormElement&&(n=new FormData(n)),n instanceof FormData)u="POST"===s?n:new(T())(n).toString();else{for(var c in n)if(n.hasOwnProperty(c))if(L()(n[c])){var f,h=O(n[c]);try{for(h.s();!(f=h.n()).done;){var d,p=f.value;a.push(e()(d="".concat(c,"[]=")).call(d,o.encodeValue(p)))}}catch(t){h.e(t)}finally{h.f()}}else{var v;a.push(e()(v="".concat(c,"=")).call(v,o.encodeValue(n[c])))}u=(u=a.join("&")).replace(/%20/g,"+")}"GET"===s&&u.length&&(t+="?".concat(u),u=null),l.open(s,t,!0),"POST"!==s||n instanceof FormData||l.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l.send(u)}))}},{key:"encodeValue",value:function(t){return"object"===E()(t)&&(t=k()(t)),encodeURIComponent(t)}}]),t}(),I=i(6544),C=i.n(I),j=i(1624),D=i.n(j),R=i(9224),U=i.n(R),N=i(4607),z=i.n(N),V=i(5349),B=i.n(V),F=i(8174),H=i.n(F),q=i(1467),G=i.n(q),X=i(9733),Y=i.n(X),Z=i(5206),W=i.n(Z),J=i(6130),$=i.n(J),Q=i(540),K=i.n(Q),tt=i(7448),et=i.n(tt),nt=i(552),rt=i.n(nt);function it(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return ot(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ot(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var at=function(){function t(){l()(this,t)}return c()(t,null,[{key:"observe",value:function(t,e,n){if("object"!==E()(t)||null===t)throw new Error("Invalid argument: invalid object");if("function"==typeof n)this.observeProperty(t,e,n);else{if("function"!=typeof e)throw new Error("Invalid argument for observe");this.observeRecursive(t,e)}}},{key:"notify",value:function(t,e){var n,r=it(t);try{var i=function(){var t=n.value;rt()(et().mark((function n(){return et().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t(e);case 2:case"end":return n.stop()}}),n)})))()};for(r.s();!(n=r.n()).done;)i()}catch(t){r.e(t)}finally{r.f()}}},{key:"forceUpdate",value:function(t,e){var n=t._values[e],r=t._observers[e];this.notify(r,n)}},{key:"isObserved",value:function(t,e,n){if("object"!==E()(t)||null===t||!t.hasOwnProperty(e))return!1;var r=!!(t._observers&&t._observers[e]&&t._observers[e].size>0);return r&&n?t._observers[e].has(n):r}},{key:"setSilently",value:function(t,e,n){if(!t.hasOwnProperty(e))throw new Error('Invalid argument: object does not have property "'.concat(e,'"'));if(this.isObserved(t,e)){if(t._values[e]=n,L()(t[e])){var r,i=it(t._observers[e]);try{for(i.s();!(r=i.n()).done;){var o=r.value;this.observeArray(t[e],o)}}catch(t){i.e(t)}finally{i.f()}}}else t[e]=n}},{key:"observeProperty",value:function(n,r,i){var o=this;if(!n.hasOwnProperty(r))throw new Error('Invalid argument: object does not have property "'.concat(r,'"'));if(this.isObserved(n,r,i))throw new Error("Observer already registered for property ".concat(r));this.addObserver(n,i,r),n.hasOwnProperty("_values")||K()(n,"_values",{enumerable:!1,configurable:!1,value:{}}),n._values[r]=n[r],K()(n,r,{get:function(){return n._values[r]},set:function(i){var a;n._values[r]!==i&&(n._values[r]=i,"".concat(r," = "),L()(i)&&i.length&&e()(a="[".concat(i[0],", …](")).call(a,i.length,")"),t.notify(n._observers[r],i));L()(n[r])&&o.observeArray(n[r],n._observers[r])}}),L()(n[r])&&this.observeArray(n[r],i)}},{key:"observeRecursive",value:function(e,n){if(L()(e))this.observeArray(e,n);else for(var r in e)e.hasOwnProperty(r)&&t.observeProperty(e,r,n)}},{key:"observeArray",value:function(t,e){if(e instanceof $()){var n,r=it(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.addObserver(t,i)}}catch(t){r.e(t)}finally{r.f()}}else this.addObserver(t,e);this.overrideArrayPrototypes(t,arguments)}},{key:"addObserver",value:function(t,e,n){t.hasOwnProperty("_observers")||K()(t,"_observers",{enumerable:!1,configurable:!1,value:3===arguments.length?[]:new($())}),3===arguments.length?(t._observers[n]||(t._observers[n]=new($())),t._observers[n].add(e)):t._observers.add(e)}},{key:"unobserve",value:function(t,e,n){if("function"==typeof n)this.unobserveProperty(t,e,n);else{if("function"!=typeof e)throw new Error("Invalid argument for unobserve");L()(t)?this.unobserveArray(t,e):this.unobserveRecursive(t,e)}}},{key:"unobserveAll",value:function(t,e){if(1===arguments.length)for(var n in t)t.hasOwnProperty(n)&&this.unobserveAll(t,n);else if(this.isObserved(t,e)){if("Removing all observers for ".concat(e,"…"),L()(t[e]))this.restoreArrayPrototypes(t[e]);else if("object"===E()(t[e])&&null!==t[e])for(var r in t[e])t[e].hasOwnProperty(r)&&this.unobserveAll(t[e],r);delete t._observers[e],delete t[e],t[e]=t._values[e],delete t._values[e]}}},{key:"unobserveProperty",value:function(t,e,n){L()(t[e])&&this.unobserveArray(t[e],n),this.removeObserver(t,n,e),t._observers[e].size||(delete t[e],t[e]=t._values[e],delete t._values[e])}},{key:"unobserveRecursive",value:function(e,n){for(var r in e)e.hasOwnProperty(r)&&t.unobserveProperty(e,r,n)}},{key:"unobserveArray",value:function(t,e){this.removeObserver(t,e),t._observers.size||this.restoreArrayPrototypes(t)}},{key:"overrideArrayPrototypes",value:function(n){var r;W()(r=["pop","push","reverse","shift","sort","splice","unshift"]).call(r,(function(r){var i=Y()(Array.prototype,r);n.hasOwnProperty(r)||(i.value=function(){var i,o=Array.prototype[r].apply(n,arguments);return"[".concat(r,"] "),n.length&&e()(i="[".concat(n[0],", …](")).call(i,n.length,")"),t.notify(n._observers,n),o},K()(n,r,i))}))}},{key:"restoreArrayPrototypes",value:function(t){var e;W()(e=["pop","push","reverse","shift","sort","splice","unshift"]).call(e,(function(e){delete t[e]}))}},{key:"removeObserver",value:function(t,e,n){if(t.hasOwnProperty("_observers")){var r;if(3===arguments.length){if(!t._observers[n])return;r=t._observers[n],"Removing observer for ".concat(n,"…")}else r=t._observers;W()(r).call(r,(function(t){t===e&&r.delete(t)}))}}}]),t}();function st(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return lt(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ut=function(){function t(e,n,r){if(l()(this,t),!(e instanceof HTMLSelectElement))throw new Error("Invalid argument for select");this.element=e,this.hasAllOption=!1,this.allText="",r&&r.length&&(this.allText=r),n&&n.length?this.head=n:(this.hasHead=!1,this.headText="")}return c()(t,[{key:"showAllOption",value:function(e){e&&(this.allText=e),this.hasAllOption=!0;var n=this.hasHead?1:0;this.element.add(new Option(this.allText,t.allValue),n)}},{key:"hideAllOption",value:function(){var e=this.selected===t.allValue;this.hasAllOption=!1,this.remove(t.allValue),e&&(this.selected=this.hasHead?t.headValue:"",this.element.dispatchEvent(new Event("change")))}},{key:"addHead",value:function(){var e=new Option(this.headText,t.headValue,!0,!0);e.disabled=!0,this.element.options.add(e,0)}},{key:"hasValue",value:function(t){return void 0!==this.getOption(t)}},{key:"getOption",value:function(t){var e;return G()(e=H()(this.element.options)).call(e,(function(e){return e.value===t}))}},{key:"remove",value:function(t){var e=this.getOption(t);e&&this.element.remove(e.index)}},{key:"setOptions",value:function(e,n){var r=this;n=n||this.element.value,this.element.options.length=0,this.hasHead&&this.addHead(),this.hasAllOption&&this.element.add(new Option(this.allText,t.allValue,!1,n===t.allValue));var i,o=st(e);try{var a=function(){var t=i.value,e=new Option(t.listText,t.listValue,!1,n===t.listValue);r.element.add(e),at.observe(t,"listText",(function(t){e.text=t}))};for(o.s();!(i=o.n()).done;)a()}catch(t){o.e(t)}finally{o.f()}}},{key:"selected",set:function(t){this.hasValue(t)&&(this.element.value=t)},get:function(){return this.element.value}},{key:"head",set:function(t){t.length&&(this.hasHead=!0,this.headText=t,this.addHead())},get:function(){return this.headText}}],[{key:"allValue",get:function(){return"all"}},{key:"headValue",get:function(){return"0"}}]),t}(),ct=function(){function t(){l()(this,t),this.listValue=ut.allValue,this.listText="-"}return c()(t,[{key:"listItem",value:function(t,e){this.listValue=String(t),this.listText=String(e)}},{key:"toString",value:function(){var t;return e()(t="[".concat(this.listValue,", ")).call(t,this.listText,"]")}}]),t}(),ft=i(5327),ht=i.n(ft),dt=i(8409),pt=i.n(dt),vt=i(5901),mt=i.n(vt),yt=i(9540),gt=i.n(yt),bt=i(7526),xt=i.n(bt),wt=i(2706),kt=i.n(wt),St=i(2717),Et=i.n(St),At=function(){function t(){l()(this,t)}return c()(t,null,[{key:"setCookie",value:function(t,n){var r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,a="";if(o){var s=new Date;s.setTime(s.getTime()+24*o*60*60*1e3),a="; expires=".concat(s.toUTCString())}document.cookie=e()(r=e()(i="ulogger_".concat(t,"=")).call(i,n)).call(r,a,"; path=/; samesite=lax")}},{key:"sprintf",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=0,a=t.replace(/%%|%s|%d/g,(function(t){if("%%"===t)return"%";var n;if("%d"===t&&isNaN(r[o])&&void 0!==r[o])throw new Error(e()(n="Wrong format specifier ".concat(t," for ")).call(n,r[o]," argument"));if(void 0===r[o])throw new Error("Missing argument for format specifier ".concat(t));return r[o++]}));if(o<r.length)throw new Error("Unused argument for format specifier ".concat(t));return a}},{key:"addScript",value:function(t,e,n,r){if(e&&document.getElementById(e))n instanceof Function&&n();else{var i=document.createElement("script");i.type="text/javascript",i.src=t,e&&(i.id=e),i.async=!0,n instanceof Function&&(i.onload=n),r instanceof Function&&(i.onerror=function(){return r(new Error("error loading ".concat(e," script")))}),document.getElementsByTagName("head")[0].appendChild(i)}}},{key:"loadScript",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4,o=new(r())((function(r,i){return t.addScript(e,n,r,i)})),a=this.timeoutPromise(i);return r().race([o,a])}},{key:"timeoutPromise",value:function(t){return new(r())((function(e,n){var r=a()((function(){clearTimeout(r),n(new Error("timeout (".concat(t," ms).")))}),t)}))}},{key:"htmlEncode",value:function(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}},{key:"hexToRGBA",value:function(t,n){var r,i;return n=void 0!==n?n:1,"rgba(".concat(e()(r=Et()(i=(t=t.replace("#","")).match(new RegExp("(.{".concat(t.length/3,"})"),"g"))).call(i,(function(e){return kt()(t.length%2?e+e:e,16)}))).call(r,n).join(","),")")}},{key:"getScaleColor",value:function(t,n,r){var i,o;if(r<0||r>1)throw new Error("Invalid value");for(var a=[],s=0;s<3;s++){if(t[s]<0||t[s]>255||n[s]<0||n[s]>255)throw new Error("Invalid value");a[s]=Math.round((n[s]-t[s])*r+t[s])}return e()(i=e()(o="rgb(".concat(a[0],", ")).call(o,a[1],", ")).call(i,a[2],")")}},{key:"addCss",value:function(t,e){if(!e||!document.getElementById(e)){var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,e&&(n.id=e),document.getElementsByTagName("head")[0].appendChild(n)}}},{key:"removeElementById",value:function(t){var e=document.getElementById(t);e&&e.remove()}},{key:"nodeFromHtml",value:function(t){var e=document.createElement("template");return e.innerHTML=xt()(t).call(t),e.content.childNodes.length>1?e.content.childNodes:e.content.firstChild}},{key:"getFloat",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.getParsed(e,n,"float")}},{key:"getInteger",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.getParsed(e,n,"int")}},{key:"getString",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.getParsed(e,n,"string")}},{key:"getParsed",value:function(t,e,n){if(e&&null===t)return null;var r;switch(n){case"float":r=gt()(t);break;case"int":r=Math.round(gt()(t));break;case"string":r=String(t);break;default:throw new Error("Unknown type")}if(null==t||"string"!==n&&isNaN(r))throw new Error("Invalid value");return r}},{key:"getTimeString",value:function(t){var n,r,i,o,a="";return{date:e()(n=e()(r="".concat(t.getFullYear(),"-")).call(r,x()(i="0".concat(t.getMonth()+1)).call(i,-2),"-")).call(n,x()(o="0".concat(t.getDate())).call(o,-2)),time:t.toTimeString().replace(/^\s*([^ ]+)([^(]*)(\([^)]*\))*/,(function(t,e,n,r){return n&&(a=n.replace(/(0(?=[1-9]00))|(00\b)/g,""),r&&/[A-Z]/.test(r)&&(a+=r.match(/\b[A-Z]+/g).join(""))),e})),zone:a}}},{key:"openUrl",value:function(t){window.location.assign(t)}},{key:"deg2rad",value:function(t){return t*Math.PI/180}},{key:"isDeepEqual",value:function(t,e){var n,r=this;return mt()(n=pt()(t)).call(n,(function(n){return"object"===E()(t[n])&&null!==t[n]&&"object"===E()(e[n])&&null!==e[n]?r.isDeepEqual(t[n],e[n]):t[n]===e[n]}))}}]),t}(),Lt=function(){function t(){l()(this,t)}return c()(t,[{key:"hasComment",value:function(){return null!=this.comment&&this.comment.length>0}},{key:"hasImage",value:function(){return null!=this.image&&this.image.length>0}},{key:"hasSpeed",value:function(){return null!=this.speed}},{key:"hasAltitude",value:function(){return null!=this.altitude}},{key:"getImagePath",value:function(){return this.hasImage()?"uploads/".concat(this.image):null}},{key:"delete",value:function(){return t.update({action:"delete",posid:this.id})}},{key:"save",value:function(){return t.update({action:"update",posid:this.id,comment:this.comment})}},{key:"imageDelete",value:function(){var e=this;return t.update({action:"imagedel",posid:this.id}).then((function(){e.image=null}))}},{key:"imageAdd",value:function(e){var n=this,r=new FormData;return r.append("image",e),r.append("action","imageadd"),r.append("posid",this.id),t.update(r).then((function(t){n.image=t.image}))}},{key:"distanceTo",value:function(t){var e=At.deg2rad(this.latitude),n=At.deg2rad(this.longitude),r=At.deg2rad(t.latitude),i=r-e,o=At.deg2rad(t.longitude)-n;return 6371e3*(2*Math.asin(Math.sqrt(Math.pow(Math.sin(i/2),2)+Math.cos(e)*Math.cos(r)*Math.pow(Math.sin(o/2),2))))}},{key:"secondsTo",value:function(t){return this.timestamp-t.timestamp}},{key:"totalSpeed",get:function(){return this.totalSeconds?this.totalMeters/this.totalSeconds:0}}],[{key:"fromJson",value:function(e){var n=new t;return n.id=At.getInteger(e.id),n.latitude=At.getFloat(e.latitude),n.longitude=At.getFloat(e.longitude),n.altitude=At.getInteger(e.altitude,!0),n.speed=At.getFloat(e.speed,!0),n.bearing=At.getInteger(e.bearing,!0),n.accuracy=At.getInteger(e.accuracy,!0),n.provider=At.getString(e.provider,!0),n.comment=At.getString(e.comment,!0),n.image=At.getString(e.image,!0),n.username=At.getString(e.username),n.trackname=At.getString(e.trackname),n.trackid=At.getInteger(e.trackid),n.timestamp=At.getInteger(e.timestamp),n.meters=At.getInteger(e.meters),n.seconds=At.getInteger(e.seconds),n.totalMeters=0,n.totalSeconds=0,n}},{key:"update",value:function(t){return P.post("utils/handleposition.php",t)}}]),t}();function Mt(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return Tt(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ot(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var _t=function(t){U()(n,t);var e=Ot(n);function n(){var t;return l()(this,n),(t=e.call(this)).positions=[],t}return c()(n,[{key:"clear",value:function(){this.positions.length=0}},{key:"isLastPosition",value:function(t){return!0}},{key:"isFirstPosition",value:function(t){return!0}},{key:"fromJson",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];e?n=this.positions:this.clear();var r,i=Mt(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.push(Lt.fromJson(o))}}catch(t){i.e(t)}finally{i.f()}this.positions=n}},{key:"fetchLatest",value:function(){var t=this;return this.clear(),n.fetch({last:!0}).then((function(e){t.fromJson(e)}))}},{key:"length",get:function(){return this.positions.length}},{key:"hasPositions",get:function(){return this.positions.length>0}}],[{key:"fetchLatest",value:function(){var t=new n;return t.fetchLatest().then((function(){return t.length?t:null}))}},{key:"fetch",value:function(t){return P.get("utils/getpositions.php",t)}}]),n}(ct);function Pt(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return It(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return It(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function It(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ct(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var jt=function(t){U()(r,t);var n=Ct(r);function r(t,e,i){var o;if(l()(this,r),o=n.call(this),!D()(t)||t<=0||!e||!(i instanceof Nt))throw new Error("Invalid argument for track constructor");return o.id=t,o.name=e,o.user=i,o.plotData=[],o.maxId=0,o.maxSpeed=0,o.maxAltitude=null,o.minAltitude=null,o.totalMeters=0,o.totalSeconds=0,o.listItem(t,e),o}return c()(r,[{key:"setName",value:function(t){this.name=t,this.listText=t}},{key:"clear",value:function(){ht()(B()(r.prototype),"clear",this).call(this),this.clearTrackCounters()}},{key:"clearTrackCounters",value:function(){this.maxId=0,this.maxSpeed=0,this.maxAltitude=null,this.minAltitude=null,this.plotData.length=0,this.totalMeters=0,this.totalSeconds=0}},{key:"isEqualTo",value:function(t){return!!t&&t.id===this.id}},{key:"fromJson",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];e&&this.hasPositions?n=this.positions:this.clear();var r,i=Pt(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=Lt.fromJson(o);this.calculatePosition(a),n.push(a)}}catch(t){i.e(t)}finally{i.f()}this.positions=n}},{key:"isLastPosition",value:function(t){return this.length>0&&t===this.length-1}},{key:"isFirstPosition",value:function(t){return this.length>0&&0===t}},{key:"fetchPositions",value:function(){var t=this,e={userid:this.user.id,trackid:this.id};return this.maxId&&(e.afterid=this.maxId),_t.fetch(e).then((function(n){t.fromJson(n,e.afterid>0)}))}},{key:"export",value:function(t){if(this.hasPositions){var n,r,i=e()(n=e()(r="utils/export.php?type=".concat(t,"&userid=")).call(r,this.user.id,"&trackid=")).call(n,this.id);At.openUrl(i)}}},{key:"delete",value:function(){return r.update({action:"delete",trackid:this.id})}},{key:"saveMeta",value:function(){return r.update({action:"update",trackid:this.id,trackname:this.name})}},{key:"recalculatePositions",value:function(){this.clearTrackCounters();var t,e=null,n=Pt(this.positions);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.meters=e?r.distanceTo(e):0,r.seconds=e?r.secondsTo(e):0,this.calculatePosition(r),e=r}}catch(t){n.e(t)}finally{n.f()}}},{key:"calculatePosition",value:function(t){this.totalMeters+=t.meters,this.totalSeconds+=t.seconds,t.totalMeters=this.totalMeters,t.totalSeconds=this.totalSeconds,t.hasAltitude()&&(this.plotData.push({x:t.totalMeters,y:t.altitude}),(null===this.maxAltitude||t.altitude>this.maxAltitude)&&(this.maxAltitude=t.altitude),(null===this.minAltitude||t.altitude<this.minAltitude)&&(this.minAltitude=t.altitude)),t.id>this.maxId&&(this.maxId=t.id),t.hasSpeed()&&t.speed>this.maxSpeed&&(this.maxSpeed=t.speed)}},{key:"hasPlotData",get:function(){return this.plotData.length>0}},{key:"hasAltitudes",get:function(){return null!==this.maxAltitude}},{key:"hasSpeeds",get:function(){return this.maxSpeed>0}}],[{key:"fetchLatest",value:function(t){return this.fetch({last:!0,userid:t.id}).then((function(e){if(e.length){var n=new r(e[0].trackid,e[0].trackname,t);return n.fromJson(e),n}return null}))}},{key:"fetchList",value:function(t){return P.get("utils/gettracks.php",{userid:t.id}).then((function(e){var n,i=[],o=Pt(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;i.push(new r(a.id,a.name,t))}}catch(t){o.e(t)}finally{o.f()}return i}))}},{key:"import",value:function(t,e){return P.post("utils/import.php",t).then((function(t){var n,i=[],o=Pt(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;i.push(new r(a.id,a.name,e))}}catch(t){o.e(t)}finally{o.f()}return i}))}},{key:"getMeta",value:function(t){return r.update({action:"getmeta",trackid:t})}},{key:"update",value:function(t){return P.post("utils/handletrack.php",t)}}]),r}(_t);function Dt(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return Rt(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ut(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var Nt=function(t){U()(n,t);var e=Ut(n);function n(t,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(l()(this,n),i=e.call(this),!D()(t)||t<=0)throw new Error("Invalid argument for user constructor");return i.id=t,i.login=r,i.isAdmin=o,i.listItem(t,r),i}return c()(n,[{key:"isEqualTo",value:function(t){return!!t&&t.id===this.id}},{key:"fetchLastPosition",value:function(){return jt.fetchLatest(this)}},{key:"delete",value:function(){return n.update({action:"delete",login:this.login})}},{key:"setPassword",value:function(t,e){return P.post("utils/changepass.php",{login:this.login,pass:t,oldpass:e})}},{key:"modify",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i={action:"update",login:this.login,admin:t};return r&&(i.pass=r),n.update(i).then((function(){e.isAdmin=t}))}}],[{key:"fetchList",value:function(){return P.get("utils/getusers.php").then((function(t){var e,r=[],i=Dt(t);try{for(i.s();!(e=i.n()).done;){var o=e.value;r.push(new n(o.id,o.login,o.isAdmin))}}catch(t){i.e(t)}finally{i.f()}return r}))}},{key:"add",value:function(t,e){return n.update({action:"add",login:t,pass:e}).then((function(e){return new n(e.id,t)}))}},{key:"update",value:function(t){return P.post("utils/handleuser.php",t)}}]),n}(ct),zt=function(){function t(){l()(this,t),this._isAdmin=!1,this._isAuthenticated=!1,this._user=null}return c()(t,[{key:"load",value:function(t){t&&t.isAuthenticated&&(this.user=new Nt(t.userId,t.userLogin),this.isAdmin=t.isAdmin)}},{key:"user",set:function(t){t?(this._user=t,this._isAuthenticated=!0):(this._user=null,this._isAuthenticated=!1,this._isAdmin=!1)},get:function(){return this._user}},{key:"isAdmin",set:function(t){if(!this._user)throw new Error("No authenticated user");this._isAdmin=t},get:function(){return this._isAdmin}},{key:"isAuthenticated",get:function(){return this._isAuthenticated}}]),t}(),Vt=i(6824),Bt=i.n(Vt),Ft=i(2609),Ht=i.n(Ft),qt=i(509),Gt=i.n(qt),Xt=i(5281),Yt=i.n(Xt),Zt=i(8894),Wt=i.n(Zt);function Jt(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var $t=function(t){U()(n,t);var e=Jt(n);function n(t,r,i,o){var a;return l()(this,n),(a=e.call(this)).id=t,a.name=r,a.url=i,a.priority=o,a.listItem(t,r),a}return c()(n,[{key:"setName",value:function(t){this.name=t,this.listItem(this.id,this.name)}},{key:"setUrl",value:function(t){this.url=t}}]),n}(ct);function Qt(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return Kt(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function te(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var ee=function(t){U()(r,t);var n=te(r);function r(){return l()(this,r),n.apply(this,arguments)}return c()(r,[{key:"addNewLayer",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.addLayer(this.getMaxId()+1,t,e,n)}},{key:"addLayer",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.push(new $t(t,e,n,r))}},{key:"delete",value:function(t){var e,n=Yt()(e=Et()(this).call(this,(function(t){return t.id}))).call(e,t);Gt()(this).call(this,n,1)}},{key:"get",value:function(t){return G()(this).call(this,(function(e){return e.id===t}))}},{key:"getMaxId",value:function(){var t;return Math.max.apply(Math,e()(t=H()(Et()(this).call(this,(function(t){return t.id})))).call(t,[0]))}},{key:"setPriorityLayer",value:function(t){var e,n=Qt(this);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.id>0&&r.id===t?r.priority=1:r.priority=0}}catch(t){n.e(t)}finally{n.f()}}},{key:"getPriorityLayer",value:function(){var t,e=Qt(this);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(n.priority>0)return n.id}}catch(t){e.e(t)}finally{e.f()}return 0}},{key:"load",value:function(t){this.length=0;var e,n=Qt(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.id>0&&this.addLayer(r.id,r.name,r.url,r.priority)}}catch(t){n.e(t)}finally{n.f()}}}]),r}(Wt()(Array)),ne=function(){function t(){l()(this,t),this.initialize()}return c()(t,[{key:"initialize",value:function(){this.interval=10,this.units="metric",this.lang="en",this.mapApi="openlayers",this.googleKey="",this.olLayers=new ee,this.initLatitude=52.23,this.initLongitude=21.01,this.requireAuth=!0,this.publicTracks=!1,this.passStrength=2,this.passLenMin=10,this.strokeWeight=2,this.strokeColor="#ff0000",this.strokeOpacity=1,this.colorNormal="#ffffff",this.colorStart="#55b500",this.colorStop="#ff6a00",this.colorExtra="#cccccc",this.colorHilite="#feff6a",this.uploadMaxSize=0,this.initUnits()}},{key:"initUnits",value:function(){"imperial"===this.units?(this.factorSpeed=2.237,this.unitSpeed="unitmph",this.factorDistance=3.28,this.unitDistance="unitft",this.factorDistanceMajor=.621,this.unitDistanceMajor="unitmi"):"nautical"===this.units?(this.factorSpeed=1.944,this.unitSpeed="unitkt",this.factorDistance=1,this.unitDistance="unitm",this.factorDistanceMajor=.54,this.unitDistanceMajor="unitnm"):(this.factorSpeed=3.6,this.unitSpeed="unitkmh",this.factorDistance=1,this.unitDistance="unitm",this.factorDistanceMajor=1,this.unitDistanceMajor="unitkm"),this.unitDay="unitday",this.unitAltitude="unitamsl"}},{key:"load",value:function(t){if(t){for(var e in t)"layers"===e?this.olLayers.load(t[e]):t.hasOwnProperty(e)&&this.hasOwnProperty(e)&&(this[e]=t[e]);this.initUnits()}}},{key:"save",value:function(t){var e,n,r=this;return this.load(t),t=Ht()(e=Bt()(n=pt()(this)).call(n,(function(t){return"function"!=typeof r[t]}))).call(e,(function(t,e){return t[e]=r[e],t}),{}),P.post("utils/saveconfig.php",t)}},{key:"reinitialize",value:function(){at.unobserveAll(this),this.initialize()}},{key:"onChanged",value:function(t,e){at.observe(this,t,e)}},{key:"validPassStrength",value:function(t){return this.getPassRegExp().test(t)}},{key:"getPassRegExp",value:function(){var t="";return this.passStrength>0&&(t+="(?=.*[a-z])(?=.*[A-Z])"),this.passStrength>1&&(t+="(?=.*[0-9])"),this.passStrength>2&&(t+="(?=.*[^a-zA-Z0-9])"),this.passLenMin>0&&(t+="(?=.{".concat(this.passLenMin,",})")),0===t.length&&(t=".*"),new RegExp(t)}}]),t}(),re=i(589),ie=i.n(re),oe=i(222),ae=i.n(oe),se=function(){function t(){l()(this,t),this.strings={},this.config=null}return c()(t,[{key:"init",value:function(t,e){this.config=t,e&&(this.strings=e)}},{key:"_",value:function(t){if(void 0===this.strings[t])throw new Error("Unknown localized string");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o;return r.length?At.sprintf.apply(At,e()(o=[this.strings[t]]).call(o,r)):this.strings[t]}},{key:"unit",value:function(t){var e=this.config[t];if(void 0===this.config[t])throw new Error("Unknown localized unit");return this._(e)}},{key:"getLocaleSpeed",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Math.round(t*this.config.factorSpeed*100)/100,r=n.toLocaleString(this.config.lang);return e&&(r+=" ".concat(this.unit("unitSpeed"))),r}},{key:"getLocaleDistanceMajor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Math.round(t*this.config.factorDistanceMajor/10)/100,r=n.toLocaleString(this.config.lang);return e&&(r+=" ".concat(this.unit("unitDistanceMajor"))),r}},{key:"getLocaleDistance",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Math.round(t*this.config.factorDistance*100)/100,r=n.toLocaleString(this.config.lang);return e&&(r+=" ".concat(this.unit("unitDistance"))),r}},{key:"getLocaleAltitude",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getLocaleDistance(t,e);return e&&(n+=" ".concat(this.unit("unitAltitude"))),n.replace("-","")}},{key:"getLocaleAccuracy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getLocaleDistance(t,e)}},{key:"getLocaleDuration",value:function(t){var n,r,i,o,a=Math.floor(t/86400),s=Math.floor(t%86400/3600),l=Math.floor(t%86400%3600/60);return t=t%86400%3600%60,(a>0?e()(n="".concat(a," ")).call(n,this.unit("unitDay")," "):"")+x()(r="00".concat(s)).call(r,-2)+":"+x()(i="00".concat(l)).call(i,-2)+":"+x()(o="00".concat(t)).call(o,-2)}},{key:"getLocaleCoordinates",value:function(t){var n;return e()(n="".concat(this.coordStr(t.longitude,!0)," ")).call(n,this.coordStr(t.latitude,!1))}},{key:"coordStr",value:function(t,n){var r,i,o,a=ae()(t),s=Math.round(100*(Math.abs(60*(t-a))+ie()))/100;return o=n?t<0?"W":"E":t<0?"S":"N",e()(r=e()(i="".concat(Math.abs(a).toLocaleString(this.config.lang),"°")).call(i,s.toLocaleString(this.config.lang,{maximumFractionDigits:2}),"'")).call(r,o)}},{key:"getLocalePassRules",value:function(){var t="";return this.config.passLenMin>0&&(t=At.sprintf(this._("passlenmin")+"\n",this.config.passLenMin)),this.config.passStrength>0&&this.config.passStrength<4&&(t+=this._("passrules_".concat(this.config.passStrength))),t}},{key:"getLangList",value:function(){return this.strings.langArr||{}}}]),t}(),le=function(){function t(){l()(this,t),this.auth=new zt,this.config=new ne,this.lang=new se}return c()(t,[{key:"initialize",value:function(){var t=this;return P.get("utils/getinit.php").then((function(e){if(!(e&&e.auth&&e.config&&e.lang))throw new Error("Corrupted initialization data");t.auth.load(e.auth),t.config.load(e.config),t.lang.init(t.config,e.lang)}))}}],[{key:"waitForDom",value:function(){return new(r())((function(t){"complete"===document.readyState||"interactive"===document.readyState?a()(t,1):document.addEventListener("DOMContentLoaded",t)}))}}]),t}(),ue=new le,ce=ue.config,fe=ue.lang,he=ue.auth,de=i(274),pe=i.n(de),ve=i(4375),me=i.n(ve),ye=function(){function t(e){l()(this,t),this._model=e,this.root=document}return c()(t,[{key:"bindAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;for(var e in this.root=t,this._model){var n;if(this._model.hasOwnProperty(e))me()(n=this).call(n,e)}}},{key:"bind",value:function(t){var e=this,n=this.root.querySelectorAll("[data-".concat("bind","]"));W()(n).call(n,(function(n){me()(n.dataset)===t&&(n instanceof HTMLInputElement||n instanceof HTMLSelectElement||n instanceof HTMLTextAreaElement?e.onChangeBind(n,t):n instanceof HTMLAnchorElement||n instanceof HTMLButtonElement?e.onClickBind(n,t):e.viewUpdateBind(n,t))}))}},{key:"onClickBind",value:function(t,e){var n=this;t.addEventListener("click",(function(t){if("function"!=typeof n._model[e])throw new Error("Property ".concat(e," is not a callback"));n._model[e](t),t.preventDefault()}))}},{key:"onChangeBind",value:function(t,e){var n=this,r="value",i=function(t){return t};"checkbox"===t.type&&(r="checked",i=function(t){return!!t}),t.addEventListener("change",(function(){n._model[e]=t[r]})),at.observe(this.model,e,(function(e){e=i(e),t[r]!==e&&(t[r]=e)}))}},{key:"viewUpdateBind",value:function(t,e){at.observe(this.model,e,(function(e){t.innerHTML!==e&&(t.innerHTML=e)}))}},{key:"onChanged",value:function(t,e){at.observe(this.model,t,e)}},{key:"unsubscribe",value:function(t,e){at.unobserve(this.model,t,e)}},{key:"getBoundElement",value:function(t){return this.root.querySelector("[data-bind='".concat(t,"']"))}},{key:"model",get:function(){return this._model}}]),t}(),ge=i(5826),be=i.n(ge);function xe(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var we=1e3,ke=function(t){U()(r,t);var n=xe(r);function r(t){var e;return l()(this,r),(e=n.call(this,{pointSelected:null,chartVisible:!1,buttonVisible:!1,onChartToggle:null,onMenuToggle:null})).state=t,e.data=[],e.chart=null,e.chartPoints=null,e.chartElement=document.querySelector("#chart"),e.chartContainer=e.chartElement.parentElement,e.buttonElement=document.querySelector("#altitudes"),e}return c()(r,[{key:"init",value:function(){return this.chartSetup(),this.setObservers(),this.bindAll(),this}},{key:"chartSetup",value:function(){var t,n,r=this;At.addCss("css/dist/chartist.css","chartist_css"),this.chart=new(pe().Line)(this.chartElement,{series:[this.data]},{lineSmooth:!0,showArea:!0,axisX:{type:pe().AutoScaleAxis,onlyInteger:!0,showLabel:!1},plugins:[be()({axisY:{axisTitle:e()(t=e()(n="".concat(fe._("altitude")," (")).call(n,fe.unit("unitDistance")," ")).call(t,fe.unit("unitAltitude"),")"),axisClass:"ct-axis-title",offset:{x:0,y:11},textAnchor:"middle",flipTitle:!0}})]}),this.chart.on("created",(function(){return r.onCreated()}))}},{key:"onCreated",value:function(){var t=this;if(this.data.length&&this.data.length<=we){this.chartPoints=document.querySelectorAll(".ct-series .ct-point");for(var e=this.chartPoints.length,n=function(e){t.chartPoints[e].addEventListener("click",(function(){t.model.pointSelected=e}))},r=0;r<e;r++)n(r)}}},{key:"setObservers",value:function(){var t=this;this.state.onChanged("currentTrack",(function(e){e&&at.observe(e,"positions",(function(){t.onTrackUpdate(e,!0)})),t.onTrackUpdate(e)})),this.onChanged("buttonVisible",(function(e){return t.renderButton(e)})),this.onChanged("chartVisible",(function(e){return t.renderContainer(e)})),this.model.onChartToggle=function(){t.model.chartVisible=!t.model.chartVisible},this.model.onMenuToggle=function(){t.model.chartVisible&&t.chart.update()}}},{key:"onTrackUpdate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.render(t,e),this.model.buttonVisible=!!t&&t.hasPlotData}},{key:"renderContainer",value:function(t){t?(this.chartContainer.style.display="block",this.render(this.state.currentTrack)):this.chartContainer.style.display="none"}},{key:"renderButton",value:function(t){t?this.buttonElement.classList.remove("menu-hidden"):this.buttonElement.classList.add("menu-hidden")}},{key:"render",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];if(t&&t.hasPlotData&&this.model.chartVisible?r=t.plotData:this.model.chartVisible=!1,n||this.data!==r){var i;e()(i="Chart".concat(n?" forced":""," update (")).call(i,r.length,")"),this.data=r;var o={lineSmooth:r.length<=we};this.chart.update({series:[r]},o,!0)}}},{key:"pointAddClass",value:function(t,e){this.model.chartVisible&&this.chartPoints.length>t&&this.chartPoints[t].classList.add(e)}},{key:"pointsRemoveClass",value:function(t){var e;this.model.chartVisible&&this.chartPoints&&W()(e=this.chartPoints).call(e,(function(e){return e.classList.remove(t)}))}},{key:"onPointOver",value:function(t){this.pointAddClass(t,"ct-point-hilight")}},{key:"onPointOut",value:function(){this.pointsRemoveClass("ct-point-hilight")}},{key:"onPointSelect",value:function(t){this.pointAddClass(t,"ct-point-selected")}},{key:"onPointUnselect",value:function(){this.pointsRemoveClass("ct-point-selected")}}]),r}(ye),Se=i(3482),Ee=i.n(Se),Ae=i(9989),Le=i.n(Ae),Me=i(7365),Te=i.n(Me),Oe=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l()(this,t),this.autoClose=r.autoClose||0,this.hasButton=void 0!==r.hasButton?r.hasButton:0===this.autoClose,this.fixedPosition=r.fixed||!1;var i='<div class="alert"><span>'.concat(e,"</span></div>");if(this.box=At.nodeFromHtml(i),r.id&&(this.box.id=r.id),r.class&&this.box.classList.add(r.class),this.hasButton){var o=document.createElement("button");o.setAttribute("type","button"),o.textContent="×",o.onclick=function(){return n.destroy()},this.box.appendChild(o)}this.closeHandle=null}return c()(t,[{key:"render",value:function(){var e=this;if(!this.fixedPosition){var n=t.getPosition();n&&(this.box.style.top="".concat(n,"px"))}document.body.appendChild(this.box),a()((function(){e.box&&e.box.classList.add("in")}),50)}},{key:"destroy",value:function(){if(this.closeHandle&&(clearTimeout(this.closeHandle),this.closeHandle=null),this.box&&document.body.contains(this.box)){var t=this.box;requestAnimationFrame((function(){t.classList.add("out"),a()((function(){t.remove()}),1e3)})),this.box=null}}}],[{key:"getPosition",value:function(){var t=document.querySelectorAll(".alert"),e=t[t.length-1],n=0;if(e){var r=document.body.clientHeight-100;(n=e.getBoundingClientRect().bottom)>r&&(n=r)}return n}},{key:"show",value:function(e,n){var r=new t(e,n);return r.render(),r.autoClose&&(r.closeHandle=a()((function(){return r.destroy()}),r.autoClose)),r}},{key:"error",value:function(t,n){var r,i;n instanceof Error&&console.error(e()(r=e()(i="".concat(n.name,": ")).call(i,n.message," (")).call(r,n.stack,")"));return this.show(t,{class:"error"})}},{key:"toast",value:function(t){return this.show(t,{class:"toast",autoClose:1e4})}},{key:"spinner",value:function(){return this.show("",{class:"spinner",hasButton:!1,fixed:!0})}}]),t}();function _e(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return Pe(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pe(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Pe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ie=function(){function t(e){l()(this,t);var n=document.createElement("div");n.setAttribute("id","modal");var r=document.createElement("div");r.setAttribute("id","modal-header");var i=document.createElement("button");i.setAttribute("id","modal-close"),i.setAttribute("type","button"),i.setAttribute("class","button-reject"),i.setAttribute("data-bind","onCancel");var o=document.createElement("img");o.setAttribute("src","images/close.svg"),o.setAttribute("alt",fe._("close")),i.append(o),r.append(i);var a=document.createElement("div");if(a.setAttribute("id","modal-body"),"string"==typeof e)a.innerHTML=e;else if(e instanceof NodeList||e instanceof Array){var s,u=_e(e);try{for(u.s();!(s=u.n()).done;){var c=s.value;a.append(c)}}catch(t){u.e(t)}finally{u.f()}}else a.append(e);a.prepend(r),n.append(a),this.element=n,this.visible=!1}return c()(t,[{key:"show",value:function(){this.visible||(document.body.append(this.element),this.visible=!0,this.autofocus())}},{key:"autofocus",value:function(){var t=this.element.querySelector("[autofocus]");t&&t.focus()}},{key:"destroy",value:function(){document.body.removeChild(this.element),this.visible=!1}}],[{key:"isConfirmed",value:function(t){return confirm(t)}}]),t}();function Ce(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return je(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return je(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function je(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function De(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var Re=function(t){U()(r,t);var n=De(r);function r(){var t,i;return l()(this,r),(i=n.call(this,{colorExtra:ce.colorExtra,colorHilite:ce.colorHilite,colorNormal:ce.colorNormal,colorStart:ce.colorStart,colorStop:ce.colorStop,googleKey:ce.googleKey,initLatitude:ce.initLatitude,initLongitude:ce.initLongitude,interval:ce.interval,lang:ce.lang,layerId:0,layerName:null,layers:Te()(ee,e()(t=[new $t(0,"OpenStreetMap","",0)]).call(t,H()(ce.olLayers))),layerUrl:null,mapApi:ce.mapApi,passLenMin:ce.passLenMin,passStrength:ce.passStrength,publicTracks:ce.publicTracks,requireAuth:ce.requireAuth,strokeColor:ce.strokeColor,strokeOpacity:ce.strokeOpacity,strokeWeight:ce.strokeWeight,units:ce.units,uploadMaxSize:ce.uploadMaxSize,uploadMaxSizeMB:ce.uploadMaxSize/1024/1024})).model.onCancel=function(){return i.onCancel()},i.model.onSave=function(){return i.onSave()},i.model.onLayerUpdate=function(){return i.onLayerUpdate()},i.model.onLayerCancel=function(){return i.onLayerCancel()},i.model.onLayerEdit=function(){return i.onLayerEdit()},i.model.onLayerDelete=function(){return i.onLayerDelete()},i.model.onLayerAdd=function(){return i.onLayerAdd()},i}return c()(r,[{key:"init",value:function(){var t=this,e=this.getHtml();this.dialog=new Ie(e),this.dialog.show(),this.bindAll(this.dialog.element),this.toggleEditEl=this.getBoundElement("onLayerEdit").parentNode,this.layerEditEl=this.getBoundElement("layerName").parentNode,this.layerSelect=new ut(this.getBoundElement("layerId")),this.setPublicTracksActivity(this.model.requireAuth),this.toggleEditVisible(),this.onChanged("layerId",(function(e){var n=t.model.layers.get(kt()(e));t.model.layerName=n?n.name:"",t.model.layerUrl=n?n.url:"",t.toggleEditVisible()})),this.model.layerId=ce.olLayers.getPriorityLayer().toString(),this.onChanged("uploadMaxSizeMB",(function(e){t.model.uploadMaxSize=1024*e*1024})),this.onChanged("layers",(function(e){return t.layerSelect.setOptions(e)})),this.onChanged("requireAuth",(function(e){t.setPublicTracksActivity(e)}))}},{key:"setPublicTracksActivity",value:function(t){t?this.getBoundElement("publicTracks").disabled=!1:(this.model.publicTracks=!0,this.getBoundElement("publicTracks").disabled=!0)}},{key:"onCancel",value:function(){this.dialog.destroy()}},{key:"onSave",value:function(){var t=this;this.validate()&&(this.model.layers.setPriorityLayer(kt()(this.model.layerId)),ce.save(this.model).then((function(){return t.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)})))}},{key:"validate",value:function(){return this.dialog.element.querySelector("form").checkValidity()}},{key:"toggleEditVisible",value:function(){kt()(this.model.layerId)>0?this.toggleEditEl.style.visibility="visible":(this.toggleEditEl.style.visibility="hidden",this.hideEditElement())}},{key:"onLayerDelete",value:function(){this.model.layers.delete(kt()(this.model.layerId)),this.model.layerId="0"}},{key:"onLayerEdit",value:function(){"none"===this.layerEditEl.style.display?this.showEditElement():this.hideEditElement()}},{key:"onLayerUpdate",value:function(){if(this.model.layerName&&this.model.layerUrl){if("-1"===this.model.layerId)this.model.layers.addNewLayer(this.model.layerName,this.model.layerUrl);else{var t=this.currentLayer();t.setName(this.model.layerName),t.setUrl(this.model.layerUrl)}this.hideEditElement(),this.layerSelect.setOptions(this.model.layers)}}},{key:"onLayerCancel",value:function(){this.hideEditElement(),this.layerSelect.setOptions(this.model.layers)}},{key:"onLayerAdd",value:function(){this.model.layerId="-1",this.onLayerEdit()}},{key:"hideEditElement",value:function(){this.layerEditEl.style.display="none"}},{key:"showEditElement",value:function(){this.layerEditEl.style.display="block"}},{key:"currentLayer",value:function(){return this.model.layers.get(kt()(this.model.layerId))}},{key:"getHtml",value:function(){for(var t,n,r,i,o,a,s,l,u,c,f,h,d,p,v,m,y,g,b,x,w,k,S,E,A,L,M,T,O,_,P,I,C,j,D,R,U,N,z,V,B,F,H,q,G,X,Y,Z,W,J,$,Q,K,tt,et,nt,rt="",it=0,ot=Le()(fe.getLangList());it<ot.length;it++){var at,st,lt=Ee()(ot[it],2),ut=lt[0],ct=lt[1];rt+=e()(at=e()(st='<option value="'.concat(ut,'"')).call(st,this.model.lang===ut?" selected":"",">")).call(at,ct,"</option>")}for(var ft="",ht=0,dt=["metric","imperial","nautical"];ht<dt.length;ht++){var pt,vt,mt=dt[ht];ft+=e()(pt=e()(vt='<option value="'.concat(mt,'"')).call(vt,this.model.units===mt?" selected":"",">")).call(pt,fe._(mt),"</option>")}var yt,gt="",bt=Ce(this.model.layers);try{for(bt.s();!(yt=bt.n()).done;){var xt,wt,kt=yt.value;gt+=e()(xt=e()(wt='<option value="'.concat(kt.id,'"')).call(wt,kt.priority>0?" selected":"",">")).call(xt,kt.name,"</option>")}}catch(t){bt.e(t)}finally{bt.f()}return e()(t=e()(n=e()(r=e()(i=e()(o=e()(a=e()(s=e()(l=e()(u=e()(c=e()(f=e()(h=e()(d=e()(p=e()(v=e()(m=e()(y=e()(g=e()(b=e()(x=e()(w=e()(k=e()(S=e()(E=e()(A=e()(L=e()(M=e()(T=e()(O=e()(_=e()(P=e()(I=e()(C=e()(j=e()(D=e()(R=e()(U=e()(N=e()(z=e()(V=e()(B=e()(F=e()(H=e()(q=e()(G=e()(X=e()(Y=e()(Z=e()(W=e()(J=e()($=e()(Q=e()(K=e()(tt=e()(et=e()(nt='<div><img style="vertical-align: bottom; margin-right: 10px;" src="images/settings.svg" alt="'.concat(fe._("settings"),'"> <b>')).call(nt,fe._("editingconfig"),'</b></div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="configForm">\n <label><b>')).call(et,fe._("language"),'</b>\n <select data-bind="lang">\n ')).call(tt,rt,"\n </select></label>\n <label><b>")).call(K,fe._("units"),'</b>\n <select data-bind="units">\n ')).call(Q,ft,"\n </select></label>\n <label><b>")).call($,fe._("api"),'</b>\n <select data-bind="mapApi">\n <option value="openlayers"')).call(J,"openlayers"===this.model.mapApi?" selected":"",'>OpenLayers</option>\n <option value="gmaps"')).call(W,"gmaps"===this.model.mapApi?" selected":"",">Google Maps</option>\n </select></label>\n <label><b>")).call(Z,fe._("ollayers"),'</b>\n <select data-bind="layerId">\n ')).call(Y,gt,'\n </select>\n <a data-bind="onLayerAdd"><img src="images/add.svg" alt="')).call(X,fe._("add"),'"></a> \n <span style="visibility: hidden;">\n <a data-bind="onLayerEdit"><img src="images/edit.svg" alt="')).call(G,fe._("edit"),'"></a> \n <a data-bind="onLayerDelete"><img src="images/delete.svg" alt="')).call(q,fe._("delete"),'"></a>\n </span></label>\n <div style="display: none; text-align: center;">\n <input type="text" maxlength="50" placeholder="')).call(H,fe._("layername"),'" data-bind="layerName">\n <input type="text" maxlength="255" placeholder="')).call(F,fe._("layerurl"),'" data-bind="layerUrl">\n <button class="button-resolve" data-bind="onLayerUpdate" type="submit">')).call(B,fe._("submit"),'</button>\n <button class="button-reject" data-bind="onLayerCancel" type="button">')).call(V,fe._("cancel"),"</button>\n </div>\n <label><b>")).call(z,fe._("interval"),'</b>\n <input type="number" data-bind="interval" min="1" value="')).call(N,this.model.interval,'" required></label>\n <label><b>')).call(U,fe._("longitude"),'</b>\n <input type="number" data-bind="initLongitude" min="-180" max="180" step="0.01" value="')).call(R,this.model.initLongitude,'" required></label>\n <label><b>')).call(D,fe._("latitude"),'</b>\n <input type="number" data-bind="initLatitude" min="-90" max="90" step="0.01" value="')).call(j,this.model.initLatitude,'" required></label>\n <label><b>')).call(C,fe._("googlekey"),'</b>\n <input type="text" data-bind="googleKey" value="')).call(I,this.model.googleKey,'"></label>\n <label><b>')).call(P,fe._("passlength"),'</b>\n <input type="number" data-bind="passLenMin" min="1" value="')).call(_,this.model.passLenMin,'" required></label>\n <label><b>')).call(O,fe._("passstrength"),'</b>\n <select data-bind="passStrength">\n <option value="0"')).call(T,0===this.model.passStrength?" selected":"",'>password</option>\n <option value="1"')).call(M,1===this.model.passStrength?" selected":"",'>paSsword</option>\n <option value="2"')).call(L,2===this.model.passStrength?" selected":"",'>paSsword1</option>\n <option value="3"')).call(A,3===this.model.passStrength?" selected":"",">paSsword1#</option>\n </select></label>\n <label><b>")).call(E,fe._("uploadmaxsize"),'</b>\n <input type="number" data-bind="uploadMaxSizeMB" min="1" value="')).call(S,this.model.uploadMaxSizeMB,'" required></label>\n <label><b>')).call(k,fe._("requireauth"),'</b>\n <input type="checkbox" data-bind="requireAuth"')).call(w,this.model.requireAuth?" checked":"","></label>\n <label><b>")).call(x,fe._("publictracks"),'</b>\n <input type="checkbox" data-bind="publicTracks"')).call(b,this.model.publicTracks?" checked":"","></label>\n <label><b>")).call(g,fe._("strokeweight"),'</b>\n <input type="number" data-bind="strokeWeight" min="1" value="')).call(y,this.model.strokeWeight,'" required></label>\n <label><b>')).call(m,fe._("strokeopacity"),'</b>\n <input type="number" data-bind="strokeOpacity" min="0" max="1" step="0.01" value="')).call(v,this.model.strokeOpacity,'" required></label>\n <label><b>')).call(p,fe._("strokecolor"),'</b>\n <input type="color" data-bind="strokeColor" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(d,this.model.strokeColor,'" required></label>\n <label><b>')).call(h,fe._("colornormal"),'</b>\n <input type="color" data-bind="colorNormal" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(f,this.model.colorNormal,'" required></label>\n <label><b>')).call(c,fe._("colorstart"),'</b>\n <input type="color" data-bind="colorStart" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(u,this.model.colorStart,'" required></label>\n <label><b>')).call(l,fe._("colorstop"),'</b>\n <input type="color" data-bind="colorStop" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(s,this.model.colorStop,'" required></label>\n <label><b>')).call(a,fe._("colorextra"),'</b>\n <input type="color" data-bind="colorExtra" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(o,this.model.colorExtra,'" required></label>\n <label><b>')).call(i,fe._("colorhilite"),'</b>\n <input type="color" data-bind="colorHilite" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(r,this.model.colorHilite,'" required></label>\n <div class="buttons">\n <button class="button-reject" data-bind="onCancel" type="button">')).call(n,fe._("cancel"),'</button>\n <button class="button-resolve" data-bind="onSave" type="submit">')).call(t,fe._("submit"),"</button>\n </div>\n </form>")}}]),r}(ye);function Ue(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var Ne=function(t){U()(n,t);var e=Ue(n);function n(t){var r;return l()(this,n),(r=e.call(this,ce)).state=t,r.model.onSetInterval=function(){return r.setAutoReloadInterval()},r.model.onConfigEdit=function(){return r.showConfigDialog()},r}return c()(n,[{key:"init",value:function(){return this.setObservers(),this.bindAll(),this}},{key:"setObservers",value:function(){this.onChanged("mapApi",(function(t){At.setCookie("api",t)})),this.onChanged("lang",(function(t){At.setCookie("lang",t),n.reload()})),this.onChanged("units",(function(t){At.setCookie("units",t),n.reload()})),this.onChanged("interval",(function(t){At.setCookie("interval",t)}))}},{key:"setAutoReloadInterval",value:function(){var t=kt()(prompt(fe._("newinterval")));isNaN(t)||t===this.model.interval||(this.model.interval=t)}},{key:"showConfigDialog",value:function(){new Re(this).init()}}],[{key:"reload",value:function(){window.location.reload()}}]),n}(ye);function ze(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var Ve,Be="menu-hidden",Fe=function(t){U()(n,t);var e=ze(n);function n(t){var r;return l()(this,n),(r=e.call(this,{onMenuToggle:null,onShowUserMenu:null,onLogin:null,onLogout:null})).state=t,r.model.onMenuToggle=function(){return r.toggleSideMenu()},r.model.onShowUserMenu=function(){return r.toggleUserMenu()},r.model.onLogin=function(){return n.login()},r.model.onLogout=function(){return n.logout()},r.hideUserMenuCallback=function(t){return r.hideUserMenu(t)},r.menuEl=document.querySelector("#menu"),r.userMenuEl=document.querySelector("#user-menu"),r}return c()(n,[{key:"init",value:function(){return this.bindAll(),this}},{key:"toggleSideMenu",value:function(){this.menuEl.classList.contains(Be)?this.menuEl.classList.remove(Be):this.menuEl.classList.add(Be)}},{key:"toggleUserMenu",value:function(){this.userMenuEl.classList.contains(Be)?(this.userMenuEl.classList.remove(Be),window.addEventListener("click",this.hideUserMenuCallback,!0)):this.userMenuEl.classList.add(Be)}},{key:"hideUserMenu",value:function(t){var e=t.target;this.userMenuEl.classList.add(Be),window.removeEventListener("click",this.hideUserMenuCallback,!0),"user-menu"!==e.parentElement.id&&t.stopPropagation()}}],[{key:"login",value:function(){At.openUrl("login.php".concat(window.location.hash))}},{key:"logout",value:function(){var t="utils/logout.php";ce.requireAuth||(t+="?hash=".concat(window.location.hash.replace("#",""))),At.openUrl(t)}}]),n}(ye),He=function(){function t(e){l()(this,t),this.map=null,this.viewModel=e,this.polies=[],this.markers=[],this.popup=null,this.timeoutHandle=0}return c()(t,[{key:"init",value:function(){var e=this,n="?".concat(ce.googleKey?"key=".concat(ce.googleKey,"&"):"","callback=gm_loaded");return r().all([t.onScriptLoaded(),At.loadScript("https://maps.googleapis.com/maps/api/js".concat(n),"mapapi_gmaps",t.loadTimeoutMs)]).then((function(){return e.initMap()}))}},{key:"initMap",value:function(){var t=this,e={center:new google.maps.LatLng(ce.initLatitude,ce.initLongitude),zoom:8,mapTypeId:google.maps.MapTypeId.TERRAIN,scaleControl:!0,controlSize:30};this.map=new google.maps.Map(this.viewModel.mapElement,e),this.popup=new google.maps.InfoWindow,this.popup.addListener("closeclick",(function(){t.popupClose()})),this.saveState=function(){t.viewModel.state.mapParams=t.getState()}}},{key:"cleanup",value:function(){this.polies.length=0,this.markers.length=0,this.popup=null,Et()(this)&&Et()(this).getDiv()&&(Et()(this).getDiv().innerHTML=""),this.map=null}},{key:"displayTrack",value:function(t,e){var n=this;if(!t||!t.hasPositions)return r().resolve();google.maps.event.clearListeners(Et()(this),"idle");var i,o=new(r())((function(t){google.maps.event.addListenerOnce(Et()(n),"tilesloaded",(function(){Et()(n)&&(n.saveState(),Et()(n).addListener("idle",n.saveState)),t()}))})),s={strokeColor:ce.strokeColor,strokeOpacity:ce.strokeOpacity,strokeWeight:ce.strokeWeight},l=new google.maps.LatLngBounds;if(this.polies.length){i=this.polies[0];for(var u=0;u<this.markers.length;u++)l.extend(this.markers[u].getPosition())}else(i=new google.maps.Polyline(s)).setMap(Et()(this)),this.polies.push(i);var c=i.getPath(),f=this.markers.length;f>0&&this.removePoint(--f);for(var h=f;h<t.length;h++){this.setMarker(h,t);var d=t.positions[h],p=new google.maps.LatLng(d.latitude,d.longitude);t instanceof jt&&c.push(p),l.extend(p)}if(e&&(Et()(this).fitBounds(l),1===t.length)){var v=google.maps.event.addListenerOnce(Et()(this),"bounds_changed",(function(){this.getZoom()&&this.setZoom(15)}));a()((function(){google.maps.event.removeListener(v)}),2e3)}return o}},{key:"clearMap",value:function(){if(this.polies)for(var t=0;t<this.polies.length;t++)this.polies[t].setMap(null);if(this.markers)for(var e=0;e<this.markers.length;e++)this.markers[e].setMap(null);this.popup.getMap()&&this.popupClose(),this.popup.setContent(""),this.markers.length=0,this.polies.length=0}},{key:"setMarker",value:function(e,n){var r,i=this,o=n.positions[e],a=new google.maps.Marker({position:new google.maps.LatLng(o.latitude,o.longitude),title:new Date(1e3*o.timestamp).toLocaleString(),map:Et()(this)}),s=o.hasComment()||o.hasImage();r=n.isLastPosition(e)?t.getMarkerIcon(ce.colorStop,!0,s):n.isFirstPosition(e)?t.getMarkerIcon(ce.colorStart,!0,s):t.getMarkerIcon(s?ce.colorExtra:ce.colorNormal,!1,s),a.setIcon(r),a.addListener("click",(function(){i.popupOpen(e,a)})),a.addListener("mouseover",(function(){i.viewModel.model.markerOver=e})),a.addListener("mouseout",(function(){i.viewModel.model.markerOver=null})),this.markers.push(a)}},{key:"removePoint",value:function(t){var e;this.markers.length>t&&(this.markers[t].setMap(null),Gt()(e=this.markers).call(e,t,1),this.polies.length&&this.polies[0].getPath().removeAt(t),this.viewModel.model.markerSelect===t&&this.popupClose())}},{key:"popupOpen",value:function(t,e){this.popup.setContent(this.viewModel.getPopupElement(t)),this.popup.open(Et()(this),e),this.viewModel.model.markerSelect=t}},{key:"popupClose",value:function(){this.viewModel.model.markerSelect=null,this.popup.close()}},{key:"animateMarker",value:function(e){var n=this;this.popup.getMap()&&(this.popupClose(),clearTimeout(this.timeoutHandle));var r=this.markers[e].getIcon();this.markers[e].setIcon(t.getMarkerIcon(ce.colorHilite,!1,!1)),this.markers[e].setAnimation(google.maps.Animation.BOUNCE),this.timeoutHandle=a()((function(){n.markers[e].setIcon(r),n.markers[e].setAnimation(null)}),2e3)}},{key:"getBounds",value:function(){var t=Et()(this).getBounds(),e=t.getSouthWest().lat(),n=t.getSouthWest().lng(),r=t.getNorthEast().lat();return[n,e,t.getNorthEast().lng(),r]}},{key:"zoomToExtent",value:function(){for(var t=new google.maps.LatLngBounds,e=0;e<this.markers.length;e++)t.extend(this.markers[e].getPosition());Et()(this).fitBounds(t)}},{key:"zoomToBounds",value:function(t){var e=new google.maps.LatLng(t[1],t[0]),n=new google.maps.LatLng(t[3],t[2]),r=new google.maps.LatLngBounds(e,n);Et()(this).fitBounds(r)}},{key:"updateSize",value:function(){}},{key:"setTrackDefaultStyle",value:function(){}},{key:"setTrackGradientStyle",value:function(t,e,n){}},{key:"updateState",value:function(t){Et()(this).setCenter({lat:t.center[0],lng:t.center[1]}),Et()(this).setZoom(t.zoom)}},{key:"getState",value:function(){if(Et()(this)){var t=Et()(this).getCenter();return{center:[t.lat(),t.lng()],zoom:Et()(this).getZoom(),rotation:0}}return null}}],[{key:"onScriptLoaded",value:function(){var e=At.timeoutPromise(t.loadTimeoutMs),n=new(r())((function(e,n){window.gm_loaded=function(){t.gmInitialized=!0,e()},window.gm_authFailure=function(){t.authError=!0;var e=fe._("apifailure","Google Maps");e+="<br><br>"+fe._("gmauthfailure"),e+="<br><br>"+fe._("gmapilink"),t.gmInitialized&&Oe.error(e),n(new Error(e))},t.authError&&window.gm_authFailure(),t.gmInitialized&&window.gm_loaded()}));return r().race([n,e])}},{key:"getMarkerIcon",value:function(t,e,n){return{anchor:new google.maps.Point(15,35),url:$e.getSvgSrc(t,e,n)}}},{key:"loadTimeoutMs",get:function(){return 1e4}}]),t}();function qe(t,e){var n;if(void 0===m()||null==p()(t)){if(L()(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return Ge(t,e);var r=x()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return g()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ge(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=h()(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ge(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}He.authError=!1,He.gmInitialized=!1;var Xe=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;l()(this,t),this.map=null,this.viewModel=e,this.layerTrack=null,this.layerMarkers=null,this.selectedLayer=null,this.markerStyles=null,this.popup=null,n&&(Ve=n)}return c()(t,[{key:"init",value:function(){var t=this;return At.addCss("css/dist/ol.css","ol_css"),(Ve?r().resolve():i.e(521).then(i.bind(i,9003)).then((function(t){Ve=t}))).then((function(){t.initMap(),t.initLayers(),t.initStyles(),t.initPopups()}))}},{key:"initMap",value:function(){var t=this,e=[new Ve.control.Zoom,new Ve.control.Rotate,new Ve.control.ScaleLine],n=new Ve.View({center:Ve.proj.fromLonLat([ce.initLongitude,ce.initLatitude]),zoom:8});this.map=new Ve.Map({target:this.viewModel.mapElement,controls:e,view:n}),Et()(this).on("pointermove",(function(e){var n=Et()(t).forEachFeatureAtPixel(e.pixel,(function(t,e){return"Markers"===e.get("name")?t:null}));if(n){Et()(t).getTargetElement().style.cursor="pointer";var r=n.getId();r!==t.viewModel.model.markerOver&&(t.viewModel.model.markerOver=r)}else Et()(t).getTargetElement().style.cursor="",t.viewModel.model.markerOver=null})),this.saveState=function(){t.viewModel.state.mapParams=t.getState()}}},{key:"initLayers",value:function(){var t=new Ve.layer.TileLayer({name:"OpenStreetMap",visible:!0,source:new Ve.source.OSM});Et()(this).addLayer(t),this.selectedLayer=t;var e,n=qe(ce.olLayers);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=new Ve.layer.TileLayer({name:r.name,visible:!1,source:new Ve.source.XYZ({url:r.url})});Et()(this).addLayer(i),r.priority&&(this.selectedLayer.setVisible(!1),this.selectedLayer=i,this.selectedLayer.setVisible(!0))}}catch(t){n.e(t)}finally{n.f()}this.layerTrack=new Ve.layer.VectorLayer({name:"Track",type:"data",source:new Ve.source.Vector}),this.layerMarkers=new Ve.layer.VectorLayer({name:"Markers",type:"data",source:new Ve.source.Vector}),Et()(this).addLayer(this.layerTrack),Et()(this).addLayer(this.layerMarkers),this.initLayerSwitcher()}},{key:"initStyles",value:function(){var t=[.5,1];this.markerStyles={start:new Ve.style.Style({image:new Ve.style.Icon({anchor:t,src:$e.getSvgSrc(ce.colorStart,!0)})}),stop:new Ve.style.Style({image:new Ve.style.Icon({anchor:t,src:$e.getSvgSrc(ce.colorStop,!0)})}),normal:new Ve.style.Style({image:new Ve.style.Icon({anchor:t,opacity:.7,src:$e.getSvgSrc(ce.colorNormal,!1)})}),extra:new Ve.style.Style({image:new Ve.style.Icon({anchor:t,src:$e.getSvgSrc(ce.colorExtra,!1,!0)})}),startExtra:new Ve.style.Style({image:new Ve.style.Icon({anchor:t,src:$e.getSvgSrc(ce.colorStart,!0,!0)})}),stopExtra:new Ve.style.Style({image:new Ve.style.Icon({anchor:t,src:$e.getSvgSrc(ce.colorStop,!0,!0)})}),hilite:new Ve.style.Style({image:new Ve.style.Icon({anchor:t,src:$e.getSvgSrc(ce.colorHilite,!1)})})}}},{key:"setTrackDefaultStyle",value:function(){var t=new Ve.style.Style({stroke:new Ve.style.Stroke({color:At.hexToRGBA(ce.strokeColor,ce.strokeOpacity),width:ce.strokeWeight})});this.layerTrack.setStyle(t)}},{key:"getGradientStyle",value:function(t,e,n){var r=Et()(this).getPixelFromCoordinate(e[0]),i=Et()(this).getPixelFromCoordinate(e[1]),o=window.devicePixelRatio,a=r[0]*o,s=r[1]*o,l=i[0]*o,u=i[1]*o,c=t.createLinearGradient(a,s,l,u);return c.addColorStop(0,n[0]),c.addColorStop(1,n[1]),new Ve.style.Style({geometry:new Ve.geom.LineString(e),stroke:new Ve.style.Stroke({color:c,width:2*ce.strokeWeight})})}},{key:"setTrackGradientStyle",value:function(t,e,n){var r=this,i=n.minValue,o=n.maxValue,a=n.minColor,s=n.maxColor;if(t.length<2||o<i)this.setTrackDefaultStyle();else{var l=document.createElement("canvas",{alpha:!1,desynchronized:!0}).getContext("2d");this.layerTrack.setStyle((function(n){var u=[new Ve.style.Style({stroke:new Ve.style.Stroke({color:"grey",width:2*ce.strokeWeight+2})})],c=n.getGeometry();if(i===o)return u.push(new Ve.style.Style({geometry:c,stroke:new Ve.style.Stroke({color:At.getScaleColor(a,s,.5),width:2*ce.strokeWeight})})),u;var f=t.positions[0],h=null!==f[e]?f[e]:0,d=At.getScaleColor(a,s,(h-i)/(o-i)),p=1;return c.forEachSegment((function(n,c){var h;h=null!==(f=t.positions[p])[e]?At.getScaleColor(a,s,(f[e]-i)/(o-i)):d,u.push(r.getGradientStyle(l,[n,c],[d,h])),d=h,p++})),u}))}}},{key:"initPopups",value:function(){var t=this,e=document.createElement("div");e.id="popup-container",e.className="ol-popup";var n=document.createElement("div");n.id="popup-content",e.appendChild(n);var r=document.createElement("a");r.className="ol-popup-closer",e.appendChild(r),this.popup=new Ve.Overlay({element:e,autoPan:!0,autoPanAnimation:{duration:250}}),Et()(this).addOverlay(this.popup),r.onclick=function(){return t.popupClose(),r.blur(),!1},Et()(this).on("click",(function(e){var n=e.coordinate,r=Et()(t).forEachFeatureAtPixel(e.pixel,(function(t,e){return"Markers"===e.get("name")?t:null}));r?t.popupOpen(r.getId(),n):t.popupClose()}))}},{key:"popupOpen",value:function(t,e){this.popup.getElement().firstElementChild.innerHTML="",this.popup.getElement().firstElementChild.appendChild(this.viewModel.getPopupElement(t)),this.popup.setPosition(e),this.viewModel.model.markerSelect=t}},{key:"popupClose",value:function(){this.popup&&(this.popup.setPosition(void 0),this.popup.getElement().firstElementChild.innerHTML=""),this.viewModel.model.markerSelect=null}},{key:"switchLayer",value:function(t){var e,n=this;W()(e=Et()(this).getLayers()).call(e,(function(e){e.get("name")===t&&("data"===e.get("type")?e.getVisible()?e.setVisible(!1):e.setVisible(!0):(n.selectedLayer.setVisible(!1),n.selectedLayer=e,e.setVisible(!0)))}))}},{key:"initLayerSwitcher",value:function(){var t,e=this,n=document.createElement("div");n.id="switcher",n.className="ol-control",document.body.appendChild(n);var r=document.createElement("div");r.id="switcher-content",r.className="ol-layerswitcher",n.appendChild(r);var i=document.createElement("a");i.className="ol-popup-closer",n.appendChild(i),W()(t=Et()(this).getLayers()).call(t,(function(t){var n=document.createElement("label");n.innerHTML=t.get("name"),r.appendChild(n);var i=document.createElement("input");"data"===t.get("type")?(i.type="checkbox",n.className="ol-datalayer"):i.type="radio",i.name="layer",i.value=t.get("name"),i.onclick=function(t){var n=t.target;e.switchLayer(n.value)},t.getVisible()&&(i.checked=!0),n.insertBefore(i,n.childNodes[0])}));var o=document.createElement("button"),a=document.createElement("img");a.src="images/layers.svg",a.style.width="60%",o.appendChild(a);var s=function(){"block"===n.style.display?n.style.display="none":n.style.display="block"};i.addEventListener("click",s,!1),o.addEventListener("click",s,!1),o.addEventListener("touchstart",s,!1);var l=document.createElement("div");l.className="ol-switcher-button ol-unselectable ol-control",l.appendChild(o);var u=new Ve.control.Control({element:l});Et()(this).addControl(u)}},{key:"cleanup",value:function(){this.layerTrack=null,this.layerMarkers=null,this.selectedLayer=null,this.markerStyles=null,At.removeElementById("switcher"),Et()(this)&&Et()(this).getTargetElement()&&(Et()(this).getTargetElement().innerHTML=""),this.map=null}},{key:"displayTrack",value:function(t,e){var n=this;if(!t||!t.hasPositions)return r().resolve();Et()(this).un("moveend",this.saveState);var i=new(r())((function(t){Et()(n).once("rendercomplete",(function(){Et()(n)&&(n.saveState(),Et()(n).on("moveend",n.saveState)),t()}))})),o=this.layerMarkers?this.layerMarkers.getSource().getFeatures().length:0;o>0&&this.removePoint(--o);for(var a=o;a<t.length;a++)this.setMarker(a,t);if(t instanceof jt){var s;if(this.layerTrack&&this.layerTrack.getSource().getFeatures().length)s=this.layerTrack.getSource().getFeatures()[0].getGeometry();else{s=new Ve.geom.LineString([]);var l=new Ve.Feature({geometry:s});this.layerTrack.getSource().addFeature(l)}for(var u=o;u<t.length;u++){var c=t.positions[u];s.appendCoordinate(Ve.proj.fromLonLat([c.longitude,c.latitude]))}}var f=this.layerMarkers.getSource().getExtent();return e&&(f=this.fitToExtent(f)),this.setZoomToExtent(f),i}},{key:"setZoomToExtent",value:function(e){var n,r=this;W()(n=Et()(this).getControls()).call(n,(function(t){t instanceof Ve.control.ZoomToExtent&&Et()(r).removeControl(t)})),Et()(this).addControl(new Ve.control.ZoomToExtent({extent:e,label:t.getExtentImg()}))}},{key:"fitToExtent",value:function(e){return Et()(this).getView().fit(e,{padding:[40,10,10,10],maxZoom:t.ZOOM_MAX}),Et()(this).getView().getZoom()===t.ZOOM_MAX&&(e=Et()(this).getView().calculateExtent(Et()(this).getSize())),e}},{key:"clearMap",value:function(){this.popupClose(),this.layerTrack&&this.layerTrack.getSource().clear(),this.layerMarkers&&this.layerMarkers.getSource().clear()}},{key:"getMarkerStyle",value:function(t,e){var n=e.positions[t],r=this.markerStyles.normal;return n.hasComment()||n.hasImage()?r=e.isLastPosition(t)?this.markerStyles.stopExtra:e.isFirstPosition(t)?this.markerStyles.startExtra:this.markerStyles.extra:e.isLastPosition(t)?r=this.markerStyles.stop:e.isFirstPosition(t)&&(r=this.markerStyles.start),r}},{key:"setMarker",value:function(t,e){var n=e.positions[t],r=new Ve.Feature({geometry:new Ve.geom.Point(Ve.proj.fromLonLat([n.longitude,n.latitude]))}),i=this.getMarkerStyle(t,e);r.setStyle(i),r.setId(t),this.layerMarkers.getSource().addFeature(r)}},{key:"removePoint",value:function(t){var e=this.layerMarkers.getSource().getFeatureById(t);if(e){if(this.layerMarkers.getSource().removeFeature(e),this.layerTrack){var n=this.layerTrack.getSource().getFeatures()[0].getGeometry(),r=n.getCoordinates();Gt()(r).call(r,t,1),n.setCoordinates(r)}this.viewModel.model.markerSelect===t&&this.popupClose()}}},{key:"animateMarker",value:function(t){var e=this.layerMarkers.getSource().getFeatureById(t),n=e.getStyle();e.setStyle(this.markerStyles.hilite),a()((function(){return e.setStyle(n)}),2e3)}},{key:"getBounds",value:function(){var t=Et()(this).getView().calculateExtent(Et()(this).getSize()),e=Ve.proj.toLonLat([t[0],t[1]]),n=Ve.proj.toLonLat([t[2],t[3]]);return[e[0],e[1],n[0],n[1]]}},{key:"zoomToExtent",value:function(){Et()(this).getView().fit(this.layerMarkers.getSource().getExtent(),{maxZoom:t.ZOOM_MAX})}},{key:"zoomToBounds",value:function(t){var e=Ve.proj.fromLonLat([t[0],t[1]]),n=Ve.proj.fromLonLat([t[2],t[3]]);Et()(this).getView().fit([e[0],e[1],n[0],n[1]])}},{key:"updateSize",value:function(){Et()(this).updateSize()}},{key:"updateState",value:function(t){Et()(this).getView().setCenter(t.center),Et()(this).getView().setZoom(t.zoom),Et()(this).getView().setRotation(t.rotation)}},{key:"getState",value:function(){var t=Et()(this)?Et()(this).getView():null;return t?{center:t.getCenter(),zoom:t.getZoom(),rotation:t.getRotation()}:null}}],[{key:"getExtentImg",value:function(){var t=document.createElement("img");return t.src="images/extent.svg",t.style.width="60%",t}}]),t}();function Ye(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}Xe.ZOOM_MAX=20;var Ze="hidden",We=function(t){U()(i,t);var n=Ye(i);function i(t,e){var r;return l()(this,i),(r=n.call(this,{onPositionDelete:null,onPositionUpdate:null,onCancel:null,comment:null,image:null,onImageDelete:null})).state=t,r.positionIndex=e,r.position=r.state.currentTrack.positions[e],r.model.comment=r.position.hasComment()?r.position.comment:"",r.model.image=r.position.image,r.model.onPositionDelete=function(){return r.onPositionDelete()},r.model.onPositionUpdate=function(){return r.onPositionUpdate()},r.model.onCancel=function(){return r.onCancel()},r.model.onImageDelete=function(){return r.onImageDelete()},r.onChanged("image",(function(t){t&&t!==r.position.image&&r.readImage()})),r}return c()(i,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new Ie(t),this.dialog.show(),this.bindAll(this.dialog.element),this.previewEl=this.getBoundElement("imagePreview"),this.fileEl=this.getBoundElement("image"),this.imageDeleteEl=this.getBoundElement("onImageDelete"),this.initReader()}},{key:"initReader",value:function(){var t=this;this.reader=new FileReader,this.reader.addEventListener("load",(function(){t.showThumbnail()}),!1),this.reader.addEventListener("error",(function(){t.model.image=t.position.image}),!1)}},{key:"readImage",value:function(){var t=this.fileEl.files[0];if(t){if(t.size>ce.uploadMaxSize)return Oe.error(fe._("isizefailure",ce.uploadMaxSize)),void(this.model.image=this.position.image);this.reader.readAsDataURL(t)}}},{key:"showThumbnail",value:function(){var t=this;this.previewEl.onload=function(){return t.toggleImage()},this.previewEl.onerror=function(){Oe.error(fe._("iuploadfailure")),t.model.image=t.position.image},this.previewEl.src=this.reader.result}},{key:"toggleImage",value:function(){this.previewEl.classList.contains(Ze)?(this.previewEl.classList.remove(Ze),this.imageDeleteEl.classList.remove(Ze),this.fileEl.classList.add(Ze)):(this.previewEl.classList.add(Ze),this.imageDeleteEl.classList.add(Ze),this.fileEl.classList.remove(Ze))}},{key:"onImageDelete",value:function(){this.model.image=null,this.toggleImage()}},{key:"getHtml",value:function(){var t,n,r,i,o,a,s,l,u,c,f;return e()(t=e()(n=e()(r=e()(i=e()(o=e()(a=e()(s=e()(l=e()(u=e()(c=e()(f='<div class="red-button button-resolve"><b><a data-bind="onPositionDelete">'.concat(fe._("delposition"),"</a></b></div>\n <div>")).call(f,fe._("editingposition",this.positionIndex+1,"<b>".concat(At.htmlEncode(this.position.trackname),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="positionForm">\n <label><b>')).call(c,fe._("comment"),'</b></label><br>\n <textarea style="width:100%;" maxlength="255" rows="5" placeholder="')).call(u,fe._("comment"),'" name="comment" \n data-bind="comment" autofocus>')).call(l,At.htmlEncode(this.model.comment),"</textarea>\n <br><br>\n <label><b>")).call(s,fe._("image"),'</b></label><br>\n <input type="file" name="image" data-bind="image" accept="image/png, image/jpeg, image/gif, image/bmp"')).call(a,this.position.hasImage()?' class="hidden"':"",'>\n <img style="max-width:50px; max-height:50px" data-bind="imagePreview" ')).call(o,this.position.hasImage()?'src="'.concat(this.position.getImagePath(),'"'):'class="hidden"','>\n <a data-bind="onImageDelete" ')).call(i,this.position.hasImage()?"":' class="hidden"',">")).call(r,fe._("delimage"),'</a>\n <div class="buttons">\n <button class="button-reject" data-bind="onCancel" type="button">')).call(n,fe._("cancel"),'</button>\n <button class="button-resolve" data-bind="onPositionUpdate" type="submit">')).call(t,fe._("submit"),"</button>\n </div>\n </form>")}},{key:"onPositionDelete",value:function(){var t=this;Ie.isConfirmed(fe._("positiondelwarn",this.positionIndex+1,At.htmlEncode(this.position.trackname)))&&this.position.delete().then((function(){var e,n=t.state.currentTrack;t.state.currentTrack=null,Gt()(e=n.positions).call(e,t.positionIndex,1),n.recalculatePositions(),t.state.currentTrack=n,t.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)}))}},{key:"updateImage",value:function(){var t=r().resolve();return this.model.image!==this.position.image&&(t=null===this.model.image?this.position.imageDelete():this.position.imageAdd(this.fileEl.files[0])),t}},{key:"onPositionUpdate",value:function(){var t,n=this;xt()(t=this.model.comment).call(t),this.validate()&&(this.position.comment=this.model.comment,this.updateImage().then((function(){return n.position.save()})).then((function(){at.forceUpdate(n.state,"currentTrack"),n.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)})))}},{key:"onCancel",value:function(){this.dialog.destroy()}},{key:"validate",value:function(){return!(this.model.comment===this.position.comment&&this.model.image===this.position.image)}}]),i}(ye);function Je(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var $e=function(t){U()(r,t);var n=Je(r);function r(t){var e;return l()(this,r),(e=n.call(this,{markerOver:null,markerSelect:null,onMenuToggle:null,speedVisible:!1,altitudeVisible:!1})).state=t,e.mapElement=document.querySelector("#map-canvas"),e.speedEl=e.getBoundElement("speedVisible"),e.altitudeEl=e.getBoundElement("altitudeVisible"),e.styleEl=e.getBoundElement("trackColor"),e.savedBounds=null,e.api=null,e}return c()(r,[{key:"init",value:function(){return this.bindAll(),this.setObservers(),this}},{key:"loadMapAPI",value:function(t){var e=this,n=this.api;if(this.api=null,n){try{this.savedBounds=n.getBounds()}catch(t){this.savedBounds=null}n.cleanup()}(n=this.getApi(t)).init().then((function(){e.api=n,e.onReady()})).catch((function(e){var n=fe._("apifailure",t);e&&e.message&&(n+=" (".concat(e.message,")")),Oe.error(n,e),ce.mapApi="gmaps"===t?"openlayers":"gmaps"}))}},{key:"getApi",value:function(t){return"gmaps"===t?new He(this):new Xe(this)}},{key:"onReady",value:function(){if(this.state.currentTrack){var t=!0;this.savedBounds&&(this.api.zoomToBounds(this.savedBounds),t=!1),this.displayTrack(this.state.currentTrack,t)}}},{key:"setObservers",value:function(){var t=this;ce.onChanged("mapApi",(function(e){t.loadMapAPI(e),t.toggleStyleOptions(),t.toggleStyleMenu()})),this.state.onChanged("currentTrack",(function(e){t.api&&(t.api.clearMap(),e&&(at.observe(e,"positions",(function(){t.displayTrack(e,!1),t.api.zoomToExtent(),t.toggleStyleOptions()})),t.displayTrack(e,!0)),t.toggleStyleOptions())})),this.state.onChanged("history",(function(){var e=t.state.history;t.api&&e&&!e.trackId&&(e.mapApi?ce.mapApi=e.mapApi:(e.mapParams?t.api.updateState(e.mapParams):t.api.zoomToExtent(),t.state.history=null))})),this.model.onMenuToggle=function(){return t.onMapResize()},this.onChanged("speedVisible",(function(e){e&&(t.model.altitudeVisible=!1),t.setTrackStyle()})),this.onChanged("altitudeVisible",(function(e){e&&(t.model.speedVisible=!1),t.setTrackStyle()}))}},{key:"displayTrack",value:function(t,e){var n=this;this.state.jobStart(),e&&this.state.history&&this.state.history.mapParams&&(this.api.updateState(this.state.history.mapParams),e=!1),this.state.history=null,this.setTrackStyle(),this.api.displayTrack(t,e).finally((function(){return n.state.jobStop()}))}},{key:"onMapResize",value:function(){this.api&&this.api.updateSize()}},{key:"toggleStyleOptions",value:function(){var t=this.state.currentTrack;this.speedEl.disabled=!t||!t.hasSpeeds||t.length<=1,this.altitudeEl.disabled=!t||!t.hasAltitudes||t.length<=1}},{key:"toggleStyleMenu",value:function(){"openlayers"===ce.mapApi?this.styleEl.style.display="block":this.styleEl.style.display="none"}},{key:"setTrackStyle",value:function(){var t=this.state.currentTrack;this.api&&t&&(this.model.speedVisible&&t.hasSpeeds?this.setSpeedStyle():this.model.altitudeVisible&&t.hasAltitudes?this.setAltitudeStyle():this.api.setTrackDefaultStyle())}},{key:"setSpeedStyle",value:function(){var t=this.state.currentTrack,e={minValue:0,maxValue:t.maxSpeed,minColor:[0,255,0],maxColor:[255,0,0]};this.api.setTrackGradientStyle(t,"speed",e)}},{key:"setAltitudeStyle",value:function(){var t=this.state.currentTrack,e={minValue:t.minAltitude,maxValue:t.maxAltitude,minColor:[0,255,0],maxColor:[255,0,0]};this.api.setTrackGradientStyle(t,"altitude",e)}},{key:"getPopupElement",value:function(t){var n,r,i,o,a,s,l,u,c,f,h,d,p,v,m,y,g,b,x,w,k,S,E,A,L,M,T,O,_,P,I,C,j,D=this,R=this.state.currentTrack.positions[t],U=this.state.currentTrack.length,N=this.state.currentTrack.user,z=he.user&&(he.isAdmin||he.user.id===N.id),V="",B="";if(R.timestamp>0){var F,H=At.getTimeString(new Date(1e3*R.timestamp));V=H.date,B=e()(F="".concat(H.time,'<span class="smaller">')).call(F,H.zone,"</span>")}var q,G="";if("gps"===R.provider)G=e()(q=' <img class="icon" alt="'.concat(fe._("gps"),'" title="')).call(q,fe._("gps"),'" src="images/gps_dark.svg">');else if("network"===R.provider){var X;G=e()(X=' <img class="icon" alt="'.concat(fe._("network"),'" title="')).call(X,fe._("network"),'" src="images/network_dark.svg">')}var Y="";z&&(Y='<a id="editposition" class="menu-link" data-bind="onUserAdd">'.concat(fe._("editposition"),"</a>"));var Z,W,J,$,Q,K,tt,et,nt,rt="";this.state.showLatest||(rt=e()(Z=e()(W=e()(J=e()($=e()(Q=e()(K=e()(tt=e()(et=e()(nt='<div id="pright">\n <img class="icon" alt="'.concat(fe._("track"),'" src="images/stats_blue.svg" style="margin-left: 3em;"><br>\n <img class="icon" alt="')).call(nt,fe._("ttime"),'" title="')).call(et,fe._("ttime"),'" src="images/time_blue.svg"> ')).call(tt,fe.getLocaleDuration(R.totalSeconds),'<br>\n <img class="icon" alt="')).call(K,fe._("aspeed"),'" title="')).call(Q,fe._("aspeed"),'" src="images/speed_blue.svg"> ')).call($,fe.getLocaleSpeed(R.totalSpeed,!0),'<br>\n <img class="icon" alt="')).call(J,fe._("tdistance"),'" title="')).call(W,fe._("tdistance"),'" src="images/distance_blue.svg"> ')).call(Z,fe.getLocaleDistanceMajor(R.totalMeters,!0),"<br>\n </div>"));var it=e()(n=e()(r=e()(i=e()(o=e()(a=e()(s=e()(l=e()(u=e()(c=e()(f=e()(h=e()(d=e()(p=e()(v=e()(m=e()(y=e()(g=e()(b=e()(x=e()(w=e()(k=e()(S=e()(E='<div id="pheader">\n <div><img alt="'.concat(fe._("user"),'" title="')).call(E,fe._("user"),'" src="images/user_dark.svg"> ')).call(S,At.htmlEncode(R.username),'</div>\n <div><img alt="')).call(k,fe._("track"),'" title="')).call(w,fe._("track"),'" src="images/route_dark.svg"> ')).call(x,At.htmlEncode(R.trackname),'</div>\n </div>\n <div id="pbody">\n ')).call(b,R.hasComment()?'<div id="pcomments">'.concat(At.htmlEncode(R.comment).replace(/\n/,"<br>"),"</div>"):"","\n ")).call(g,R.hasImage()?'<div id="pimage"><img src="uploads/'.concat(R.image,'" alt="image"></div>'):"",'\n <div id="pleft">\n <img class="icon" alt="')).call(y,fe._("time"),'" title="')).call(m,fe._("time"),'" src="images/calendar_dark.svg"> ')).call(v,V,'<br>\n <img class="icon" alt="')).call(p,fe._("time"),'" title="')).call(d,fe._("time"),'" src="images/clock_dark.svg"> ')).call(h,B,"<br>\n ")).call(f,null!==R.speed?e()(A=e()(L='<img class="icon" alt="'.concat(fe._("speed"),'" title="')).call(L,fe._("speed"),'" src="images/speed_dark.svg">')).call(A,fe.getLocaleSpeed(R.speed,!0),"<br>"):"","\n ")).call(c,null!==R.altitude?e()(M=e()(T='<img class="icon" alt="'.concat(fe._("altitude"),'" title="')).call(T,fe._("altitude"),'" src="images/altitude_dark.svg">')).call(M,fe.getLocaleAltitude(R.altitude,!0),"<br>"):"","\n ")).call(u,null!==R.accuracy?e()(O=e()(_=e()(P='<img class="icon" alt="'.concat(fe._("accuracy"),'" title="')).call(P,fe._("accuracy"),'" src="images/accuracy_dark.svg">')).call(_,fe.getLocaleAccuracy(R.accuracy,!0))).call(O,G,"<br>"):"","\n ")).call(l,null!==R.bearing?e()(I=e()(C=e()(j='<img class="icon" alt="'.concat(fe._("bearing"),'" title="')).call(j,fe._("bearing"),'" src="images/bearing.svg" style="transform: rotate(')).call(C,R.bearing,'deg) scale(1.2);">')).call(I,R.bearing,"°<br>"):"",'\n <img class="icon" alt="')).call(s,fe._("position"),'" title="')).call(a,fe._("position"),'" src="images/position.svg">')).call(o,fe.getLocaleCoordinates(R),"<br>\n </div>")).call(i,rt,'</div>\n <div id="pfooter"><div>')).call(r,fe._("pointof",t+1,U),"</div><div>")).call(n,Y,"</div></div>"),ot=document.createElement("div");(ot.setAttribute("id","popup"),ot.innerHTML=it,R.hasImage())&&(ot.querySelector("#pimage img").onclick=function(){var t=new Ie('<img src="'.concat(R.getImagePath(),'" alt="image">'));t.element.querySelector("#modal-close").onclick=function(){return t.destroy()},t.element.classList.add("image"),t.show()});z&&(ot.querySelector("#editposition").onclick=function(){new We(D.state,t).init()});return ot}}],[{key:"getMarkerPath",value:function(t){return t?"M15,34.911c0,0,0.359-3.922,1.807-8.588c0.414-1.337,1.011-2.587,2.495-4.159c1.152-1.223,3.073-2.393,3.909-4.447c1.681-6.306-3.676-9.258-8.211-9.258c-4.536,0-9.893,2.952-8.211,9.258c0.836,2.055,2.756,3.225,3.91,4.447c1.484,1.572,2.08,2.822,2.495,4.159C14.64,30.989,15,34.911,15,34.911z M18,15.922c0,1.705-1.342,3.087-2.999,3.087c-1.657,0-3-1.382-3-3.087c0-1.704,1.343-3.086,3-3.086C16.658,12.836,18,14.218,18,15.922z":"M14.999,34.911c0,0,0.232-1.275,1.162-4.848c0.268-1.023,0.652-1.98,1.605-3.184c0.742-0.937,1.975-1.832,2.514-3.404c1.082-4.828-2.363-7.088-5.281-7.088c-2.915,0-6.361,2.26-5.278,7.088c0.538,1.572,1.771,2.468,2.514,3.404c0.953,1.203,1.337,2.16,1.604,3.184C14.77,33.635,14.999,34.911,14.999,34.911z"}},{key:"getMarkerExtra",value:function(t){var n,r=t?"M26.074,13.517":"M23.328,20.715",i=t?"M28.232,10.942":"M25.486,18.141";return e()(n='<path fill="none" stroke="red" stroke-width="2" d="'.concat(r,'c0-3.961-3.243-7.167-7.251-7.167"/>\n <path fill="none" stroke="red" stroke-width="2" d="')).call(n,i,'c-0.5-4.028-3.642-7.083-7.724-7.542"/>')}},{key:"getSvgSrc",value:function(t,n,i){var o,a,s=e()(o=e()(a='<svg viewBox="0 0 30 35" width="30px" height="35px" xmlns="http://www.w3.org/2000/svg">\n <g><path stroke="black" fill="'.concat(t,'" d="')).call(a,r.getMarkerPath(n),'"/>')).call(o,i?r.getMarkerExtra(n):"","</g></svg>");return"data:image/svg+xml,".concat(encodeURIComponent(s))}}]),r}(ye),Qe=i(6206),Ke=i.n(Qe);function tn(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var en=function(t){U()(r,t);var n=tn(r);function r(t){var e;return l()(this,r),(e=n.call(this,{onTrackDelete:null,onTrackUpdate:null,onCancel:null,trackname:""})).track=t.state.currentTrack,e.trackVM=t,e.model.onTrackDelete=function(){return e.onTrackDelete()},e.model.onTrackUpdate=function(){return e.onTrackUpdate()},e.model.onCancel=function(){return e.onCancel()},e}return c()(r,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new Ie(t),this.dialog.show(),this.bindAll(this.dialog.element)}},{key:"getHtml",value:function(){var t,n,r,i,o,a;return e()(t=e()(n=e()(r=e()(i=e()(o=e()(a='<div class="red-button button-resolve"><b><a data-bind="onTrackDelete">'.concat(fe._("deltrack"),"</a></b></div>\n <div>")).call(a,fe._("editingtrack","<b>".concat(At.htmlEncode(this.track.name),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="trackForm">\n <label><b>')).call(o,fe._("trackname"),'</b></label>\n <input type="text" placeholder="')).call(i,fe._("trackname"),'" name="trackname" data-bind="trackname" value="')).call(r,At.htmlEncode(this.track.name),'" required autofocus>\n <div class="buttons">\n <button class="button-reject" data-bind="onCancel" type="button">')).call(n,fe._("cancel"),'</button>\n <button class="button-resolve" data-bind="onTrackUpdate" type="submit">')).call(t,fe._("submit"),"</button>\n </div>\n </form>")}},{key:"onTrackDelete",value:function(){var t=this;Ie.isConfirmed(fe._("trackdelwarn",At.htmlEncode(this.track.name)))&&this.track.delete().then((function(){t.trackVM.onTrackDeleted(),t.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)}))}},{key:"onTrackUpdate",value:function(){var t=this;this.validate()&&(this.track.setName(this.model.trackname),this.track.saveMeta().then((function(){return t.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)})))}},{key:"onCancel",value:function(){this.dialog.destroy()}},{key:"validate",value:function(){return this.model.trackname!==this.track.name&&(!!this.model.trackname||(Oe.error(fe._("allrequired")),!1))}}]),r}(ye);function nn(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var rn=function(t){U()(r,t);var n=nn(r);function r(t){var e;l()(this,r),(e=n.call(this,{trackList:[],currentTrackId:"",showLatest:!1,autoReload:!1,inputFile:!1,summary:!1,onReload:null,onExportGpx:null,onExportKml:null,onImportGpx:null,onTrackEdit:null})).setClickHandlers();var i=document.querySelector("#track");return e.importEl=document.querySelector("#input-file"),e.editEl=e.getBoundElement("onTrackEdit"),e.select=new ut(i),e.state=t,e.timerId=0,e}return c()(r,[{key:"init",value:function(){return this.setObservers(),this.bindAll(),this}},{key:"setObservers",value:function(){var t=this;this.onChanged("trackList",(function(e){t.select.setOptions(e)})),this.onChanged("currentTrackId",(function(e){t.onTrackSelect(e)})),this.onChanged("inputFile",(function(e){e&&t.onImport()})),this.onChanged("autoReload",(function(e){t.autoReload(e)})),this.onChanged("showLatest",(function(e){t.state.showLatest=e,t.onReload(!0)})),this.state.onChanged("currentUser",(function(e){e?(t.loadTrackList(),he.user&&(he.isAdmin||he.user.id===e.id)&&r.setMenuVisible(t.editEl,!0)):(t.model.currentTrackId="",t.model.trackList=[],r.setMenuVisible(t.editEl,!1))})),this.state.onChanged("currentTrack",(function(e){t.renderSummary(),e&&at.observe(e,"positions",(function(){t.renderSummary()}))})),this.state.onChanged("showAllUsers",(function(e){e&&t.loadAllUsersPosition()})),ce.onChanged("interval",(function(){t.timerId&&(t.stopAutoReload(),t.startAutoReload())})),this.state.onChanged("history",(function(e){e&&!e.userId&&e.trackId&&(t.model.currentTrackId=e.trackId.toString())}))}},{key:"setClickHandlers",value:function(){var t=this;this.model.onReload=function(){return t.onReload()};var e=function(e){return function(){t.state.currentTrack&&t.state.currentTrack.export(e)}};this.model.onExportGpx=e("gpx"),this.model.onExportKml=e("kml"),this.model.onImportGpx=function(){return t.importEl.click()},this.model.onTrackEdit=function(){return t.showDialog()}}},{key:"onReload",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.state.showLatest?this.state.showAllUsers?this.loadAllUsersPosition():this.state.currentUser&&this.onUserLastPosition():this.state.currentTrack instanceof jt?this.onTrackUpdate(t):this.state.currentTrack instanceof _t?this.state.currentTrack=null:this.state.currentUser&&this.loadTrackList()}},{key:"onImport",value:function(){var t=this,n=this.importEl.parentElement,r=n.elements.MAX_FILE_SIZE.value;this.importEl.files&&1===this.importEl.files.length&&this.importEl.files[0].size>r?Oe.error(fe._("isizefailure",r)):he.isAuthenticated?(this.state.jobStart(),jt.import(n,he.user).then((function(n){n.length&&(n.length>1&&Oe.toast(fe._("imultiple",n.length)),t.model.trackList=e()(n).call(n,t.model.trackList),t.model.currentTrackId=n[0].listValue)})).catch((function(t){var n;return Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)})).finally((function(){t.model.inputFile="",t.state.jobStop()}))):Oe.error(fe._("notauthorized"))}},{key:"onTrackSelect",value:function(t){var n,r=this,i=G()(n=this.model.trackList).call(n,(function(e){return e.listValue===t}));i?i.isEqualTo(this.state.currentTrack)||(this.state.jobStart(),i.fetchPositions().then((function(){var t;e()(t="currentTrack id: ".concat(i.id,", loaded ")).call(t,i.length," positions"),r.state.currentTrack=i,r.model.showLatest&&(r.model.showLatest=!1)})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)})).finally((function(){return r.state.jobStop()}))):this.state.currentTrack=null}},{key:"onTrackUpdate",value:function(t){t&&this.state.currentTrack.clear(),this.state.currentTrack.fetchPositions().catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)}))}},{key:"onUserLastPosition",value:function(){var t=this;this.state.currentUser.fetchLastPosition().then((function(e){var n;e&&(G()(n=t.model.trackList).call(n,(function(t){return t.listValue===e.listValue}))||t.model.trackList.unshift(e),t.state.currentTrack=e,t.model.currentTrackId=e.listValue)})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)}))}},{key:"loadAllUsersPosition",value:function(){var t=this;this.state.jobStart(),_t.fetchLatest().then((function(e){e&&(t.model.trackList=[],t.model.currentTrackId="",t.state.currentTrack=e)})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)})).finally((function(){return t.state.jobStop()}))}},{key:"loadTrackList",value:function(){var t=this;this.state.jobStart(),jt.fetchList(this.state.currentUser).then((function(e){t.model.trackList=e,e.length?t.state.showLatest?t.onUserLastPosition():t.state.history?t.model.currentTrackId=t.state.history.trackId.toString():t.model.currentTrackId=e[0].listValue:t.model.currentTrackId=""})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)})).finally((function(){return t.state.jobStop()}))}},{key:"showDialog",value:function(){new en(this).init()}},{key:"onTrackDeleted",value:function(){var t,e,n=Yt()(t=this.model.trackList).call(t,this.state.currentTrack);(this.state.currentTrack=null,-1!==n)&&(Gt()(e=this.model.trackList).call(e,n,1),this.model.trackList.length?(n>=this.model.trackList.length&&(n=this.model.trackList.length-1),this.model.currentTrackId=this.model.trackList[n].listValue):this.model.currentTrackId="")}},{key:"autoReload",value:function(t){t?this.startAutoReload():this.stopAutoReload()}},{key:"startAutoReload",value:function(){var t=this;this.timerId=Ke()((function(){return t.onReload()}),1e3*ce.interval)}},{key:"stopAutoReload",value:function(){clearInterval(this.timerId),this.timerId=0}},{key:"renderSummary",value:function(){var t=this.state.currentTrack;if(t&&t.hasPositions){var n=t.positions[t.length-1];if(this.state.showLatest){var r,i,o,a=new Date,s=new Date(1e3*n.timestamp),l=At.getTimeString(s),u=s.toDateString()!==a.toDateString()?"".concat(l.date,"<br>"):"",c=e()(r="".concat(l.time,'<span style="font-weight:normal">')).call(r,l.zone,"</span>");this.model.summary=e()(i=e()(o='\n <div class="menu-title">'.concat(fe._("latest"),":</div>\n ")).call(o,u,"\n ")).call(i,c)}else{var f,h,d,p,v,m,y,g,b=e()(f=e()(h=e()(d=e()(p=e()(v=e()(m='\n <div class="menu-title">'.concat(fe._("summary"),'</div>\n <div><img class="icon" alt="')).call(m,fe._("tdistance"),'" title="')).call(v,fe._("tdistance"),'" src="images/distance.svg"> ')).call(p,fe.getLocaleDistanceMajor(n.totalMeters,!0),'</div>\n <div><img class="icon" alt="')).call(d,fe._("ttime"),'" title="')).call(h,fe._("ttime"),'" src="images/time.svg"> ')).call(f,fe.getLocaleDuration(n.totalSeconds),"</div>");if(t.hasSpeeds)b+=e()(y=e()(g='<div><img class="icon" alt="'.concat(fe._("speed"),'" title="')).call(g,fe._("speed"),'" src="images/speed.svg"><b>&#10138;</b> ')).call(y,fe.getLocaleSpeed(t.maxSpeed,!0),"</div>");if(t.hasAltitudes){var x,w,k,S="".concat(fe.getLocaleAltitude(t.maxAltitude,!0));if(t.minAltitude!==t.maxAltitude)S=e()(k="".concat(fe.getLocaleAltitude(t.minAltitude),"&ndash;")).call(k,S);b+=e()(x=e()(w='<div><img class="icon" alt="'.concat(fe._("altitude"),'" title="')).call(w,fe._("altitude"),'" src="images/altitude.svg"> ')).call(x,S,"</div>")}this.model.summary=b}}else this.model.summary=""}}],[{key:"setMenuVisible",value:function(t,e){t&&(e?t.classList.remove("menu-hidden"):t.classList.add("menu-hidden"))}}]),r}(ye),on=i(1060),an=i.n(on);function sn(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var ln=function(t){U()(r,t);var n=sn(r);function r(t,e){var i;return l()(this,r),(i=n.call(this,{onUserDelete:null,onUserUpdate:null,onPassChange:null,onUserAdd:null,onCancel:null,passVisibility:!1,login:null,password:null,password2:null,oldPassword:null,admin:!1})).user=t.state.currentUser,i.type=e,i.userVM=t,i.model.onUserDelete=function(){return i.onUserDelete()},i.model.onUserUpdate=function(){return i.onUserUpdate()},i.model.onPassChange=function(){return i.onPassChange()},i.model.onUserAdd=function(){return i.onUserAdd()},i.model.onCancel=function(){return i.onCancel()},i}return c()(r,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new Ie(t),this.dialog.show(),this.bindAll(this.dialog.element);var e=this.getBoundElement("passInput");e&&this.onChanged("passVisibility",(function(){"none"===e.style.display?e.style.display="block":e.style.display="none"}))}},{key:"onUserDelete",value:function(){var t=this;Ie.isConfirmed(fe._("userdelwarn",At.htmlEncode(this.user.login)))&&this.user.delete().then((function(){t.userVM.onUserDeleted(),t.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)}))}},{key:"onUserUpdate",value:function(){var t=this;if(this.validate()){var n=this.model.passVisibility?this.model.password:null;this.user.modify(this.model.admin,n).then((function(){return t.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)}))}}},{key:"onPassChange",value:function(){var t=this;this.model.passVisibility=!0,this.validate()&&he.user.setPassword(this.model.password,this.model.oldPassword).then((function(){return t.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)}))}},{key:"onUserAdd",value:function(){var t=this;this.model.passVisibility=!0,this.validate()&&Nt.add(this.model.login,this.model.password,this.model.admin).then((function(e){t.userVM.onUserAdded(e),t.dialog.destroy()})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)}))}},{key:"onCancel",value:function(){this.dialog.destroy()}},{key:"validate",value:function(){if("add"===this.type){if(!this.model.login)return Oe.error(fe._("allrequired")),!1}else if("pass"===this.type&&!this.model.oldPassword)return Oe.error(fe._("allrequired")),!1;if(this.model.passVisibility){if(!this.model.password||!this.model.password2)return Oe.error(fe._("allrequired")),!1;if(this.model.password!==this.model.password2)return Oe.error(fe._("passnotmatch")),!1;if(!ce.validPassStrength(this.model.password))return Oe.error(fe.getLocalePassRules()),!1}return!0}},{key:"getHtml",value:function(){var t,n,r,i,o,a,s,l,u,c,f,h,d,p,v,m,y,g,b,x,w,k,S,E,A="",L="";switch(this.type){case"add":S="onUserAdd",L=e()(t="<label><b>".concat(fe._("username"),'</b></label>\n <input type="text" placeholder="')).call(t,fe._("usernameenter"),'" name="login" data-bind="login" required autofocus>'),E=e()(n=e()(r=e()(i=e()(o="<label><b>".concat(fe._("password"),'</b></label>\n <input type="password" placeholder="')).call(o,fe._("passwordenter"),'" name="password" data-bind="password" required>\n <label><b>')).call(i,fe._("passwordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(r,fe._("passwordenter"),'" name="password2" data-bind="password2" required>\n <label><b>')).call(n,fe._("admin"),'</b></label>\n <input type="checkbox" name="admin" data-bind="admin">');break;case"edit":S="onUserUpdate",A=e()(a='<div class="red-button button-resolve"><b><a data-bind="onUserDelete">'.concat(fe._("deluser"),"</a></b></div>\n <div>")).call(a,fe._("editinguser","<b>".concat(At.htmlEncode(this.user.login),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>'),E=e()(s=e()(l=e()(u=e()(c=e()(f=e()(h="<label><b>".concat(fe._("changepass"),'</b></label>\n <input type="checkbox" name="changepass" data-bind="passVisibility"><br>\n <div style="display: none;" data-bind="passInput">\n <label><b>')).call(h,fe._("password"),'</b></label>\n <input type="password" placeholder="')).call(f,fe._("passwordenter"),'" name="password" data-bind="password" required autofocus>\n <label><b>')).call(c,fe._("passwordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(u,fe._("passwordenter"),'" name="password2" data-bind="password2" required>\n </div>\n <label><b>')).call(l,fe._("admin"),'</b></label>\n <input type="checkbox" name="admin" data-bind="admin" ')).call(s,this.user.isAdmin?"checked":"",">");break;case"pass":S="onPassChange",E=e()(d=e()(p=e()(v=e()(m=e()(y="<label><b>".concat(fe._("oldpassword"),'</b></label>\n <input type="password" placeholder="')).call(y,fe._("passwordenter"),'" name="old-password" data-bind="oldPassword" required autofocus>\n <label><b>')).call(m,fe._("newpassword"),'</b></label>\n <input type="password" placeholder="')).call(v,fe._("passwordenter"),'" name="password" data-bind="password" required>\n <label><b>')).call(p,fe._("newpasswordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(d,fe._("passwordenter"),'" name="password2" data-bind="password2" required>');break;default:throw new Error("Unknown dialog type: ".concat(this.type))}return e()(g=e()(b=e()(x=e()(w=e()(k="".concat(A,'\n <form id="userForm">\n ')).call(k,L,"\n ")).call(w,E,'\n <div class="buttons">\n <button class="button-reject" type="button" data-bind="onCancel">')).call(x,fe._("cancel"),'</button>\n <button class="button-resolve" type="submit" data-bind="')).call(b,S,'">')).call(g,fe._("submit"),"</button>\n </div>\n </form>")}}]),r}(ye);function un(t){var e=function(){if("undefined"==typeof Reflect||!C())return!1;if(C().sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(C()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B()(t);if(e){var i=B()(this).constructor;n=C()(r,arguments,i)}else n=r.apply(this,arguments);return z()(this,n)}}var cn=function(t){U()(r,t);var n=un(r);function r(t){var e;l()(this,r),(e=n.call(this,{userList:[],currentUserId:"0",onUserEdit:null,onUserAdd:null,onPasswordChange:null})).setClickHandlers();var i=document.querySelector("#user");return e.editEl=e.getBoundElement("onUserEdit"),e.select=new ut(i,fe._("suser"),"- ".concat(fe._("allusers")," -")),e.state=t,e}return c()(r,[{key:"setClickHandlers",value:function(){var t=this;this.model.onUserEdit=function(){return t.showDialog("edit")},this.model.onUserAdd=function(){return t.showDialog("add")},this.model.onPasswordChange=function(){return t.showDialog("pass")}}},{key:"init",value:function(){var t=this;return this.setObservers(this.state),this.bindAll(),Nt.fetchList().then((function(e){if(t.model.userList=e,e.length){var n=e[0].listValue;if(t.state.history)n=t.state.history.userId.toString();else if(he.isAuthenticated){var r,i=G()(r=t.model.userList).call(r,(function(t){return t.listValue===he.user.listValue}));i&&(n=i.listValue)}t.model.currentUserId=n}})).catch((function(t){var n;Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t.message),t)})),this}},{key:"setObservers",value:function(t){var e=this;this.onChanged("userList",(function(t){e.select.setOptions(t)})),this.onChanged("currentUserId",(function(t){var n;e.state.showAllUsers=t===ut.allValue,e.state.currentUser=G()(n=e.model.userList).call(n,(function(e){return e.listValue===t}))||null,r.setMenuVisible(e.editEl,null!==e.state.currentUser&&!e.state.currentUser.isEqualTo(he.user))})),t.onChanged("showLatest",(function(t){t?e.select.showAllOption():e.select.hideAllOption()})),t.onChanged("history",(function(t){t&&t.userId&&(e.model.currentUserId=t.userId.toString())}))}},{key:"showDialog",value:function(t){new ln(this,t).init()}},{key:"onUserAdded",value:function(t){var e;this.model.userList.push(t),an()(e=this.model.userList).call(e,(function(t,e){return t.login>e.login?1:-1}))}},{key:"onUserDeleted",value:function(){var t,e,n=Yt()(t=this.model.userList).call(t,this.state.currentUser);(this.state.currentUser=null,-1!==n)&&(Gt()(e=this.model.userList).call(e,n,1),this.model.userList.length?(n>=this.model.userList.length&&(n=this.model.userList.length-1),this.model.currentUserId=this.model.userList[n].listValue):this.model.currentUserId="0")}}],[{key:"setMenuVisible",value:function(t,e){t&&(e?t.classList.remove("menu-hidden"):t.classList.add("menu-hidden"))}}]),r}(ye),fn=i(4696),hn=i.n(fn),dn=function(){function t(e){l()(this,t),this.state=e,this.skipPush=!1}return c()(t,[{key:"init",value:function(){var t=this;return this.state.onChanged("mapParams",(function(){return t.pushState()})),window.addEventListener("popstate",(function(e){if(null!==e.state){var n=t.state.currentTrack,r=t.state.currentUser,i={title:e.state.title,userId:r&&r.id===e.state.userId?null:e.state.userId,trackId:n&&n.id===e.state.trackId?null:e.state.trackId,mapApi:ce.mapApi===e.state.mapApi?null:e.state.mapApi,mapParams:e.state.mapParams};t.onPop(i),t.skipPush=!0}})),this}},{key:"onPop",value:function(t){var n,r,i;(t&&e()(n=e()(r="".concat(t.trackId,"/")).call(r,t.mapApi,"/")).call(n,t.mapParams),this.state.history=t,t)&&(document.title=e()(i="".concat(fe._("title")," ")).call(i,t.title))}},{key:"pushState",value:function(){if(this.skipPush)this.skipPush=!1;else if(null!==this.state.currentUser&&null!==this.state.currentTrack){var n=this.getState(),r=window.history.state;if(!r||!At.isDeepEqual(r,n)){var i,o,a=t.getHash(n);e()(i="pushState: ".concat(a," => ")).call(i,n),window.history.pushState(n,n.title,a),document.title=e()(o="".concat(fe._("title")," ")).call(o,n.title)}}}},{key:"getState",value:function(){return{title:this.state.currentTrack.name,userId:this.state.currentUser.id,trackId:this.state.currentTrack.id,mapApi:ce.mapApi,mapParams:this.state.mapParams}}}],[{key:"parseHash",value:function(){return t.parse(window.location.hash)}},{key:"parse",value:function(t){var n=t.replace("#","").split("/");hn()(n).call(n);var i=kt()(n.pop());if(!isNaN(i)){var o="openlayers";"g"===n.pop()&&(o="gmaps");var a=null;return n.length>=4&&((a={}).center=[gt()(n.pop()),gt()(n.pop())],a.zoom=gt()(n.pop()),a.rotation=gt()(n.pop())),jt.getMeta(i).then((function(t){var e=t.userId;return{title:t.name,userId:e,trackId:i,mapApi:o,mapParams:a}})).catch((function(t){var n;return e()(n="Ignoring unknown track ".concat(i," ")).call(n,t),null}))}return r().resolve(null)}},{key:"getHash",value:function(t){var n,r,i,o=e()(n="#".concat(t.trackId,"/")).call(n,t.mapApi.charAt(0));t.mapParams&&(o+=e()(r="/".concat(t.mapParams.center[0],"/")).call(r,t.mapParams.center[1]),o+=e()(i="/".concat(t.mapParams.zoom,"/")).call(i,t.mapParams.rotation));return o}}]),t}(),pn=function(){function t(e){l()(this,t),this.spinner=null,this.state=e}return c()(t,[{key:"init",value:function(){var t=this;this.state.onChanged("activeJobs",(function(e){e>0?t.spinner||(t.spinner=Oe.spinner()):t.spinner&&(t.spinner.destroy(),t.spinner=null)}))}}]),t}(),vn=function(){function t(){l()(this,t),this.currentTrack=null,this.currentUser=null,this.showLatest=!1,this.showAllUsers=!1,this.activeJobs=0,this.mapParams=null,this.history=null}return c()(t,[{key:"jobStart",value:function(){this.activeJobs++}},{key:"jobStop",value:function(){this.activeJobs--}},{key:"onChanged",value:function(t,e){at.observe(this,t,e)}}]),t}(),mn=le.waitForDom(),yn=ue.initialize(),gn=dn.parseHash();r().all([mn,yn,gn]).then((function(t){var e,n,r,i,o,a,s,l,u,c;e=t[2],n=new vn,r=new dn(n),i=new pn(n),o=new Fe(n),a=new cn(n),s=new rn(n),l=new $e(n),u=new ke(n),c=new Ne(n),r.init().onPop(e),i.init(),o.init(),a.init(),s.init(),l.init().loadMapAPI(ce.mapApi),u.init(),c.init(),l.onChanged("markerOver",(function(t){null!==t?u.onPointOver(t):u.onPointOut()})),l.onChanged("markerSelect",(function(t){null!==t?u.onPointSelect(t):u.onPointUnselect()})),u.onChanged("pointSelected",(function(t){null!==t&&l.api.animateMarker(t)}))})).catch((function(t){var n;return Oe.error(e()(n="".concat(fe._("actionfailure"),"\n")).call(n,t))}))}()}();
//# sourceMappingURL=bundle.js.map