import{a as hy}from"./chunk-FTAMPEZ2.js";import{a as dy,b as py}from"./chunk-2LY23SRP.js";import{b as Ie,c as iy,g as ly,h as Ec,i as Pc,j as Dc,k as cy,l as uy,m as Ic}from"./chunk-XYDYISIG.js";import{$a as ni,A as h_,Aa as on,Ab as Y,Ae as Z_,Ah as my,Ba as an,Bb as Z,Be as K_,Bh as gy,C as f_,Ca as sn,Cb as Qr,D as m_,Da as le,De as $_,Ea as P,Fa as E,Ga as ie,Gc as bc,Hc as C_,Hd as gh,I as hr,Ic as Fi,Id as U_,If as _h,J as Ms,Jc as M_,Kb as mh,Kd as H_,Kf as Sc,Kg as ny,L as _e,Lb as Gn,M as W,Md as vh,N as j,Nc as gr,Ne as X_,Oe as Q_,Pa as ye,Pg as Ae,Qg as ry,Rg as Lc,Sc as wc,U as yn,Ua as re,Uc as k_,Ud as G_,V as uh,Vd as W_,W as g_,Wa as R,Wb as _c,Wc as xc,Wd as pa,Xc as S_,Xd as ha,Xg as Gt,Y as v_,Yd as fa,Z as fc,Zd as ma,Zg as Tc,_ as ua,_a as ii,_d as Cc,a as pr,ab as ri,ac as yc,ad as L_,ae as vr,b as c_,bd as T_,be as Mc,c as ca,cd as E_,d as u_,da as k,dd as P_,df as kc,dh as yh,e as Cs,ea as ze,eb as ks,ef as J_,eh as oy,fa as __,fb as hh,fc as b_,fd as D_,g as d_,gb as Ri,gc as w_,gg as _r,hb as Hn,ib as U,id as I_,ig as Jr,jb as ae,jc as x_,jd as O_,jg as yr,kb as me,kd as A_,kg as ga,kh as va,lb as da,ld as N_,ma as dh,mb as y_,md as B_,nd as R_,oa as Te,ob as Ue,og as Ls,oh as bh,pa as fr,pb as He,qa as mc,qb as Ge,qg as xt,rb as oi,rf as ey,rh as ay,sa as ph,sb as gc,sd as F_,sf as ty,tb as vc,u as p_,ud as V_,vb as fh,vd as z_,ve as j_,wb as mr,we as q_,xa as $,xb as Ss,xh as sy,ya as X,ye as Y_,zh as fy}from"./chunk-VZVHAHX6.js";import{a as Mi,b as sa,e as la,f as ki,g as ve,i as ge}from"./chunk-UDPOFCFO.js";var Ry=la((g5,Nc)=>{"use strict";var vy,_y,yy,by,wy,xy,Cy,My,ky,Oc,wh,Sy,Ly,Ty,_a,Ey,Py,Dy,Iy,Oy,Ay,Ny,By,Ac;(function(i){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){i(t(e,t(n)))}):typeof Nc=="object"&&typeof Nc.exports=="object"?i(t(e,t(Nc.exports))):i(t(e));function t(n,r){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(o,a){return n[o]=r?r(o,a):a}}})(function(i){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])};vy=function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function o(){this.constructor=n}n.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)},_y=Object.assign||function(n){for(var r,o=1,a=arguments.length;o=0;d--)(c=n[d])&&(l=(s3?c(r,o,l):c(r,o))||l);return s>3&&l&&Object.defineProperty(r,o,l),l},wy=function(n,r){return function(o,a){r(o,a,n)}},xy=function(n,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,r)},Cy=function(n,r,o,a){function s(l){return l instanceof o?l:new o(function(c){c(l)})}return new(o||(o=Promise))(function(l,c){function d(h){try{p(a.next(h))}catch(f){c(f)}}function u(h){try{p(a.throw(h))}catch(f){c(f)}}function p(h){h.done?l(h.value):s(h.value).then(d,u)}p((a=a.apply(n,r||[])).next())})},My=function(n,r){var o={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(h){return u([p,h])}}function u(p){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,s&&(l=p[0]&2?s.return:p[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,p[1])).done)return l;switch(s=0,l&&(p=[p[0]&2,l.value]),p[0]){case 0:case 1:l=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,s=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(l=o.trys,!(l=l.length>0&&l[l.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!l||p[1]>l[0]&&p[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},wh=function(n,r){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,l=[],c;try{for(;(r===void 0||r-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(d){c={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(c)throw c.error}}return l},Sy=function(){for(var n=[],r=0;r1||d(v,_)})})}function d(v,_){try{u(a[v](_))}catch(y){f(l[0][3],y)}}function u(v){v.value instanceof _a?Promise.resolve(v.value.v).then(p,h):f(l[0][2],v)}function p(v){d("next",v)}function h(v){d("throw",v)}function f(v,_){v(_),l.shift(),l.length&&d(l[0][0],l[0][1])}},Py=function(n){var r,o;return r={},a("next"),a("throw",function(s){throw s}),a("return"),r[Symbol.iterator]=function(){return this},r;function a(s,l){r[s]=n[s]?function(c){return(o=!o)?{value:_a(n[s](c)),done:s==="return"}:l?l(c):c}:l}},Dy=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n[Symbol.asyncIterator],o;return r?r.call(n):(n=typeof Oc=="function"?Oc(n):n[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(l){o[l]=n[l]&&function(c){return new Promise(function(d,u){c=n[l](c),s(d,u,c.done,c.value)})}}function s(l,c,d,u){Promise.resolve(u).then(function(p){l({value:p,done:d})},c)}},Iy=function(n,r){return Object.defineProperty?Object.defineProperty(n,"raw",{value:r}):n.raw=r,n};var t=Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r};Oy=function(n){if(n&&n.__esModule)return n;var r={};if(n!=null)for(var o in n)o!=="default"&&Object.prototype.hasOwnProperty.call(n,o)&&Ac(r,n,o);return t(r,n),r},Ay=function(n){return n&&n.__esModule?n:{default:n}},Ny=function(n,r,o,a){if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?n!==r||!a:!r.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?a:o==="a"?a.call(n):a?a.value:r.get(n)},By=function(n,r,o,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?n!==r||!s:!r.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(n,o):s?s.value=o:r.set(n,o),o},i("__extends",vy),i("__assign",_y),i("__rest",yy),i("__decorate",by),i("__param",wy),i("__metadata",xy),i("__awaiter",Cy),i("__generator",My),i("__exportStar",ky),i("__createBinding",Ac),i("__values",Oc),i("__read",wh),i("__spread",Sy),i("__spreadArrays",Ly),i("__spreadArray",Ty),i("__await",_a),i("__asyncGenerator",Ey),i("__asyncDelegator",Py),i("__asyncValues",Dy),i("__makeTemplateObject",Iy),i("__importStar",Oy),i("__importDefault",Ay),i("__classPrivateFieldGet",Ny),i("__classPrivateFieldSet",By)})});var db=la((W5,Wc)=>{"use strict";var jy,qy,Yy,Zy,Ky,$y,Xy,Qy,Jy,Hc,Sh,eb,tb,ib,xa,nb,rb,ob,ab,sb,lb,cb,ub,Gc;(function(i){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){i(t(e,t(n)))}):typeof Wc=="object"&&typeof Wc.exports=="object"?i(t(e,t(Wc.exports))):i(t(e));function t(n,r){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(o,a){return n[o]=r?r(o,a):a}}})(function(i){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])};jy=function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function o(){this.constructor=n}n.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)},qy=Object.assign||function(n){for(var r,o=1,a=arguments.length;o=0;d--)(c=n[d])&&(l=(s3?c(r,o,l):c(r,o))||l);return s>3&&l&&Object.defineProperty(r,o,l),l},Ky=function(n,r){return function(o,a){r(o,a,n)}},$y=function(n,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,r)},Xy=function(n,r,o,a){function s(l){return l instanceof o?l:new o(function(c){c(l)})}return new(o||(o=Promise))(function(l,c){function d(h){try{p(a.next(h))}catch(f){c(f)}}function u(h){try{p(a.throw(h))}catch(f){c(f)}}function p(h){h.done?l(h.value):s(h.value).then(d,u)}p((a=a.apply(n,r||[])).next())})},Qy=function(n,r){var o={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(h){return u([p,h])}}function u(p){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,s&&(l=p[0]&2?s.return:p[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,p[1])).done)return l;switch(s=0,l&&(p=[p[0]&2,l.value]),p[0]){case 0:case 1:l=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,s=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(l=o.trys,!(l=l.length>0&&l[l.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!l||p[1]>l[0]&&p[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Sh=function(n,r){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,l=[],c;try{for(;(r===void 0||r-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(d){c={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(c)throw c.error}}return l},eb=function(){for(var n=[],r=0;r1||d(v,_)})})}function d(v,_){try{u(a[v](_))}catch(y){f(l[0][3],y)}}function u(v){v.value instanceof xa?Promise.resolve(v.value.v).then(p,h):f(l[0][2],v)}function p(v){d("next",v)}function h(v){d("throw",v)}function f(v,_){v(_),l.shift(),l.length&&d(l[0][0],l[0][1])}},rb=function(n){var r,o;return r={},a("next"),a("throw",function(s){throw s}),a("return"),r[Symbol.iterator]=function(){return this},r;function a(s,l){r[s]=n[s]?function(c){return(o=!o)?{value:xa(n[s](c)),done:s==="return"}:l?l(c):c}:l}},ob=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n[Symbol.asyncIterator],o;return r?r.call(n):(n=typeof Hc=="function"?Hc(n):n[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(l){o[l]=n[l]&&function(c){return new Promise(function(d,u){c=n[l](c),s(d,u,c.done,c.value)})}}function s(l,c,d,u){Promise.resolve(u).then(function(p){l({value:p,done:d})},c)}},ab=function(n,r){return Object.defineProperty?Object.defineProperty(n,"raw",{value:r}):n.raw=r,n};var t=Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r};sb=function(n){if(n&&n.__esModule)return n;var r={};if(n!=null)for(var o in n)o!=="default"&&Object.prototype.hasOwnProperty.call(n,o)&&Gc(r,n,o);return t(r,n),r},lb=function(n){return n&&n.__esModule?n:{default:n}},cb=function(n,r,o,a){if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?n!==r||!a:!r.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?a:o==="a"?a.call(n):a?a.value:r.get(n)},ub=function(n,r,o,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?n!==r||!s:!r.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(n,o):s?s.value=o:r.set(n,o),o},i("__extends",jy),i("__assign",qy),i("__rest",Yy),i("__decorate",Zy),i("__param",Ky),i("__metadata",$y),i("__awaiter",Xy),i("__generator",Qy),i("__exportStar",Jy),i("__createBinding",Gc),i("__values",Hc),i("__read",Sh),i("__spread",eb),i("__spreadArrays",tb),i("__spreadArray",ib),i("__await",xa),i("__asyncGenerator",nb),i("__asyncDelegator",rb),i("__asyncValues",ob),i("__makeTemplateObject",ab),i("__importStar",sb),i("__importDefault",lb),i("__classPrivateFieldGet",cb),i("__classPrivateFieldSet",ub)})});var Nv=la((Tp,mS)=>{"use strict";(function(i,e){typeof Tp=="object"&&typeof mS=o;)r=r.__parent;return this._currentShownBounds.contains(r.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(n,r):this._animationAddLayerNonAnimated(n,r)),this},removeLayer:function(n){return n instanceof L.LayerGroup?this.removeLayers([n]):n.getLatLng?this._map?n.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(n)),this._removeLayer(n,!0),this.fire("layerremove",{layer:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),n.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(n)&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,n)&&this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n}),this):(this._nonPointGroup.removeLayer(n),this.fire("layerremove",{layer:n}),this)},addLayers:function(n,r){if(!L.Util.isArray(n))return this.addLayer(n);var o=this._featureGroup,a=this._nonPointGroup,s=this.options.chunkedLoading,l=this.options.chunkInterval,c=this.options.chunkProgress,d=n.length,u=0,p=!0,h;if(this._map){var f=new Date().getTime(),v=L.bind(function(){var y=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();ul)break}if(h=n[u],h instanceof L.LayerGroup){p&&(n=n.slice(),p=!1),this._extractNonGroupLayers(h,n),d=n.length;continue}if(!h.getLatLng){a.addLayer(h),r||this.fire("layeradd",{layer:h});continue}if(!this.hasLayer(h)&&(this._addLayer(h,this._maxZoom),r||this.fire("layeradd",{layer:h}),h.__parent&&h.__parent.getChildCount()===2)){var x=h.__parent.getAllChildMarkers(),M=x[0]===h?x[1]:x[0];o.removeLayer(M)}}c&&c(u,d,new Date().getTime()-f),u===d?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(v,this.options.chunkDelay)},this);v()}else for(var _=this._needsClustering;u=0;r--)n.extend(this._needsClustering[r].getLatLng());return n.extend(this._nonPointGroup.getBounds()),n},eachLayer:function(n,r){var o=this._needsClustering.slice(),a=this._needsRemoving,s,l,c;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(o),l=o.length-1;l>=0;l--){for(s=!0,c=a.length-1;c>=0;c--)if(a[c].layer===o[l]){s=!1;break}s&&n.call(r,o[l])}this._nonPointGroup.eachLayer(n,r)},getLayers:function(){var n=[];return this.eachLayer(function(r){n.push(r)}),n},getLayer:function(n){var r=null;return n=parseInt(n,10),this.eachLayer(function(o){L.stamp(o)===n&&(r=o)}),r},hasLayer:function(n){if(!n)return!1;var r,o=this._needsClustering;for(r=o.length-1;r>=0;r--)if(o[r]===n)return!0;for(o=this._needsRemoving,r=o.length-1;r>=0;r--)if(o[r].layer===n)return!1;return!!(n.__parent&&n.__parent._group===this)||this._nonPointGroup.hasLayer(n)},zoomToShowLayer:function(n,r){var o=this._map;typeof r!="function"&&(r=function(){});var a=function(){(o.hasLayer(n)||o.hasLayer(n.__parent))&&!this._inZoomAnimation&&(this._map.off("moveend",a,this),this.off("animationend",a,this),o.hasLayer(n)?r():n.__parent._icon&&(this.once("spiderfied",r,this),n.__parent.spiderfy()))};n._icon&&this._map.getBounds().contains(n.getLatLng())?r():n.__parent._zoom=0;o--)if(n[o]===r)return n.splice(o,1),!0},_removeFromGridUnclustered:function(n,r){for(var o=this._map,a=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());r>=s&&a[r].removeObject(n,o.project(n.getLatLng(),r));r--);},_childMarkerDragStart:function(n){n.target.__dragStart=n.target._latlng},_childMarkerMoved:function(n){if(!this._ignoreMove&&!n.target.__dragStart){var r=n.target._popup&&n.target._popup.isOpen();this._moveChild(n.target,n.oldLatLng,n.latlng),r&&n.target.openPopup()}},_moveChild:function(n,r,o){n._latlng=r,this.removeLayer(n),n._latlng=o,this.addLayer(n)},_childMarkerDragEnd:function(n){var r=n.target.__dragStart;delete n.target.__dragStart,r&&this._moveChild(n.target,r,n.target._latlng)},_removeLayer:function(n,r,o){var a=this._gridClusters,s=this._gridUnclustered,l=this._featureGroup,c=this._map,d=Math.floor(this._map.getMinZoom());r&&this._removeFromGridUnclustered(n,this._maxZoom);var u=n.__parent,p=u._markers,h;for(this._arraySplice(p,n);u&&(u._childCount--,u._boundsNeedUpdate=!0,!(u._zoom"+r+" ",className:"marker-cluster"+o,iconSize:new L.Point(40,40)})},_bindEvents:function(){var n=this._map,r=this.options.spiderfyOnMaxZoom,o=this.options.showCoverageOnHover,a=this.options.zoomToBoundsOnClick,s=this.options.spiderfyOnEveryZoom;(r||a||s)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),o&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),n.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(n){var r=n.layer,o=r;if(!(n.type==="clusterkeypress"&&n.originalEvent&&n.originalEvent.keyCode!==13)){for(;o._childClusters.length===1;)o=o._childClusters[0];o._zoom===this._maxZoom&&o._childCount===r._childCount&&this.options.spiderfyOnMaxZoom?r.spiderfy():this.options.zoomToBoundsOnClick&&r.zoomToBounds(),this.options.spiderfyOnEveryZoom&&r.spiderfy(),n.originalEvent&&n.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(n){var r=this._map;this._inZoomAnimation||(this._shownPolygon&&r.removeLayer(this._shownPolygon),n.layer.getChildCount()>2&&n.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(n.layer.getConvexHull(),this.options.polygonOptions),r.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var n=this.options.spiderfyOnMaxZoom,r=this.options.showCoverageOnHover,o=this.options.zoomToBoundsOnClick,a=this.options.spiderfyOnEveryZoom,s=this._map;(n||o||a)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),r&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),s.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var n=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,n),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),n),this._currentShownBounds=n}},_generateInitialClusters:function(){var n=Math.ceil(this._map.getMaxZoom()),r=Math.floor(this._map.getMinZoom()),o=this.options.maxClusterRadius,a=o;typeof o!="function"&&(a=function(){return o}),this.options.disableClusteringAtZoom!==null&&(n=this.options.disableClusteringAtZoom-1),this._maxZoom=n,this._gridClusters={},this._gridUnclustered={};for(var s=n;s>=r;s--)this._gridClusters[s]=new L.DistanceGrid(a(s)),this._gridUnclustered[s]=new L.DistanceGrid(a(s));this._topClusterLevel=new this._markerCluster(this,r-1)},_addLayer:function(n,r){var o=this._gridClusters,a=this._gridUnclustered,s=Math.floor(this._map.getMinZoom()),l,c;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(n),n.on(this._childMarkerEventHandlers,this);r>=s;r--){l=this._map.project(n.getLatLng(),r);var d=o[r].getNearObject(l);if(d){d._addChild(n),n.__parent=d;return}if(d=a[r].getNearObject(l),d){var u=d.__parent;u&&this._removeLayer(d,!1);var p=new this._markerCluster(this,r,d,n);o[r].addObject(p,this._map.project(p._cLatLng,r)),d.__parent=p,n.__parent=p;var h=p;for(c=r-1;c>u._zoom;c--)h=new this._markerCluster(this,c,h),o[c].addObject(h,this._map.project(d.getLatLng(),c));u._addChild(h),this._removeFromGridUnclustered(d,r);return}a[r].addObject(n,l)}this._topClusterLevel._addChild(n),n.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(n){n instanceof L.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon()})},_enqueue:function(n){this._queue.push(n),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var n=0;nn?(this._animationStart(),this._animationZoomOut(this._zoom,n)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(L.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(n){var r=this._maxLat;return r!==void 0&&(n.getNorth()>=r&&(n._northEast.lat=1/0),n.getSouth()=0;l--)p=u[l],o.contains(p._latlng)||a.removeLayer(p)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(o,r),a.eachLayer(function(c){!(c instanceof L.MarkerCluster)&&c._icon&&c.clusterShow()}),this._topClusterLevel._recursively(o,n,r,function(c){c._recursivelyRestoreChildPositions(r)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(o,n,s,function(c){a.removeLayer(c),c.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(n,r){this._animationZoomOutSingle(this._topClusterLevel,n-1,r),this._topClusterLevel._recursivelyAddChildrenToMap(null,r,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n,this._getExpandedVisibleBounds())},_animationAddLayer:function(n,r){var o=this,a=this._featureGroup;a.addLayer(n),r!==n&&(r._childCount>2?(r._updateIcon(),this._forceLayout(),this._animationStart(),n._setPos(this._map.latLngToLayerPoint(r.getLatLng())),n.clusterHide(),this._enqueue(function(){a.removeLayer(n),n.clusterShow(),o._animationEnd()})):(this._forceLayout(),o._animationStart(),o._animationZoomOutSingle(r,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(n,r,o){var a=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());n._recursivelyAnimateChildrenInAndAddSelfToMap(a,s,r+1,o);var l=this;this._forceLayout(),n._recursivelyBecomeVisible(a,o),this._enqueue(function(){if(n._childCount===1){var c=n._markers[0];this._ignoreMove=!0,c.setLatLng(c.getLatLng()),this._ignoreMove=!1,c.clusterShow&&c.clusterShow()}else n._recursively(a,o,s,function(d){d._recursivelyRemoveChildrenFromMap(a,s,r+1)});l._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(n){return new L.MarkerClusterGroup(n)};var t=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(n,r,o,a){L.Marker.prototype.initialize.call(this,o?o._cLatLng||o.getLatLng():new L.LatLng(0,0),{icon:this,pane:n.options.clusterPane}),this._group=n,this._zoom=r,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,o&&this._addChild(o),a&&this._addChild(a)},getAllChildMarkers:function(n,r){n=n||[];for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o].getAllChildMarkers(n,r);for(var a=this._markers.length-1;a>=0;a--)r&&this._markers[a].__dragStart||n.push(this._markers[a]);return n},getChildCount:function(){return this._childCount},zoomToBounds:function(n){for(var r=this._childClusters.slice(),o=this._group._map,a=o.getBoundsZoom(this._bounds),s=this._zoom+1,l=o.getZoom(),c;r.length>0&&a>s;){s++;var d=[];for(c=0;cs?this._group._map.setView(this._latlng,s):a=0;l--)c=s[l],c._icon&&(c._setPos(r),c.clusterHide())},function(a){var s=a._childClusters,l,c;for(l=s.length-1;l>=0;l--)c=s[l],c._icon&&(c._setPos(r),c.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(n,r,o,a){this._recursively(n,a,r,function(s){s._recursivelyAnimateChildrenIn(n,s._group._map.latLngToLayerPoint(s.getLatLng()).round(),o),s._isSingleParent()&&o-1===a?(s.clusterShow(),s._recursivelyRemoveChildrenFromMap(n,r,o)):s.clusterHide(),s._addToMap()})},_recursivelyBecomeVisible:function(n,r){this._recursively(n,this._group._map.getMinZoom(),r,null,function(o){o.clusterShow()})},_recursivelyAddChildrenToMap:function(n,r,o){this._recursively(o,this._group._map.getMinZoom()-1,r,function(a){if(r!==a._zoom)for(var s=a._markers.length-1;s>=0;s--){var l=a._markers[s];o.contains(l._latlng)&&(n&&(l._backupLatlng=l.getLatLng(),l.setLatLng(n),l.clusterHide&&l.clusterHide()),a._group._featureGroup.addLayer(l))}},function(a){a._addToMap(n)})},_recursivelyRestoreChildPositions:function(n){for(var r=this._markers.length-1;r>=0;r--){var o=this._markers[r];o._backupLatlng&&(o.setLatLng(o._backupLatlng),delete o._backupLatlng)}if(n-1===this._zoom)for(var a=this._childClusters.length-1;a>=0;a--)this._childClusters[a]._restorePosition();else for(var s=this._childClusters.length-1;s>=0;s--)this._childClusters[s]._recursivelyRestoreChildPositions(n)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(n,r,o,a){var s,l;this._recursively(n,r-1,o-1,function(c){for(l=c._markers.length-1;l>=0;l--)s=c._markers[l],(!a||!a.contains(s._latlng))&&(c._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())},function(c){for(l=c._childClusters.length-1;l>=0;l--)s=c._childClusters[l],(!a||!a.contains(s._latlng))&&(c._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())})},_recursively:function(n,r,o,a,s){var l=this._childClusters,c=this._zoom,d,u;if(r=0;d--)u=l[d],u._boundsNeedUpdate&&u._recalculateBounds(),n.intersects(u._bounds)&&u._recursively(n,r,o,a,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var n=this.options.opacity;return this.setOpacity(0),this.options.opacity=n,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(n){this._cellSize=n,this._sqCellSize=n*n,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(n,r){var o=this._getCoord(r.x),a=this._getCoord(r.y),s=this._grid,l=s[a]=s[a]||{},c=l[o]=l[o]||[],d=L.Util.stamp(n);this._objectPoint[d]=r,c.push(n)},updateObject:function(n,r){this.removeObject(n),this.addObject(n,r)},removeObject:function(n,r){var o=this._getCoord(r.x),a=this._getCoord(r.y),s=this._grid,l=s[a]=s[a]||{},c=l[o]=l[o]||[],d,u;for(delete this._objectPoint[L.Util.stamp(n)],d=0,u=c.length;d=0;l--){if(c=r[l],d=this.getDistant(c,n),d>0)s.push(c);else continue;d>o&&(o=d,a=c)}return{maxPoint:a,newPoints:s}},buildConvexHull:function(n,r){var o=[],a=this.findMostDistantPointFromBaseLine(n,r);return a.maxPoint?(o=o.concat(this.buildConvexHull([n[0],a.maxPoint],a.newPoints)),o=o.concat(this.buildConvexHull([a.maxPoint,n[1]],a.newPoints)),o):[n[0]]},getConvexHull:function(n){var r=!1,o=!1,a=!1,s=!1,l=null,c=null,d=null,u=null,p=null,h=null,f;for(f=n.length-1;f>=0;f--){var v=n[f];(r===!1||v.lat>r)&&(l=v,r=v.lat),(o===!1||v.lata)&&(d=v,a=v.lng),(s===!1||v.lng=0;a--)o=n[a].getLatLng(),r.push(o);return L.QuickHull.getConvexHull(r)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var n=this.getAllChildMarkers(null,!0),r=this._group,o=r._map,a=o.latLngToLayerPoint(this._latlng),s;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?s=this._group.options.spiderfyShapePositions(n.length,a):n.length>=this._circleSpiralSwitchover?s=this._generatePointsSpiral(n.length,a):(a.y+=10,s=this._generatePointsCircle(n.length,a)),this._animationSpiderfy(n,s)}},unspiderfy:function(n){this._group._inZoomAnimation||(this._animationUnspiderfy(n),this._group._spiderfied=null)},_generatePointsCircle:function(n,r){var o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+n),a=o/this._2PI,s=this._2PI/n,l=[],c,d;for(a=Math.max(a,35),l.length=n,c=0;c=0;u--)u=0;l--)s=a[l],o.removeLayer(s),s._preSpiderfyLatlng&&(s.setLatLng(s._preSpiderfyLatlng),delete s._preSpiderfyLatlng),s.setZIndexOffset&&s.setZIndexOffset(0),s._spiderLeg&&(r.removeLayer(s._spiderLeg),delete s._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:a}),n._ignoreMove=!1,n._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(n,r){var o=this._group,a=o._map,s=o._featureGroup,l=this._group.options.spiderLegPolylineOptions,c,d,u,p;for(o._ignoreMove=!0,c=0;c=0;f--)x=s.layerPointToLatLng(r[f]),v=n[f],v._preSpiderfyLatlng=v._latlng,v.setLatLng(x),v.clusterShow&&v.clusterShow(),u&&(_=v._spiderLeg,y=_._path,y.style.strokeDashoffset=0,_.setStyle({opacity:h}));this.setOpacity(.3),a._ignoreMove=!1,setTimeout(function(){a._animationEnd(),a.fire("spiderfied",{cluster:o,markers:n})},200)},_animationUnspiderfy:function(n){var r=this,o=this._group,a=o._map,s=o._featureGroup,l=n?a._latLngToNewLayerPoint(this._latlng,n.zoom,n.center):a.latLngToLayerPoint(this._latlng),c=this.getAllChildMarkers(null,!0),d=L.Path.SVG,u,p,h,f,v,_;for(o._ignoreMove=!0,o._animationStart(),this.setOpacity(1),p=c.length-1;p>=0;p--)u=c[p],u._preSpiderfyLatlng&&(u.closePopup(),u.setLatLng(u._preSpiderfyLatlng),delete u._preSpiderfyLatlng,_=!0,u._setPos&&(u._setPos(l),_=!1),u.clusterHide&&(u.clusterHide(),_=!1),_&&s.removeLayer(u),d&&(h=u._spiderLeg,f=h._path,v=f.getTotalLength()+.1,f.style.strokeDashoffset=v,h.setStyle({opacity:0})));o._ignoreMove=!1,setTimeout(function(){var y=0;for(p=c.length-1;p>=0;p--)u=c[p],u._spiderLeg&&y++;for(p=c.length-1;p>=0;p--)u=c[p],u._spiderLeg&&(u.clusterShow&&u.clusterShow(),u.setZIndexOffset&&u.setZIndexOffset(0),y>1&&s.removeLayer(u),a.removeLayer(u._spiderLeg),delete u._spiderLeg);o._animationEnd(),o.fire("unspiderfied",{cluster:r,markers:c})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(n){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(n))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(n){this._spiderfied&&this._spiderfied.unspiderfy(n)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(n){n._spiderLeg&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow(),n.setZIndexOffset&&n.setZIndexOffset(0),this._map.removeLayer(n._spiderLeg),delete n._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(n){return n?n instanceof L.MarkerClusterGroup?n=n._topClusterLevel.getAllChildMarkers():n instanceof L.LayerGroup?n=n._layers:n instanceof L.MarkerCluster?n=n.getAllChildMarkers():n instanceof L.Marker&&(n=[n]):n=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(n),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(n),this},_flagParentsIconsNeedUpdate:function(n){var r,o;for(r in n)for(o=n[r].__parent;o;)o._iconNeedsUpdate=!0,o=o.__parent},_refreshSingleMarkerModeMarkers:function(n){var r,o;for(r in n)o=n[r],this.hasLayer(o)&&o.setIcon(this._overrideMarkerIcon(o))}}),L.Marker.include({refreshIconOptions:function(n,r){var o=this.options.icon;return L.setOptions(o,n),this.setIcon(o),r&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),i.MarkerClusterGroup=e,i.MarkerCluster=t,Object.defineProperty(i,"__esModule",{value:!0})})});var QS=la((see,$v)=>{"use strict";(function(i){var e;if(typeof define=="function"&&define.amd)define(["leaflet"],i);else if(typeof $v"u")throw"Leaflet must be loaded first";i(window.L)}})(function(i){"use strict";return i.Polyline._flat=i.LineUtil.isFlat||i.Polyline._flat||function(e){return!i.Util.isArray(e[0])||typeof e[0][0]!="object"&&typeof e[0][0]1e3?r=(e/1e3).toFixed(2)+" km":r=Math.ceil(e)+" m":(e*=1.09361,e>1760?r=(e/1760).toFixed(2)+" miles":r=Math.ceil(e)+" yd"),r},belongsSegment:function(e,t,n,r){r=r===void 0?.2:r;var o=t.distanceTo(n),a=t.distanceTo(e)+e.distanceTo(n)-o;return a/o0?t[t.length-1]:0},accumulatedLengths:function(e){if(typeof e.getLatLngs=="function"&&(e=e.getLatLngs()),e.length===0)return[];for(var t=0,n=[0],r=0,o=e.length-1;rr?o.slice(0,r):o},layersWithin:function(e,t,n,r){r=typeof r=="number"?r:1/0;for(var o=[],a=null,s=0,l=0,c=t.length;lr)return null;if(o&&typeof a.layer.getLatLngs=="function"){var s=i.GeometryUtil.closest(e,a.layer,a.latlng,!0);s.distance0&&(s+=a[l-1].distanceTo(a[l]));for(var c=s*n,d=0,u=0,l=0;ur)return i.GeometryUtil.extract(e,i.GeometryUtil.reverse(t),1-n,1-r);n=Math.max(Math.min(n,1),0),r=Math.max(Math.min(r,1),0);var o=t.getLatLngs(),a=i.GeometryUtil.interpolateOnLine(e,t,n),s=i.GeometryUtil.interpolateOnLine(e,t,r);if(n==r){var l=i.GeometryUtil.interpolateOnLine(e,t,r);return[l.latLng]}a.predecessor==-1&&(a.predecessor=0),s.predecessor==-1&&(s.predecessor=0);var c=o.slice(a.predecessor+1,s.predecessor+1);return c.unshift(a.latLng),c.push(s.latLng),c},isBefore:function(e,t){if(!t)return!1;var n=e.getLatLngs(),r=t.getLatLngs();return n[n.length-1].equals(r[0])},isAfter:function(e,t){if(!t)return!1;var n=e.getLatLngs(),r=t.getLatLngs();return n[0].equals(r[r.length-1])},startsAtExtremity:function(e,t){if(!t)return!1;var n=e.getLatLngs(),r=t.getLatLngs(),o=n[0];return o.equals(r[0])||o.equals(r[r.length-1])},computeAngle:function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI},computeSlope:function(e,t){var n=(t.y-e.y)/(t.x-e.x),r=e.y-n*e.x;return{a:n,b:r}},rotatePoint:function(e,t,n,r){var o=e.getMaxZoom();o===1/0&&(o=e.getZoom());var a=n*Math.PI/180,s=e.project(t,o),l=e.project(r,o),c=Math.cos(a)*(s.x-l.x)-Math.sin(a)*(s.y-l.y)+l.x,d=Math.sin(a)*(s.x-l.x)+Math.cos(a)*(s.y-l.y)+l.y;return e.unproject(new i.Point(c,d),o)},bearing:function(e,t){var n=Math.PI/180,r=e.lat*n,o=t.lat*n,a=e.lng*n,s=t.lng*n,l=Math.sin(s-a)*Math.cos(o),c=Math.cos(r)*Math.sin(o)-Math.sin(r)*Math.cos(o)*Math.cos(s-a),d=(Math.atan2(l,c)*180/Math.PI+360)%360;return d>=180?d-360:d},destination:function(e,t,n){t=(t+360)%360;var r=Math.PI/180,o=180/Math.PI,a=6378137,s=e.lng*r,l=e.lat*r,c=t*r,d=Math.sin(l),u=Math.cos(l),p=Math.cos(n/a),h=Math.sin(n/a),f=Math.asin(d*p+u*h*Math.cos(c)),v=s+Math.atan2(Math.sin(c)*h*u,p-d*Math.sin(f));return v=v*o,v=v>180?v-360:v{"use strict";(function(i){var e;if(typeof define=="function"&&define.amd)define(["leaflet"],i);else if(typeof Vp=="object"&&typeof Vp.exports=="object")e=Ae(),Vp.exports=i(e);else{if(typeof window.L>"u")throw new Error("Leaflet must be loaded first");i(window.L)}})(function(i){i.Map.mergeOptions({contextmenuItems:[]}),i.Map.ContextMenu=i.Handler.extend({_touchstart:i.Browser.msPointer?"MSPointerDown":i.Browser.pointer?"pointerdown":"touchstart",statics:{BASE_CLS:"leaflet-contextmenu"},initialize:function(a){i.Handler.prototype.initialize.call(this,a),this._items=[],this._visible=!1;var s=this._container=i.DomUtil.create("div",i.Map.ContextMenu.BASE_CLS,a._container);s.style.zIndex=1e4,s.style.position="absolute",a.options.contextmenuWidth&&(s.style.width=a.options.contextmenuWidth+"px"),this._createItems(),i.DomEvent.on(s,"click",i.DomEvent.stop).on(s,"mousedown",i.DomEvent.stop).on(s,"dblclick",i.DomEvent.stop).on(s,"contextmenu",i.DomEvent.stop)},addHooks:function(){var a=this._map.getContainer();i.DomEvent.on(a,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),i.Browser.touch&&i.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,movestart:this._hide,zoomstart:this._hide},this)},removeHooks:function(){var a=this._map.getContainer();i.DomEvent.off(a,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),i.Browser.touch&&i.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,movestart:this._hide,zoomstart:this._hide},this)},showAt:function(a,s){a instanceof i.LatLng&&(a=this._map.latLngToContainerPoint(a)),this._showAtPoint(a,s)},hide:function(){this._hide()},addItem:function(a){return this.insertItem(a)},insertItem:function(a,s){s=s!==void 0?s:this._items.length;var l=this._createItem(this._container,a,s);return this._items.push(l),this._sizeChanged=!0,this._map.fire("contextmenu.additem",{contextmenu:this,el:l.el,index:s}),l.el},removeItem:function(a){var s=this._container;return isNaN(a)||(a=s.children[a]),a?(this._removeItem(i.Util.stamp(a)),this._sizeChanged=!0,this._map.fire("contextmenu.removeitem",{contextmenu:this,el:a}),a):null},removeAllItems:function(){for(var a=this._container.children,s;a.length;)s=a[0],this._removeItem(i.Util.stamp(s));return a},hideAllItems:function(){var a,s,l;for(s=0,l=this._items.length;s':f&&(v=''),u.innerHTML=v+s.text,u.href="#",i.DomEvent.on(u,"mouseover",this._onItemMouseOver,this).on(u,"mouseout",this._onItemMouseOut,this).on(u,"mousedown",i.DomEvent.stopPropagation).on(u,"click",p),i.Browser.touch&&i.DomEvent.on(u,this._touchstart,i.DomEvent.stopPropagation),i.Browser.pointer||i.DomEvent.on(u,"click",this._onItemMouseOut,this),{id:i.Util.stamp(u),el:u,callback:p}},_removeItem:function(a){var s,l,c,d,u;for(c=0,d=this._items.length;cs.x?(l.style.left="auto",l.style.right=Math.min(Math.max(s.x-a.x,0),s.x-c.x-1)+"px"):(l.style.left=Math.max(a.x,0)+"px",l.style.right="auto"),a.y+c.y>s.y?(l.style.top="auto",l.style.bottom=Math.min(Math.max(s.y-a.y,0),s.y-c.y-1)+"px"):(l.style.top=Math.max(a.y,0)+"px",l.style.bottom="auto")},_getElementSize:function(a){var s=this._size,l=a.style.display;return(!s||this._sizeChanged)&&(s={},a.style.left="-999999px",a.style.right="auto",a.style.display="block",s.x=a.offsetWidth,s.y=a.offsetHeight,a.style.left="auto",a.style.display=l,this._sizeChanged=!1),s},_onKeyDown:function(a){var s=a.keyCode;s===27&&this._hide()},_onItemMouseOver:function(a){i.DomUtil.addClass(a.target||a.srcElement,"over")},_onItemMouseOut:function(a){i.DomUtil.removeClass(a.target||a.srcElement,"over")}}),i.Map.addInitHook("addHandler","contextmenu",i.Map.ContextMenu),i.Mixin.ContextMenu={bindContextMenu:function(a){return i.setOptions(this,a),this._initContextMenu(),this},unbindContextMenu:function(){return this.off("contextmenu",this._showContextMenu,this),this},addContextMenuItem:function(a){this.options.contextmenuItems.push(a)},removeContextMenuItemWithIndex:function(a){for(var s=[],l=0;l{"use strict";(function(i,e){typeof Vn=="object"&&typeof Xv{a.previousActiveElement instanceof HTMLElement?(a.previousActiveElement.focus(),a.previousActiveElement=null):document.body&&document.body.focus()},l=m=>new Promise(g=>{if(!m)return g();let b=window.scrollX,C=window.scrollY;a.restoreFocusTimeout=setTimeout(()=>{s(),g()},o),window.scrollTo(b,C)}),c="swal2-",u=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce((m,g)=>(m[g]=c+g,m),{}),h=["success","warning","info","question","error"].reduce((m,g)=>(m[g]=c+g,m),{}),f="SweetAlert2:",v=m=>m.charAt(0).toUpperCase()+m.slice(1),_=m=>{console.warn(`${f} ${typeof m=="object"?m.join(" "):m}`)},y=m=>{console.error(`${f} ${m}`)},w=[],x=m=>{w.includes(m)||(w.push(m),_(m))},M=(m,g=null)=>{x(`"${m}" is deprecated and will be removed in the next major release.${g?` Use "${g}" instead.`:""}`)},S=m=>typeof m=="function"?m():m,T=m=>m&&typeof m.toPromise=="function",I=m=>T(m)?m.toPromise():Promise.resolve(m),N=m=>m&&Promise.resolve(m)===m,A=()=>document.body.querySelector(`.${u.container}`),V=m=>{let g=A();return g?g.querySelector(m):null},F=m=>V(`.${m}`),z=()=>F(u.popup),B=()=>F(u.icon),H=()=>F(u["icon-content"]),se=()=>F(u.title),oe=()=>F(u["html-container"]),Se=()=>F(u.image),be=()=>F(u["progress-steps"]),xe=()=>F(u["validation-message"]),fe=()=>V(`.${u.actions} .${u.confirm}`),pe=()=>V(`.${u.actions} .${u.cancel}`),de=()=>V(`.${u.actions} .${u.deny}`),Ne=()=>F(u["input-label"]),et=()=>V(`.${u.loader}`),Ut=()=>F(u.actions),wi=()=>F(u.footer),ei=()=>F(u["timer-progress-bar"]),xi=()=>F(u.close),ti=`
a[href],
area[href],
input:not([disabled]),
select:not([disabled]),
textarea:not([disabled]),
button:not([disabled]),
iframe,
object,
embed,
[tabindex="0"],
[contenteditable],
audio[controls],
video[controls],
summary
`,pt=()=>{let m=z();if(!m)return[];let g=m.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),b=Array.from(g).sort((K,ke)=>{let Fe=parseInt(K.getAttribute("tabindex")||"0"),tt=parseInt(ke.getAttribute("tabindex")||"0");return Fe>tt?1:FeK.getAttribute("tabindex")!=="-1");return[...new Set(b.concat(O))].filter(K=>hi(K))},we=()=>Ni(document.body,u.shown)&&!Ni(document.body,u["toast-shown"])&&!Ni(document.body,u["no-backdrop"]),De=()=>{let m=z();return m?Ni(m,u.toast):!1},Un=()=>{let m=z();return m?m.hasAttribute("data-loading"):!1},$e=(m,g)=>{if(m.textContent="",g){let C=new DOMParser().parseFromString(g,"text/html"),O=C.querySelector("head");O&&Array.from(O.childNodes).forEach(ke=>{m.appendChild(ke)});let K=C.querySelector("body");K&&Array.from(K.childNodes).forEach(ke=>{ke instanceof HTMLVideoElement||ke instanceof HTMLAudioElement?m.appendChild(ke.cloneNode(!0)):m.appendChild(ke)})}},Ni=(m,g)=>{if(!g)return!1;let b=g.split(/\s+/);for(let C=0;C{Array.from(m.classList).forEach(b=>{!Object.values(u).includes(b)&&!Object.values(h).includes(b)&&!Object.values(g.showClass||{}).includes(b)&&m.classList.remove(b)})},Ci=(m,g,b)=>{if(ic(m,g),!g.customClass)return;let C=g.customClass[b];if(C){if(typeof C!="string"&&!C.forEach){_(`Invalid type of customClass.${b}! Expected string or iterable object, got "${typeof C}"`);return}je(m,C)}},nc=(m,g)=>{if(!g)return null;switch(g){case"select":case"textarea":case"file":return m.querySelector(`.${u.popup} > .${u[g]}`);case"checkbox":return m.querySelector(`.${u.popup} > .${u.checkbox} input`);case"radio":return m.querySelector(`.${u.popup} > .${u.radio} input:checked`)||m.querySelector(`.${u.popup} > .${u.radio} input:first-child`);case"range":return m.querySelector(`.${u.popup} > .${u.range} input`);default:return m.querySelector(`.${u.popup} > .${u.input}`)}},h0=m=>{if(m.focus(),m.type!=="file"){let g=m.value;m.value="",m.value=g}},f0=(m,g,b)=>{!m||!g||(typeof g=="string"&&(g=g.split(/\s+/).filter(Boolean)),g.forEach(C=>{Array.isArray(m)?m.forEach(O=>{b?O.classList.add(C):O.classList.remove(C)}):b?m.classList.add(C):m.classList.remove(C)}))},je=(m,g)=>{f0(m,g,!0)},Bi=(m,g)=>{f0(m,g,!1)},cr=(m,g)=>{let b=Array.from(m.children);for(let C=0;C{b===`${parseInt(`${b}`)}`&&(b=parseInt(b)),b||parseInt(`${b}`)===0?m.style.setProperty(g,typeof b=="number"?`${b}px`:b):m.style.removeProperty(g)},Dt=(m,g="flex")=>{m&&(m.style.display=g)},Ht=m=>{m&&(m.style.display="none")},$p=(m,g="block")=>{m&&new MutationObserver(()=>{bs(m,m.innerHTML,g)}).observe(m,{childList:!0,subtree:!0})},m0=(m,g,b,C)=>{let O=m.querySelector(g);O&&O.style.setProperty(b,C)},bs=(m,g,b="flex")=>{g?Dt(m,b):Ht(m)},hi=m=>!!(m&&(m.offsetWidth||m.offsetHeight||m.getClientRects().length)),p2=()=>!hi(fe())&&!hi(de())&&!hi(pe()),Xp=m=>m.scrollHeight>m.clientHeight,h2=(m,g)=>{let b=m;for(;b&&b!==g;){if(Xp(b))return!0;b=b.parentElement}return!1},g0=m=>{let g=window.getComputedStyle(m),b=parseFloat(g.getPropertyValue("animation-duration")||"0"),C=parseFloat(g.getPropertyValue("transition-duration")||"0");return b>0||C>0},Qp=(m,g=!1)=>{let b=ei();b&&hi(b)&&(g&&(b.style.transition="none",b.style.width="100%"),setTimeout(()=>{b.style.transition=`width ${m/1e3}s linear`,b.style.width="0%"},10))},f2=()=>{let m=ei();if(!m)return;let g=parseInt(window.getComputedStyle(m).width);m.style.removeProperty("transition"),m.style.width="100%";let b=parseInt(window.getComputedStyle(m).width),C=g/b*100;m.style.width=`${C}%`},m2=()=>typeof window>"u"||typeof document>"u",g2=`
`.replace(/(^|\n)\s*/g,""),v2=()=>{let m=A();return m?(m.remove(),Bi([document.documentElement,document.body],[u["no-backdrop"],u["toast-shown"],u["has-column"]]),!0):!1},$r=()=>{a.currentInstance&&a.currentInstance.resetValidationMessage()},_2=()=>{let m=z();if(!m)return;let g=cr(m,u.input),b=cr(m,u.file),C=m.querySelector(`.${u.range} input`),O=m.querySelector(`.${u.range} output`),K=cr(m,u.select),ke=m.querySelector(`.${u.checkbox} input`),Fe=cr(m,u.textarea);g&&(g.oninput=$r),b&&(b.onchange=$r),K&&(K.onchange=$r),ke&&(ke.onchange=$r),Fe&&(Fe.oninput=$r),C&&O&&(C.oninput=()=>{$r(),O.value=C.value},C.onchange=()=>{$r(),O.value=C.value})},y2=m=>{if(typeof m=="string"){let g=document.querySelector(m);if(!g)throw new Error(`Target element "${m}" not found`);return g}return m},b2=m=>{let g=z();g&&(g.setAttribute("role",m.toast?"alert":"dialog"),g.setAttribute("aria-live",m.toast?"polite":"assertive"),m.toast||g.setAttribute("aria-modal","true"))},w2=m=>{window.getComputedStyle(m).direction==="rtl"&&(je(A(),u.rtl),a.isRTL=!0)},x2=m=>{let g=v2();if(m2()){y("SweetAlert2 requires document to initialize");return}let b=document.createElement("div");b.className=u.container,g&&je(b,u["no-transition"]),$e(b,g2),b.dataset.swal2Theme=m.theme;let C=y2(m.target||"body");C.appendChild(b),m.topLayer&&(b.setAttribute("popover",""),b.showPopover()),b2(m),w2(C),_2()},Jp=(m,g)=>{m instanceof HTMLElement?g.appendChild(m):typeof m=="object"?C2(m,g):m&&$e(g,m)},C2=(m,g)=>{"jquery"in m?M2(g,m):$e(g,m.toString())},M2=(m,g)=>{if(m.textContent="",0 in g)for(let b=0;b in g;b++)m.appendChild(g[b].cloneNode(!0));else m.appendChild(g.cloneNode(!0))},k2=(m,g)=>{let b=Ut(),C=et();!b||!C||(!g.showConfirmButton&&!g.showDenyButton&&!g.showCancelButton?Ht(b):Dt(b),Ci(b,g,"actions"),S2(b,C,g),$e(C,g.loaderHtml||""),Ci(C,g,"loader"))};function S2(m,g,b){let C=fe(),O=de(),K=pe();!C||!O||!K||(th(C,"confirm",b),th(O,"deny",b),th(K,"cancel",b),L2(C,O,K,b),b.reverseButtons&&(b.toast?(m.insertBefore(K,C),m.insertBefore(O,C)):(m.insertBefore(K,g),m.insertBefore(O,g),m.insertBefore(C,g))))}function L2(m,g,b,C){if(!C.buttonsStyling){Bi([m,g,b],u.styled);return}je([m,g,b],u.styled),C.confirmButtonColor&&m.style.setProperty("--swal2-confirm-button-background-color",C.confirmButtonColor),C.denyButtonColor&&g.style.setProperty("--swal2-deny-button-background-color",C.denyButtonColor),C.cancelButtonColor&&b.style.setProperty("--swal2-cancel-button-background-color",C.cancelButtonColor),eh(m),eh(g),eh(b)}function eh(m){let g=window.getComputedStyle(m);if(g.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;let b=g.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");m.style.setProperty("--swal2-action-button-focus-box-shadow",g.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${b}`))}function th(m,g,b){let C=v(g);bs(m,b[`show${C}Button`],"inline-block"),$e(m,b[`${g}ButtonText`]||""),m.setAttribute("aria-label",b[`${g}ButtonAriaLabel`]||""),m.className=u[g],Ci(m,b,`${g}Button`)}let T2=(m,g)=>{let b=xi();b&&($e(b,g.closeButtonHtml||""),Ci(b,g,"closeButton"),bs(b,g.showCloseButton),b.setAttribute("aria-label",g.closeButtonAriaLabel||""))},E2=(m,g)=>{let b=A();b&&(P2(b,g.backdrop),D2(b,g.position),I2(b,g.grow),Ci(b,g,"container"))};function P2(m,g){typeof g=="string"?m.style.background=g:g||je([document.documentElement,document.body],u["no-backdrop"])}function D2(m,g){g&&(g in u?je(m,u[g]):(_('The "position" parameter is not valid, defaulting to "center"'),je(m,u.center)))}function I2(m,g){g&&je(m,u[`grow-${g}`])}var qe={innerParams:new WeakMap,domCache:new WeakMap,focusedElement:new WeakMap};let O2=["input","file","range","select","radio","checkbox","textarea"],A2=(m,g)=>{let b=z();if(!b)return;let C=qe.innerParams.get(m),O=!C||g.input!==C.input;O2.forEach(K=>{let ke=cr(b,u[K]);ke&&(R2(K,g.inputAttributes),ke.className=u[K],O&&Ht(ke))}),g.input&&(O&&N2(g),F2(g))},N2=m=>{if(!m.input)return;if(!ht[m.input]){y(`Unexpected type of input! Expected ${Object.keys(ht).join(" | ")}, got "${m.input}"`);return}let g=v0(m.input);if(!g)return;let b=ht[m.input](g,m);Dt(g),m.inputAutoFocus&&setTimeout(()=>{h0(b)})},B2=m=>{for(let g=0;g{let b=z();if(!b)return;let C=nc(b,m);if(C){B2(C);for(let O in g)C.setAttribute(O,g[O])}},F2=m=>{if(!m.input)return;let g=v0(m.input);g&&Ci(g,m,"input")},ih=(m,g)=>{!m.placeholder&&g.inputPlaceholder&&(m.placeholder=g.inputPlaceholder)},ws=(m,g,b)=>{if(b.inputLabel){let C=document.createElement("label"),O=u["input-label"];C.setAttribute("for",m.id),C.className=O,typeof b.customClass=="object"&&je(C,b.customClass.inputLabel),C.innerText=b.inputLabel,g.insertAdjacentElement("beforebegin",C)}},v0=m=>{let g=z();if(g)return cr(g,u[m]||u.input)},rc=(m,g)=>{["string","number"].includes(typeof g)?m.value=`${g}`:N(g)||_(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof g}"`)},ht={};ht.text=ht.email=ht.password=ht.number=ht.tel=ht.url=ht.search=ht.date=ht["datetime-local"]=ht.time=ht.week=ht.month=(m,g)=>{let b=m;return rc(b,g.inputValue),ws(b,b,g),ih(b,g),b.type=g.input,b},ht.file=(m,g)=>{let b=m;return ws(b,b,g),ih(b,g),b},ht.range=(m,g)=>{let b=m,C=b.querySelector("input"),O=b.querySelector("output");return C&&(rc(C,g.inputValue),C.type=g.input,ws(C,m,g)),O&&rc(O,g.inputValue),m},ht.select=(m,g)=>{let b=m;if(b.textContent="",g.inputPlaceholder){let C=document.createElement("option");$e(C,g.inputPlaceholder),C.value="",C.disabled=!0,C.selected=!0,b.appendChild(C)}return ws(b,b,g),b},ht.radio=m=>{let g=m;return g.textContent="",m},ht.checkbox=(m,g)=>{let b=z();if(!b)throw new Error("Popup not found");let C=nc(b,"checkbox");if(!C)throw new Error("Checkbox input not found");C.value="1",C.checked=!!g.inputValue;let K=m.querySelector("span");if(K){let ke=g.inputPlaceholder||g.inputLabel;ke&&$e(K,ke)}return C},ht.textarea=(m,g)=>{let b=m;rc(b,g.inputValue),ih(b,g),ws(b,b,g);let C=O=>parseInt(window.getComputedStyle(O).marginLeft)+parseInt(window.getComputedStyle(O).marginRight);return setTimeout(()=>{if("MutationObserver"in window){let O=z();if(!O)return;let K=parseInt(window.getComputedStyle(O).width),ke=()=>{if(!document.body.contains(b))return;let Fe=b.offsetWidth+C(b),tt=z();tt&&(Fe>K?tt.style.width=`${Fe}px`:Kr(tt,"width",g.width))};new MutationObserver(ke).observe(b,{attributes:!0,attributeFilter:["style"]})}}),b};let V2=(m,g)=>{let b=oe();b&&($p(b),Ci(b,g,"htmlContainer"),g.html?(Jp(g.html,b),Dt(b,"block")):g.text?(b.textContent=g.text,Dt(b,"block")):Ht(b),A2(m,g))},z2=(m,g)=>{let b=wi();b&&($p(b),bs(b,!!g.footer,"block"),g.footer&&Jp(g.footer,b),Ci(b,g,"footer"))},U2=(m,g)=>{let b=qe.innerParams.get(m),C=B();if(!C)return;if(b&&g.icon===b.icon){b0(C,g),_0(C,g);return}if(!g.icon&&!g.iconHtml){Ht(C);return}if(g.icon&&Object.keys(h).indexOf(g.icon)===-1){y(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${g.icon}"`),Ht(C);return}Dt(C),b0(C,g),_0(C,g),je(C,g.showClass&&g.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",y0)},_0=(m,g)=>{for(let[b,C]of Object.entries(h))g.icon!==b&&Bi(m,C);je(m,g.icon&&h[g.icon]),W2(m,g),y0(),Ci(m,g,"icon")},y0=()=>{let m=z();if(!m)return;let g=window.getComputedStyle(m).getPropertyValue("background-color"),b=m.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let C=0;C`
${m.animation?'
':""}
${m.animation?'
':""}
${m.animation?'
':""}
`,G2=`
`,b0=(m,g)=>{if(!g.icon&&!g.iconHtml)return;let b=m.innerHTML,C="";g.iconHtml?C=w0(g.iconHtml):g.icon==="success"?(C=H2(g),b=b.replace(/ style=".*?"/g,"")):g.icon==="error"?C=G2:g.icon&&(C=w0({question:"?",warning:"!",info:"i"}[g.icon])),b.trim()!==C.trim()&&$e(m,C)},W2=(m,g)=>{if(g.iconColor){m.style.color=g.iconColor,m.style.borderColor=g.iconColor;for(let b of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])m0(m,b,"background-color",g.iconColor);m0(m,".swal2-success-ring","border-color",g.iconColor)}},w0=m=>`${m}
`,j2=(m,g)=>{let b=Se();if(b){if(!g.imageUrl){Ht(b);return}Dt(b,""),b.setAttribute("src",g.imageUrl),b.setAttribute("alt",g.imageAlt||""),Kr(b,"width",g.imageWidth),Kr(b,"height",g.imageHeight),b.className=u.image,Ci(b,g,"image")}},nh=!1,x0=0,C0=0,M0=0,k0=0,q2=m=>{m.addEventListener("mousedown",oc),document.body.addEventListener("mousemove",ac),m.addEventListener("mouseup",sc),m.addEventListener("touchstart",oc),document.body.addEventListener("touchmove",ac),m.addEventListener("touchend",sc)},Y2=m=>{m.removeEventListener("mousedown",oc),document.body.removeEventListener("mousemove",ac),m.removeEventListener("mouseup",sc),m.removeEventListener("touchstart",oc),document.body.removeEventListener("touchmove",ac),m.removeEventListener("touchend",sc)},oc=m=>{let g=z();if(!g)return;let b=B();if(m.target===g||b&&b.contains(m.target)){nh=!0;let C=S0(m);x0=C.clientX,C0=C.clientY,M0=parseInt(g.style.insetInlineStart)||0,k0=parseInt(g.style.insetBlockStart)||0,je(g,"swal2-dragging")}},ac=m=>{let g=z();if(g&&nh){let{clientX:b,clientY:C}=S0(m),O=b-x0;g.style.insetInlineStart=`${M0+(a.isRTL?-O:O)}px`,g.style.insetBlockStart=`${k0+(C-C0)}px`}},sc=()=>{let m=z();nh=!1,Bi(m,"swal2-dragging")},S0=m=>{let g=0,b=0;return m.type.startsWith("mouse")?(g=m.clientX,b=m.clientY):m.type.startsWith("touch")&&(g=m.touches[0].clientX,b=m.touches[0].clientY),{clientX:g,clientY:b}},Z2=(m,g)=>{let b=A(),C=z();if(!(!b||!C)){if(g.toast){Kr(b,"width",g.width),C.style.width="100%";let O=et();O&&C.insertBefore(O,B())}else Kr(C,"width",g.width);Kr(C,"padding",g.padding),g.color&&(C.style.color=g.color),g.background&&(C.style.background=g.background),Ht(xe()),K2(C,g),g.draggable&&!g.toast?(je(C,u.draggable),q2(C)):(Bi(C,u.draggable),Y2(C))}},K2=(m,g)=>{let b=g.showClass||{};m.className=`${u.popup} ${hi(m)?b.popup:""}`,g.toast?(je([document.documentElement,document.body],u["toast-shown"]),je(m,u.toast)):je(m,u.modal),Ci(m,g,"popup"),typeof g.customClass=="string"&&je(m,g.customClass),g.icon&&je(m,u[`icon-${g.icon}`])},$2=(m,g)=>{let b=be();if(!b)return;let{progressSteps:C,currentProgressStep:O}=g;if(!C||C.length===0||O===void 0){Ht(b);return}Dt(b),b.textContent="",O>=C.length&&_("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),C.forEach((K,ke)=>{let Fe=X2(K);if(b.appendChild(Fe),ke===O&&je(Fe,u["active-progress-step"]),ke!==C.length-1){let tt=Q2(g);b.appendChild(tt)}})},X2=m=>{let g=document.createElement("li");return je(g,u["progress-step"]),$e(g,m),g},Q2=m=>{let g=document.createElement("li");return je(g,u["progress-step-line"]),m.progressStepsDistance&&Kr(g,"width",m.progressStepsDistance),g},J2=(m,g)=>{let b=se();b&&($p(b),bs(b,!!(g.title||g.titleText),"block"),g.title&&Jp(g.title,b),g.titleText&&(b.innerText=g.titleText),Ci(b,g,"title"))},L0=(m,g)=>{var b;Z2(m,g),E2(m,g),$2(m,g),U2(m,g),j2(m,g),J2(m,g),T2(m,g),V2(m,g),k2(m,g),z2(m,g);let C=z();typeof g.didRender=="function"&&C&&g.didRender(C),(b=a.eventEmitter)===null||b===void 0||b.emit("didRender",C)},eL=()=>hi(z()),T0=()=>{var m;return(m=fe())===null||m===void 0?void 0:m.click()},tL=()=>{var m;return(m=de())===null||m===void 0?void 0:m.click()},iL=()=>{var m;return(m=pe())===null||m===void 0?void 0:m.click()},ia=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),E0=m=>{if(m.keydownTarget&&m.keydownHandlerAdded&&m.keydownHandler){let g=m.keydownHandler;m.keydownTarget.removeEventListener("keydown",g,{capture:m.keydownListenerCapture}),m.keydownHandlerAdded=!1}},nL=(m,g,b)=>{if(E0(m),!g.toast){let C=K=>oL(g,K,b);m.keydownHandler=C;let O=g.keydownListenerCapture?window:z();if(O){m.keydownTarget=O,m.keydownListenerCapture=g.keydownListenerCapture;let K=C;m.keydownTarget.addEventListener("keydown",K,{capture:m.keydownListenerCapture}),m.keydownHandlerAdded=!0}}},rh=(m,g)=>{var b;let C=pt();if(C.length){m=m+g,m===-2&&(m=C.length-1),m===C.length?m=0:m===-1&&(m=C.length-1),C[m].focus();return}(b=z())===null||b===void 0||b.focus()},P0=["ArrowRight","ArrowDown"],rL=["ArrowLeft","ArrowUp"],oL=(m,g,b)=>{m&&(g.isComposing||g.keyCode===229||(m.stopKeydownPropagation&&g.stopPropagation(),g.key==="Enter"?aL(g,m):g.key==="Tab"?sL(g):[...P0,...rL].includes(g.key)?lL(g.key):g.key==="Escape"&&cL(g,m,b)))},aL=(m,g)=>{if(!S(g.allowEnterKey))return;let b=z();if(!b||!g.input)return;let C=nc(b,g.input);if(m.target&&C&&m.target instanceof HTMLElement&&m.target.outerHTML===C.outerHTML){if(["textarea","file"].includes(g.input))return;T0(),m.preventDefault()}},sL=m=>{let g=m.target,b=pt(),C=-1;for(let O=0;O{let g=Ut(),b=fe(),C=de(),O=pe();if(!g||!b||!C||!O)return;let K=[b,C,O];if(document.activeElement instanceof HTMLElement&&!K.includes(document.activeElement))return;let ke=P0.includes(m)?"nextElementSibling":"previousElementSibling",Fe=document.activeElement;if(Fe){for(let tt=0;tt{m.preventDefault(),S(g.allowEscapeKey)&&b(ia.esc)};var na={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};let uL=()=>{let m=A();Array.from(document.body.children).forEach(b=>{b.contains(m)||(b.hasAttribute("aria-hidden")&&b.setAttribute("data-previous-aria-hidden",b.getAttribute("aria-hidden")||""),b.setAttribute("aria-hidden","true"))})},D0=()=>{Array.from(document.body.children).forEach(g=>{g.hasAttribute("data-previous-aria-hidden")?(g.setAttribute("aria-hidden",g.getAttribute("data-previous-aria-hidden")||""),g.removeAttribute("data-previous-aria-hidden")):g.removeAttribute("aria-hidden")})},I0=typeof window{if(I0&&!Ni(document.body,u.iosfix)){let m=document.body.scrollTop;document.body.style.top=`${m*-1}px`,je(document.body,u.iosfix),pL()}},pL=()=>{let m=A();if(!m)return;let g;m.ontouchstart=b=>{g=hL(b)},m.ontouchmove=b=>{g&&(b.preventDefault(),b.stopPropagation())}},hL=m=>{let g=m.target,b=A(),C=oe();return!b||!C||fL(m)||mL(m)?!1:g===b||!Xp(b)&&g instanceof HTMLElement&&!h2(g,C)&&g.tagName!=="INPUT"&&g.tagName!=="TEXTAREA"&&!(Xp(C)&&C.contains(g))},fL=m=>!!(m.touches&&m.touches.length&&m.touches[0].touchType==="stylus"),mL=m=>m.touches&&m.touches.length>1,gL=()=>{if(Ni(document.body,u.iosfix)){let m=parseInt(document.body.style.top,10);Bi(document.body,u.iosfix),document.body.style.top="",document.body.scrollTop=m*-1}},vL=()=>{let m=document.createElement("div");m.className=u["scrollbar-measure"],document.body.appendChild(m);let g=m.getBoundingClientRect().width-m.clientWidth;return document.body.removeChild(m),g},ra=null,_L=m=>{ra===null&&(document.body.scrollHeight>window.innerHeight||m==="scroll")&&(ra=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${ra+vL()}px`)},yL=()=>{ra!==null&&(document.body.style.paddingRight=`${ra}px`,ra=null)};function O0(m,g,b,C){De()?N0(m,C):(l(b).then(()=>N0(m,C)),E0(a)),I0?(g.setAttribute("style","display:none !important"),g.removeAttribute("class"),g.innerHTML=""):g.remove(),we()&&(yL(),gL(),D0()),bL()}function bL(){Bi([document.documentElement,document.body],[u.shown,u["height-auto"],u["no-backdrop"],u["toast-shown"]])}function ur(m){m=xL(m);let g=na.swalPromiseResolve.get(this),b=wL(this);this.isAwaitingPromise?m.isDismissed||(xs(this),g(m)):b&&g(m)}let wL=m=>{let g=z();if(!g)return!1;let b=qe.innerParams.get(m);if(!b||Ni(g,b.hideClass.popup))return!1;Bi(g,b.showClass.popup),je(g,b.hideClass.popup);let C=A();return Bi(C,b.showClass.backdrop),je(C,b.hideClass.backdrop),CL(m,g,b),!0};function A0(m){let g=na.swalPromiseReject.get(this);xs(this),g&&g(m)}let xs=m=>{m.isAwaitingPromise&&(delete m.isAwaitingPromise,qe.innerParams.get(m)||m._destroy())},xL=m=>typeof m>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},m),CL=(m,g,b)=>{var C;let O=A(),K=g0(g);typeof b.willClose=="function"&&b.willClose(g),(C=a.eventEmitter)===null||C===void 0||C.emit("willClose",g),K&&O?ML(m,g,O,!!b.returnFocus,b.didClose):O&&O0(m,O,!!b.returnFocus,b.didClose)},ML=(m,g,b,C,O)=>{a.swalCloseEventFinishedCallback=O0.bind(null,m,b,C,O);let K=function(ke){if(ke.target===g){var Fe;(Fe=a.swalCloseEventFinishedCallback)===null||Fe===void 0||Fe.call(a),delete a.swalCloseEventFinishedCallback,g.removeEventListener("animationend",K),g.removeEventListener("transitionend",K)}};g.addEventListener("animationend",K),g.addEventListener("transitionend",K)},N0=(m,g)=>{setTimeout(()=>{var b;typeof g=="function"&&g.bind(m.params)(),(b=a.eventEmitter)===null||b===void 0||b.emit("didClose"),m._destroy&&m._destroy()})},oa=m=>{let g=z();if(g||new hc,g=z(),!g)return;let b=et();De()?Ht(B()):kL(g,m),Dt(b),g.setAttribute("data-loading","true"),g.setAttribute("aria-busy","true"),g.focus()},kL=(m,g)=>{let b=Ut(),C=et();!b||!C||(!g&&hi(fe())&&(g=fe()),Dt(b),g&&(Ht(g),C.setAttribute("data-button-to-replace",g.className),b.insertBefore(C,g)),je([m,b],u.loading))},SL=(m,g)=>{g.input==="select"||g.input==="radio"?DL(m,g):["text","email","number","tel","textarea"].some(b=>b===g.input)&&(T(g.inputValue)||N(g.inputValue))&&(oa(fe()),IL(m,g))},LL=(m,g)=>{let b=m.getInput();if(!b)return null;switch(g.input){case"checkbox":return TL(b);case"radio":return EL(b);case"file":return PL(b);default:return g.inputAutoTrim?b.value.trim():b.value}},TL=m=>m.checked?1:0,EL=m=>m.checked?m.value:null,PL=m=>m.files&&m.files.length?m.getAttribute("multiple")!==null?m.files:m.files[0]:null,DL=(m,g)=>{let b=z();if(!b)return;let C=O=>{g.input==="select"?OL(b,lc(O),g):g.input==="radio"&&AL(b,lc(O),g)};T(g.inputOptions)||N(g.inputOptions)?(oa(fe()),I(g.inputOptions).then(O=>{m.hideLoading(),C(O)})):typeof g.inputOptions=="object"?C(g.inputOptions):y(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof g.inputOptions}`)},IL=(m,g)=>{let b=m.getInput();b&&(Ht(b),I(g.inputValue).then(C=>{b.value=g.input==="number"?`${parseFloat(C)||0}`:`${C}`,Dt(b),b.focus(),m.hideLoading()}).catch(C=>{y(`Error in inputValue promise: ${C}`),b.value="",Dt(b),b.focus(),m.hideLoading()}))};function OL(m,g,b){let C=cr(m,u.select);if(!C)return;let O=(K,ke,Fe)=>{let tt=document.createElement("option");tt.value=Fe,$e(tt,ke),tt.selected=B0(Fe,b.inputValue),K.appendChild(tt)};g.forEach(K=>{let ke=K[0],Fe=K[1];if(Array.isArray(Fe)){let tt=document.createElement("optgroup");tt.label=ke,tt.disabled=!1,C.appendChild(tt),Fe.forEach(aa=>O(tt,aa[1],aa[0]))}else O(C,Fe,ke)}),C.focus()}function AL(m,g,b){let C=cr(m,u.radio);if(!C)return;g.forEach(K=>{let ke=K[0],Fe=K[1],tt=document.createElement("input"),aa=document.createElement("label");tt.type="radio",tt.name=u.radio,tt.value=ke,B0(ke,b.inputValue)&&(tt.checked=!0);let ch=document.createElement("span");$e(ch,Fe),ch.className=u.label,aa.appendChild(tt),aa.appendChild(ch),C.appendChild(aa)});let O=C.querySelectorAll("input");O.length&&O[0].focus()}let lc=m=>{let g=[];return m instanceof Map?m.forEach((b,C)=>{let O=b;typeof O=="object"&&(O=lc(O)),g.push([C,O])}):Object.keys(m).forEach(b=>{let C=m[b];typeof C=="object"&&(C=lc(C)),g.push([b,C])}),g},B0=(m,g)=>!!g&&g!==null&&g!==void 0&&g.toString()===m.toString(),NL=m=>{let g=qe.innerParams.get(m);m.disableButtons(),g.input?R0(m,"confirm"):ah(m,!0)},BL=m=>{let g=qe.innerParams.get(m);m.disableButtons(),g.returnInputValueOnDeny?R0(m,"deny"):oh(m,!1)},RL=(m,g)=>{m.disableButtons(),g(ia.cancel)},R0=(m,g)=>{let b=qe.innerParams.get(m);if(!b.input){y(`The "input" parameter is needed to be set when using returnInputValueOn${v(g)}`);return}let C=m.getInput(),O=LL(m,b);b.inputValidator?FL(m,O,g):C&&!C.checkValidity()?(m.enableButtons(),m.showValidationMessage(b.validationMessage||C.validationMessage)):g==="deny"?oh(m,O):ah(m,O)},FL=(m,g,b)=>{let C=qe.innerParams.get(m);m.disableInput(),Promise.resolve().then(()=>I(C.inputValidator(g,C.validationMessage))).then(K=>{m.enableButtons(),m.enableInput(),K?m.showValidationMessage(K):b==="deny"?oh(m,g):ah(m,g)})},oh=(m,g)=>{let b=qe.innerParams.get(m);b.showLoaderOnDeny&&oa(de()),b.preDeny?(m.isAwaitingPromise=!0,Promise.resolve().then(()=>I(b.preDeny(g,b.validationMessage))).then(O=>{O===!1?(m.hideLoading(),xs(m)):m.close({isDenied:!0,value:typeof O>"u"?g:O})}).catch(O=>V0(m,O))):m.close({isDenied:!0,value:g})},F0=(m,g)=>{m.close({isConfirmed:!0,value:g})},V0=(m,g)=>{m.rejectPromise(g)},ah=(m,g)=>{let b=qe.innerParams.get(m);b.showLoaderOnConfirm&&oa(),b.preConfirm?(m.resetValidationMessage(),m.isAwaitingPromise=!0,Promise.resolve().then(()=>I(b.preConfirm(g,b.validationMessage))).then(O=>{hi(xe())||O===!1?(m.hideLoading(),xs(m)):F0(m,typeof O>"u"?g:O)}).catch(O=>V0(m,O))):F0(m,g)};function cc(){let m=qe.innerParams.get(this);if(!m)return;let g=qe.domCache.get(this);Ht(g.loader),De()?m.icon&&Dt(B()):VL(g),Bi([g.popup,g.actions],u.loading),g.popup.removeAttribute("aria-busy"),g.popup.removeAttribute("data-loading"),g.confirmButton.disabled=!1,g.denyButton.disabled=!1,g.cancelButton.disabled=!1;let b=qe.focusedElement.get(this);b instanceof HTMLElement&&document.activeElement===document.body&&b.focus(),qe.focusedElement.delete(this)}let VL=m=>{let g=m.loader.getAttribute("data-button-to-replace"),b=g?m.popup.getElementsByClassName(g):[];b.length?Dt(b[0],"inline-block"):p2()&&Ht(m.actions)};function z0(){let m=qe.innerParams.get(this),g=qe.domCache.get(this);return g?nc(g.popup,m.input):null}function U0(m,g,b){let C=qe.domCache.get(m);g.forEach(O=>{C[O].disabled=b})}function H0(m,g){let b=z();if(!(!b||!m))if(m.type==="radio"){let C=b.querySelectorAll(`[name="${u.radio}"]`);for(let O=0;OObject.prototype.hasOwnProperty.call(dr,m),$0=m=>zL.indexOf(m)!==-1,X0=m=>UL[m],GL=m=>{K0(m)||_(`Unknown parameter "${m}"`)},WL=m=>{HL.includes(m)&&_(`The parameter "${m}" is incompatible with toasts`)},jL=m=>{let g=X0(m);g&&M(m,g)},Q0=m=>{m.backdrop===!1&&m.allowOutsideClick&&_('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),m.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(m.theme)&&_(`Invalid theme "${m.theme}"`);for(let g in m)GL(g),m.toast&&WL(g),jL(g)};function J0(m){let g=A(),b=z(),C=qe.innerParams.get(this);if(!b||Ni(b,C.hideClass.popup)){_("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}let O=qL(m),K=Object.assign({},C,O);Q0(K),g&&(g.dataset.swal2Theme=K.theme),L0(this,K),qe.innerParams.set(this,K),Object.defineProperties(this,{params:{value:Object.assign({},this.params,m),writable:!1,enumerable:!0}})}let qL=m=>{let g={};return Object.keys(m).forEach(b=>{if($0(b)){let C=m;g[b]=C[b]}else _(`Invalid parameter to update: ${b}`)}),g};function e_(){var m;let g=qe.domCache.get(this),b=qe.innerParams.get(this);if(!b){t_(this);return}g.popup&&a.swalCloseEventFinishedCallback&&(a.swalCloseEventFinishedCallback(),delete a.swalCloseEventFinishedCallback),typeof b.didDestroy=="function"&&b.didDestroy(),(m=a.eventEmitter)===null||m===void 0||m.emit("didDestroy"),YL(this)}let YL=m=>{t_(m),delete m.params,delete a.keydownHandler,delete a.keydownTarget,delete a.currentInstance},t_=m=>{m.isAwaitingPromise?(sh(qe,m),m.isAwaitingPromise=!0):(sh(na,m),sh(qe,m),delete m.isAwaitingPromise,delete m.disableButtons,delete m.enableButtons,delete m.getInput,delete m.disableInput,delete m.enableInput,delete m.hideLoading,delete m.disableLoading,delete m.showValidationMessage,delete m.resetValidationMessage,delete m.close,delete m.closePopup,delete m.closeModal,delete m.closeToast,delete m.rejectPromise,delete m.update,delete m._destroy)},sh=(m,g)=>{for(let b in m)m[b].delete(g)};var ZL=Object.freeze({__proto__:null,_destroy:e_,close:ur,closeModal:ur,closePopup:ur,closeToast:ur,disableButtons:W0,disableInput:q0,disableLoading:cc,enableButtons:G0,enableInput:j0,getInput:z0,handleAwaitingPromise:xs,hideLoading:cc,rejectPromise:A0,resetValidationMessage:Z0,showValidationMessage:Y0,update:J0});let KL=(m,g,b)=>{m.toast?$L(m,g,b):(QL(g),JL(g),eT(m,g,b))},$L=(m,g,b)=>{g.popup.onclick=()=>{m&&(XL(m)||m.timer||m.input)||b(ia.close)}},XL=m=>!!(m.showConfirmButton||m.showDenyButton||m.showCancelButton||m.showCloseButton),uc=!1,QL=m=>{m.popup.onmousedown=()=>{m.container.onmouseup=function(g){m.container.onmouseup=()=>{},g.target===m.container&&(uc=!0)}}},JL=m=>{m.container.onmousedown=g=>{g.target===m.container&&g.preventDefault(),m.popup.onmouseup=function(b){m.popup.onmouseup=()=>{},(b.target===m.popup||b.target instanceof HTMLElement&&m.popup.contains(b.target))&&(uc=!0)}}},eT=(m,g,b)=>{g.container.onclick=C=>{if(uc){uc=!1;return}C.target===g.container&&S(m.allowOutsideClick)&&b(ia.backdrop)}},tT=m=>typeof m=="object"&&m!==null&&"jquery"in m,i_=m=>m instanceof Element||tT(m),iT=m=>{let g={};return typeof m[0]=="object"&&!i_(m[0])?Object.assign(g,m[0]):["title","html","icon"].forEach((b,C)=>{let O=m[C];typeof O=="string"||i_(O)?g[b]=O:O!==void 0&&y(`Unexpected type of ${b}! Expected "string" or "Element", got ${typeof O}`)}),g};function nT(...m){return new this(...m)}function rT(m){class g extends this{_main(C,O){return super._main(C,Object.assign({},m,O))}}return g}let oT=()=>a.timeout&&a.timeout.getTimerLeft(),n_=()=>{if(a.timeout)return f2(),a.timeout.stop()},r_=()=>{if(a.timeout){let m=a.timeout.start();return Qp(m),m}},aT=()=>{let m=a.timeout;return m&&(m.running?n_():r_())},sT=m=>{if(a.timeout){let g=a.timeout.increase(m);return Qp(g,!0),g}},lT=()=>!!(a.timeout&&a.timeout.isRunning()),o_=!1,lh={};function cT(m="data-swal-template"){lh[m]=this,o_||(document.body.addEventListener("click",uT),o_=!0)}let uT=m=>{for(let g=m.target;g&&g!==document;g=g.parentNode)for(let b in lh){let C=g.getAttribute&&g.getAttribute(b);if(C){lh[b].fire({template:C});return}}};class dT{constructor(){this.events={}}_getHandlersByEventName(g){return typeof this.events[g]>"u"&&(this.events[g]=[]),this.events[g]}on(g,b){let C=this._getHandlersByEventName(g);C.includes(b)||C.push(b)}once(g,b){let C=(...O)=>{this.removeListener(g,C),b.apply(this,O)};this.on(g,C)}emit(g,...b){this._getHandlersByEventName(g).forEach(C=>{try{C.apply(this,b)}catch(O){console.error(O)}})}removeListener(g,b){let C=this._getHandlersByEventName(g),O=C.indexOf(b);O>-1&&C.splice(O,1)}removeAllListeners(g){this.events[g]!==void 0&&(this.events[g].length=0)}reset(){this.events={}}}a.eventEmitter=new dT;var pT=Object.freeze({__proto__:null,argsToParams:iT,bindClickHandler:cT,clickCancel:iL,clickConfirm:T0,clickDeny:tL,enableLoading:oa,fire:nT,getActions:Ut,getCancelButton:pe,getCloseButton:xi,getConfirmButton:fe,getContainer:A,getDenyButton:de,getFocusableElements:pt,getFooter:wi,getHtmlContainer:oe,getIcon:B,getIconContent:H,getImage:Se,getInputLabel:Ne,getLoader:et,getPopup:z,getProgressSteps:be,getTimerLeft:oT,getTimerProgressBar:ei,getTitle:se,getValidationMessage:xe,increaseTimer:sT,isDeprecatedParameter:X0,isLoading:Un,isTimerRunning:lT,isUpdatableParameter:$0,isValidParameter:K0,isVisible:eL,mixin:rT,off:(m,g)=>{if(a.eventEmitter){if(!m){a.eventEmitter.reset();return}g?a.eventEmitter.removeListener(m,g):a.eventEmitter.removeAllListeners(m)}},on:(m,g)=>{a.eventEmitter&&a.eventEmitter.on(m,g)},once:(m,g)=>{a.eventEmitter&&a.eventEmitter.once(m,g)},resumeTimer:r_,showLoading:oa,stopTimer:n_,toggleTimer:aT});class hT{constructor(g,b){this.callback=g,this.remaining=b,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(g){let b=this.running;return b&&this.stop(),this.remaining+=g,b&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}let a_=["swal-title","swal-html","swal-footer"],fT=m=>{let g=typeof m.template=="string"?document.querySelector(m.template):m.template;if(!g)return{};let b=g.content;return xT(b),Object.assign(mT(b),gT(b),vT(b),_T(b),yT(b),bT(b),wT(b,a_))},mT=m=>{let g={};return Array.from(m.querySelectorAll("swal-param")).forEach(C=>{Xr(C,["name","value"]);let O=C.getAttribute("name"),K=C.getAttribute("value");!O||!K||(O in dr&&typeof dr[O]=="boolean"?g[O]=K!=="false":O in dr&&typeof dr[O]=="object"?g[O]=JSON.parse(K):g[O]=K)}),g},gT=m=>{let g={};return Array.from(m.querySelectorAll("swal-function-param")).forEach(C=>{let O=C.getAttribute("name"),K=C.getAttribute("value");!O||!K||(g[O]=new Function(`return ${K}`)())}),g},vT=m=>{let g={};return Array.from(m.querySelectorAll("swal-button")).forEach(C=>{Xr(C,["type","color","aria-label"]);let O=C.getAttribute("type");if(!(!O||!["confirm","cancel","deny"].includes(O))){if(g[`${O}ButtonText`]=C.innerHTML,g[`show${v(O)}Button`]=!0,C.hasAttribute("color")){let K=C.getAttribute("color");K!==null&&(g[`${O}ButtonColor`]=K)}if(C.hasAttribute("aria-label")){let K=C.getAttribute("aria-label");K!==null&&(g[`${O}ButtonAriaLabel`]=K)}}}),g},_T=m=>{let g={},b=m.querySelector("swal-image");return b&&(Xr(b,["src","width","height","alt"]),b.hasAttribute("src")&&(g.imageUrl=b.getAttribute("src")||void 0),b.hasAttribute("width")&&(g.imageWidth=b.getAttribute("width")||void 0),b.hasAttribute("height")&&(g.imageHeight=b.getAttribute("height")||void 0),b.hasAttribute("alt")&&(g.imageAlt=b.getAttribute("alt")||void 0)),g},yT=m=>{let g={},b=m.querySelector("swal-icon");return b&&(Xr(b,["type","color"]),b.hasAttribute("type")&&(g.icon=b.getAttribute("type")),b.hasAttribute("color")&&(g.iconColor=b.getAttribute("color")),g.iconHtml=b.innerHTML),g},bT=m=>{let g={},b=m.querySelector("swal-input");b&&(Xr(b,["type","label","placeholder","value"]),g.input=b.getAttribute("type")||"text",b.hasAttribute("label")&&(g.inputLabel=b.getAttribute("label")),b.hasAttribute("placeholder")&&(g.inputPlaceholder=b.getAttribute("placeholder")),b.hasAttribute("value")&&(g.inputValue=b.getAttribute("value")));let C=Array.from(m.querySelectorAll("swal-input-option"));return C.length&&(g.inputOptions={},C.forEach(O=>{Xr(O,["value"]);let K=O.getAttribute("value");if(!K)return;let ke=O.innerHTML;g.inputOptions[K]=ke})),g},wT=(m,g)=>{let b={};for(let C in g){let O=g[C],K=m.querySelector(O);K&&(Xr(K,[]),b[O.replace(/^swal-/,"")]=K.innerHTML.trim())}return b},xT=m=>{let g=a_.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(m.children).forEach(b=>{let C=b.tagName.toLowerCase();g.includes(C)||_(`Unrecognized element `)})},Xr=(m,g)=>{Array.from(m.attributes).forEach(b=>{g.indexOf(b.name)===-1&&_([`Unrecognized attribute "${b.name}" on .`,`${g.length?`Allowed attributes are: ${g.join(", ")}`:"To set the value, use HTML within the element."}`])})},s_=10,CT=m=>{var g,b;let C=A(),O=z();if(!C||!O)return;typeof m.willOpen=="function"&&m.willOpen(O),(g=a.eventEmitter)===null||g===void 0||g.emit("willOpen",O);let ke=window.getComputedStyle(document.body).overflowY;if(ST(C,O,m),setTimeout(()=>{MT(C,O)},s_),we()&&(kT(C,m.scrollbarPadding!==void 0?m.scrollbarPadding:!1,ke),uL()),!De()&&!a.previousActiveElement&&(a.previousActiveElement=document.activeElement),typeof m.didOpen=="function"){let Fe=m.didOpen;setTimeout(()=>Fe(O))}(b=a.eventEmitter)===null||b===void 0||b.emit("didOpen",O)},dc=m=>{let g=z();if(!g||m.target!==g)return;let b=A();b&&(g.removeEventListener("animationend",dc),g.removeEventListener("transitionend",dc),b.style.overflowY="auto",Bi(b,u["no-transition"]))},MT=(m,g)=>{g0(g)?(m.style.overflowY="hidden",g.addEventListener("animationend",dc),g.addEventListener("transitionend",dc)):m.style.overflowY="auto"},kT=(m,g,b)=>{dL(),g&&b!=="hidden"&&_L(b),setTimeout(()=>{m.scrollTop=0})},ST=(m,g,b)=>{var C;(C=b.showClass)!==null&&C!==void 0&&C.backdrop&&je(m,b.showClass.backdrop),b.animation?(g.style.setProperty("opacity","0","important"),Dt(g,"grid"),setTimeout(()=>{var O;(O=b.showClass)!==null&&O!==void 0&&O.popup&&je(g,b.showClass.popup),g.style.removeProperty("opacity")},s_)):Dt(g,"grid"),je([document.documentElement,document.body],u.shown),b.heightAuto&&b.backdrop&&!b.toast&&je([document.documentElement,document.body],u["height-auto"])};var l_={email:(m,g)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(m)?Promise.resolve():Promise.resolve(g||"Invalid email address"),url:(m,g)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(m)?Promise.resolve():Promise.resolve(g||"Invalid URL")};function LT(m){m.inputValidator||(m.input==="email"&&(m.inputValidator=l_.email),m.input==="url"&&(m.inputValidator=l_.url))}function TT(m){(!m.target||typeof m.target=="string"&&!document.querySelector(m.target)||typeof m.target!="string"&&!m.target.appendChild)&&(_('Target parameter is not valid, defaulting to "body"'),m.target="body")}function ET(m){LT(m),m.showLoaderOnConfirm&&!m.preConfirm&&_(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
showLoaderOnConfirm should be used together with preConfirm, see usage example:
https://sweetalert2.github.io/#ajax-request`),TT(m),typeof m.title=="string"&&(m.title=m.title.split(`
`).join(" ")),x2(m)}let _n;var pc=new WeakMap;class ft{constructor(...g){if(n(this,pc,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),typeof window>"u")return;_n=this;let b=Object.freeze(this.constructor.argsToParams(g));this.params=b,this.isAwaitingPromise=!1,r(pc,this,this._main(_n.params))}_main(g,b={}){if(Q0(Object.assign({},b,g)),a.currentInstance){let K=na.swalPromiseResolve.get(a.currentInstance),{isAwaitingPromise:ke}=a.currentInstance;a.currentInstance._destroy(),ke||K({isDismissed:!0}),we()&&D0()}a.currentInstance=_n;let C=DT(g,b);ET(C),Object.freeze(C),a.timeout&&(a.timeout.stop(),delete a.timeout),clearTimeout(a.restoreFocusTimeout);let O=IT(_n);return L0(_n,C),qe.innerParams.set(_n,C),PT(_n,O,C)}then(g){return t(pc,this).then(g)}finally(g){return t(pc,this).finally(g)}}let PT=(m,g,b)=>new Promise((C,O)=>{let K=ke=>{m.close({isDismissed:!0,dismiss:ke,isConfirmed:!1,isDenied:!1})};na.swalPromiseResolve.set(m,C),na.swalPromiseReject.set(m,O),g.confirmButton.onclick=()=>{NL(m)},g.denyButton.onclick=()=>{BL(m)},g.cancelButton.onclick=()=>{RL(m,K)},g.closeButton.onclick=()=>{K(ia.close)},KL(b,g,K),nL(a,b,K),SL(m,b),CT(b),OT(a,b,K),AT(g,b),setTimeout(()=>{g.container.scrollTop=0})}),DT=(m,g)=>{let b=fT(m),C=Object.assign({},dr,g,b,m);return C.showClass=Object.assign({},dr.showClass,C.showClass),C.hideClass=Object.assign({},dr.hideClass,C.hideClass),C.animation===!1&&(C.showClass={backdrop:"swal2-noanimation"},C.hideClass={}),C},IT=m=>{let g={popup:z(),container:A(),actions:Ut(),confirmButton:fe(),denyButton:de(),cancelButton:pe(),loader:et(),closeButton:xi(),validationMessage:xe(),progressSteps:be()};return qe.domCache.set(m,g),g},OT=(m,g,b)=>{let C=ei();Ht(C),g.timer&&(m.timeout=new hT(()=>{b("timer"),delete m.timeout},g.timer),g.timerProgressBar&&C&&(Dt(C),Ci(C,g,"timerProgressBar"),setTimeout(()=>{m.timeout&&m.timeout.running&&Qp(g.timer)})))},AT=(m,g)=>{if(!g.toast){if(!S(g.allowEnterKey)){M("allowEnterKey","preConfirm: () => false"),m.popup.focus();return}NT(m)||BT(m,g)||rh(-1,1)}},NT=m=>{let g=Array.from(m.popup.querySelectorAll("[autofocus]"));for(let b of g)if(b instanceof HTMLElement&&hi(b))return b.focus(),!0;return!1},BT=(m,g)=>g.focusDeny&&hi(m.denyButton)?(m.denyButton.focus(),!0):g.focusCancel&&hi(m.cancelButton)?(m.cancelButton.focus(),!0):g.focusConfirm&&hi(m.confirmButton)?(m.confirmButton.focus(),!0):!1;ft.prototype.disableButtons=W0,ft.prototype.enableButtons=G0,ft.prototype.getInput=z0,ft.prototype.disableInput=q0,ft.prototype.enableInput=j0,ft.prototype.hideLoading=cc,ft.prototype.disableLoading=cc,ft.prototype.showValidationMessage=Y0,ft.prototype.resetValidationMessage=Z0,ft.prototype.close=ur,ft.prototype.closePopup=ur,ft.prototype.closeModal=ur,ft.prototype.closeToast=ur,ft.prototype.rejectPromise=A0,ft.prototype.update=J0,ft.prototype._destroy=e_,Object.assign(ft,pT),Object.keys(ZL).forEach(m=>{ft[m]=function(...g){if(_n&&_n[m])return _n[m](...g)}}),ft.DismissReason=ia,ft.version="11.26.21";let hc=ft;return hc.default=hc,hc});typeof Vn[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}')});var Fy=ve(Ry(),1),{__extends:lt,__assign:v5,__rest:_5,__decorate:y5,__param:b5,__metadata:w5,__awaiter:x5,__generator:C5,__exportStar:M5,__createBinding:k5,__values:S5,__read:L5,__spread:T5,__spreadArrays:E5,__spreadArray:P5,__await:D5,__asyncGenerator:I5,__asyncDelegator:O5,__asyncValues:A5,__makeTemplateObject:N5,__importStar:B5,__importDefault:R5,__classPrivateFieldGet:F5,__classPrivateFieldSet:V5}=Fy.default;var xu={};ki(xu,{dispose:()=>SP,disposeAll:()=>LP,getElementSSRData:()=>EP,getInstance:()=>TP,init:()=>wu,registerPainter:()=>kf,registerSSRDataGetter:()=>Sf,version:()=>PP});var RT=(function(){function i(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return i})(),FT=(function(){function i(){this.browser=new RT,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window"u"&&typeof self-1?(br.node=!0,br.svgSupported=!0):VT(navigator.userAgent,br);function VT(i,e){var t=e.browser,n=i.match(/Firefox\/([\d.]+)/),r=i.match(/MSIE\s([\d.]+)/)||i.match(/Trident\/.+?rv:(([\d.]+))/),o=i.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(i);n&&(t.firefox=!0,t.version=n[1]),r&&(t.ie=!0,t.version=r[1]),o&&(t.edge=!0,t.version=o[1],t.newEdge=+o[1].split(".")[0]>18),a&&(t.weChat=!0),e.svgSupported=typeof SVGRect=11);var s=e.domSupported=typeof document=9}}var Be=br;var Ze={};ki(Ze,{EPSILON:()=>aE,HashMap:()=>Wy,RADIAN_TO_DEGREE:()=>Uc,assert:()=>Ct,bind:()=>Ye,clone:()=>Me,concatArray:()=>kh,createCanvas:()=>XT,createHashMap:()=>ce,createObject:()=>jn,curry:()=>bn,defaults:()=>We,disableUserSelect:()=>oE,each:()=>D,eqNaN:()=>to,extend:()=>q,filter:()=>ot,find:()=>QT,guid:()=>Ts,hasOwn:()=>Nt,indexOf:()=>Oe,inherits:()=>Ps,isArray:()=>Q,isArrayLike:()=>mt,isBuiltInObject:()=>xh,isDom:()=>Vc,isFunction:()=>ue,isGradientObject:()=>eo,isImagePatternObject:()=>eE,isNumber:()=>Re,isObject:()=>ne,isPrimitive:()=>ya,isRegExp:()=>tE,isString:()=>te,isStringSafe:()=>wa,isTypedArray:()=>ct,keys:()=>Pe,logError:()=>Es,map:()=>J,merge:()=>Xe,mergeAll:()=>$T,mixin:()=>jt,noop:()=>Bt,normalizeCssArray:()=>io,reduce:()=>qt,retrieve:()=>iE,retrieve2:()=>Ee,retrieve3:()=>Wn,setAsPrimitive:()=>no,slice:()=>Ds,trim:()=>Yt});var Bc=12,zT="sans-serif",Vi=Bc+"px "+zT,UT=20,HT=100,GT="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function WT(i){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=a*t.length;else for(var l=0;ljc,applyTransform:()=>Si,clone:()=>Lh,copy:()=>sE,create:()=>qn,dist:()=>Ih,distSquare:()=>wr,distance:()=>Os,distanceSquare:()=>hb,div:()=>hE,dot:()=>fE,len:()=>Eh,lenSquare:()=>Ph,length:()=>uE,lengthSquare:()=>dE,lerp:()=>gE,max:()=>Ui,min:()=>zi,mul:()=>pE,negate:()=>mE,normalize:()=>Dh,scale:()=>Is,scaleAndAdd:()=>cE,set:()=>lE,sub:()=>Th});function qn(i,e){return i==null&&(i=0),e==null&&(e=0),[i,e]}function sE(i,e){return i[0]=e[0],i[1]=e[1],i}function Lh(i){return[i[0],i[1]]}function lE(i,e,t){return i[0]=e,i[1]=t,i}function jc(i,e,t){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i}function cE(i,e,t,n){return i[0]=e[0]+t[0]*n,i[1]=e[1]+t[1]*n,i}function Th(i,e,t){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i}function Eh(i){return Math.sqrt(Ph(i))}var uE=Eh;function Ph(i){return i[0]*i[0]+i[1]*i[1]}var dE=Ph;function pE(i,e,t){return i[0]=e[0]*t[0],i[1]=e[1]*t[1],i}function hE(i,e,t){return i[0]=e[0]/t[0],i[1]=e[1]/t[1],i}function fE(i,e){return i[0]*e[0]+i[1]*e[1]}function Is(i,e,t){return i[0]=e[0]*t,i[1]=e[1]*t,i}function Dh(i,e){var t=Eh(e);return t===0?(i[0]=0,i[1]=0):(i[0]=e[0]/t,i[1]=e[1]/t),i}function Os(i,e){return Math.sqrt((i[0]-e[0])*(i[0]-e[0])+(i[1]-e[1])*(i[1]-e[1]))}var Ih=Os;function hb(i,e){return(i[0]-e[0])*(i[0]-e[0])+(i[1]-e[1])*(i[1]-e[1])}var wr=hb;function mE(i,e){return i[0]=-e[0],i[1]=-e[1],i}function gE(i,e,t,n){return i[0]=e[0]+n*(t[0]-e[0]),i[1]=e[1]+n*(t[1]-e[1]),i}function Si(i,e,t){var n=e[0],r=e[1];return i[0]=t[0]*n+t[2]*r+t[4],i[1]=t[1]*n+t[3]*r+t[5],i}function zi(i,e,t){return i[0]=Math.min(e[0],t[0]),i[1]=Math.min(e[1],t[1]),i}function Ui(i,e,t){return i[0]=Math.max(e[0],t[0]),i[1]=Math.max(e[1],t[1]),i}var Ca=(function(){function i(e,t){this.target=e,this.topTarget=t&&t.topTarget}return i})(),vE=(function(){function i(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return i.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Ca(t,e),"dragstart",e.event))},i.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,o=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(o,a,e),this.handler.dispatchToElement(new Ca(t,e),"drag",e.event);var s=this.handler.findHover(n,r,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Ca(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Ca(s,e),"dragenter",e.event))}},i.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Ca(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Ca(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},i})(),fb=vE;var _E=(function(){function i(e){e&&(this._$eventProcessor=e)}return i.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var o=this._$handlers;if(typeof t=="function"&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),o[e]||(o[e]=[]);for(var s=0;s>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",r[c]+":0",n[1-l]+":auto",r[1-c]+":auto",""].join("!important;"),i.appendChild(a),t.push(a)}return e.clearMarkers=function(){D(t,function(d){d.parentNode&&d.parentNode.removeChild(d)})},t}function wE(i,e,t){for(var n=t?"invTrans":"trans",r=e[n],o=e.srcCoords,a=[],s=[],l=!0,c=0;c"'])/g,CE={"&":"&","":">",'"':""","'":"'"};function Rt(i){return i==null?"":(i+"").replace(xE,function(e,t){return CE[t]})}var ME=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Rh=[],kE=Be.browser.firefox&&+Be.browser.version.split(".")[0]=0;if(r){var a=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];a&&Zc(i,a,e,t)}else{Zc(i,e,e,t);var o=SE(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&ME.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function SE(i){var e=i.wheelDelta;if(e)return e;var t=i.deltaX,n=i.deltaY;if(t==null||n==null)return e;var r=Math.abs(n!==0?n:t),o=n>0?-1:n0?-1:1;return 3*r*o}function gb(i,e,t,n){i.addEventListener(e,t,n)}function vb(i,e,t,n){i.removeEventListener(e,t,n)}var _b=function(i){i.preventDefault(),i.stopPropagation(),i.cancelBubble=!0};function S4(i){return i.which===2||i.which===3}var wb=(function(){function i(){this._track=[]}return i.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},i.prototype.clear=function(){return this._track.length=0,this},i.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var o={points:[],touches:[],target:t,event:e},a=0,s=r.length;a1&&n&&n.length>1){var o=bb(n)/bb(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=LE(n);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:i[0].target,event:e}}}}};var oo={};ki(oo,{clone:()=>TE,copy:()=>Ma,create:()=>ln,identity:()=>ro,invert:()=>Zn,mul:()=>Yn,rotate:()=>Vh,scale:()=>zh,translate:()=>$c});function ln(){return[1,0,0,1,0,0]}function ro(i){return i[0]=1,i[1]=0,i[2]=0,i[3]=1,i[4]=0,i[5]=0,i}function Ma(i,e){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i}function Yn(i,e,t){var n=e[0]*t[0]+e[2]*t[1],r=e[1]*t[0]+e[3]*t[1],o=e[0]*t[2]+e[2]*t[3],a=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=s,i[5]=l,i}function $c(i,e,t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4]+t[0],i[5]=e[5]+t[1],i}function Vh(i,e,t,n){n===void 0&&(n=[0,0]);var r=e[0],o=e[2],a=e[4],s=e[1],l=e[3],c=e[5],d=Math.sin(t),u=Math.cos(t);return i[0]=r*u+s*d,i[1]=-r*d+s*u,i[2]=o*u+l*d,i[3]=-o*d+u*l,i[4]=u*(a-n[0])+d*(c-n[1])+n[0],i[5]=u*(c-n[1])-d*(a-n[0])+n[1],i}function zh(i,e,t){var n=t[0],r=t[1];return i[0]=e[0]*n,i[1]=e[1]*r,i[2]=e[2]*n,i[3]=e[3]*r,i[4]=e[4]*n,i[5]=e[5]*r,i}function Zn(i,e){var t=e[0],n=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=t*a-o*n;return l?(l=1/l,i[0]=a*l,i[1]=-o*l,i[2]=-n*l,i[3]=t*l,i[4]=(n*s-a*r)*l,i[5]=(o*r-t*s)*l,i):null}function TE(i){var e=ln();return Ma(e,i),e}var EE=(function(){function i(e,t){this.x=e||0,this.y=t||0}return i.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},i.prototype.clone=function(){return new i(this.x,this.y)},i.prototype.set=function(e,t){return this.x=e,this.y=t,this},i.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},i.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},i.prototype.scale=function(e){this.x*=e,this.y*=e},i.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},i.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},i.prototype.dot=function(e){return this.x*e.x+this.y*e.y},i.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},i.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},i.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},i.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},i.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},i.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},i.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},i.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},i.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},i.set=function(e,t,n){e.x=t,e.y=n},i.copy=function(e,t){e.x=t.x,e.y=t.y},i.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},i.lenSquare=function(e){return e.x*e.x+e.y*e.y},i.dot=function(e,t){return e.x*t.x+e.y*t.y},i.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},i.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},i.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},i.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},i.lerp=function(e,t,n,r){var o=1-r;e.x=o*t.x+r*n.x,e.y=o*t.y+r*n.y},i})(),nt=EE;var uo=Math.min,ka=Math.max,Uh=Math.abs,xb=["x","y"],PE=["width","height"],ao=new nt,so=new nt,lo=new nt,co=new nt,Li=Wh(),As=Li.minTv,Hh=Li.maxTv,Ns=[0,0],Gh=(function(){function i(e,t,n,r){i.set(this,e,t,n,r)}return i.set=function(e,t,n,r,o){return rd||u>p||h>f||v>_)return!1;var y=!(d=e.x&&t=e.y&&n-1e-5&&n[2]-1e-5){var r=n[0],o=n[3],a=n[4],s=n[5];e.x=t.x*r+a,e.y=t.y*o+s,e.width=t.width*r,e.height=t.height*o,e.width=c||!Li.bidirectional)&&(As[u]=-c,As[p]=0,Li.useDir&&Li.calcDirMTV())))}function Wh(){var i=0,e=new nt,t=new nt,n={minTv:new nt,maxTv:new nt,useDir:!1,dirMinTv:new nt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(o,a){n.touchThreshold=0,o&&o.touchThreshold!=null&&(n.touchThreshold=ka(0,o.touchThreshold)),n.negativeSize=!1,a&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,o&&o.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),t.copy(n.minTv),i=o.direction,n.bidirectional=o.bidirectional==null||!!o.bidirectional,n.bidirectional||e.set(Math.cos(i),Math.sin(i))))},calcDirMTV:function(){var o=n.minTv,a=n.dirMinTv,s=o.y*o.y+o.x*o.x,l=Math.sin(i),c=Math.cos(i),d=l*o.y+c*o.x;if(r(d)){r(o.x)&&r(o.y)&&a.set(0,0);return}if(t.x=s*c/d,t.y=s*l/d,r(t.x)&&r(t.y)){a.set(0,0);return}(n.bidirectional||e.dot(t)>0)&&t.len()=0;u--){var p=o[u];p!==r&&!p.ignore&&!p.ignoreCoarsePointer&&(!p.parent||!p.parent.ignoreCoarsePointer)&&(jh.copy(p.getBoundingRect()),p.transform&&jh.applyTransform(p.transform),jh.intersect(d)&&s.push(p))}if(s.length)for(var h=4,f=Math.PI/12,v=Math.PI*2,_=0;_4)return;this._downPoint=null}this.dispatchToElement(o,i,e)}});function RE(i,e,t){if(i[i.rectHover?"rectContain":"contain"](e,t)){for(var n=i,r=void 0,o=!1;n;){if(n.ignoreClip&&(o=!0),!o){var a=n.getClipPath();if(a&&!a.contain(e,t))return!1}n.silent&&(r=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return r?kb:!0}return!1}function Mb(i,e,t,n,r){for(var o=i.length-1;o>=0;o--){var a=i[o],s=void 0;if(a!==r&&!a.ignore&&(s=RE(a,t,n))&&(!e.topTarget&&(e.topTarget=a),s!==kb)){e.target=a;break}}}function Lb(i,e,t){var n=i.painter;return en.getWidth()||tn.getHeight()}var Tb=Sb;var Db=32,Rs=7;function FE(i){for(var e=0;i>=Db;)e|=i&1,i>>=1;return i+e}function Eb(i,e,t,n){var r=e+1;if(r===t)return 1;if(n(i[r++],i[e])=0;)r++;return r-e}function VE(i,e,t){for(t--;e>>1,r(o,i[l])0;)i[a+c]=i[a+c-1],c--}i[a]=o}}function qh(i,e,t,n,r,o){var a=0,s=0,l=1;if(o(i,e[t+r])>0){for(s=n-r;l0;)a=l,l=(ls&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var c=a;a=r-l,l=r-c}for(a++;a>>1);o(i,e[t+d])>0?a=d+1:l=d}return l}function Yh(i,e,t,n,r,o){var a=0,s=0,l=1;if(o(i,e[t+r])s&&(l=s);var c=a;a=r-l,l=r-c}else{for(s=n-r;l=0;)a=l,l=(ls&&(l=s),a+=r,l+=r}for(a++;a>>1);o(i,e[t+d])1;){var h=o-2;if(h>=1&&r[h-1]=2&&r[h-2]r[h+1])break;d(h)}}function c(){for(;o>1;){var h=o-2;h>0&&r[h-1]=Rs||I>=Rs);if(N)break;S=0;y--)i[T+y]=i[S+y];i[M]=a[x];return}for(var I=t;;){var N=0,A=0,V=!1;do if(e(a[x],i[w])=0;y--)i[T+y]=i[S+y];if(f===0){V=!0;break}}if(i[M--]=a[x--],--_===1){V=!0;break}if(A=_-qh(i[w],a,0,_,_-1,e),A!==0){for(M-=A,x-=A,_-=A,T=M+1,S=x+1,y=0;y=Rs||A>=Rs);if(V)break;I=0;y--)i[T+y]=i[S+y];i[M]=a[x]}else{if(_===0)throw new Error;for(S=M-(_-1),y=0;y<_ po r="n-t;if(!(r<2)){var" o="0;if(r<Db){o=Eb(i,t,n,e),Pb(i,t,n,t+o,e);return}var" a="zE(i,e),s=FE(r);do{if(o=Eb(i,t,n,e),o<s){var" l="r;l">s&&(l=s),Pb(i,t,t+l,t+o,e),o=l}a.pushRun(t,o),a.mergeRuns(),r-=o,t+=o}while(r!==0);a.forceMergeRuns()}}var si=1,ho=2,xr=4;var Ib=!1;function Zh(){Ib||(Ib=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Ob(i,e){return i.zlevel===e.zlevel?i.z===e.z?i.z2-e.z2:i.z-e.z:i.zlevel-e.zlevel}var UE=(function(){function i(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ob}return i.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},i.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},i.prototype.getRoots=function(){return this._roots},i.prototype.dispose=function(){this._displayList=null,this._roots=null},i})(),Ab=UE;var Nb;Nb=Be.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(i){return setTimeout(i,16)};var Kh=Nb;var Xc={linear:function(i){return i},quadraticIn:function(i){return i*i},quadraticOut:function(i){return i*(2-i)},quadraticInOut:function(i){return(i*=2)-tu&&itu||i=0&&f=0&&f=0&&y0){var w=Mr(v),x=d*s+1.5*a*(-u+w),M=d*s+1.5*a*(-u-w);x=0&&f=0&&f=0&&y=0&&A=0&&c0){var u=Mr(d),c=(-o+u)/(2*a),p=(-o-u)/(2*a);c>=0&&c=0&&p=0&&_=0&&c=0&&c0){var u=Mr(d),c=(-a+u)/(2*o),p=(-a-u)/(2*o);c>=0&&c=0&&p=0&&h=1?1:iu(0,n,o,1,l,s)&>(0,r,a,1,s[0])}}}var GE=(function(){function i(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Bt,this.ondestroy=e.ondestroy||Bt,this.onrestart=e.onrestart||Bt,e.easing&&this.setEasing(e.easing)}return i.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,o=r/n;oKb,fastMapToColor:()=>KE,lerp:()=>$b,lift:()=>nf,liftColor:()=>lu,lum:()=>fo,mapToColor:()=>$E,modifyAlpha:()=>XE,modifyHSL:()=>Pa,parse:()=>fi,parseCssFloat:()=>Sr,parseCssInt:()=>su,random:()=>QE,stringify:()=>Lr,toHex:()=>ZE});var jb=(function(){function i(e){this.value=e}return i})();var WE=(function(){function i(){this._len=0}return i.prototype.insert=function(e){var t=new jb(e);return this.insertEntry(t),t},i.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},i.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},i.prototype.len=function(){return this._len},i.prototype.clear=function(){this.head=this.tail=null,this._len=0},i})();var jE=(function(){function i(e){this._list=new WE,this._maxSize=10,this._map={},this._maxSize=e}return i.prototype.put=function(e,t){var n=this._list,r=this._map,o=null;if(r[e]==null){var a=n.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=n.head;n.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new jb(t),s.key=e,n.insertEntry(s),r[e]=s}return o},i.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},i.prototype.clear=function(){this._list.clear(),this._map={}},i.prototype.len=function(){return this._list.len()},i})(),Cn=jE;var qb={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function cn(i){return i=Math.round(i),i255?255:i}function qE(i){return i=Math.round(i),i360?360:i}function Fs(i){return i1?1:i}function su(i){var e=i;return e.length&&e.charAt(e.length-1)==="%"?cn(parseFloat(e)/100*255):cn(parseInt(e,10))}function Sr(i){var e=i;return e.length&&e.charAt(e.length-1)==="%"?Fs(parseFloat(e)/100):Fs(parseFloat(e))}function Jh(i,e,t){return t1&&(t-=1),t*6=0&&o>4|(o&3840)>>8,o&240|(o&240)>>4,o&15|(o&15)=0&&o>16,(o&65280)>>8,o&255,r===9?parseInt(n.slice(7),16)/255:1),Ea(i,e),e}return}var a=n.indexOf("("),s=n.indexOf(")");if(a!==-1&&s+1===r){var l=n.substr(0,a),c=n.substr(a+1,s-(a+1)).split(","),d=1;switch(l){case"rgba":if(c.length!==4)return c.length===3?Wi(e,+c[0],+c[1],+c[2],1):Wi(e,0,0,0,1);d=Sr(c.pop());case"rgb":if(c.length>=3)return Wi(e,su(c[0]),su(c[1]),su(c[2]),c.length===3?d:Sr(c[3])),Ea(i,e),e;Wi(e,0,0,0,1);return;case"hsla":if(c.length!==4){Wi(e,0,0,0,1);return}return c[3]=Sr(c[3]),tf(c,e),Ea(i,e),e;case"hsl":if(c.length!==3){Wi(e,0,0,0,1);return}return tf(c,e),Ea(i,e),e;default:return}}Wi(e,0,0,0,1)}}function tf(i,e){var t=(parseFloat(i[0])%360+360)%360/360,n=Sr(i[1]),r=Sr(i[2]),o=r1&&(l-=1)}var h=[l*360,c,s];return i[3]!=null&&h.push(i[3]),h}}function nf(i,e){var t=fi(i);if(t){for(var n=0;n255?t[n]=255:t[n]=0&&i=0&&in?e:i,o=Math.min(t,n),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa;if(s)n.length=a;else for(var l=o;l=1},i.prototype.getAdditiveTrack=function(){return this._additiveTrack},i.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,o=r.length,a=!1,s=ew,l=t;if(mt(t)){var c=iP(t);s=c,(c===1&&!Re(t[0])||c===2&&!Re(t[0][0]))&&(a=!0)}else if(Re(t)&&!to(t))s=du;else if(te(t))if(!isNaN(+t))s=du;else{var d=fi(t);d&&(l=d,s=zs)}else if(eo(t)){var u=q({},l);u.colorStops=J(t.colorStops,function(h){return{offset:h.offset,color:fi(h.color)}}),Xb(t)?s=af:Qb(t)&&(s=sf),l=u}o===0?this.valType=s:(s!==this.valType||s===ew)&&(a=!0),this.discrete=this.discrete||a;var p={time:e,value:l,rawValue:t,percent:0};return n&&(p.easing=n,p.easingFunc=ue(n)?n:Qc[n]||ou(n)),r.push(p),p},i.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(v,_){return v.time-_.time});for(var r=this.valType,o=n.length,a=n[o-1],s=this.discrete,l=pu(r),c=tw(r),d=0;d=0&&!(a[d].percentt);d++);d=p(d-1,s-2)}f=a[d+1],h=a[d]}if(h&&f){this._lastFr=d,this._lastFrP=t;var _=f.percent-h.percent,y=_===0?1:p((t-h.percent)/_,1);f.easingFunc&&(y=f.easingFunc(y));var w=n?this._additiveValue:c?Vs:e[l];if((pu(o)||c)&&!w&&(w=this._additiveValue=[]),this.discrete)e[l]=y0&&l.addKeyframe(0,Us(c),r),this._trackKeys.push(s)}l.addKeyframe(e,Us(t[s]),r)}return this._maxTime=Math.max(this._maxTime,e),this},i.prototype.pause=function(){this._clip.pause(),this._paused=!0},i.prototype.resume=function(){this._clip.resume(),this._paused=!1},i.prototype.isPaused=function(){return!!this._paused},i.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},i.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,o=0;o1){var s=a.pop();o.addKeyframe(s.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},i})(),Hs=rP;function mo(){return new Date().getTime()}var oP=(function(i){he(e,i);function e(t){var n=i.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,r=t.next;n?n.next=r:this._head=r,r?r.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=mo()-this._pausedTime,r=n-this._time,o=this._head;o;){var a=o.next,s=o.step(n,r);s&&(o.ondestroy(),this.removeClip(o)),o=a}this._time=n,t||(this.trigger("frame",r),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(Kh(n),!t._paused&&t.update())}Kh(n)},e.prototype.start=function(){this._running||(this._time=mo(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=mo(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=mo()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var r=new Hs(t,n.loop);return this.addAnimator(r),r},e})(ai),nw=oP;var aP=300,lf=Be.domSupported,cf=(function(){var i=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=J(i,function(r){var o=r.replace("mouse","pointer");return t.hasOwnProperty(o)?o:r});return{mouse:i,touch:e,pointer:n}})(),rw={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},ow=!1;function pf(i){var e=i.pointerType;return e==="pen"||e==="touch"}function sP(i){i.touching=!0,i.touchTimer!=null&&(clearTimeout(i.touchTimer),i.touchTimer=null),i.touchTimer=setTimeout(function(){i.touching=!1,i.touchTimer=null},700)}function uf(i){i&&(i.zrByTouch=!0)}function lP(i,e){return Hi(i.dom,new cP(i,e),!0)}function sw(i,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===i.painterRoot);)t=t.parentNode;return n}var cP=(function(){function i(e,t){this.stopPropagation=Bt,this.stopImmediatePropagation=Bt,this.preventDefault=Bt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return i})(),un={mousedown:function(i){i=Hi(this.dom,i),this.__mayPointerCapture=[i.zrX,i.zrY],this.trigger("mousedown",i)},mousemove:function(i){i=Hi(this.dom,i);var e=this.__mayPointerCapture;e&&(i.zrX!==e[0]||i.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",i)},mouseup:function(i){i=Hi(this.dom,i),this.__togglePointerCapture(!1),this.trigger("mouseup",i)},mouseout:function(i){i=Hi(this.dom,i);var e=i.toElement||i.relatedTarget;sw(this,e)||(this.__pointerCapturing&&(i.zrEventControl="no_globalout"),this.trigger("mouseout",i))},wheel:function(i){ow=!0,i=Hi(this.dom,i),this.trigger("mousewheel",i)},mousewheel:function(i){ow||(i=Hi(this.dom,i),this.trigger("mousewheel",i))},touchstart:function(i){i=Hi(this.dom,i),uf(i),this.__lastTouchMoment=new Date,this.handler.processGesture(i,"start"),un.mousemove.call(this,i),un.mousedown.call(this,i)},touchmove:function(i){i=Hi(this.dom,i),uf(i),this.handler.processGesture(i,"change"),un.mousemove.call(this,i)},touchend:function(i){i=Hi(this.dom,i),uf(i),this.handler.processGesture(i,"end"),un.mouseup.call(this,i),+new Date-+this.__lastTouchMomentpw||i1e-10&&gf(e[3]-1)>1e-10?Math.sqrt(gf(e[0]*e[3]-e[2]*e[1])):1},i.prototype.copyTransform=function(e){fP(this,e)},i.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,o=e.scaleX,a=e.scaleY,s=e.anchorX,l=e.anchorY,c=e.rotation||0,d=e.x,u=e.y,p=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||r||s||l){var f=n+s,v=r+l;t[4]=-f*o-p*v*a,t[5]=-v*a-h*f*o}else t[4]=t[5]=0;return t[0]=o,t[3]=a,t[1]=h*o,t[2]=p*a,c&&Vh(t,t,c),t[4]+=n+d,t[5]+=r+u,t},i.initDefaultProps=(function(){var e=i.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),i})(),_o=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function fP(i,e){for(var t=0;t<_o.length n="_o[t];i[n]=e[n]}}var" qs="hP;function" dn cn e="gu.get(i);return" gu mp>=hw)){i=i||Vi;for(var e=[],t=+new Date,n=0;n16?vf=hw:r>2&&vf++,e}}var vf=0,hw=5;function _f(i,e){return i.asciiWidthMapTried||(i.asciiWidthMap=mP(i.font),i.asciiWidthMapTried=!0),0=0?parseFloat(i)/100*e:parseFloat(i):i}function vu(i,e,t){var n=e.position||"inside",r=e.distance!=null?e.distance:5,o=t.height,a=t.width,s=o/2,l=t.x,c=t.y,d="left",u="top";if(n instanceof Array)l+=Mn(n[0],t.width),c+=Mn(n[1],t.height),d=null,u=null;else switch(n){case"left":l-=r,c+=s,d="right",u="middle";break;case"right":l+=r+a,c+=s,u="middle";break;case"top":l+=a/2,c-=r,d="center",u="bottom";break;case"bottom":l+=a/2,c+=o+r,d="center";break;case"inside":l+=a/2,c+=s,d="center",u="middle";break;case"insideLeft":l+=r,c+=s,u="middle";break;case"insideRight":l+=a-r,c+=s,d="right",u="middle";break;case"insideTop":l+=a/2,c+=r,d="center";break;case"insideBottom":l+=a/2,c+=o-r,d="center",u="bottom";break;case"insideTopLeft":l+=r,c+=r;break;case"insideTopRight":l+=a-r,c+=r,d="right";break;case"insideBottomLeft":l+=r,c+=o-r,u="bottom";break;case"insideBottomRight":l+=a-r,c+=o-r,d="right",u="bottom";break}return i=i||{},i.x=l,i.y=c,i.align=d,i.verticalAlign=u,i}var yf="__zr_normal__",bf=_o.concat(["ignore"]),vP=qt(_o,function(i,e){return i[e]=!0,i},{ignore:!1}),Ia={},_P=new Ce(0,0,0,0),_u=[],Cf=(function(){function i(e){this.id=Ts(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return i.prototype._init=function(e){this.attr(e)},i.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},i.prototype.beforeUpdate=function(){},i.prototype.afterUpdate=function(){},i.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},i.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,o=t.innerTransformable,a=void 0,s=void 0,l=!1;o.parent=r?this:null;var c=!1;o.copyTransform(t);var d=n.position!=null,u=n.autoOverflowArea,p=void 0;if((u||d)&&(p=_P,n.layoutRect?p.copy(n.layoutRect):p.copy(this.getBoundingRect()),r||p.applyTransform(this.transform)),d){this.calculateTextPosition?this.calculateTextPosition(Ia,n,p):vu(Ia,n,p),o.x=Ia.x,o.y=Ia.y,a=Ia.align,s=Ia.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var f=void 0,v=void 0;h==="center"?(f=p.width*.5,v=p.height*.5):(f=Mn(h[0],p.width),v=Mn(h[1],p.height)),c=!0,o.originX=-o.x+f+(r?0:p.x),o.originY=-o.y+v+(r?0:p.y)}}n.rotation!=null&&(o.rotation=n.rotation);var _=n.offset;_&&(o.x+=_[0],o.y+=_[1],c||(o.originX=-_[0],o.originY=-_[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(u){var w=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);o.getLocalTransform(_u),Zn(_u,_u),Ce.copy(w,p),w.applyTransform(_u)}else y.overflowRect=null;var x=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,M=void 0,S=void 0,T=void 0;x&&this.canBeInsideText()?(M=n.insideFill,S=n.insideStroke,(M==null||M==="auto")&&(M=this.getInsideTextFill()),(S==null||S==="auto")&&(S=this.getInsideTextStroke(M),T=!0)):(M=n.outsideFill,S=n.outsideStroke,(M==null||M==="auto")&&(M=this.getOutsideFill()),(S==null||S==="auto")&&(S=this.getOutsideStroke(M),T=!0)),M=M||"#000",(M!==y.fill||S!==y.stroke||T!==y.autoStroke||a!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=M,y.stroke=S,y.autoStroke=T,y.align=a,y.verticalAlign=s,t.setDefaultTextStyle(y)),t.__dirty|=si,l&&t.dirtyStyle(!0)}},i.prototype.canBeInsideText=function(){return!0},i.prototype.getInsideTextFill=function(){return"#fff"},i.prototype.getInsideTextStroke=function(e){return"#000"},i.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?js:Ws},i.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&fi(t);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),a=0;a0},i.prototype.getState=function(e){return this.states[e]},i.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},i.prototype.clearStates=function(e){this.useState(yf,!1,e)},i.prototype.useState=function(e,t,n,r){var o=e===yf,a=this.hasState();if(!(!a&&o)){var s=this.currentStates,l=this.stateTransition;if(!(Oe(s,e)>=0&&(t||s.length===1))){var c;if(this.stateProxy&&!o&&(c=this.stateProxy(e)),c||(c=this.states&&this.states[e]),!c&&!o){Es("State "+e+" not exists.");return}o||this.saveCurrentToNormalState(c);var d=!!(c&&c.hoverLayer||r);d&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,c,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var u=this._textContent,p=this._textGuide;return u&&u.useState(e,t,n,d),p&&p.useState(e,t,n,d),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~si),c}}},i.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],o=this.currentStates,a=e.length,s=a===o.length;if(s){for(var l=0;l0,f);var v=this._textContent,_=this._textGuide;v&&v.useStates(e,t,p),_&&_.useStates(e,t,p),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~si)}},i.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},i.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},i.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),o=Oe(r,e),a=Oe(r,t)>=0;o>=0?a?r.splice(o,1):r[o]=t:n&&!a&&r.push(t),this.useStates(r)},i.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},i.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&o.splice(a,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},i.prototype.updateDuringAnimation=function(e){this.markRedraw()},i.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,o=[],a=0;a0&&t.during&&o[0].during(function(f,v){t.during(v)});for(var p=0;p0||r.force&&!a.length){var N=void 0,A=void 0,V=void 0;if(s){A={},p&&(N={});for(var M=0;M=0&&(r.splice(o,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var r=Oe(this._children,t);return r>=0&&this.replaceAt(n,r),this},e.prototype.replaceAt=function(t,n){var r=this._children,o=r[n];if(t&&t!==this&&t.parent!==this&&t!==o){r[n]=t,o.parent=null;var a=this.__zr;a&&o.removeSelfFromZr(a),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,r=this._children,o=Oe(r,t);return o0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},i.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},i.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},i.prototype.refreshHover=function(){this._needsRefreshHover=!0},i.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},i.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},i.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},i.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},i.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},i.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},i.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},i.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},i.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},i.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},i.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(i=o)return s}else{if(i>=r)return a;if(i1e-14){for(var e=1,t=0;t0?+e.slice(t+1):0,r=t>0?t:e.length,o=e.indexOf("."),a=oc&&(c=l[u],d=u);++a[d],l[d]=0,++s}return J(a,function(h){return h/n})}function xw(i,e){var t=Math.max(li(i),li(e)),n=i+e;return t>yw?n:Ft(n,t)}var Cw=9007199254740991;function Mw(i){var e=Math.PI*2;return(i%e+e)%e}function kw(i){return i>-_w&&i<_w np="/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T" ci instanceof date i e="NP.exec(i);if(!e)return" new t="+e[4]||0;return" return if mu math.pow aa>=10&&e++,e}function Na(i,e){var t=Aa(i),n=Math.pow(10,t),r=i/n,o;return e?r=-20?+i.toFixed(t0?e.length:0),this.item=null,this.key=NaN,this},i.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},i})();var KP=".",wo="___EC__COMPONENT__CONTAINER___",Rw="___EC__EXTENDED_CLASS___";function mi(i){var e={main:"",sub:""};if(i){var t=i.split(KP);e.main=t[0]||"",e.sub=t[1]||""}return e}function $P(i){Ct(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(i),'componentType "'+i+'" illegal')}function Fw(i){return!!(i&&i[Rw])}function Fa(i,e){i.$constructor=i,i.extend=function(t){var n=this,r;return XP(n)?r=(function(o){lt(a,o);function a(){return o.apply(this,arguments)||this}return a})(n):(r=function(){(t.$constructor||n).apply(this,arguments)},Ps(r,this)),q(r.prototype,t),r[Rw]=!0,r.extend=this.extend,r.superCall=JP,r.superApply=eD,r.superClass=n,r}}function XP(i){return ue(i)&&/^class\s/.test(Function.prototype.toString.call(i))}function Eu(i,e){i.extend=e.extend}var QP=Math.round(Math.random()*10);function Vw(i){var e=["__\0is_clz",QP++].join("_");i.prototype[e]=!0,i.isInstance=function(t){return!!(t&&t[e])}}function JP(i,e){for(var t=[],n=2;n=0||o&&Oe(o,l)=s;c++)l-=s;var d=pn(a,t);return d>l&&(t="",d=0),l=i-d,r.ellipsis=t,r.ellipsisWidth=d,r.contentWidth=l,r.containerWidth=i,r}function Zw(i,e,t){var n=t.containerWidth,r=t.contentWidth,o=t.fontMeasureInfo;if(!n){i.textLine="",i.isTruncated=!1;return}var a=pn(o,e);if(a=t.maxIterations){e+=t.ellipsis;break}var l=s===0?rD(e,r,o):a>0?Math.floor(e.length*r/a):0;e=e.substr(0,l),a=pn(o,e)}e===""&&(e=t.placeholder),i.textLine=e,i.isTruncated=!0}function rD(i,e,t){for(var n=0,r=0,o=i.length;r_&&h){var x=Math.floor(_/p);f=f||y.length>x,y=y.slice(0,x),w=y.length*p}if(r&&d&&v!=null)for(var M=Yw(v,c,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),S={},T=0;Tf&&Ff(o,a.substring(f,_),e,h),Ff(o,v[2],e,h,v[1]),f=Rf.lastIndex}fu){var xe=o.lines.length;z>0?(A.tokens=A.tokens.slice(0,z),I(A,F,V),o.lines=o.lines.slice(0,N+1)):o.lines=o.lines.slice(0,N),o.isTruncated=o.isTruncated||o.lines.length0&&f+n.accumWidth>n.width&&(d=e.split(`
`),c=!0),n.accumWidth=f}else{var v=Xw(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=v.accumWidth+h,u=v.linesWidths,d=v.lines}}d||(d=e.split(`
`));for(var _=dn(l),y=0;y=32&&e=880&&e=4608&&e=7680&&et:r+d+f>t){d?(s||l)&&(v?(s||(s=l,l="",c=0,d=c),o.push(s),a.push(d-c),l+=h,c+=f,s="",d=c):(l&&(s+=l,l="",c=0),o.push(s),a.push(d),s=h,d=f)):v?(o.push(l),a.push(c),l=h,c=f):(o.push(h),a.push(f));continue}d+=f,v?(l+=h,c+=f):(l&&(s+=l,l="",c=0),s+=h)}return l&&(s+=l),s&&(o.push(s),a.push(d)),o.length===1&&(d+=r),{accumWidth:d,lines:o,linesWidths:a}}function zf(i,e,t,n,r,o){if(i.baseX=t,i.baseY=n,i.outerWidth=i.outerHeight=null,!!e){var a=e.width*2,s=e.height*2;Ce.set(Ww,Tr(t,a,r),$n(n,s,o),a,s),Ce.intersect(e,Ww,null,jw);var l=jw.outIntersectRect;i.outerWidth=l.width,i.outerHeight=l.height,i.baseX=Tr(l.x,l.width,r,!0),i.baseY=$n(l.y,l.height,o,!0)}}var Ww=new Ce(0,0,0,0),jw={outIntersectRect:{},clamp:!0};function Uf(i){return i!=null?i+="":i=""}function Qw(i){var e=Uf(i.text),t=i.font,n=pn(dn(t),e),r=Ys(t);return Pu(i,n,r,null)}function Pu(i,e,t,n){var r=new Ce(Tr(i.x||0,e,i.textAlign),$n(i.y||0,t,i.textBaseline),e,t),o=n??(Hf(i)?i.lineWidth:0);return o>0&&(r.x-=o/2,r.y-=o/2,r.width+=o,r.height+=o),r}function Hf(i){var e=i.stroke;return e!=null&&e!=="none"&&i.lineWidth>0}var jf="__zr_style_"+Math.round(Math.random()*10),Ln={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ln[jf]=!0;var Jw=["z","z2","invisible"],uD=["invisible"],dD=(function(i){he(e,i);function e(t){return i.call(this,t)||this}return e.prototype._init=function(t){for(var n=Pe(t),r=0;r1e-4){s[0]=i-t,s[1]=e-n,l[0]=i+t,l[1]=e+n;return}if(Du[0]=Yf(r)*t+i,Du[1]=qf(r)*n+e,Iu[0]=Yf(o)*t+i,Iu[1]=qf(o)*n+e,c(s,Du,Iu),d(l,Du,Iu),r=r%Co,ro&&!a?o+=Co:rr&&(Ou[0]=Yf(h)*t+i,Ou[1]=qf(h)*n+e,c(s,Ou,s),d(l,Ou,l))}var Ke={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Mo=[],ko=[],En=[],Pr=[],Pn=[],Dn=[],Kf=Math.min,$f=Math.max,So=Math.cos,Lo=Math.sin,Qn=Math.abs,Jf=Math.PI,Dr=Jf*2,Xf=typeof Float32Array=Dr?r=t+Dr:e&&t-r>=Dr?r=t-Dr:!e&&t>r?r=t+(Dr-Qf(t-r)):e&&t0&&(this._ux=Qn(n/ff/e)||0,this._uy=Qn(n/ff/t)||0)},i.prototype.setDPR=function(e){this.dpr=e},i.prototype.setContext=function(e){this._ctx=e},i.prototype.getContext=function(){return this._ctx},i.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},i.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},i.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Ke.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},i.prototype.lineTo=function(e,t){var n=Qn(e-this._xi),r=Qn(t-this._yi),o=n>this._ux||r>this._uy;if(this.addData(Ke.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},i.prototype.bezierCurveTo=function(e,t,n,r,o,a){return this._drawPendingPt(),this.addData(Ke.C,e,t,n,r,o,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,o,a),this._xi=o,this._yi=a,this},i.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Ke.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},i.prototype.arc=function(e,t,n,r,o,a){this._drawPendingPt(),Qs[0]=r,Qs[1]=o,hD(Qs,a),r=Qs[0],o=Qs[1];var s=o-r;return this.addData(Ke.A,e,t,n,n,r,s,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,r,o,a),this._xi=So(o)*n+e,this._yi=Lo(o)*n+t,this},i.prototype.arcTo=function(e,t,n,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,o),this},i.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Ke.R,e,t,n,r),this},i.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ke.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},i.prototype.fill=function(e){e&&e.fill(),this.toStatic()},i.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},i.prototype.len=function(){return this._len},i.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Xf&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var s=0;sd.length&&(this._expandData(),d=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},i.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},i.prototype.getBoundingRect=function(){En[0]=En[1]=Pn[0]=Pn[1]=Number.MAX_VALUE,Pr[0]=Pr[1]=Dn[0]=Dn[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,o=0,a;for(a=0;an||Qn(x)>r||p===t-1)&&(v=Math.sqrt(w*w+x*x),o=_,a=y);break}case Ke.C:{var M=e[p++],S=e[p++],_=e[p++],y=e[p++],T=e[p++],I=e[p++];v=zb(o,a,M,S,_,y,T,I,10),o=T,a=I;break}case Ke.Q:{var M=e[p++],S=e[p++],_=e[p++],y=e[p++];v=Gb(o,a,M,S,_,y,10),o=_,a=y;break}case Ke.A:var N=e[p++],A=e[p++],V=e[p++],F=e[p++],z=e[p++],B=e[p++],H=B+z;p+=1,f&&(s=So(z)*V+N,l=Lo(z)*F+A),v=$f(V,F)*Kf(Dr,Math.abs(B)),o=So(H)*V+N,a=Lo(H)*F+A;break;case Ke.R:{s=o=e[p++],l=a=e[p++];var se=e[p++],oe=e[p++];v=se*2+oe*2;break}case Ke.Z:{var w=s-o,x=l-a;v=Math.sqrt(w*w+x*x),o=s,a=l;break}}v>=0&&(c[u++]=v,d+=v)}return this._pathLen=d,d},i.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,o=this._uy,a=this._len,s,l,c,d,u,p,h=t0&&(e.lineTo(M,S),x=0),I){case Ke.M:s=c=n[T++],l=d=n[T++],e.moveTo(c,d);break;case Ke.L:{u=n[T++],p=n[T++];var A=Qn(u-c),V=Qn(p-d);if(A>r||V>o){if(h){var F=f[y++];if(_+F>w){var z=(w-_)/F;e.lineTo(c*(1-z)+u*z,d*(1-z)+p*z);break e}_+=F}e.lineTo(u,p),c=u,d=p,x=0}else{var B=A*A+V*V;B>x&&(M=u,S=p,x=B)}break}case Ke.C:{var H=n[T++],se=n[T++],oe=n[T++],Se=n[T++],be=n[T++],xe=n[T++];if(h){var F=f[y++];if(_+F>w){var z=(w-_)/F;La(c,H,oe,be,z,Mo),La(d,se,Se,xe,z,ko),e.bezierCurveTo(Mo[1],ko[1],Mo[2],ko[2],Mo[3],ko[3]);break e}_+=F}e.bezierCurveTo(H,se,oe,Se,be,xe),c=be,d=xe;break}case Ke.Q:{var H=n[T++],se=n[T++],oe=n[T++],Se=n[T++];if(h){var F=f[y++];if(_+F>w){var z=(w-_)/F;Ta(c,H,oe,z,Mo),Ta(d,se,Se,z,ko),e.quadraticCurveTo(Mo[1],ko[1],Mo[2],ko[2]);break e}_+=F}e.quadraticCurveTo(H,se,oe,Se),c=oe,d=Se;break}case Ke.A:var fe=n[T++],pe=n[T++],de=n[T++],Ne=n[T++],et=n[T++],Ut=n[T++],wi=n[T++],ei=!n[T++],xi=de>Ne?de:Ne,ti=Qn(de-Ne)>.001,pt=et+Ut,we=!1;if(h){var F=f[y++];_+F>w&&(pt=et+Ut*(w-_)/F,we=!0),_+=F}if(ti&&e.ellipse?e.ellipse(fe,pe,de,Ne,wi,et,pt,ei):e.arc(fe,pe,xi,et,pt,ei),we)break e;N&&(s=So(et)*de+fe,l=Lo(et)*Ne+pe),c=So(pt)*de+fe,d=Lo(pt)*Ne+pe;break;case Ke.R:s=c=n[T],l=d=n[T+1],u=n[T++],p=n[T++];var De=n[T++],Un=n[T++];if(h){var F=f[y++];if(_+F>w){var $e=w-_;e.moveTo(u,p),e.lineTo(u+Kf($e,De),p),$e-=De,$e>0&&e.lineTo(u+De,p+Kf($e,Un)),$e-=Un,$e>0&&e.lineTo(u+$f(De-$e,0),p+Un),$e-=De,$e>0&&e.lineTo(u,p+$f(Un-$e,0));break e}_+=F}e.rect(u,p,De,Un);break;case Ke.Z:if(h){var F=f[y++];if(_+F>w){var z=(w-_)/F;e.lineTo(c*(1-z)+s*z,d*(1-z)+l*z);break e}_+=F}e.closePath(),c=s,d=l}}},i.prototype.clone=function(){var e=new i,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},i.prototype.canSave=function(){return!!this._saveData},i.CMD=Ke,i.initDefaultProps=(function(){var e=i.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),i})(),fn=fD;function To(i,e,t,n,r,o,a){if(r===0)return!1;var s=r,l=0,c=i;if(a>e+s&&a>n+s||ai+s&&o>t+s||oe+u&&d>n+u&&d>o+u&&d>s+u||di+u&&c>t+u&&c>r+u&&c>a+u||ce+c&&l>n+c&&l>o+c||li+c&&s>t+c&&s>r+c||st||d+cr&&(r+=el);var p=Math.atan2(l,s);return p=n&&p=n&&p+ele&&o>n||or?s:0}var Ir=fn.CMD,Eo=Math.PI*2,yD=1e-4;function bD(i,e){return Math.abs(i-e)e&&c>n&&c>o&&c>s||c1&&wD(),h=gt(e,n,o,s,Xi[0]),p>1&&(f=gt(e,n,o,s,Xi[1]))),p===2?_e&&s>n&&s>o||s=0&&ct||s=Eo-1e-4){n=0,r=Eo;var d=o?1:-1;return a>=ui[0]+i&&ar){var u=n;n=r,r=u}na){var v=Math.atan2(s,f),d=o?1:-1;v=n&&v=n&&v+EoMath.PI/2&&v1&&(t||(s+=$i(l,c,d,u,n,r))),_&&(l=o[f],c=o[f+1],d=l,u=c),v){case Ir.M:d=o[f++],u=o[f++],l=d,c=u;break;case Ir.L:if(t){if(To(l,c,o[f],o[f+1],e,n,r))return!0}else s+=$i(l,c,o[f],o[f+1],n,r)||0;l=o[f++],c=o[f++];break;case Ir.C:if(t){if(ox(l,c,o[f++],o[f++],o[f++],o[f++],o[f],o[f+1],e,n,r))return!0}else s+=xD(l,c,o[f++],o[f++],o[f++],o[f++],o[f],o[f+1],n,r)||0;l=o[f++],c=o[f++];break;case Ir.Q:if(t){if(ax(l,c,o[f++],o[f++],o[f],o[f+1],e,n,r))return!0}else s+=CD(l,c,o[f++],o[f++],o[f],o[f+1],n,r)||0;l=o[f++],c=o[f++];break;case Ir.A:var y=o[f++],w=o[f++],x=o[f++],M=o[f++],S=o[f++],T=o[f++];f+=1;var I=!!(1-o[f++]);p=Math.cos(S)*x+y,h=Math.sin(S)*M+w,_?(d=p,u=h):s+=$i(l,c,p,h,n,r);var N=(n-y)*M/x+y;if(t){if(lx(y,w,M,S,S+T,I,e,N,r))return!0}else s+=MD(y,w,M,S,S+T,I,N,r);l=Math.cos(S+T)*x+y,c=Math.sin(S+T)*M+w;break;case Ir.R:d=l=o[f++],u=c=o[f++];var A=o[f++],V=o[f++];if(p=d+A,h=u+V,t){if(To(d,u,p,u,e,n,r)||To(p,u,p,h,e,n,r)||To(p,h,d,h,e,n,r)||To(d,h,d,u,e,n,r))return!0}else s+=$i(p,u,p,h,n,r),s+=$i(d,h,d,u,n,r);break;case Ir.Z:if(t){if(To(l,c,d,u,e,n,r))return!0}else s+=$i(l,c,d,u,n,r);l=d,c=u;break}}return!t&&!bD(c,u)&&(s+=$i(l,c,d,u,n,r)||0),s!==0}function ux(i,e,t){return cx(i,0,!1,e,t)}function dx(i,e,t,n){return cx(i,e,!0,t,n)}var tm=We({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ln),SD={style:We({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xo.style)},em=_o.concat(["invisible","culling","z","z2","zlevel","parent"]),LD=(function(i){he(e,i);function e(t){return i.call(this,t)||this}return e.prototype.update=function(){var t=this;i.prototype.update.call(this);var n=this.style;if(n.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(l){t.buildPath(l,t.shape)}),r.silent=!0;var o=r.style;for(var a in n)o[a]!==n[a]&&(o[a]=n[a]);o.fill=n.fill?n.decal:null,o.decal=null,o.shadowColor=null,n.strokeFirst&&(o.stroke=null);for(var s=0;s.5?Ws:n>.2?uw:js}else if(t)return js}return Ws},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(te(n)){var r=this.__zr,o=!!(r&&r.isDarkMode()),a=fo(t,0)0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,r=!t;if(r){var o=!1;this.path||(o=!0,this.createPathProxy());var a=this.path;(o||this.__dirty&xr)&&(a.beginPath(),this.buildPath(a,this.shape,!1),this.pathUpdated()),t=a.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||r){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,c=n.lineWidth;if(!this.hasFill()){var d=this.strokeContainThreshold;c=Math.max(c,d??4)}l>1e-10&&(s.width+=c/l,s.height+=c/l,s.x-=c/l/2,s.y-=c/l/2)}return s}return t},e.prototype.contain=function(t,n){var r=this.transformCoordToLocal(t,n),o=this.getBoundingRect(),a=this.style;if(t=r[0],n=r[1],o.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=a.lineWidth,c=a.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),dx(s,l/c,t,n)))return!0}if(this.hasFill())return ux(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=xr,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):i.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var r=this.shape;return r||(r=this.shape={}),typeof t=="string"?r[t]=n:q(r,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&xr)},e.prototype.createStyle=function(t){return jn(tm,t)},e.prototype._innerSaveToNormal=function(t){i.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=q({},this.shape))},e.prototype._applyStateObj=function(t,n,r,o,a,s){i.prototype._applyStateObj.call(this,t,n,r,o,a,s);var l=!(n&&o),c;if(n&&n.shape?a?o?c=n.shape:(c=q({},r.shape),q(c,n.shape)):(c=q({},o?this.shape:r.shape),q(c,n.shape)):l&&(c=r.shape),c)if(a){this.shape=q({},this.shape);for(var d={},u=Pe(c),p=0;pr&&(u=s+l,s*=r/u,l*=r/u),c+d>r&&(u=c+d,c*=r/u,d*=r/u),l+c>o&&(u=l+c,l*=o/u,c*=o/u),s+d>o&&(u=s+d,s*=o/u,d*=o/u),i.moveTo(t+s,n),i.lineTo(t+r-l,n),l!==0&&i.arc(t+r-l,n+l,l,-Math.PI/2,0),i.lineTo(t+r,n+o-c),c!==0&&i.arc(t+r-c,n+o-c,c,0,Math.PI/2),i.lineTo(t+d,n+o),d!==0&&i.arc(t+d,n+o-d,d,Math.PI/2,Math.PI),i.lineTo(t,n+s),s!==0&&i.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var za=Math.round;function Au(i,e,t){if(e){var n=e.x1,r=e.x2,o=e.y1,a=e.y2;i.x1=n,i.x2=r,i.y1=o,i.y2=a;var s=t&&t.lineWidth;return s&&(za(n*2)===za(r*2)&&(i.x1=i.x2=Or(n,s,!0)),za(o*2)===za(a*2)&&(i.y1=i.y2=Or(o,s,!0))),i}}function Nu(i,e,t){if(e){var n=e.x,r=e.y,o=e.width,a=e.height;i.x=n,i.y=r,i.width=o,i.height=a;var s=t&&t.lineWidth;return s&&(i.x=Or(n,s,!0),i.y=Or(r,s,!0),i.width=Math.max(Or(n+o,s,!1)-i.x,o===0?0:1),i.height=Math.max(Or(r+a,s,!1)-i.y,a===0?0:1)),i}}function Or(i,e,t){if(!e)return i;var n=za(i*2);return(n+za(e))%2===0?n/2:(n+(t?1:-1))/2}var AD=(function(){function i(){this.x=0,this.y=0,this.width=0,this.height=0}return i})();var ND={},mx=(function(i){he(e,i);function e(t){return i.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new AD},e.prototype.buildPath=function(t,n){var r,o,a,s;if(this.subPixelOptimize){var l=Nu(ND,n,this.style);r=l.x,o=l.y,a=l.width,s=l.height,l.r=n.r,n=l}else r=n.x,o=n.y,a=n.width,s=n.height;n.r?fx(t,n):t.rect(r,o,a,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(Le);mx.prototype.type="rect";var Kt=mx;var gx={fill:"#000"},vx=2,In={},BD={style:We({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},xo.style)},Sx=(function(i){he(e,i);function e(t){var n=i.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=gx,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){i.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,z=0;z<_.length b='this._getOrCreateChild(tl),H=B.createStyle();B.useStyle(H),H.text=_[z],H.x=w,H.y=x,l&&(H.textAlign=l),H.textBaseline="middle",H.opacity=t.opacity,H.strokeFirst=!0,F&&(H.shadowBlur=t.textShadowBlur||0,H.shadowColor=t.textShadowColor||"transparent",H.shadowOffsetX=t.textShadowOffsetX||0,H.shadowOffsetY=t.textShadowOffsetY||0),H.stroke=V,H.fill=A,V&&(H.lineWidth=t.lineWidth||T,H.lineDash=t.lineDash,H.lineDashOffset=t.lineDashOffset||0),H.font=n,yx(H,t),x+=y,B.setBoundingRect(Pu(H,u.contentWidth,u.calculatedLineHeight,I?0:null))}},e.prototype._updateRichTexts=function(){var' t="this.style,n=this._defaultStyle,r=t.align||n.align,o=t.verticalAlign||n.verticalAlign,a=t.x||0,s=t.y||0;zf(In,n.overflowRect,a,s,r,o),a=In.baseX,s=In.baseY;var" l="kx(t),c=$w(l,t,In.outerWidth,In.outerHeight,r),d=c.width,u=c.outerWidth,p=c.outerHeight,h=t.padding;this.isTruncated=!!c.isTruncated;var" f="Tr(a,u,r),v=$n(s,p,o),_=f,y=v;h&&(_+=h[3],y+=h[0]);var" w="_+d;im(t)&&this._renderBackground(t,t,f,v,u,p);for(var" x="!!t.backgroundColor,M=0;M<c.lines.length;M++){for(var" s="c.lines[M],T=S.tokens,I=T.length,N=S.lineHeight,A=S.width,V=0,F=_,z=w,B=I-1,H=void">=0&&(H=T[B],H.align==="right");)this._placeToken(H,t,N,y,z,"right",x),A-=H.width,z-=H.width,B--;for(F+=(d-(F-_)-(w-z)-A)/2;V0||n.textShadowBlur>0;_.text=t.text,_.x=a,_.y=u,I&&(_.shadowBlur=c.textShadowBlur||n.textShadowBlur||0,_.shadowColor=c.textShadowColor||n.textShadowColor||"transparent",_.shadowOffsetX=c.textShadowOffsetX||n.textShadowOffsetX||0,_.shadowOffsetY=c.textShadowOffsetY||n.textShadowOffsetY||0),_.textAlign=s,_.textBaseline="middle",_.font=t.font||Vi,_.opacity=Wn(c.opacity,n.opacity,1),yx(_,c),T&&(_.lineWidth=Wn(c.lineWidth,n.lineWidth,x),_.lineDash=Ee(c.lineDash,n.lineDash),_.lineDashOffset=n.lineDashOffset||0,_.stroke=T),S&&(_.fill=S),v.setBoundingRect(Pu(_,t.contentWidth,t.contentHeight,M?0:null))},e.prototype._renderBackground=function(t,n,r,o,a,s){var l=t.backgroundColor,c=t.borderWidth,d=t.borderColor,u=l&&l.image,p=l&&!u,h=t.borderRadius,f=this,v,_;if(p||t.lineHeight||c&&d){v=this._getOrCreateChild(Kt),v.useStyle(v.createStyle()),v.style.fill=null;var y=v.shape;y.x=r,y.y=o,y.width=a,y.height=s,y.r=h,v.dirtyShape()}if(p){var w=v.style;w.fill=l||null,w.fillOpacity=Ee(t.fillOpacity,1)}else if(u){_=this._getOrCreateChild(Qi),_.onload=function(){f.dirtyStyle()};var x=_.style;x.image=l.image,x.x=r,x.y=o,x.width=a,x.height=s}if(c&&d){var w=v.style;w.lineWidth=c,w.stroke=d,w.strokeOpacity=Ee(t.strokeOpacity,1),w.lineDash=t.borderDash,w.lineDashOffset=t.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(w.strokeFirst=!0,w.lineWidth*=2)}var M=(v||_).style;M.shadowBlur=t.shadowBlur||0,M.shadowColor=t.shadowColor||"transparent",M.shadowOffsetX=t.shadowOffsetX||0,M.shadowOffsetY=t.shadowOffsetY||0,M.opacity=Wn(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return zD(t)&&(n=[t.fontStyle,t.fontWeight,VD(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&Yt(n)||t.textFont||t.font},e})(Tn),RD={left:!0,right:1,center:1},FD={top:1,bottom:1,middle:1},_x=["fontStyle","fontWeight","fontSize","fontFamily"];function VD(i){return typeof i=="string"&&(i.indexOf("px")!==-1||i.indexOf("rem")!==-1||i.indexOf("em")!==-1)?i:isNaN(+i)?Bc+"px":i+"px"}function yx(i,e){for(var t=0;t<_x.length n="_x[t],r=e[n];r!=null&&(i[n]=r)}}function" zd i.fontsize ud bx e='i.align;e==="middle"&&(e="center"),i.align=e==null||RD[e]?e:"left";var' t='i.verticalAlign;t==="center"&&(t="middle"),i.verticalAlign=t==null||FD[t]?t:"top";var' xx i='=null||e<=0||i==="transparent"||i==="none"?null:i.image||i.colorStops?"#000":i}function' cx mx kx im ei="Sx;var" it="Qe(),Lx=function(i,e,t,n){if(n){var" r='It(n);r.dataIndex=t,r.dataType=e,r.seriesIndex=i,r.ssrType="chart",n.type==="group"&&n.traverse(function(o){var' a='It(o);a.seriesIndex=i,a.dataIndex=t,a.dataType=e,a.ssrType="chart"})}};var' tx='1,Ex={},Ax=Qe(),om=Qe(),am=0,il=1,nl=2,Jn=["emphasis","blur","select"],sm=["normal","emphasis","blur","select"],HD=10,GD=9,Ar="highlight",rl="downplay",ol="select",Ru="unselect",al="toggleSelect",Fu="selectchanged";function' ua vu nx lm rx wd jd px er xu qd s="e[a],l=r[s];o[s]=l??(n&&n[s])}for(var" c='i.animators[a];c.__fromStateTransition&&c.__fromStateTransition.indexOf(t)<0&&c.targetName==="style"&&c.saveTo(o,e)}return' o yd>=0,o=!1;if(i instanceof Le){var a=Ax(i),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(Ua(s)||Ua(l)){n=n||{};var c=n.style||{};c.fill==="inherit"?(o=!0,n=q({},n),c=q({},c),c.fill=s):!Ua(c.fill)&&Ua(s)?(o=!0,n=q({},n),c=q({},c),c.fill=lu(s)):!Ua(c.stroke)&&Ua(l)&&(o||(n=q({},n),c=q({},c)),c.stroke=lu(l)),n.style=c}}if(n&&n.z2==null){o||(n=q({},n));var d=i.z2EmphasisLift;n.z2=i.z2+(d??HD)}return n}function ZD(i,e,t){if(t&&t.z2==null){t=q({},t);var n=i.z2SelectLift;t.z2=i.z2+(n??GD)}return t}function KD(i,e,t){var n=Oe(i.currentStates,e)>=0,r=i.style.opacity,o=n?null:qD(i,["opacity"],e,{opacity:1});t=t||{};var a=t.style||{};return a.opacity==null&&(t=q({},t),a=q({opacity:n?r:o.opacity*.1},a),t.style=a),t}function nm(i,e){var t=this.states[i];if(this.style){if(i==="emphasis")return YD(this,i,e,t);if(i==="blur")return KD(this,i,t);if(i==="select")return ZD(this,i,t)}return t}function $D(i){i.stateProxy=nm;var e=i.getTextContent(),t=i.getTextGuideLine();e&&(e.stateProxy=nm),t&&(t.stateProxy=nm)}function Dx(i,e){!Vx(i,e)&&!i.__highByOuter&&er(i,Nx)}function Ix(i,e){!Vx(i,e)&&!i.__highByOuter&&er(i,Bx)}function sl(i,e){i.__highByOuter|=10){var l={dataIndex:s,seriesIndex:t.seriesIndex};a!=null&&(l.dataType=a),e.push(l)}})}),e}function fm(i,e,t){jx(i,!0),er(i,$D),QD(i,e,t)}function XD(i){jx(i,!1)}function CU(i,e,t,n){n?XD(i):fm(i,e,t)}function QD(i,e,t){var n=It(i);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var Ox=["emphasis","blur","select"],JD={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function MU(i,e,t,n){t=t||"itemStyle";for(var r=0;rOo,BezierCurve:()=>_l,BoundingRect:()=>Ce,Circle:()=>Po,CompoundPath:()=>qu,Ellipse:()=>dl,Group:()=>ji,Image:()=>Qi,IncrementalDisplayable:()=>Ju,Line:()=>Io,LinearGradient:()=>Zu,OrientedBoundingRect:()=>_C,Path:()=>Le,Point:()=>nt,Polygon:()=>gl,Polyline:()=>vl,RadialGradient:()=>Ku,Rect:()=>Kt,Ring:()=>ml,Sector:()=>fl,Text:()=>Ei,WH:()=>DI,XY:()=>PI,applyTransform:()=>MC,calcZ2Range:()=>qI,clipPointsByRect:()=>Im,clipRectByRect:()=>Om,createIcon:()=>Am,ensureCopyRect:()=>WI,ensureCopyTransform:()=>jI,expandOrShrinkRect:()=>UI,extendPath:()=>Tm,extendShape:()=>Lm,getShapeClass:()=>Em,getTransform:()=>Dm,groupTransition:()=>FI,initProps:()=>ed,isBoundingRectAxisAligned:()=>GI,isElementRemoved:()=>Bo,lineLineIntersect:()=>kC,linePolygonIntersect:()=>VI,makeImage:()=>bl,makePath:()=>Wa,mergePath:()=>Pm,registerShape:()=>Pi,removeElement:()=>Cm,removeElementWithFadeOut:()=>bC,resizePath:()=>id,retrieveZInfo:()=>Bm,setTooltipConfig:()=>HI,subPixelOptimize:()=>NI,subPixelOptimizeLine:()=>OI,subPixelOptimizeRect:()=>AI,transformDirection:()=>BI,traverseElements:()=>Nm,traverseUpdateZ:()=>Rm,updateProps:()=>yl});var Ha=fn.CMD,eI=[[],[],[]],Zx=Math.sqrt,tI=Math.atan2;function gm(i,e){if(e){var t=i.data,n=i.len(),r,o,a,s,l,c,d=Ha.M,u=Ha.C,p=Ha.L,h=Ha.R,f=Ha.A,v=Ha.Q;for(a=0,s=0;a1&&(a*=vm(f),s*=vm(f));var v=(r===o?-1:1)*vm((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,_=v*a*h/s,y=v*-s*p/a,w=(i+t)/2+Gu(u)*_-Hu(u)*y,x=(e+n)/2+Hu(u)*_+Gu(u)*y,M=$x([1,0],[(p-_)/a,(h-y)/s]),S=[(p-_)/a,(h-y)/s],T=[(-1*p-_)/a,(-1*h-y)/s],I=$x(S,T);if(_m(S,T)=1&&(I=0),IH*H+se*se&&(N=V,A=F),{cx:N,cy:A,x0:-d,y0:-u,x1:N*(r/S-1),y1:A*(r/S-1)}}function uI(i){var e;if(Q(i)){var t=i.length;if(!t)return i;t===1?e=[i[0],i[0],0,0]:t===2?e=[i[0],i[0],i[1],i[1]]:t===3?e=i.concat(i[2]):e=i}else e=[i,i,i,i];return e}function lC(i,e){var t,n=pl(e.r,0),r=pl(e.r0||0,0),o=n>0,a=r>0;if(!(!o&&!a)){if(o||(n=r,r=0),r>n){var s=n;n=r,r=s}var l=e.startAngle,c=e.endAngle;if(!(isNaN(l)||isNaN(c))){var d=e.cx,u=e.cy,p=!!e.clockwise,h=aC(c-l),f=h>ym&&h%ym;if(f>mn&&(h=f),!(n>mn))i.moveTo(d,u);else if(h>ym-mn)i.moveTo(d+n*Ga(l),u+n*Do(l)),i.arc(d,u,n,l,c,!p),r>mn&&(i.moveTo(d+r*Ga(c),u+r*Do(c)),i.arc(d,u,r,c,l,p));else{var v=void 0,_=void 0,y=void 0,w=void 0,x=void 0,M=void 0,S=void 0,T=void 0,I=void 0,N=void 0,A=void 0,V=void 0,F=void 0,z=void 0,B=void 0,H=void 0,se=n*Ga(l),oe=n*Do(l),Se=r*Ga(c),be=r*Do(c),xe=h>mn;if(xe){var fe=e.cornerRadius;fe&&(t=uI(fe),v=t[0],_=t[1],y=t[2],w=t[3]);var pe=aC(n-r)/2;if(x=On(pe,y),M=On(pe,w),S=On(pe,v),T=On(pe,_),A=I=pl(x,M),V=N=pl(S,T),(I>mn||N>mn)&&(F=n*Ga(c),z=n*Do(c),B=r*Ga(l),H=r*Do(l),hmn){var ti=On(y,A),pt=On(w,A),we=Wu(B,H,se,oe,n,ti,p),De=Wu(F,z,Se,be,n,pt,p);i.moveTo(d+we.cx+we.x0,u+we.cy+we.y0),A0&&i.arc(d+we.cx,u+we.cy,ti,$t(we.y0,we.x0),$t(we.y1,we.x1),!p),i.arc(d,u,n,$t(we.cy+we.y1,we.cx+we.x1),$t(De.cy+De.y1,De.cx+De.x1),!p),pt>0&&i.arc(d+De.cx,u+De.cy,pt,$t(De.y1,De.x1),$t(De.y0,De.x0),!p))}else i.moveTo(d+se,u+oe),i.arc(d,u,n,l,c,!p);if(!(r>mn)||!xe)i.lineTo(d+Se,u+be);else if(V>mn){var ti=On(v,V),pt=On(_,V),we=Wu(Se,be,F,z,r,-pt,p),De=Wu(se,oe,B,H,r,-ti,p);i.lineTo(d+we.cx+we.x0,u+we.cy+we.y0),V0&&i.arc(d+we.cx,u+we.cy,pt,$t(we.y0,we.x0),$t(we.y1,we.x1),!p),i.arc(d,u,r,$t(we.cy+we.y1,we.cx+we.x1),$t(De.cy+De.y1,De.cx+De.x1),p),ti>0&&i.arc(d+De.cx,u+De.cy,ti,$t(De.y1,De.x1),$t(De.y0,De.x0),!p))}else i.lineTo(d+Se,u+be),i.arc(d,u,r,c,l,p)}i.closePath()}}}var pI=(function(){function i(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return i})();var cC=(function(i){he(e,i);function e(t){return i.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new pI},e.prototype.buildPath=function(t,n){lC(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(Le);cC.prototype.type="sector";var fl=cC;var hI=(function(){function i(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return i})();var uC=(function(i){he(e,i);function e(t){return i.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new hI},e.prototype.buildPath=function(t,n){var r=n.cx,o=n.cy,a=Math.PI*2;t.moveTo(r+n.r,o),t.arc(r,o,n.r,0,a,!1),t.moveTo(r+n.r0,o),t.arc(r,o,n.r0,0,a,!0)},e})(Le);uC.prototype.type="ring";var ml=uC;function bm(i,e,t,n){var r=[],o=[],a=[],s=[],l,c,d,u;if(n){d=[1/0,1/0],u=[-1/0,-1/0];for(var p=0,h=i.length;p=2){if(n){var o=bm(r,n,t,e.smoothConstraint);i.moveTo(r[0][0],r[0][1]);for(var a=r.length,s=0;sNo[1]){if(o=!1,Ot.negativeSize||n)return o;var l=$u(No[0]-Ao[1]),c=$u(Ao[0]-No[1]);wm(l,c)>Qu.len()&&(l=c||!Ot.bidirectional)&&(nt.scale(Xu,s,-c*r),Ot.useDir&&Ot.calcDirMTV()))}}return o},i.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],o=this._origin,a=t[0].dot(r)+o[e],s=a,l=a,c=1;c0){var u=d.duration,p=d.delay,h=d.easing,f={duration:u,delay:p||0,easing:h,done:o,force:!!o||!!a,setToFinal:!c,scope:i,during:a};s?e.animateFrom(t,f):e.animateTo(t,f)}else e.stopAnimation(),!s&&e.attr(t),a&&a(1),o&&o()}function yl(i,e,t,n,r,o){xm("update",i,e,t,n,r,o)}function ed(i,e,t,n,r,o){xm("enter",i,e,t,n,r,o)}function Bo(i){if(!i.__zr)return!0;for(var e=0;ehn(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function wC(i){return!i.isGroup}function RI(i){return i.shape!=null}function FI(i,e,t){if(!i||!e)return;function n(a){var s={};return a.traverse(function(l){wC(l)&&l.anid&&(s[l.anid]=l)}),s}function r(a){var s={x:a.x,y:a.y,rotation:a.rotation};return RI(a)&&(s.shape=Me(a.shape)),s}var o=n(i);e.traverse(function(a){if(wC(a)&&a.anid){var s=o[a.anid];if(s){var l=r(a);a.attr(r(s)),yl(a,l,t,It(a).dataIndex)}}})}function Im(i,e){return J(i,function(t){var n=t[0];n=qi(n,e.x),n=Oa(n,e.x+e.width);var r=t[1];return r=qi(r,e.y),r=Oa(r,e.y+e.height),[n,r]})}function Om(i,e){var t=qi(i.x,e.x),n=Oa(i.x+i.width,e.x+e.width),r=qi(i.y,e.y),o=Oa(i.y+i.height,e.y+e.height);if(n>=t&&o>=r)return{x:t,y:r,width:n-t,height:o-r}}function Am(i,e,t){var n=q({rectHover:!0},e),r=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},i)return i.indexOf("image://")===0?(r.image=i.slice(8),We(r,t),new Qi(n)):Wa(i.replace("path://",""),n,t,"center")}function VI(i,e,t,n,r){for(var o=0,a=r[r.length-1];o1)return!1;var _=Mm(h,f,d,u)/p;return!(_1)}function Mm(i,e,t,n){return i*n-t*e}function zI(i){return i=-1e-6}function UI(i,e,t,n,r){return e==null||(Re(e)?it[0]=it[1]=it[2]=it[3]=e:(it[0]=e[0],it[1]=e[1],it[2]=e[2],it[3]=e[3]),n&&(it[0]=qi(0,it[0]),it[1]=qi(0,it[1]),it[2]=qi(0,it[2]),it[3]=qi(0,it[3])),t&&(it[0]=-it[0],it[1]=-it[1],it[2]=-it[2],it[3]=-it[3]),xC(i,it,"x","width",3,1,r&&r[0]||0),xC(i,it,"y","height",0,2,r&&r[1]||0)),i}var it=[0,0,0,0];function xC(i,e,t,n,r,o,a){var s=e[o]+e[r],l=i[n];i[n]+=s,a=qi(0,Oa(a,l)),i[n]=0?-e[r]:e[o]>=0?l+e[o]:hn(s)>1e-8?(l-a)*e[r]/s:0):i[t]-=e[r]}function HI(i){var e=i.itemTooltipOption,t=i.componentModel,n=i.itemName,r=te(e)?{formatter:e}:e,o=t.mainType,a=t.componentIndex,s={componentType:o,name:n,$vars:["name"]};s[o+"Index"]=a;var l=i.formatterParamsExtra;l&&D(Pe(l),function(d){Nt(s,d)||(s[d]=l[d],s.$vars.push(d))});var c=It(i.el);c.componentMainType=o,c.componentIndex=a,c.tooltipConfig={name:n,option:We({content:n,encodeHTMLContent:!0,formatterParams:s},r)}}function Sm(i,e){var t;i.isGroup&&(t=e(i)),t||i.traverse(e)}function Nm(i,e){if(i)if(Q(i))for(var t=0;te&&(e=a),ae&&(t=e=0),{min:t,max:e}}function Rm(i,e,t){SC(i,e,t,-1/0)}function SC(i,e,t,n){if(i.ignoreModelZ)return n;var r=i.getTextContent(),o=i.getTextGuideLine(),a=i.isGroup;if(a)for(var s=i.childrenRef(),l=0;l=0&&s.push(l)}),s}}function D6(i,e){return Xe(Xe({},i,!0),e,!0)}var UC={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}};var HC={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var sd="ZH",Gm="EN",ja=Gm,ad={},Wm={},ld=Be.domSupported?(function(){var i=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ja).toUpperCase();return i.indexOf(sd)>-1?sd:ja})():ja;function cd(i,e){i=i.toUpperCase(),Wm[i]=new vt(e),ad[i]=e}function GC(i){if(te(i)){var e=ad[i.toUpperCase()]||{};return i===sd||i===Gm?Me(e):Xe(Me(e),Me(ad[ja]),!1)}else return Xe(Me(i),Me(ad[ja]),!1)}function WC(i){return Wm[i]}function jC(){return Wm[ja]}cd(Gm,UC);cd(sd,HC);var tO=null;function kt(){return tO}var pd=1e3,hd=pd*60,qa=hd*60,Di=qa*24,jm=Di*365,iO={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},dd={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},nO="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",ud="{yyyy}-{MM}-{dd}",qm={year:"{yyyy}",month:"{yyyy}-{MM}",day:ud,hour:ud+" "+dd.hour,minute:ud+" "+dd.minute,second:ud+" "+dd.second,millisecond:nO},vi=["year","month","day","hour","minute","second","millisecond"],qC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function YC(i){return!te(i)&&!ue(i)?rO(i):i}function rO(i){i=i||{};var e={},t=!0;return D(vi,function(n){t&&(t=i[n]==null)}),D(vi,function(n,r){var o=i[n];e[n]={};for(var a=null,s=r;s>=0;s--){var l=vi[s],c=ne(o)&&!Q(o)?o[l]:o,d=void 0;Q(c)?(d=c.slice(),a=d[0]||""):te(c)?(a=c,d=[a]):(a==null?a=dd[n]:iO[l].test(a)||(a=e[l][l][0]+" "+a),d=[a],t&&(d[1]="{primary|"+a+"}")),e[n][l]=d}}),e}function Xt(i,e){return i+="","0000".substr(0,e-i.length)+i}function Ya(i){switch(i){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return i}}function ZC(i){return i===Ya(i)}function KC(i){switch(i){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Fo(i,e,t,n){var r=ci(i),o=r[Ym(t)](),a=r[fd(t)]()+1,s=Math.floor((a-1)/3)+1,l=r[md(t)](),c=r["get"+(t?"UTC":"")+"Day"](),d=r[gd(t)](),u=(d-1)%12+1,p=r[vd(t)](),h=r[_d(t)](),f=r[yd(t)](),v=d>=12?"pm":"am",_=v.toUpperCase(),y=n instanceof vt?n:WC(n||ld)||jC(),w=y.getModel("time"),x=w.get("month"),M=w.get("monthAbbr"),S=w.get("dayOfWeek"),T=w.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,v+"").replace(/{A}/g,_+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,Xt(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,x[a-1]).replace(/{MMM}/g,M[a-1]).replace(/{MM}/g,Xt(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Xt(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[c]).replace(/{ee}/g,T[c]).replace(/{e}/g,c+"").replace(/{HH}/g,Xt(d,2)).replace(/{H}/g,d+"").replace(/{hh}/g,Xt(u+"",2)).replace(/{h}/g,u+"").replace(/{mm}/g,Xt(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Xt(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Xt(f,3)).replace(/{S}/g,f+"")}function $C(i,e,t,n,r){var o=null;if(te(t))o=t;else if(ue(t)){var a={time:i.time,level:i.time.level},s=kt();s&&s.makeAxisLabelFormatterParamBreak(a,i.break),o=t(i.value,e,a)}else{var l=i.time;if(l){var c=t[l.lowerTimeUnit][l.upperTimeUnit];o=c[Math.min(l.level,c.length-1)]||""}else{var d=Vo(i.value,r);o=t[d][d][0]}}return Fo(new Date(i.value),o,r,n)}function Vo(i,e){var t=ci(i),n=t[fd(e)]()+1,r=t[md(e)](),o=t[gd(e)](),a=t[vd(e)](),s=t[_d(e)](),l=t[yd(e)](),c=l===0,d=c&&s===0,u=d&&a===0,p=u&&o===0,h=p&&r===1,f=h&&n===1;return f?"year":h?"month":p?"day":u?"hour":d?"minute":c?"second":"millisecond"}function Za(i,e,t){switch(e){case"year":i[Zm(t)](0);case"month":i[Km(t)](1);case"day":i[$m(t)](0);case"hour":i[Xm(t)](0);case"minute":i[Qm(t)](0);case"second":i[Jm(t)](0)}return i}function Ym(i){return i?"getUTCFullYear":"getFullYear"}function fd(i){return i?"getUTCMonth":"getMonth"}function md(i){return i?"getUTCDate":"getDate"}function gd(i){return i?"getUTCHours":"getHours"}function vd(i){return i?"getUTCMinutes":"getMinutes"}function _d(i){return i?"getUTCSeconds":"getSeconds"}function yd(i){return i?"getUTCMilliseconds":"getMilliseconds"}function XC(i){return i?"setUTCFullYear":"setFullYear"}function Zm(i){return i?"setUTCMonth":"setMonth"}function Km(i){return i?"setUTCDate":"setDate"}function $m(i){return i?"setUTCHours":"setHours"}function Xm(i){return i?"setUTCMinutes":"setMinutes"}function Qm(i){return i?"setUTCSeconds":"setSeconds"}function Jm(i){return i?"setUTCMilliseconds":"setMilliseconds"}function eg(i,e,t,n,r,o,a,s){var l=new Ei({style:{text:i,font:e,align:t,verticalAlign:n,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function wl(i){if(!Ks(i))return te(i)?i:"-";var e=(i+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function JC(i,e){return i=(i||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&i&&(i=i.charAt(0).toUpperCase()+i.slice(1)),i}var bd=io;function wd(i,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function r(d){return d&&Yt(d)?d:"-"}function o(d){return!!(d!=null&&!isNaN(d)&&isFinite(d))}var a=e==="time",s=i instanceof Date;if(a||s){var l=a?ci(i):i;if(isNaN(+l)){if(s)return"-"}else return Fo(l,n,t)}if(e==="ordinal")return wa(i)?r(i):Re(i)&&o(i)?i+"":"-";var c=Yi(i);return o(c)?wl(c):wa(i)?r(i):typeof i=="boolean"?i+"":"-"}var QC=["a","b","c","d","e","f","g"],tg=function(i,e){return"{"+i+(e??"")+"}"};function xd(i,e,t){Q(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],o=0;o':' ';var a=t.markerId||"markerX";return{renderMode:o,content:"{"+a+"|} ",style:r==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function e1(i,e,t){(i==="week"||i==="month"||i==="quarter"||i==="half-year"||i==="year")&&(i=`MM-dd
yyyy`);var n=ci(e),r=t?"getUTC":"get",o=n[r+"FullYear"](),a=n[r+"Month"]()+1,s=n[r+"Date"](),l=n[r+"Hours"](),c=n[r+"Minutes"](),d=n[r+"Seconds"](),u=n[r+"Milliseconds"]();return i=i.replace("MM",Xt(a,2)).replace("M",a).replace("yyyy",o).replace("yy",Xt(o%100+"",2)).replace("dd",Xt(s,2)).replace("d",s).replace("hh",Xt(l,2)).replace("h",l).replace("mm",Xt(c,2)).replace("m",c).replace("ss",Xt(d,2)).replace("s",d).replace("SSS",Xt(u,3)),i}function t1(i){return i&&i.charAt(0).toUpperCase()+i.substr(1)}function i1(i,e){return e=e||"transparent",te(i)?i:ne(i)&&i.colorStops&&(i.colorStops[0]||{}).color||e}var Md={},ig={},oO=(function(){function i(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return i.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Md,!0),this._normalMasterList=n(ig,!1);function n(r,o){var a=[];return D(r,function(s,l){var c=s.create(e,t);a=a.concat(c||[])}),a}},i.prototype.update=function(e,t){D(this._normalMasterList,function(n){n.update&&n.update(e,t)})},i.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},i.register=function(e,t){if(e==="matrix"||e==="calendar"){Md[e]=t;return}ig[e]=t},i.get=function(e){return ig[e]||Md[e]},i})();function aO(i){return!!Md[i]}var kd={coord:1,coord2:2};function Q6(i){r1.set(i.fullType,{getCoord2:void 0}).getCoord2=i.getCoord2}var r1=ce();function o1(i){var e=i.getShallow("coord",!0),t=kd.coord;if(e==null){var n=r1.get(i.type);n&&n.getCoord2&&(t=kd.coord2,e=n.getCoord2(i))}return{coord:e,from:t}}var tr={none:0,dataCoordSys:1,boxCoordSys:2};function sO(i,e){var t=i.getShallow("coordinateSystem"),n=i.getShallow("coordinateSystemUsage",!0),r=n!=null,o=tr.none;if(t){var a=i.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(o=tr.dataCoordSys,a||(o=tr.none)):n==="box"&&(o=tr.boxCoordSys,!a&&!aO(t)&&(o=tr.none))}return{coordSysType:t,kind:o}}function J6(i){var e=i.targetModel,t=i.coordSysType,n=i.coordSysProvider,r=i.isDefaultDataCoordSys,o=i.allowNotFound,a=sO(e,!0),s=a.kind,l=a.coordSysType;if(r&&s!==tr.dataCoordSys&&(s=tr.dataCoordSys,l=t),s===tr.none||l!==t)return!1;var c=n(t,e);return c?(s===tr.dataCoordSys?e.coordinateSystem=c:e.boxCoordinateSystem=c,!0):!1}var Ka=oO;var Ld=D,lO=["left","right","top","bottom","width","height"],Sd=[["width","left","right"],["height","top","bottom"]];function ng(i,e,t,n,r){var o=0,a=0;n==null&&(n=1/0),r==null&&(r=1/0);var s=0;e.eachChild(function(l,c){var d=l.getBoundingRect(),u=e.childAt(c+1),p=u&&u.getBoundingRect(),h,f;if(i==="horizontal"){var v=d.width+(p?-p.x+d.x:0);h=o+v,h>n||l.newline?(o=0,h=v,a+=s+t,s=d.height):s=Math.max(s,d.height)}else{var _=d.height+(p?-p.y+d.y:0);f=a+_,f>r||l.newline?(o+=s+t,a=0,f=_,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),i==="horizontal"?o=h+t:a=f+t)})}var rG=ng,oG=bn(ng,"vertical"),aG=bn(ng,"horizontal");function a1(i,e){return{left:i.getShallow("left",e),top:i.getShallow("top",e),right:i.getShallow("right",e),bottom:i.getShallow("bottom",e),width:i.getShallow("width",e),height:i.getShallow("height",e)}}function cO(i,e){var t=uO(i,e,{enableLayoutOnlyByCenter:!0}),n=i.getBoxLayoutParams(),r,o;if(t.type===xl.point)o=t.refPoint,r=Td(n,{width:e.getWidth(),height:e.getHeight()});else{var a=i.get("center"),s=Q(a)?a:[a,a];r=Td(n,t.refContainer),o=t.boxCoordFrom===kd.coord2?t.refPoint:[at(s[0],r.width)+r.x,at(s[1],r.height)+r.y]}return{viewRect:r,center:o}}function sG(i,e){var t=cO(i,e),n=t.viewRect,r=t.center,o=i.get("radius");Q(o)||(o=[0,o]);var a=at(n.width,e.getWidth()),s=at(n.height,e.getHeight()),l=Math.min(a,s),c=at(o[0],l/2),d=at(o[1],l/2);return{cx:r[0],cy:r[1],r0:c,r:d,viewRect:n}}function Td(i,e,t){t=bd(t||0);var n=e.width,r=e.height,o=at(i.left,n),a=at(i.top,r),s=at(i.right,n),l=at(i.bottom,r),c=at(i.width,n),d=at(i.height,r),u=t[2]+t[0],p=t[1]+t[3],h=i.aspect;switch(isNaN(c)&&(c=n-s-p-o),isNaN(d)&&(d=r-l-u-a),h!=null&&(isNaN(c)&&isNaN(d)&&(h>n/r?c=n*.8:d=r*.8),isNaN(c)&&(c=h*d),isNaN(d)&&(d=c/h)),isNaN(o)&&(o=n-s-c-p),isNaN(a)&&(a=r-l-d-u),i.left||i.right){case"center":o=n/2-c/2-t[3];break;case"right":o=n-c-p;break}switch(i.top||i.bottom){case"middle":case"center":a=r/2-d/2-t[0];break;case"bottom":a=r-d-u;break}o=o||0,a=a||0,isNaN(c)&&(c=n-p-o-(s||0)),isNaN(d)&&(d=r-u-a-(l||0));var f=new Ce((e.x||0)+o+t[3],(e.y||0)+a+t[0],c,d);return f.margin=t,f}var xl={rect:1,point:2};function uO(i,e,t){var n,r,o,a=i.boxCoordinateSystem,s;if(a){var l=o1(i),c=l.coord,d=l.from;if(a.dataToLayout){o=xl.rect,s=d;var u=a.dataToLayout(c);n=u.contentRect||u.rect}else t&&t.enableLayoutOnlyByCenter&&a.dataToPoint&&(o=xl.point,s=d,r=a.dataToPoint(c))}return o==null&&(o=xl.rect),o===xl.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),r=[n.x+n.width/2,n.y+n.height/2]),{type:o,refContainer:n,refPoint:r,boxCoordFrom:s}}function $a(i){var e=i.layoutMode||i.constructor.layoutMode;return ne(e)?e:e?{type:e}:null}function Xa(i,e,t){var n=t&&t.ignoreSize;!Q(n)&&(n=[n,n]);var r=a(Sd[0],0),o=a(Sd[1],1);l(Sd[0],i,r),l(Sd[1],i,o);function a(c,d){var u={},p=0,h={},f=0,v=2;if(Ld(c,function(w){h[w]=i[w]}),Ld(c,function(w){Nt(e,w)&&(u[w]=h[w]=e[w]),s(u,w)&&p++,s(h,w)&&f++}),n[d])return s(e,c[1])?h[c[2]]=null:s(e,c[2])&&(h[c[1]]=null),h;if(f===v||!p)return h;if(p>=v)return u;for(var _=0;_=0;l--)s=Xe(s,r[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var r=t+"Index",o=t+"Id";return Ra(this.ecModel,t,{index:this.get(r,!0),id:this.get(o,!0)},n)},e.prototype.getBoxLayoutParams=function(){return a1(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=(function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0})(),e})(vt);Eu(Qa,vt);Er(Qa);VC(Qa);zC(Qa,fO);function fO(i){var e=[];return D(Qa.getClassesByMainType(i),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=J(e,function(t){return mi(t).main}),i!=="dataset"&&Oe(e,"dataset")e)return i[n];return i[t-1]}function _O(i,e,t,n,r,o,a){o=o||i;var s=e(o),l=s.paletteIdx||0,c=s.paletteNameMap=s.paletteNameMap||{};if(c.hasOwnProperty(r))return c[r];var d=a==null||!n?t:vO(n,a);if(d=d||t,!(!d||!d.length)){var u=d[l];return r&&(c[r]=u),s.paletteIdx=(l+1)%d.length,u}}function yO(i,e){e(i).paletteIdx=0,e(i).paletteNameMap={}}var Od,Ml,v1,_1="\0_ec_inner",bO=1;var x1=(function(i){lt(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.init=function(t,n,r,o,a,s){o=o||{},this.option=null,this._theme=new vt(o),this._locale=new vt(a),this._optionManager=s},e.prototype.setOption=function(t,n,r){var o=w1(n);this._optionManager.setOption(t,r,o),this._resetOption(null,o)},e.prototype.resetOption=function(t,n){return this._resetOption(t,w1(n))},e.prototype._resetOption=function(t,n){var r=!1,o=this._optionManager;if(!t||t==="recreate"){var a=o.mountOption(t==="recreate");!this.option||t==="recreate"?v1(this,a):(this.restoreData(),this._mergeOption(a,n)),r=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=o.getTimelineOption(this);s&&(r=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=o.getMediaOption(this);l.length&&D(l,function(c){r=!0,this._mergeOption(c,n)},this)}return r},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var r=this.option,o=this._componentsMap,a=this._componentsCount,s=[],l=ce(),c=n&&n.replaceMergeMainTypeMap;d1(this),D(t,function(u,p){u!=null&&(rt.hasClass(p)?p&&(s.push(p),l.set(p,!0)):r[p]=r[p]==null?Me(u):Xe(r[p],u,!0))}),c&&c.each(function(u,p){rt.hasClass(p)&&!l.get(p)&&(s.push(p),l.set(p,!0))}),rt.topologicalTravel(s,rt.getAllClassMainTypes(),d,this);function d(u){var p=m1(this,u,st(t[u])),h=o.get(u),f=h?c&&c.get(u)?"replaceMerge":"normalMerge":"replaceAll",v=Ow(h,p,f);Nw(v,u,rt),r[u]=null,o.set(u,null),a.set(u,0);var _=[],y=[],w=0,x,M;D(v,function(S,T){var I=S.existing,N=S.newOption;if(!N)I&&(I.mergeOption({},this),I.optionUpdated({},!1));else{var A=u==="series",V=rt.getClass(u,S.keyInfo.subType,!A);if(!V){if(0)var F,z;return}if(u==="tooltip"){if(x)return;x=!0}if(I&&I.constructor===V)I.name=S.keyInfo.name,I.mergeOption(N,this),I.optionUpdated(N,!1);else{var B=q({componentIndex:T},S.keyInfo);I=new V(N,this,this,B),q(I,B),S.brandNew&&(I.__requireNewView=!0),I.init(N,this,this),I.optionUpdated(null,!0)}}I?(_.push(I.option),y.push(I),w++):(_.push(void 0),y.push(void 0))},this),r[u]=_,o.set(u,y),a.set(u,w),u==="series"&&Od(this)}this._seriesIndices||Od(this)},e.prototype.getOption=function(){var t=Me(this.option);return D(t,function(n,r){if(rt.hasClass(r)){for(var o=st(n),a=o.length,s=!1,l=a-1;l>=0;l--)o[l]&&!Ba(o[l])?s=!0:(o[l]=null,!s&&a--);o.length=a,t[r]=o}}),delete t[_1],t},e.prototype.setTheme=function(t){this._theme=new vt(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var r=this._componentsMap.get(t);if(r){var o=r[n||0];if(o)return o;if(n==null){for(var a=0;a=e:t==="max"?i0?t[a-1].seriesModel:null)}),RO(t)}})}function RO(i){D(i,function(e,t){var n=[],r=[NaN,NaN],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(c,d,u){var p=a.get(e.stackedDimension,u);if(isNaN(p))return r;var h,f;s?f=a.getRawIndex(u):h=a.get(e.stackedByDimension,u);for(var v=NaN,_=t-1;_>=0;_--){var y=i[_];if(s||(f=y.data.rawIndexOf(y.stackedByDimension,h)),f>=0){var w=y.data.getByRawIndex(y.stackResultDimension,f);if(l==="all"||l==="positive"&&w>0||l==="negative"&&w=0&&w>0||l==="samesign"&&pv&&(v=x)}h[0]=f,h[1]=v}},r=function(){return this._data?this._data.length/this._dimSize:0};O1=(e={},e[yt+"_"+Oi]={pure:!0,appendData:o},e[yt+"_"+An]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Qt]={pure:!0,appendData:o},e[yi]={pure:!0,appendData:function(a){var s=this._data;D(a,function(l,c){for(var d=s[c]||(s[c]=[]),u=0;u=0&&(v=a.interpolatedValue[_])}return v!=null?v+"":""})}},i.prototype.getRawValue=function(e,t){return is(this.getData(t),e)},i.prototype.formatTooltip=function(e,t,n){},i})();function vW(i){var e,t;return ne(i)?i.type&&(t=i):e=i,{text:e,frag:t}}function Rr(i){return new WO(i)}var WO=(function(){function i(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return i.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!n&&(o=this._plan(this.context));var a=d(this._modBy),s=this._modDataCount||0,l=d(e&&e.modBy),c=e&&e.modDataCount||0;(a!==l||s!==c)&&(o="reset");function d(w){return!(w>=1)&&(w=1),w}var u;(this._dirty||o==="reset")&&(this._dirty=!1,u=this._doReset(n)),this._modBy=l,this._modDataCount=c;var p=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,f=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!n&&(u||h1&&n>0?s:a}};return o;function a(){return e=i?null:le},gte:function(i,e){return i>=e}},SW=(function(){function i(e,t){if(!Re(t)){var n="";Zt(n)}this._opFn=jO[e],this._rvalFloat=Yi(t)}return i.prototype.evaluate=function(e){return Re(e)?this._opFn(e,this._rvalFloat):this._opFn(Yi(e),this._rvalFloat)},i})(),V1=(function(){function i(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return i.prototype.evaluate=function(e,t){var n=Re(e)?e:Yi(e),r=Re(t)?t:Yi(t),o=isNaN(n),a=isNaN(r);if(o&&(n=this._incomparable),a&&(r=this._incomparable),o&&a){var s=te(e),l=te(t);s&&(n=l?e:0),l&&(r=s?t:0)}return nr?-this._resultLT:0},i})();var LW=(function(){function i(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Yi(t)}return i.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=Yi(e)===this._rvalFloat)}return this._isEQ?t:!t},i})();var qO=(function(){function i(){}return i.prototype.getRawData=function(){throw new Error("not supported")},i.prototype.getRawDataItem=function(e){throw new Error("not supported")},i.prototype.cloneRawData=function(){},i.prototype.getDimensionInfo=function(e){},i.prototype.cloneAllDimensionInfo=function(){},i.prototype.count=function(){},i.prototype.retrieveValue=function(e,t){},i.prototype.retrieveValueFromItem=function(e,t){},i.prototype.convertValue=function(e,t){return ns(e,t)},i})();function YO(i,e){var t=new qO,n=i.data,r=t.sourceFormat=i.sourceFormat,o=i.startIndex,a="";i.seriesLayoutBy!==Oi&&Zt(a);var s=[],l={},c=i.dimensionsDefine;if(c)D(c,function(v,_){var y=v.name,w={index:_,name:y,displayName:v.displayName};if(s.push(w),y!=null){var x="";Nt(l,y)&&Zt(x),l[y]=w}});else for(var d=0;d65535?JO:eA}function os(){return[1/0,-1/0]}function tA(i){var e=i.constructor;return e===Array?i.slice():new e(i)}function W1(i,e,t,n,r){var o=j1[t||"float"];if(r){var a=i[e],s=a&&a.length;if(s!==n){for(var l=new o(n),c=0;c_[1]&&(_[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},i.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,o=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,c=J(a,function(w){return w.property}),d=0;dy[1]&&(y[1]=_)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},i.prototype.count=function(){return this._count},i.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||ee)o=a-1;else return a}return-1},i.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var o=0;o=u&&w=u&&w=M&&T=u&&we[V][1])&&(N=!1)}N&&(l[c++]=t.getRawIndex(y))}return cy[1]&&(y[1]=_)}}}},i.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks,o=r[e],a=this.count(),s=0,l=Math.floor(1/t),c=this.getRawIndex(0),d,u,p,h=new(rs(this._rawCount))(Math.min((Math.ceil(a/l)+2)*2,a));h[s++]=c;for(var f=1;fd&&(d=u,p=M)}F>0&&Fs&&(v=s-d);for(var _=0;_f&&(f=w,h=d+_)}var x=this.getRawIndex(u),M=this.getRawIndex(h);ud-f&&(l=d-f,s.length=l);for(var v=0;vu[1]&&(u[1]=y),p[h++]=w}return o._count=h,o._indices=p,o._updateGetRawIdx(),o},i.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,o=0,a=this.count();ol&&(l=u)}return a=[s,l],this._extent[e]=a,a},i.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,o=0;o=0?this._indices[e]:-1},i.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},i.internalField=(function(){function e(t,n,r,o){return ns(t[o],this._dimensions[o])}vg={arrayRows:e,objectRows:function(t,n,r,o){return ns(t[n],this._dimensions[o])},keyedColumns:e,original:function(t,n,r,o){var a=t&&(t.value==null?t:t.value);return ns(a instanceof Array?a[o]:a,this._dimensions[o])},typedArray:function(t,n,r,o){return t[o]}}})(),i})(),El=iA;var Y1=(function(){function i(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return i.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},i.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},i.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},i.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},i.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,o;if(Hd(e)){var a=e,s=void 0,l=void 0,c=void 0;if(n){var d=t[0];d.prepareSource(),c=d.getSource(),s=c.data,l=c.sourceFormat,o=[d._getVersionSign()]}else s=a.get("data",!0),l=ct(s)?Ii:St,o=[];var u=this._getSourceMetaRawOption()||{},p=c&&c.metaRawOption||{},h=Ee(u.seriesLayoutBy,p.seriesLayoutBy)||null,f=Ee(u.sourceHeader,p.sourceHeader),v=Ee(u.dimensions,p.dimensions),_=h!==p.seriesLayoutBy||!!f!=!!p.sourceHeader||v;r=_?[Tl(s,{seriesLayoutBy:h,sourceHeader:f,dimensions:v},l)]:[]}else{var y=e;if(n){var w=this._applyTransform(t);r=w.sourceList,o=w.upstreamSignList}else{var x=y.get("source",!0);r=[Tl(x,this._getSourceMetaRawOption(),null)],o=[]}}this._setLocalSource(r,o)},i.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),r=t.get("fromTransformResult",!0);if(r!=null){var o="";e.length!==1&&q1(o)}var a,s=[],l=[];return D(e,function(c){c.prepareSource();var d=c.getSource(r||0),u="";r!=null&&!d&&q1(u),s.push(d),l.push(c._getVersionSign())}),n?a=H1(n,s,{datasetIndex:t.componentIndex}):r!=null&&(a=[I1(s[0])]),{sourceList:a,upstreamSignList:l}},i.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!i.noHeader;return D(i.blocks,function(r){var o=X1(r);o>=e&&(e=o+ +(n&&(!o||yg(r)&&!r.noHeader)))}),e}return 0}function aA(i,e,t,n){var r=e.noHeader,o=lA(X1(e)),a=[],s=e.blocks||[];Ct(!s||Q(s)),s=s||[];var l=i.orderMode;if(e.sortBlocks&&l){s=s.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Nt(c,l)){var d=new V1(c[l],null);s.sort(function(v,_){return d.evaluate(v.sortParam,_.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(v,_){var y=e.valueFormatter,w=$1(v)(y?q(q({},i),{valueFormatter:y}):i,v,_>0?o.html:0,n);w!=null&&a.push(w)});var u=i.renderMode==="richText"?a.join(o.richText):bg(n,a.join(""),r?t:o.html);if(r)return u;var p=wd(e.header,"ordinal",i.useUTC),h=K1(n,i.renderMode).nameStyle,f=Z1(n);return i.renderMode==="richText"?Q1(i,p,h)+o.richText+u:bg(n,''+Rt(p)+"
"+u,t)}function sA(i,e,t,n){var r=i.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,c=i.useUTC,d=e.valueFormatter||i.valueFormatter||function(M){return M=Q(M)?M:[M],J(M,function(S,T){return wd(S,Q(h)?h[T]:h,c)})};if(!(o&&a)){var u=s?"":i.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||_i.color.secondary,r),p=o?"":wd(l,"ordinal",c),h=e.valueType,f=a?[]:d(e.value,e.dataIndex),v=!s||!o,_=!s&&o,y=K1(n,r),w=y.nameStyle,x=y.valueStyle;return r==="richText"?(s?"":u)+(o?"":Q1(i,p,w))+(a?"":dA(i,f,v,_,x)):bg(n,(s?"":u)+(o?"":cA(p,!s,w))+(a?"":uA(f,v,_,x)),t)}}function o8(i,e,t,n,r,o){if(i){var a=$1(i),s={useUTC:r,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:i.valueFormatter};return a(s,i,0,o)}}function lA(i){return{html:rA[i],richText:oA[i]}}function bg(i,e,t){var n='
',r="margin: "+t+"px 0 0",o=Z1(i);return''+e+n+"
"}function cA(i,e,t){var n=e?"margin-left:2px":"";return''+Rt(i)+" "}function uA(i,e,t,n){var r=t?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return i=Q(i)?i:[i],''+J(i,function(a){return Rt(a)}).join(" ")+" "}function Q1(i,e,t){return i.markupStyleCreator.wrapRichTextStyle(e,t)}function dA(i,e,t,n,r){var o=[r],a=n?10:20;return t&&o.push({padding:[0,0,0,a],align:"right"}),i.markupStyleCreator.wrapRichTextStyle(Q(e)?e.join(" "):e,o)}function J1(i,e){var t=i.getData().getItemVisual(e,"style"),n=t[i.visualDrawType];return i1(n)}function a8(i,e){var t=i.get("padding");return t??(e==="richText"?[8,10]:10)}var s8=(function(){function i(){this.richTextStyles={},this._nextStyleNameId=ku()}return i.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},i.prototype.makeTooltipMarker=function(e,t,n){var r=n==="richText"?this._generateStyleName():null,o=Cd({color:t,type:e,renderMode:n,markerId:r});return te(o)?o:(this.richTextStyles[r]=o.style,o.content)},i.prototype.wrapRichTextStyle=function(e,t){var n={};Q(t)?D(t,function(o){return q(n,o)}):q(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},i})();function eM(i){var e=i.series,t=i.dataIndex,n=i.multipleSeries,r=e.getData(),o=r.mapDimensionsAll("defaultedTooltip"),a=o.length,s=e.getRawValue(t),l=Q(s),c=J1(e,t),d,u,p,h;if(a>1||l&&!a){var f=pA(s,e,t,o,c);d=f.inlineValues,u=f.inlineValueTypes,p=f.blocks,h=f.inlineValues[0]}else if(a){var v=r.getDimensionInfo(o[0]);h=d=is(r,t,o[0]),u=v.type}else h=d=l?s[0]:s;var _=Lu(e),y=_&&e.name||"",w=r.getName(t),x=n?y:w;return Gd("section",{header:y,noHeader:n||!_,sortParam:h,blocks:[Gd("nameValue",{markerType:"item",markerColor:c,name:x,noName:!Yt(x),value:d,valueType:u,dataIndex:t})].concat(p||[])})}function pA(i,e,t,n,r){var o=e.getData(),a=qt(i,function(u,p,h){var f=o.getDimensionInfo(h);return u=u||f&&f.tooltip!==!1&&f.displayName!=null},!1),s=[],l=[],c=[];n.length?D(n,function(u){d(is(o,t,u),u)}):D(i,d);function d(u,p){var h=o.getDimensionInfo(p);!h||h.otherDims.tooltip===!1||(a?c.push(Gd("nameValue",{markerType:"subItem",markerColor:r,name:h.displayName,value:u,valueType:h.type})):(s.push(u),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:c}}var Fr=Qe();function Wd(i,e){return i.getName(e)||i.getId(e)}var hA="__universalTransitionEnabled",jd=(function(i){lt(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,r){this.seriesIndex=this.componentIndex,this.dataTask=Rr({count:mA,reset:gA}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,r);var o=Fr(this).sourceManager=new Y1(this);o.prepareSource();var a=this.getInitialData(t,r);iM(a,this),this.dataTask.context.data=a,Fr(this).dataBeforeProcessed=a,tM(this),this._initSelectedMapFromData(a)},e.prototype.mergeDefaultAndTheme=function(t,n){var r=$a(this),o=r?Ed(t):{},a=this.subType;rt.hasClass(a)&&(a+="Series"),Xe(t,n.getTheme().get(this.subType)),Xe(t,this.getDefaultOption()),Pf(t,"label",["show"]),this.fillDataTextStyle(t.data),r&&Xa(t,o,r)},e.prototype.mergeOption=function(t,n){t=Xe(this.option,t,!0),this.fillDataTextStyle(t.data);var r=$a(this);r&&Xa(this.option,t,r);var o=Fr(this).sourceManager;o.dirty(),o.prepareSource();var a=this.getInitialData(t,n);iM(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,Fr(this).dataBeforeProcessed=a,tM(this),this._initSelectedMapFromData(a)},e.prototype.fillDataTextStyle=function(t){if(t&&!ct(t))for(var n=["show"],r=0;r=0&&pthis.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,r){var o=this.ecModel,a=Cl.prototype.getColorFromPalette.call(this,t,n,r);return a||(a=o.getColorFromPalette(t,n,r)),a},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var r=this.option.selectedMap;if(r){var o=this.option.selectedMode,a=this.getData(n);if(o==="series"||r==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&r.push(a)}return r},e.prototype.isSelected=function(t,n){var r=this.option.selectedMap;if(!r)return!1;var o=this.getData(n);return(r==="all"||r[Wd(o,t)])&&!o.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[hA])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var r,o,a=this.option,s=a.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")a.selectedMap="all";else if(s==="multiple"){ne(a.selectedMap)||(a.selectedMap={});for(var c=a.selectedMap,d=0;d0&&this._innerSelect(t,n)}},e.registerClass=function(t){return rt.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(rt);jt(jd,R1);jt(jd,Cl);Eu(jd,rt);function tM(i){var e=i.name;Lu(i)||(i.name=fA(i)||e)}function fA(i){var e=i.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return D(t,function(r){var o=e.getDimensionInfo(r);o.displayName&&n.push(o.displayName)}),n.join(" ")}function mA(i){return i.model.getRawData().count()}function gA(i){var e=i.model;return e.setData(e.getRawData().cloneShallow()),vA}function vA(i,e){e.outputData&&i.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function iM(i,e){D(kh(i.CHANGABLE_METHODS,i.DOWNSAMPLE_METHODS),function(t){i.wrapMethod(t,bn(_A,e))})}function _A(i,e){var t=wg(i);return t&&t.setOutputEnd((e||this).count()),e}function wg(i){var e=(i.ecModel||{}).scheduler,t=e&&e.getPipeline(i.uid);if(t){var n=t.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(i.uid))}return n}}var Nn=jd;var xg=(function(){function i(){this.group=new ji,this.uid=Nr("viewComponent")}return i.prototype.init=function(e,t){},i.prototype.render=function(e,t,n,r){},i.prototype.dispose=function(e,t){},i.prototype.updateView=function(e,t,n,r){},i.prototype.updateLayout=function(e,t,n,r){},i.prototype.updateVisual=function(e,t,n,r){},i.prototype.toggleBlurSeries=function(e,t,n){},i.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},i})();Fa(xg);Er(xg);var nr=xg;function Pl(){var i=Qe();return function(e){var t=i(e),n=e.pipelineContext,r=!!t.large,o=!!t.progressiveRender,a=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(r!==a||o!==s)&&"reset"}}var oM=Qe(),yA=Pl(),Cg=(function(){function i(){this.group=new ji,this.uid=Nr("viewChart"),this.renderTask=Rr({plan:bA,reset:wA}),this.renderTask.context={view:this}}return i.prototype.init=function(e,t){},i.prototype.render=function(e,t,n,r){},i.prototype.highlight=function(e,t,n,r){var o=e.getData(r&&r.dataType);o&&rM(o,r,"emphasis")},i.prototype.downplay=function(e,t,n,r){var o=e.getData(r&&r.dataType);o&&rM(o,r,"normal")},i.prototype.remove=function(e,t){this.group.removeAll()},i.prototype.dispose=function(e,t){},i.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},i.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},i.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},i.prototype.eachRendered=function(e){Nm(this.group,e)},i.markUpdateMethod=function(e,t){oM(e).updateMethod=t},i.protoInitialize=(function(){var e=i.prototype;e.type="chart"})(),i})();function nM(i,e,t){i&&cl(i)&&(e==="emphasis"?sl:ll)(i,t)}function rM(i,e,t){var n=bo(i,e),r=e&&e.highlightKey!=null?qx(e.highlightKey):null;n!=null?D(st(n),function(o){nM(i.getItemGraphicEl(o),t,r)}):i.eachItemGraphicEl(function(o){nM(o,t,r)})}Fa(Cg,["dispose"]);Er(Cg);function bA(i){return yA(i.model)}function wA(i){var e=i.model,t=i.ecModel,n=i.api,r=i.payload,o=e.pipelineContext.progressiveRender,a=i.view,s=r&&oM(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return l!=="render"&&a[l](e,t,n,r),xA[l]}var xA={incrementalPrepareRender:{progress:function(i,e){e.view.incrementalRender(i,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(i,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},vn=Cg;var qd="\0__throttleOriginMethod",aM="\0__throttleRate",sM="\0__throttleType";function Dl(i,e,t){var n,r=0,o=0,a=null,s,l,c,d;e=e||0;function u(){o=new Date().getTime(),a=null,i.apply(l,c||[])}var p=function(){for(var h=[],f=0;f=0?u():a=setTimeout(u,-s),r=n};return p.clear=function(){a&&(clearTimeout(a),a=null)},p.debounceNextCall=function(h){d=h},p}function B8(i,e,t,n){var r=i[e];if(r){var o=r[qd]||r,a=r[sM],s=r[aM];if(s!==t||a!==n){if(t==null||!n)return i[e]=o;r=i[e]=Dl(o,t,n==="debounce"),r[qd]=o,r[sM]=n,r[aM]=t}return r}}function R8(i,e){var t=i[e];t&&t[qd]&&(t.clear&&t.clear(),i[e]=t[qd])}var lM=Qe(),cM={itemStyle:Sn(Um,!0),lineStyle:Sn(zm,!0)},CA={lineStyle:"stroke",itemStyle:"fill"};function uM(i,e){var t=i.visualStyleMapper||cM[e];return t||(console.warn("Unknown style type '"+e+"'."),cM.itemStyle)}function dM(i,e){var t=i.visualDrawType||CA[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var pM={createOnAllSeries:!0,performRawSeries:!0,reset:function(i,e){var t=i.getData(),n=i.visualStyleAccessPath||"itemStyle",r=i.getModel(n),o=uM(i,n),a=o(r),s=r.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=dM(i,n),c=a[l],d=ue(c)?c:null,u=a.fill==="auto"||a.stroke==="auto";if(!a[l]||d||u){var p=i.getColorFromPalette(i.name,null,e.getSeriesCount());a[l]||(a[l]=p,t.setVisual("colorFromPalette",!0)),a.fill=a.fill==="auto"||ue(a.fill)?p:a.fill,a.stroke=a.stroke==="auto"||ue(a.stroke)?p:a.stroke}if(t.setVisual("style",a),t.setVisual("drawType",l),!e.isSeriesFiltered(i)&&d)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,f){var v=i.getDataParams(f),_=q({},a);_[l]=d(v),h.setItemVisual(f,"style",_)}}}},Il=new vt,hM={createOnAllSeries:!0,performRawSeries:!0,reset:function(i,e){if(!(i.ignoreStyleOnData||e.isSeriesFiltered(i))){var t=i.getData(),n=i.visualStyleAccessPath||"itemStyle",r=uM(i,n),o=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(a,s){var l=a.getRawDataItem(s);if(l&&l[n]){Il.option=l[n];var c=r(Il),d=a.ensureUniqueItemVisual(s,"style");q(d,c),Il.option.decal&&(a.setItemVisual(s,"decal",Il.option.decal),Il.option.decal.dirty=!0),o in c&&a.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},fM={performRawSeries:!0,overallReset:function(i){var e=ce();i.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+n,o=e.get(r);o||(o={},e.set(r,o)),lM(t).scope=o}}),i.eachSeries(function(t){if(!(t.isColorBySeries()||i.isSeriesFiltered(t))){var n=t.getRawData(),r={},o=t.getData(),a=lM(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=dM(t,s);o.each(function(c){var d=o.getRawIndex(c);r[d]=c}),n.each(function(c){var d=r[c],u=o.getItemVisual(d,"colorFromPalette");if(u){var p=o.ensureUniqueItemVisual(d,"style"),h=n.getName(c)||c+"",f=n.count();p[l]=t.getColorFromPalette(h,a,f)}})}})}};var Yd=Math.PI;function Mg(i,e){e=e||{},We(e,{text:"loading",textColor:_i.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:_i.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new ji,n=new Kt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var r=new Ei({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),o=new Kt({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(o);var a;return e.showSpinner&&(a=new Oo({shape:{startAngle:-Yd/2,endAngle:-Yd/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),a.animateShape(!0).when(1e3,{endAngle:Yd*3/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:Yd*3/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var s=r.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,c=(i.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),d=i.getHeight()/2;e.showSpinner&&a.setShape({cx:c,cy:d}),o.setShape({x:c-l,y:d-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},t.resize(),t}var MA=(function(){function i(e,t,n,r){this._stageTaskMap=ce(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return i.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var r=n.overallTask;r&&r.dirty()})},i.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,o=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex,a=o?n.step:null,s=r&&r.modDataCount,l=s!=null?Math.ceil(s/a):null;return{step:a,modBy:l,modDataCount:s}}},i.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},i.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData(),o=r.count(),a=n.progressiveEnabled&&t.incrementalPrepareRender&&o>=n.threshold,s=e.get("large")&&o>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?o:null;e.pipelineContext=n.context={progressiveRender:a,modDataCount:l,large:s}},i.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=ce();e.eachSeries(function(r){var o=r.getProgressive(),a=r.uid;n.set(a,{id:a,head:null,tail:null,threshold:r.getProgressiveThreshold(),progressiveEnabled:o&&!(r.preventIncremental&&r.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),t._pipe(r,r.dataTask)})},i.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;D(this._allHandlers,function(r){var o=e.get(r.uid)||e.set(r.uid,{}),a="";Ct(!(r.reset&&r.overallReset),a),r.reset&&this._createSeriesStageTask(r,o,t,n),r.overallReset&&this._createOverallStageTask(r,o,t,n)},this)},i.prototype.prepareView=function(e,t,n,r){var o=e.renderTask,a=o.context;a.model=t,a.ecModel=n,a.api=r,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},i.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},i.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},i.prototype._performStageTasks=function(e,t,n,r){r=r||{};var o=!1,a=this;D(e,function(l,c){if(!(r.visualType&&r.visualType!==l.visualType)){var d=a._stageTaskMap.get(l.uid),u=d.seriesTaskMap,p=d.overallTask;if(p){var h,f=p.agentStubMap;f.each(function(_){s(r,_)&&(_.dirty(),h=!0)}),h&&p.dirty(),a.updatePayload(p,n);var v=a.getPerformArgs(p,r.block);f.each(function(_){_.perform(v)}),p.perform(v)&&(o=!0)}else u&&u.each(function(_,y){s(r,_)&&_.dirty();var w=a.getPerformArgs(_,r.block);w.skip=!l.performRawSeries&&t.isSeriesFiltered(_.context.model),a.updatePayload(_,n),_.perform(w)&&(o=!0)})}});function s(l,c){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(c.__pipeline.id))}this.unfinished=o||this.unfinished},i.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},i.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},i.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},i.prototype._createSeriesStageTask=function(e,t,n,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=ce(),l=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(d):l?n.eachRawSeriesByType(l,d):c&&c(n,r).each(d);function d(u){var p=u.uid,h=s.set(p,a&&a.get(p)||Rr({plan:EA,reset:PA,count:IA}));h.context={model:u,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(u,h)}},i.prototype._createOverallStageTask=function(e,t,n,r){var o=this,a=t.overallTask=t.overallTask||Rr({reset:kA});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:o};var s=a.agentStubMap,l=a.agentStubMap=ce(),c=e.seriesType,d=e.getTargetSeries,u=!0,p=!1,h="";Ct(!e.createOnAllSeries,h),c?n.eachRawSeriesByType(c,f):d?d(n,r).each(f):(u=!1,D(n.getSeries(),f));function f(v){var _=v.uid,y=l.set(_,s&&s.get(_)||(p=!0,Rr({reset:SA,onDirty:TA})));y.context={model:v,overallProgress:u},y.agent=a,y.__block=u,o._pipe(v,y)}p&&a.dirty()},i.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},i.wrapStageHandler=function(e,t){return ue(e)&&(e={overallReset:e,seriesType:OA(e)}),e.uid=Nr("stageHandler"),t&&(e.visualType=t),e},i})();function kA(i){i.overallReset(i.ecModel,i.api,i.payload)}function SA(i){return i.overallProgress&&LA}function LA(){this.agent.dirty(),this.getDownstream().dirty()}function TA(){this.agent&&this.agent.dirty()}function EA(i){return i.plan?i.plan(i.model,i.ecModel,i.api,i.payload):null}function PA(i){i.useClearVisual&&i.data.clearAllVisual();var e=i.resetDefines=st(i.reset(i.model,i.ecModel,i.api,i.payload));return e.length>1?J(e,function(t,n){return mM(n)}):DA}var DA=mM(0);function mM(i){return function(e,t){var n=t.data,r=t.resetDefines[i];if(r&&r.dataEach)for(var o=e.start;o0&&h===c.length-p.length){var f=c.slice(0,h);f!=="data"&&(t.mainType=f,t[p.toLowerCase()]=l,d=!0)}}s.hasOwnProperty(c)&&(n[c]=l,d=!0),d||(r[c]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},i.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,o=n.packedEvent,a=n.model,s=n.view;if(!a||!s)return!0;var l=t.cptQuery,c=t.dataQuery;return d(l,a,"mainType")&&d(l,a,"subType")&&d(l,a,"noindex","componentIndex")&&d(l,a,"name")&&d(l,a,"id")&&d(c,o,"name")&&d(c,o,"dataIndex")&&d(c,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,r,o));function d(u,p,h,f){return u[h]==null||p[f||h]===u[h]}},i.prototype.afterTrigger=function(){this.eventInfo=null},i})();var Sg=["symbol","symbolSize","symbolRotate","symbolOffset"],xM=Sg.concat(["symbolKeepAspect"]),CM={createOnAllSeries:!0,performRawSeries:!0,reset:function(i,e){var t=i.getData();if(i.legendIcon&&t.setVisual("legendIcon",i.legendIcon),!i.hasSymbolVisual)return;for(var n={},r={},o=!1,a=0;a=0&&jo(l)?l:.5;var c=i.createRadialGradient(a,s,0,a,s,l);return c}function Tg(i,e,t){for(var n=e.type==="radial"?YA(i,e,t):qA(i,e,t),r=e.colorStops,o=0;o0)?null:i==="dashed"?[4*e,2*e]:i==="dotted"?[e]:Re(i)?[i]:Q(i)?i:null}function Eg(i){var e=i.style,t=e.lineDash&&e.lineWidth>0&&ZA(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var r=e.strokeNoScale&&i.getLineScale?i.getLineScale():1;r&&r!==1&&(t=J(t,function(o){return o/r}),n/=r)}return[t,n]}var KA=new fn(!0);function Xd(i){var e=i.stroke;return!(e==null||e==="none"||!(i.lineWidth>0))}function PM(i){return typeof i=="string"&&i!=="none"}function Qd(i){var e=i.fill;return e!=null&&e!=="none"}function DM(i,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=i.globalAlpha;i.globalAlpha=e.fillOpacity*e.opacity,i.fill(),i.globalAlpha=t}else i.fill()}function IM(i,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=i.globalAlpha;i.globalAlpha=e.strokeOpacity*e.opacity,i.stroke(),i.globalAlpha=t}else i.stroke()}function OM(i,e,t){var n=Bf(e.image,e.__image,t);if(Va(n)){var r=i.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*Uc),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}function $A(i,e,t,n){var r,o=Xd(t),a=Qd(t),s=t.strokePercent,l=s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,r){if(!this[bt]){if(this._disposed){this.id;return}var o,a,s;if(ne(n)&&(r=n.lazyUpdate,o=n.silent,a=n.replaceMerge,s=n.transition,n=n.notMerge),this[bt]=!0,cs(this),!this._model||n){var l=new C1(this._api),c=this._theme,d=this._model=new Ad;d.scheduler=this._scheduler,d.ssr=this._ssr,d.init(null,null,null,c,this._locale,l)}this._model.setOption(t,{replaceMerge:a},Wg);var u={seriesTransition:s,optionChanged:!0};if(r)this[At]={silent:o,updateParams:u},this[bt]=!1,this.getZr().wakeUp();else{try{qo(this),rr.update.call(this,null,u)}catch(p){throw this[At]=null,this[bt]=!1,p}this._ssr||this._zr.flush(),this[At]=null,this[bt]=!1,ss.call(this,o),ls.call(this,o)}}},e.prototype.setTheme=function(t,n){if(!this[bt]){if(this._disposed){this.id;return}var r=this._model;if(r){var o=n&&n.silent,a=null;this[At]&&(o==null&&(o=this[At].silent),a=this[At].updateParams,this[At]=null),this[bt]=!0,cs(this);try{this._updateTheme(t),r.setTheme(this._theme),qo(this),rr.update.call(this,{type:"setTheme"},a)}catch(s){throw this[bt]=!1,s}this[bt]=!1,ss.call(this,o),ls.call(this,o)}}},e.prototype._updateTheme=function(t){te(t)&&(t=hk[t]),t&&(t=Me(t),t&&Bd(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Be.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,n=t.storage.getDisplayList();return D(n,function(r){r.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,r=this._model,o=[],a=this;D(n,function(l){r.eachComponent({mainType:l},function(c){var d=a._componentsMap[c.__viewId];d.group.ignore||(o.push(d),d.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return D(o,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",r=this.group,o=Math.min,a=Math.max,s=1/0;if(lp[r]){var l=s,c=s,d=-s,u=-s,p=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();D(Yo,function(x,M){if(x.group===r){var S=n?x.getZr().painter.getSvgDom().innerHTML:x.renderToCanvas(Me(t)),T=x.getDom().getBoundingClientRect();l=o(T.left,l),c=o(T.top,c),d=a(T.right,d),u=a(T.bottom,u),p.push({dom:S,left:T.left,top:T.top})}}),l*=h,c*=h,d*=h,u*=h;var f=d-l,v=u-c,_=Wt.createCanvas(),y=wu(_,{renderer:n?"svg":"canvas"});if(y.resize({width:f,height:v}),n){var w="";return D(p,function(x){var M=x.left-l,S=x.top-c;w+=''+x.dom+" "}),y.painter.getSvgRoot().innerHTML=w,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new Kt({shape:{x:0,y:0,width:f,height:v},style:{fill:t.connectedBackgroundColor}})),D(p,function(x){var M=new Qi({style:{x:x.left*h-l,y:x.top*h-c,image:x.dom}});y.add(M)}),y.refreshImmediately(),_.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n,r){return np(this,"convertToPixel",t,n,r)},e.prototype.convertToLayout=function(t,n,r){return np(this,"convertToLayout",t,n,r)},e.prototype.convertFromPixel=function(t,n,r){return np(this,"convertFromPixel",t,n,r)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var r=this._model,o,a=Tu(r,t);return D(a,function(s,l){l.indexOf("Models")>=0&&D(s,function(c){var d=c.coordinateSystem;if(d&&d.containPoint)o=o||!!d.containPoint(n);else if(l==="seriesModels"){var u=this._chartsMap[c.__viewId];u&&u.containPoint&&(o=o||u.containPoint(n,c))}},this)},this),!!o},e.prototype.getVisual=function(t,n){var r=this._model,o=Tu(r,t,{defaultMainType:"series"}),a=o.seriesModel,s=a.getData(),l=o.hasOwnProperty("dataIndexInside")?o.dataIndexInside:o.hasOwnProperty("dataIndex")?s.indexOfRawIndex(o.dataIndex):null;return l!=null?kM(s,l,n):SM(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;D(CN,function(r){var o=function(a){var s=t.getModel(),l=a.target,c,d=r==="globalout";if(d?c={}:l&&Nl(l,function(v){var _=It(v);if(_&&_.dataIndex!=null){var y=_.dataModel||s.getSeriesByIndex(_.seriesIndex);return c=y&&y.getDataParams(_.dataIndex,_.dataType,l)||{},!0}else if(_.eventData)return c=q({},_.eventData),!0},!0),c){var u=c.componentType,p=c.componentIndex;(u==="markLine"||u==="markPoint"||u==="markArea")&&(u="series",p=c.seriesIndex);var h=u&&p!=null&&s.getComponent(u,p),f=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];c.event=a,c.type=r,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:c,model:h,view:f},t.trigger(r,c)}};o.zrEventfulCallAtLast=!0,t._zr.on(r,o,t)});var n=this._messageCenter;D(Hg,function(r,o){n.on(o,function(a){t.trigger(o,a)})}),LM(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&Of(this.getDom(),Kg,"");var n=this,r=n._api,o=n._model;D(n._componentsViews,function(a){a.dispose(o,r)}),D(n._chartsViews,function(a){a.dispose(o,r)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Yo[n.id]},e.prototype.resize=function(t){if(!this[bt]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var r=n.resetOption("media"),o=t&&t.silent;this[At]&&(o==null&&(o=this[At].silent),r=!0,this[At]=null),this[bt]=!0,cs(this);try{r&&qo(this),rr.update.call(this,{type:"resize",animation:q({duration:0},t&&t.animation)})}catch(a){throw this[bt]=!1,a}this[bt]=!1,ss.call(this,o),ls.call(this,o)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(ne(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!jg[t]){var r=jg[t](this._api,n),o=this._zr;this._loadingFX=r,o.add(r)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=q({},t);return n.type=Ug[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(ne(n)||(n={silent:!!n}),!!ap[t.type]&&this._model){if(this[bt]){this._pendingActions.push(t);return}var r=n.silent;Vg.call(this,t,r);var o=n.flush;o?this._zr.flush():o!==!1&&Be.browser.weChat&&this._throttledZrFlush(),ss.call(this,r),ls.call(this,r)}},e.prototype.updateLabelLayout=function(){en.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,r=this.getModel(),o=r.getSeriesByIndex(n);o.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){qo=function(u){var p=u._scheduler;p.restorePipelines(u._model),p.prepareStageTasks(),Rg(u,!0),Rg(u,!1),p.plan()},Rg=function(u,p){for(var h=u._model,f=u._scheduler,v=p?u._componentsViews:u._chartsViews,_=p?u._componentsMap:u._chartsMap,y=u._zr,w=u._api,x=0;xp.get("hoverLayerThreshold")&&!Be.node&&!Be.worker&&p.eachSeries(function(_){if(!_.preventUsingHoverLayer){var y=u._chartsMap[_.__viewId];y.__alive&&y.eachRendered(function(w){w.states.emphasis&&(w.states.emphasis.hoverLayer=!0)})}})}function s(u,p){var h=u.get("blendMode")||null;p.eachRendered(function(f){f.isGroup||(f.style.blend=h)})}function l(u,p){if(!u.preventAutoZ){var h=Bm(u);p.eachRendered(function(f){return Rm(f,h.z,h.zlevel),!0})}}function c(u,p){p.eachRendered(function(h){if(!Bo(h)){var f=h.getTextContent(),v=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),f&&f.stateTransition&&(f.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function d(u,p){var h=u.getModel("stateAnimation"),f=u.isAnimationEnabled(),v=h.get("duration"),_=v>0?{duration:v,delay:h.get("delay"),easing:h.get("easing")}:null;p.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Bo(y))return;if(y instanceof Le&&Yx(y),y.__dirty){var w=y.prevStates;w&&y.useStates(w)}if(f){y.stateTransition=_;var x=y.getTextContent(),M=y.getTextGuideLine();x&&(x.stateTransition=_),M&&(M.stateTransition=_)}y.__dirty&&o(y)}})}tk=function(u){return new((function(p){lt(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return u._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(f){for(;f;){var v=f.__ecComponentInfo;if(v!=null)return u._model.getComponent(v.mainType,v.index);f=f.parent}},h.prototype.enterEmphasis=function(f,v){sl(f,v),tn(u)},h.prototype.leaveEmphasis=function(f,v){ll(f,v),tn(u)},h.prototype.enterBlur=function(f){Fx(f),tn(u)},h.prototype.leaveBlur=function(f){cm(f),tn(u)},h.prototype.enterSelect=function(f){um(f),tn(u)},h.prototype.leaveSelect=function(f){dm(f),tn(u)},h.prototype.getModel=function(){return u.getModel()},h.prototype.getViewOfComponentModel=function(f){return u.getViewOfComponentModel(f)},h.prototype.getViewOfSeriesModel=function(f){return u.getViewOfSeriesModel(f)},h.prototype.getMainProcessVersion=function(){return u[tp]},h})(Nd))(u)},pk=function(u){function p(h,f){for(var v=0;v=0)){nk.push(t);var o=kg.wrapStageHandler(t,r);o.__prio=e,o.__raw=t,i.push(o)}}function pp(i,e){jg[i]=e}function ON(i){Rc({createCanvas:i})}function nv(i,e,t){var n=Ag("registerMap");n&&n(i,e,t)}function AN(i){var e=Ag("getMap");return e&&e(i)}var rv=U1;or(qg,pM);or(cp,hM);or(cp,fM);or(qg,CM);or(cp,MM);or(ak,Og);up(Bd);dp(pN,cg);pp("default",Mg);Vr({type:Ar,event:Ar,update:Ar},Bt);Vr({type:rl,event:rl,update:rl},Bt);Vr({type:ol,event:Fu,update:ol,action:Bt,refineEvent:ov,publishNonRefinedEvent:!0});Vr({type:Ru,event:Fu,update:Ru,action:Bt,refineEvent:ov,publishNonRefinedEvent:!0});Vr({type:al,event:Fu,update:al,action:Bt,refineEvent:ov,publishNonRefinedEvent:!0});function ov(i,e,t,n){return{eventContent:{selected:Wx(t),isFromClick:e.isFromClick||!1}}}Xg("default",{});Xg("dark",bM);var NN={};var mk=[],BN={registerPreprocessor:up,registerProcessor:dp,registerPostInit:Qg,registerPostUpdate:Jg,registerUpdateLifecycle:Rl,registerAction:Vr,registerCoordinateSystem:ev,registerLayout:tv,registerVisual:or,registerTransform:rv,registerLoading:pp,registerMap:nv,registerImpl:KM,PRIORITY:Yg,ComponentModel:rt,ComponentView:nr,SeriesModel:Nn,ChartView:vn,registerComponentModel:function(i){rt.registerClass(i)},registerComponentView:function(i){nr.registerClass(i)},registerSeriesModel:function(i){Nn.registerClass(i)},registerChartView:function(i){vn.registerClass(i)},registerCustomSeries:function(i,e){ep(i,e)},registerSubTypeDefaulter:function(i,e){rt.registerSubTypeDefaulter(i,e)},registerPainter:function(i,e){kf(i,e)}};function av(i){if(Q(i)){D(i,function(e){av(e)});return}Oe(mk,i)>=0||(mk.push(i),ue(i)&&(i={install:i}),i.install(BN))}function Fl(i){return i==null?0:i.length||1}function gk(i){return i}var RN=(function(){function i(e,t,n,r,o,a){this._old=e,this._new=t,this._oldKeyGetter=n||gk,this._newKeyGetter=r||gk,this.context=o,this._diffModeMultiple=a==="multiple"}return i.prototype.add=function(e){return this._add=e,this},i.prototype.update=function(e){return this._update=e,this},i.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},i.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},i.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},i.prototype.remove=function(e){return this._remove=e,this},i.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},i.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),o=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var a=0;a1){var d=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(d,a)}else c===1?(n[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,n)},i.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},o=[],a=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,r,a,"_newKeyGetter");for(var s=0;s1&&p===1)this._updateManyToOne&&this._updateManyToOne(d,c),r[l]=null;else if(u===1&&p>1)this._updateOneToMany&&this._updateOneToMany(d,c),r[l]=null;else if(u===1&&p===1)this._update&&this._update(d,c),r[l]=null;else if(u>1&&p>1)this._updateManyToMany&&this._updateManyToMany(d,c),r[l]=null;else if(u>1)for(var h=0;h1)for(var s=0;s30}var Vl=ne,zr=J,GN=typeof Int32Array>"u"?Array:Int32Array,WN="e\0\0",bk=-1,jN=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],qN=["_approximateExtent"],wk,fp,zl,Ul,pv,Hl,hv,YN=(function(){function i(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,r=!1;hp(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var o={},a=[],s={},l=!1,c={},d=0;d=t)){var n=this._store,r=n.getProvider();this._updateOrdinalMeta();var o=this._nameList,a=this._idList,s=r.getSource().sourceFormat,l=s===St;if(l&&!r.pure)for(var c=[],d=e;d0},i.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var o=r[t];return o==null&&(o=this.getVisual(t),Q(o)?o=o.slice():Vl(o)&&(o=q({},o)),r[t]=o),o},i.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Vl(t)?q(r,t):r[t]=n},i.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},i.prototype.setLayout=function(e,t){Vl(e)?q(this._layout,e):this._layout[e]=t},i.prototype.getLayout=function(e){return this._layout[e]},i.prototype.getItemLayout=function(e){return this._itemLayouts[e]},i.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?q(this._itemLayouts[e]||{},t):t},i.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},i.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;Lx(n,this.dataType,e,t),this._graphicEls[e]=t},i.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},i.prototype.eachItemGraphicEl=function(e,t){D(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},i.prototype.cloneShallow=function(e){return e||(e=new i(this._schema?this._schema:zr(this.dimensions,this._getDimInfo,this),this.hostModel)),pv(e,this),e._store=this._store,e},i.prototype.wrapMethod=function(e,t){var n=this[e];ue(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var r=n.apply(this,arguments);return t.apply(this,[r].concat(Ds(arguments)))})},i.internalField=(function(){wk=function(e){var t=e._invertedIndicesMap;D(t,function(n,r){var o=e._dimInfos[r],a=o.ordinalMeta,s=e._store;if(a){n=t[r]=new GN(a.categories.length);for(var l=0;l1&&(l+="__ec__"+d),r[t]=l}}})(),i})(),mp=YN;var xv={};ki(xv,{createDimensions:()=>xk,createList:()=>OB,createScale:()=>NB,createSymbol:()=>Kd,createTextStyle:()=>RB,dataStack:()=>AB,enableHoverEmphasis:()=>fm,getECData:()=>It,getLayoutRect:()=>Td,mixinAxisModelCommonMethods:()=>BB});function xk(i,e){return gp(i,e).dimensions}function gp(i,e){es(i)||(i=ts(i)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||i.dimensionsDefine||[],r=ce(),o=[],a=KN(i,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&dv(a),l=n===i.dimensionsDefine,c=l?uv(i):cv(n),d=e.encodeDefine;!d&&e.encodeDefaulter&&(d=e.encodeDefaulter(i,a));for(var u=ce(d),p=new _g(a),h=0;h0&&(n.name=r+(o-1)),o++,e.set(r,o)}}function KN(i,e,t,n){var r=Math.max(i.dimensionsDetectedCount||1,e.length,t.length,n||0);return D(e,function(o){var a;ne(o)&&(a=o.dimsDef)&&(r=Math.max(r,a.length))}),r}function $N(i,e,t){if(t||e.hasKey(i)){for(var n=0;e.hasKey(i+n);)n++;i+=n}return e.set(i,!0),i}var XN=(function(){function i(e){this.coordSysDims=[],this.axisMap=ce(),this.categoryAxisMap=ce(),this.coordSysName=e}return i})();function Ck(i){var e=i.get("coordinateSystem"),t=new XN(e),n=QN[e];if(n)return n(i,t,t.axisMap,t.categoryAxisMap),t}var QN={cartesian2d:function(i,e,t,n){var r=i.getReferringComponents("xAxis",kn).models[0],o=i.getReferringComponents("yAxis",kn).models[0];e.coordSysDims=["x","y"],t.set("x",r),t.set("y",o),ds(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),ds(o)&&(n.set("y",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(i,e,t,n){var r=i.getReferringComponents("singleAxis",kn).models[0];e.coordSysDims=["single"],t.set("single",r),ds(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(i,e,t,n){var r=i.getReferringComponents("polar",kn).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",o),t.set("angle",a),ds(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),ds(a)&&(n.set("angle",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(i,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(i,e,t,n){var r=i.ecModel,o=r.getComponent("parallel",i.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();D(o.parallelAxisIndex,function(s,l){var c=r.getComponent("parallelAxis",s),d=a[l];t.set(d,c),ds(c)&&(n.set(d,c),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(i,e,t,n){var r=i.getReferringComponents("matrix",kn).models[0];e.coordSysDims=["x","y"];var o=r.getDimensionModel("x"),a=r.getDimensionModel("y");t.set("x",o),t.set("y",a),n.set("x",o),n.set("y",a)}};function ds(i){return i.get("type")==="category"}function vp(i,e,t){t=t||{};var n=t.byIndex,r=t.stackedCoordDimension,o,a,s;JN(e)?o=e:(a=e.schema,o=a.dimensions,s=e.store);var l=!!(i&&i.get("stack")),c,d,u,p;if(D(o,function(w,x){te(w)&&(o[x]=w={name:w}),l&&!w.isExtraCoord&&(!n&&!c&&w.ordinalMeta&&(c=w),!d&&w.type!=="ordinal"&&w.type!=="time"&&(!r||r===w.coordDim)&&(d=w))}),d&&!n&&!c&&(n=!0),d){u="__\0ecstackresult_"+i.id,p="__\0ecstackedover_"+i.id,c&&(c.createInvertedIndices=!0);var h=d.coordDim,f=d.type,v=0;D(o,function(w){w.coordDim===h&&v++});var _={name:u,coordDim:h,coordDimIndex:v,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},y={name:p,coordDim:p,coordDimIndex:v+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};a?(s&&(_.storeDimIndex=s.ensureCalculationDimension(p,f),y.storeDimIndex=s.ensureCalculationDimension(u,f)),a.appendCalculationDimension(_),a.appendCalculationDimension(y)):(o.push(_),o.push(y))}return{stackedDimension:d&&d.name,stackedByDimension:c&&c.name,isStackedByIndex:n,stackedOverDimension:p,stackResultDimension:u}}function JN(i){return!hp(i.schema)}function Gl(i,e){return!!e&&e===i.getCalculationInfo("stackedDimension")}function _p(i,e){return Gl(i,e)?i.getCalculationInfo("stackResultDimension"):e}function eB(i,e){var t=i.get("coordinateSystem"),n=Ka.get(t),r;return e&&e.coordSysDims&&(r=J(e.coordSysDims,function(o){var a={name:o},s=e.axisMap.get(o);if(s){var l=s.get("type");a.type=yk(l)}return a})),r||(r=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),r}function tB(i,e,t){var n,r;return t&&D(i,function(o,a){var s=o.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=a),o.ordinalMeta=l.getOrdinalMeta(),e&&(o.createInvertedIndices=!0)),o.otherDims.itemName!=null&&(r=!0)}),!r&&n!=null&&(i[n].otherDims.itemName=0),n}function iB(i,e,t){t=t||{};var n=e.getSourceManager(),r,o=!1;i?(o=!0,r=ts(i)):(r=n.getSource(),o=r.sourceFormat===St);var a=Ck(e),s=eB(e,a),l=t.useEncodeDefaulter,c=ue(l)?l:l?bn(p1,s,e):null,d={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:c,canOmitUnusedDimensions:!o},u=gp(r,d),p=tB(u.dimensions,t.createInvertedIndices,a),h=o?null:n.getSharedDataStore(u),f=vp(e,{schema:u,store:h}),v=new mp(u,e);v.setCalculationInfo(f);var _=p!=null&&nB(r)?function(y,w,x,M){return M===p?x:this.defaultDimValueGetter(y,w,x,M)}:null;return v.hasItemOption=!1,v.initData(o?r:h,null,_),v}function nB(i){if(i.sourceFormat===St){var e=rB(i.data||[]);return!Q(Xn(e))}}function rB(i){for(var e=0;er&&(a=o.interval=r);var s=o.intervalPrecision=Ur(a),l=o.niceTickExtent=[Ft(Math.ceil(i[0]/a)*a,s),Ft(Math.floor(i[1]/a)*a,s)];return oB(l,i),o}function Gj(i){var e=Math.pow(10,Aa(i)),t=i/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Ft(t*e)}function Ur(i){return li(i)+2}function kk(i,e,t){i[e]=Math.max(Math.min(i[e],t[1]),t[0])}function oB(i,e){!isFinite(i[0])&&(i[0]=e[0]),!isFinite(i[1])&&(i[1]=e[1]),kk(i,0,e),kk(i,1,e),i[0]>i[1]&&(i[0]=i[1])}function ps(i,e){return i>=e[0]&&it[1]?e[1]:t[1])},i.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},i.prototype.getExtent=function(){return this._extent.slice()},i.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},i.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},i.prototype.setBreaksFromOption=function(e){var t=kt();t&&this._innerSetBreak(t.parseAxisBreakOption(e,Ye(this.parse,this)))},i.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},i.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},i.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},i.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},i.prototype.isInExtentRange=function(e){return this._extent[0]=e},i.prototype.isBlank=function(){return this._isBlank},i.prototype.setBlank=function(e){this._isBlank=e},i})();Er(Pk);var nn=Pk;var aB=0,sB=(function(){function i(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++aB,this._onCollect=e.onCollect}return i.createByAxisModel=function(e){var t=e.option,n=t.data,r=n&&J(n,lB);return new i({categories:r,needCollect:!r,deduplication:t.dedplication!==!1})},i.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},i.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!te(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},i.prototype._getOrCreateMap=function(){return this._map||(this._map=ce(this.categories))},i})();function lB(i){return ne(i)&&i.value!=null?i.value:i+""}var gv=sB;var Dk=(function(i){lt(e,i);function e(t){var n=i.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new gv({})),Q(r)&&(r=new gv({categories:J(r,function(o){return ne(o)?o.value:o})})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:te(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return ps(t,this._extent)&&t>=0&&t=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(nn);nn.registerClass(Dk);var Ik=Dk;var Hr=Ft,Ok=(function(i){lt(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return ps(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ur(t)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,r=this._extent,o=this._niceExtent,a=this._intervalPrecision,s=kt(),l=[];if(!n)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var c=1e4;r[0]=0&&(u=Hr(u+p*n,a))}if(l.length>0&&u===l[l.length-1].value)break;if(l.length>c)return[]}var h=l.length?l[l.length-1].value:o[1];return r[1]>h&&(t.expandToNicedExtent?l.push({value:Hr(h+n,a)}):l.push({value:r[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(f){return f.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks({expandToNicedExtent:!0}),r=[],o=this.getExtent(),a=1;ao[0]&&f0&&(o=o===null?s:Math.min(o,s))}t[n]=o}}return t}function bv(i){var e=dB(i),t=[];return D(i,function(n){var r=n.coordinateSystem,o=r.getBaseAxis(),a=o.getExtent(),s;if(o.type==="category")s=o.getBandWidth();else if(o.type==="value"||o.type==="time"){var l=o.dim+"_"+o.index,c=e[l],d=Math.abs(a[1]-a[0]),u=o.scale.getExtent(),p=Math.abs(u[1]-u[0]);s=c?d/p*c:d}else{var h=n.getData();s=Math.abs(a[1]-a[0])/h.count()}var f=at(n.get("barWidth"),s),v=at(n.get("barMaxWidth"),s),_=at(n.get("barMinWidth")||(Rk(n)?.5:1),s),y=n.get("barGap"),w=n.get("barCategoryGap"),x=n.get("defaultBarGap");t.push({bandWidth:s,barWidth:f,barMaxWidth:v,barMinWidth:_,barGap:y,barCategoryGap:w,defaultBarGap:x,axisKey:_v(o),stackId:vv(n)})}),pB(t)}function pB(i){var e={};D(i,function(n,r){var o=n.axisKey,a=n.bandWidth,s=e[o]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[o]=s;var c=n.stackId;l[c]||s.autoWidthCount++,l[c]=l[c]||{width:0,maxWidth:0};var d=n.barWidth;d&&!l[c].width&&(l[c].width=d,d=Math.min(s.remainedWidth,d),s.remainedWidth-=d);var u=n.barMaxWidth;u&&(l[c].maxWidth=u);var p=n.barMinWidth;p&&(l[c].minWidth=p);var h=n.barGap;h!=null&&(s.gap=h);var f=n.barCategoryGap;f!=null&&(s.categoryGap=f)});var t={};return D(e,function(n,r){t[r]={};var o=n.stacks,a=n.bandWidth,s=n.categoryGap;if(s==null){var l=Pe(o).length;s=Math.max(35-l*4,15)+"%"}var c=at(s,a),d=at(n.gap,1),u=n.remainedWidth,p=n.autoWidthCount,h=(u-c)/(p+(p-1)*d);h=Math.max(h,0),D(o,function(y){var w=y.maxWidth,x=y.minWidth;if(y.width){var M=y.width;w&&(M=Math.min(M,w)),x&&(M=Math.max(M,x)),y.width=M,u-=M+d*M,p--}else{var M=h;w&&wM&&(M=x),M!==h&&(y.width=M,u-=M+d*M,p--)}}),h=(u-c)/(p+(p-1)*d),h=Math.max(h,0);var f=0,v;D(o,function(y,w){y.width||(y.width=h),v=y,f+=y.width*(1+d)}),v&&(f-=v.width*d);var _=-f/2;D(o,function(y,w){t[r][w]=t[r][w]||{bandWidth:a,offset:_,width:y.width},_+=y.width*(1+d)})}),t}function Nk(i,e,t){if(i&&e){var n=i[_v(e)];return n!=null&&t!=null?n[vv(t)]:n}}function pq(i,e){var t=yv(i,e),n=bv(t);D(t,function(r){var o=r.getData(),a=r.coordinateSystem,s=a.getBaseAxis(),l=vv(r),c=n[_v(s)][l],d=c.offset,u=c.width;o.setLayout({bandWidth:c.bandWidth,offset:d,size:u})})}function hq(i){return{seriesType:i,plan:Pl(),reset:function(e){if(Bk(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(o.dim)),s=t.getDimensionIndex(t.mapDimension(r.dim)),l=e.get("showBackground",!0),c=t.mapDimension(o.dim),d=t.getCalculationInfo("stackResultDimension"),u=Gl(t,c)&&!!t.getCalculationInfo("stackedOnSeries"),p=o.isHorizontal(),h=hB(r,o),f=Rk(e),v=e.get("barMinHeight")||0,_=d&&t.getDimensionIndex(d),y=t.getLayout("size"),w=t.getLayout("offset");return{progress:function(x,M){for(var S=x.count,T=f&&yp(S*3),I=f&&l&&yp(S*3),N=f&&yp(S),A=n.master.getRect(),V=p?A.width:A.height,F,z=M.getStore(),B=0;(F=x.next())!=null;){var H=z.get(u?_:a,F),se=z.get(s,F),oe=h,Se=void 0;u&&(Se=+H-z.get(a,F));var be=void 0,xe=void 0,fe=void 0,pe=void 0;if(p){var de=n.dataToPoint([H,se]);if(u){var Ne=n.dataToPoint([Se,se]);oe=Ne[0]}be=oe,xe=de[1]+w,fe=de[0]-oe,pe=y,Math.abs(fe)0?t:1:t))}var fB=function(i,e,t,n){for(;t>>1;i[r][1]r&&(this._approxInterval=r);var a=bp.length,s=Math.min(fB(bp,this._approxInterval,0,a),a-1);this._interval=bp[s][1],this._intervalPrecision=Ur(this._interval),this._minLevelUnit=bp[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return Re(t)?t:+ci(t)},e.prototype.contain=function(t){return ps(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(Zo),bp=[["second",pd],["minute",hd],["hour",qa],["quarter-day",qa*6],["half-day",qa*12],["day",Di*1.2],["half-week",Di*3.5],["week",Di*7],["month",Di*31],["quarter",Di*95],["half-year",jm/2],["year",jm]];function zk(i,e,t,n){return Za(new Date(e),i,n).getTime()===Za(new Date(t),i,n).getTime()}function mB(i,e){return i/=Di,i>16?16:i>7.5?7:i>3.5?4:i>1.5?2:1}function gB(i){var e=30*Di;return i/=e,i>6?6:i>3?3:i>2?2:1}function vB(i){return i/=qa,i>12?12:i>6?6:i>3.5?4:i>2?2:1}function Fk(i,e){return i/=e?hd:pd,i>30?30:i>20?20:i>15?15:i>10?10:i>5?5:i>2?2:1}function _B(i){return Na(i,!0)}function yB(i,e,t){var n=Math.max(0,Oe(vi,e)-1);return Za(new Date(i),vi[n],t).getTime()}function bB(i,e){var t=new Date(0);t[i](1);var n=t.getTime();t[i](1+e);var r=t.getTime()-n;return function(o,a){return Math.max(0,Math.round((a-o)/r))}}function wB(i,e,t,n,r,o){var a=1e4,s=qC,l=0;function c(B,H,se,oe,Se,be,xe){for(var fe=bB(Se,B),pe=H,de=new Date(pe);pea));)if(de[Se](de[oe]()+B),pe=de.getTime(),o){var Ne=o.calcNiceTickMultiple(pe,fe);Ne>0&&(de[Se](de[oe]()+Ne*B),pe=de.getTime())}xe.push({value:pe,notAdd:!0})}function d(B,H,se){var oe=[],Se=!H.length;if(!zk(Ya(B),n[0],n[1],t)){Se&&(H=[{value:yB(n[0],B,t)},{value:n[1]}]);for(var be=0;be=n[0]&&xe1&&be===0&&se.unshift({value:se[0].value-pe})}}for(var be=0;be=n[0]&&MS*1.5&&f>S/1.5||(u.push(w),h>S||i===s[v]))break}p=[]}}}for(var T=ot(J(u,function(B){return ot(B,function(H){return H.value>=n[0]&&H.value0}),I=[],N=T.length-1,v=0;v0;)o*=10;var s=[wv(CB(n[0]/o)*o),wv(xB(n[1]/o)*o)];this._interval=o,this._intervalPrecision=Ur(o),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){i.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=xp(t)/xp(this.base),i.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=xp(t)/xp(this.base),i.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=i.prototype.scale.call(this,t),wp(this.base,t)},e.prototype.setBreaksFromOption=function(t){var n=kt();if(n){var r=n.logarithmicParseBreaksFromOption(t,this.base,Ye(this.parse,this)),o=r.parsedOriginal,a=r.parsedLogged;this._originalScale._innerSetBreak(o),this._innerSetBreak(a)}},e.type="log",e})(Zo);function Cp(i,e){return wv(i,li(e))}nn.registerClass(Hk);var Gk=Hk;var MB=(function(){function i(e,t,n){this._prepareParams(e,t,n)}return i.prototype._prepareParams=function(e,t,n){n[1]0&&l>0&&!c&&(s=0),s0&&n>0||ti[1]&&(i[1]=r[1])})}function Wq(i){return i==="middle"||i==="center"}function jq(i){return i.getShallow("show")}function PB(i){var e=i.get("breaks",!0);if(e!=null)return!kt()||!DB(i.axis)?void 0:e}function DB(i){return(i.dim==="x"||i.dim==="y"||i.dim==="z"||i.dim==="single")&&i.type!=="category"}var Kk=(function(){function i(){}return i.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},i.prototype.getCoordSysModel=function(){},i})();function OB(i){return Mk(null,i)}var AB={isDimensionStacked:Gl,enableDataStack:vp,getStackedDimension:_p};function NB(i,e){var t=e;e instanceof vt||(t=new vt(e));var n=Yk(t);return n.setExtent(i[0],i[1]),qk(n,t),n}function BB(i){jt(i,Kk)}function RB(i,e){return e=e||{},rd(i,null,null,e.state!=="normal")}var FB=1e-8;function $k(i,e){return Math.abs(i-e)r&&(n=a,r=l)}if(n)return UB(n.exterior);var c=this.getBoundingRect();return[c.x+c.width/2,c.y+c.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var r=[1/0,1/0],o=[-1/0,-1/0],a=this.geometries;return D(a,function(s){s.type==="polygon"?Xk(s.exterior,r,o,t):D(s.points,function(l){Xk(l,r,o,t)})}),isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])||(r[0]=r[1]=o[0]=o[1]=0),n=new Ce(r[0],r[1],o[0]-r[0],o[1]-r[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),r=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var o=0,a=r.length;o>1^-(s&1),l=l>>1^-(l&1),s+=r,l+=o,r=s,o=l,n.push([s/t,l/t])}return n}function Sp(i,e){return i=HB(i),J(ot(i.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,r=t.geometry,o=[];switch(r.type){case"Polygon":var a=r.coordinates;o.push(new kv(a[0],a.slice(1)));break;case"MultiPolygon":D(r.coordinates,function(l){l[0]&&o.push(new kv(l[0],l.slice(1)))});break;case"LineString":o.push(new Sv([r.coordinates]));break;case"MultiLineString":o.push(new Sv(r.coordinates))}var s=new Jk(n[e||"name"],o,n.cp);return s.properties=n,s})}var Tv={};ki(Tv,{MAX_SAFE_INTEGER:()=>Cw,asc:()=>bw,getPercentWithPrecision:()=>ww,getPixelPrecision:()=>Cu,getPrecision:()=>li,getPrecisionSafe:()=>Lf,isNumeric:()=>Ks,isRadianAroundZero:()=>kw,linearMap:()=>Zs,nice:()=>Na,numericToNumber:()=>Yi,parseDate:()=>ci,parsePercent:()=>at,quantile:()=>Sw,quantity:()=>Mu,quantityExponent:()=>Aa,reformIntervals:()=>Lw,remRadian:()=>Mw,round:()=>Ft});var Ev={};ki(Ev,{format:()=>Fo,parse:()=>ci,roundTime:()=>Za});var Pv={};ki(Pv,{Arc:()=>Oo,BezierCurve:()=>_l,BoundingRect:()=>Ce,Circle:()=>Po,CompoundPath:()=>qu,Ellipse:()=>dl,Group:()=>ji,Image:()=>Qi,IncrementalDisplayable:()=>Ju,Line:()=>Io,LinearGradient:()=>Zu,Polygon:()=>gl,Polyline:()=>vl,RadialGradient:()=>Ku,Rect:()=>Kt,Ring:()=>ml,Sector:()=>fl,Text:()=>Ei,clipPointsByRect:()=>Im,clipRectByRect:()=>Om,createIcon:()=>Am,extendPath:()=>Tm,extendShape:()=>Lm,getShapeClass:()=>Em,getTransform:()=>Dm,initProps:()=>ed,makeImage:()=>bl,makePath:()=>Wa,mergePath:()=>Pm,registerShape:()=>Pi,resizePath:()=>id,updateProps:()=>yl});var Dv={};ki(Dv,{addCommas:()=>wl,capitalFirst:()=>t1,encodeHTML:()=>Rt,formatTime:()=>e1,formatTpl:()=>xd,getTextRect:()=>eg,getTooltipMarker:()=>Cd,normalizeCssArray:()=>bd,toCamelCase:()=>JC,truncateText:()=>Vf});var Iv={};ki(Iv,{bind:()=>Ye,clone:()=>Me,curry:()=>bn,defaults:()=>We,each:()=>D,extend:()=>q,filter:()=>ot,indexOf:()=>Oe,inherits:()=>Ps,isArray:()=>Q,isFunction:()=>ue,isObject:()=>ne,isString:()=>te,map:()=>J,merge:()=>Xe,reduce:()=>qt});var GB=Qe(),Wl=Qe(),Ko={estimate:1,determine:2};function Lp(i){return{out:{noPxChangeTryDetermine:[]},kind:i}}function tS(i,e){var t=J(e,function(n){return i.scale.parse(n)});return i.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function iS(i,e){var t=i.getLabelModel().get("customValues");if(t){var n=hs(i),r=i.scale.getExtent(),o=tS(i,t),a=ot(o,function(s){return s>=r[0]&&s=r[0]&&ad&&(c=Math.max(1,Math.floor(l/d)));for(var u=s[0],p=i.dataToCoord(u+1)-i.dataToCoord(u),h=Math.abs(p*Math.cos(o)),f=Math.abs(p*Math.sin(o)),v=0,_=0;ue&&n.axisExtent0===r[0]&&n.axisExtent1===r[1])return o;n.lastTickCount=t,n.lastAutoInterval=e,n.axisExtent0=r[0],n.axisExtent1=r[1]}function XB(i){var e=i.getLabelModel();return{axisRotate:i.getRotate?i.getRotate():i.isHorizontal&&!i.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function cS(i,e,t){var n=hs(i),r=i.scale,o=r.getExtent(),a=i.getLabelModel(),s=[],l=Math.max((e||0)+1,1),c=o[0],d=r.count();c!==0&&l>1&&d/l>2&&(c=Math.round(Math.ceil(c/l)*l));var u=Zk(i),p=a.get("showMinLabel")||u,h=a.get("showMaxLabel")||u;p&&c!==o[0]&&v(o[0]);for(var f=c;f=n&&e0&&to[1];p(e[0].coord,o[0])&&(n?e[0].coord=o[0]:e.shift()),n&&p(o[0],e[0].coord)&&e.unshift({coord:o[0],onBand:!0}),p(o[1],a.coord)&&(n?a.coord=o[1]:e.pop()),n&&p(a.coord,o[1])&&e.push({coord:o[1],onBand:!0});function p(h,f){return h=Ft(h),f=Ft(f),u?h>f:hhS,ChartView:()=>vn,ComponentModel:()=>rt,ComponentView:()=>nr,List:()=>mp,Model:()=>vt,PRIORITY:()=>Yg,SeriesModel:()=>Nn,color:()=>cu,connect:()=>LN,dataTool:()=>NN,dependencies:()=>cN,disConnect:()=>TN,disconnect:()=>fk,dispose:()=>EN,env:()=>Be,extendChartView:()=>nR,extendComponentModel:()=>eR,extendComponentView:()=>tR,extendSeriesModel:()=>iR,format:()=>Dv,getCoordinateSystemDimensions:()=>DN,getInstanceByDom:()=>$g,getInstanceById:()=>PN,getMap:()=>AN,graphic:()=>Pv,helper:()=>xv,init:()=>SN,innerDrawElementOnCanvas:()=>Jd,matrix:()=>oo,number:()=>Tv,parseGeoJSON:()=>Sp,parseGeoJson:()=>Sp,registerAction:()=>Vr,registerCoordinateSystem:()=>ev,registerCustomSeries:()=>IN,registerLayout:()=>tv,registerLoading:()=>pp,registerLocale:()=>cd,registerMap:()=>nv,registerPostInit:()=>Qg,registerPostUpdate:()=>Jg,registerPreprocessor:()=>up,registerProcessor:()=>dp,registerTheme:()=>Xg,registerTransform:()=>rv,registerUpdateLifecycle:()=>Rl,registerVisual:()=>or,setCanvasCreator:()=>ON,setPlatformAPI:()=>Rc,throttle:()=>Dl,time:()=>Ev,use:()=>av,util:()=>Iv,vector:()=>wn,version:()=>lN,zrUtil:()=>Ze,zrender:()=>xu});var fS=new Ms("NGX_ECHARTS_CONFIG"),Av=class{constructor(){this.subject=new Cs(1),this.subscriptions=new pr}doFilter(e){this.subject.next(e)}dispose(){this.subscriptions.unsubscribe()}notEmpty(e,t){this.subscriptions.add(this.subject.subscribe(n=>{if(n[e]){let r=n[e].currentValue;r!=null&&t(r)}}))}has(e,t){this.subscriptions.add(this.subject.subscribe(n=>{if(n[e]){let r=n[e].currentValue;t(r)}}))}notFirst(e,t){this.subscriptions.add(this.subject.subscribe(n=>{if(n[e]&&!n[e].isFirstChange()){let r=n[e].currentValue;t(r)}}))}notFirstAndEmpty(e,t){this.subscriptions.add(this.subject.subscribe(n=>{if(n[e]&&!n[e].isFirstChange()){let r=n[e].currentValue;r!=null&&t(r)}}))}},qY=(()=>{class i{constructor(){this.el=_e(g_),this.ngZone=_e(__),this.config=_e(fS),this.options=Gn(null),this.theme=Gn(this.config.theme??null),this.initOpts=Gn(null),this.merge=Gn(null),this.autoResize=Gn(!0),this.loading=Gn(!1),this.loadingType=Gn("default"),this.loadingOpts=Gn(null),this.chartInit=mh(),this.optionsError=mh(),this.chartClick=Ie(this.createLazyEvent("click")),this.chartDblClick=Ie(this.createLazyEvent("dblclick")),this.chartMouseDown=Ie(this.createLazyEvent("mousedown")),this.chartMouseMove=Ie(this.createLazyEvent("mousemove")),this.chartMouseUp=Ie(this.createLazyEvent("mouseup")),this.chartMouseOver=Ie(this.createLazyEvent("mouseover")),this.chartMouseOut=Ie(this.createLazyEvent("mouseout")),this.chartGlobalOut=Ie(this.createLazyEvent("globalout")),this.chartContextMenu=Ie(this.createLazyEvent("contextmenu")),this.chartHighlight=Ie(this.createLazyEvent("highlight")),this.chartDownplay=Ie(this.createLazyEvent("downplay")),this.chartSelectChanged=Ie(this.createLazyEvent("selectchanged")),this.chartLegendSelectChanged=Ie(this.createLazyEvent("legendselectchanged")),this.chartLegendSelected=Ie(this.createLazyEvent("legendselected")),this.chartLegendUnselected=Ie(this.createLazyEvent("legendunselected")),this.chartLegendLegendSelectAll=Ie(this.createLazyEvent("legendselectall")),this.chartLegendLegendInverseSelect=Ie(this.createLazyEvent("legendinverseselect")),this.chartLegendScroll=Ie(this.createLazyEvent("legendscroll")),this.chartDataZoom=Ie(this.createLazyEvent("datazoom")),this.chartDataRangeSelected=Ie(this.createLazyEvent("datarangeselected")),this.chartGraphRoam=Ie(this.createLazyEvent("graphroam")),this.chartGeoRoam=Ie(this.createLazyEvent("georoam")),this.chartTreeRoam=Ie(this.createLazyEvent("treeroam")),this.chartTimelineChanged=Ie(this.createLazyEvent("timelinechanged")),this.chartTimelinePlayChanged=Ie(this.createLazyEvent("timelineplaychanged")),this.chartRestore=Ie(this.createLazyEvent("restore")),this.chartDataViewChanged=Ie(this.createLazyEvent("dataviewchanged")),this.chartMagicTypeChanged=Ie(this.createLazyEvent("magictypechanged")),this.chartGeoSelectChanged=Ie(this.createLazyEvent("geoselectchanged")),this.chartGeoSelected=Ie(this.createLazyEvent("geoselected")),this.chartGeoUnselected=Ie(this.createLazyEvent("geounselected")),this.chartAxisAreaSelected=Ie(this.createLazyEvent("axisareaselected")),this.chartBrush=Ie(this.createLazyEvent("brush")),this.chartBrushEnd=Ie(this.createLazyEvent("brushend")),this.chartBrushSelected=Ie(this.createLazyEvent("brushselected")),this.chartGlobalCursorTaken=Ie(this.createLazyEvent("globalcursortaken")),this.chartRendered=Ie(this.createLazyEvent("rendered")),this.chartFinished=Ie(this.createLazyEvent("finished")),this.animationFrameID=null,this.chart$=new Cs(1),this.resize$=new ca,this.changeFilter=new Av,this.resizeObFired=!1,this.echarts=this.config.echarts}ngOnChanges(t){this.changeFilter.doFilter(t)}ngOnInit(){if(!window.ResizeObserver)throw new Error("please install a polyfill for ResizeObserver");this.resizeSub=this.resize$.pipe(m_(100,d_,{leading:!1,trailing:!0})).subscribe(()=>this.resize()),this.autoResize()&&(this.resizeOb=this.ngZone.runOutsideAngular(()=>new window.ResizeObserver(t=>{for(let n of t)n.target===this.el.nativeElement&&(this.resizeObFired?this.animationFrameID=window.requestAnimationFrame(()=>{this.resize$.next()}):this.resizeObFired=!0)})),this.resizeOb.observe(this.el.nativeElement)),this.changeFilter.notFirstAndEmpty("options",t=>this.onOptionsChange(t)),this.changeFilter.notFirstAndEmpty("merge",t=>this.setOption(t)),this.changeFilter.has("loading",t=>this.toggleLoading(!!t)),this.changeFilter.notFirst("theme",()=>this.refreshChart())}ngOnDestroy(){window.clearTimeout(this.initChartTimer),this.resizeSub&&this.resizeSub.unsubscribe(),this.animationFrameID&&window.cancelAnimationFrame(this.animationFrameID),this.resizeOb&&this.resizeOb.unobserve(this.el.nativeElement),this.loadingSub&&this.loadingSub.unsubscribe(),this.changeFilter.dispose(),this.dispose()}ngAfterViewInit(){this.initChartTimer=window.setTimeout(()=>this.initChart())}dispose(){this.chart&&(this.chart.isDisposed()||this.chart.dispose(),this.chart=null)}resize(){this.chart&&this.chart.resize()}toggleLoading(t){this.chart?t?this.chart.showLoading(this.loadingType(),this.loadingOpts()):this.chart.hideLoading():this.loadingSub=this.chart$.subscribe(n=>t?n.showLoading(this.loadingType(),this.loadingOpts()):n.hideLoading())}setOption(t,n){if(this.chart)try{this.chart.setOption(t,n)}catch(r){console.error(r),this.optionsError.emit(r)}}refreshChart(){return ge(this,null,function*(){this.dispose(),yield this.initChart()})}createChart(){let t=this.el.nativeElement;if(window&&window.getComputedStyle){let n=window.getComputedStyle(t,null).getPropertyValue("height");(!n||n==="0px")&&(!t.style.height||t.style.height==="0px")&&(t.style.height="400px")}return this.ngZone.runOutsideAngular(()=>(typeof this.echarts=="function"?this.echarts:()=>Promise.resolve(this.echarts))().then(({init:r})=>r(t,this.theme()??this.config?.theme,this.initOpts())))}initChart(){return ge(this,null,function*(){yield this.onOptionsChange(this.options());let t=this.merge();t&&this.chart&&this.setOption(t)})}onOptionsChange(t){return ge(this,null,function*(){t&&(this.chart?this.setOption(this.options(),!0):(this.chart=yield this.createChart(),this.chart$.next(this.chart),this.chartInit.emit(this.chart),this.setOption(this.options(),!0)))})}createLazyEvent(t){return iy(this.chartInit).pipe(h_(n=>new c_(r=>(n.on(t,o=>this.ngZone.run(()=>r.next(o))),()=>{this.chart&&(this.chart.isDisposed()||n.off(t))}))))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=mc({type:i,selectors:[["echarts"],["","echarts",""]],inputs:{options:[1,"options"],theme:[1,"theme"],initOpts:[1,"initOpts"],merge:[1,"merge"],autoResize:[1,"autoResize"],loading:[1,"loading"],loadingType:[1,"loadingType"],loadingOpts:[1,"loadingOpts"]},outputs:{chartInit:"chartInit",optionsError:"optionsError",chartClick:"chartClick",chartDblClick:"chartDblClick",chartMouseDown:"chartMouseDown",chartMouseMove:"chartMouseMove",chartMouseUp:"chartMouseUp",chartMouseOver:"chartMouseOver",chartMouseOut:"chartMouseOut",chartGlobalOut:"chartGlobalOut",chartContextMenu:"chartContextMenu",chartHighlight:"chartHighlight",chartDownplay:"chartDownplay",chartSelectChanged:"chartSelectChanged",chartLegendSelectChanged:"chartLegendSelectChanged",chartLegendSelected:"chartLegendSelected",chartLegendUnselected:"chartLegendUnselected",chartLegendLegendSelectAll:"chartLegendLegendSelectAll",chartLegendLegendInverseSelect:"chartLegendLegendInverseSelect",chartLegendScroll:"chartLegendScroll",chartDataZoom:"chartDataZoom",chartDataRangeSelected:"chartDataRangeSelected",chartGraphRoam:"chartGraphRoam",chartGeoRoam:"chartGeoRoam",chartTreeRoam:"chartTreeRoam",chartTimelineChanged:"chartTimelineChanged",chartTimelinePlayChanged:"chartTimelinePlayChanged",chartRestore:"chartRestore",chartDataViewChanged:"chartDataViewChanged",chartMagicTypeChanged:"chartMagicTypeChanged",chartGeoSelectChanged:"chartGeoSelectChanged",chartGeoSelected:"chartGeoSelected",chartGeoUnselected:"chartGeoUnselected",chartAxisAreaSelected:"chartAxisAreaSelected",chartBrush:"chartBrush",chartBrushEnd:"chartBrushEnd",chartBrushSelected:"chartBrushSelected",chartGlobalCursorTaken:"chartGlobalCursorTaken",chartRendered:"chartRendered",chartFinished:"chartFinished"},exportAs:["echarts"],features:[yn]})}}return i})();function oR(i){return{provide:fS,useValue:i}}var YY=(()=>{class i{static forRoot(t){return{ngModule:i,providers:[oR(t)]}}static forChild(){return{ngModule:i}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=fr({type:i})}static{this.\u0275inj=hr({})}}return i})();var Je=ve(Ae()),mZ=ve(Nv());function Ep(i){i.ImageOverlay.Rotated=i.ImageOverlay.extend({initialize:function(e,t,n,r,o){typeof e=="string"?this._url=e:this._rawImage=e,this._topLeft=i.latLng(t),this._topRight=i.latLng(n),this._bottomLeft=i.latLng(r),i.setOptions(this,o)},onAdd:function(e){this._image||(this._initImage(),this.options.opacity{this._reset(),e.style.display="block",this.fire("load")},e.alt=this.options.alt},clipPath:"none",clipPoints:[],setClip:function(e){return this.clipPoints=e,this._map?e.length?(this.clipPath='path(evenodd, "',e.forEach((t,n)=>{n>0&&(this.clipPath+="z");let r=[];for(let a of t){let s=this._map.latLngToLayerPoint(a);r.push(s)}let o=this._map.latLngToLayerPoint(this._bounds.getNorthWest());r.forEach((a,s)=>{a.x-=o.x,a.y-=o.y,s>0?this.clipPath+="L":this.clipPath+="M",this.clipPath+=`${a.x} ${a.y}`})}),this.clipPath+='z")',this.clipPath):(this.clipPath="none",this.clipPath):this.clipPath},_reset:function(){let e=this._image;if(!this._map||!e)return;let t=this._map.latLngToLayerPoint(this._topLeft),n=this._map.latLngToLayerPoint(this._topRight),r=this._map.latLngToLayerPoint(this._bottomLeft),o=n.subtract(t).add(r),a=i.bounds([t,n,r,o]),s=a.getSize(),l=t.subtract(a.min);this._bounds=i.latLngBounds(this._map.layerPointToLatLng(a.min),this._map.layerPointToLatLng(a.max)),i.DomUtil.setPosition(e,a.min),e.style.width=s.x+"px",e.style.height=s.y+"px";let c=this._rawImage.width,d=this._rawImage.height;if(!c||!d)return;let u=n.subtract(t),p=r.subtract(t);this._rawImage.style.transformOrigin="0 0",this._rawImage.style.transform="matrix("+u.x/c+", "+u.y/c+", "+p.x/d+", "+p.y/d+", "+l.x+", "+l.y+")",this._rawImage.parentElement.style.clipPath=this.setClip(this.clipPoints)},reposition:function(e,t,n){this._topLeft=i.latLng(e),this._topRight=i.latLng(t),this._bottomLeft=i.latLng(n),this._reset()},setUrl:function(e){return this._url=e,this._rawImage&&(this._rawImage.src=e),this}}),i.imageOverlay.rotated=function(e,t,n,r,o){return new i.ImageOverlay.Rotated(e,t,n,r,o)}}function gS(i){"use strict";return(function(){"use strict";let e=typeof window(Math.atan2(e.y-i.y,e.x-i.x)*180/Math.PI+90+360)%360,Bv=({value:i,isInPixels:e},t)=>e?i/t:i;function Pp(i){if(typeof i=="string"&&i.indexOf("%")!==-1)return{value:parseFloat(i)/100,isInPixels:!1};let e=i?parseFloat(i):0;return{value:e,isInPixels:e>0}}var lR=(i,e)=>i.x===e.x&&i.y===e.y;function cR(i){return i.reduce((e,t,n,r)=>{if(n>0&&!lR(t,r[n-1])){let o=r[n-1],a=e.length>0?e[e.length-1].distB:0,s=aR(o,t);e.push({a:o,b:t,distA:a,distB:a+s,heading:sR(o,t)})}return e},[])}function vS(i,e){let t=cR(i),n=t.length;if(n===0)return[];let r=t[n-1].distB,o=Bv(e.offset,r),a=Bv(e.endOffset,r),s=Bv(e.repeat,r),l=[];if(s){let u=r*s,p=a>0?r*a:0,h=o>0?r*o:0;if(u>0)for(;h0?r*o:0);let c=0,d=t[0];return l.map(u=>{for(;u>d.distB&&cn instanceof i.LatLng||Array.isArray(n)&&n.length===2&&typeof n[0]=="number",t=n=>Array.isArray(n)&&e(n[0]);i.PolylineDecorator=i.FeatureGroup.extend({options:{patterns:[]},initialize:function(n,r){i.FeatureGroup.prototype.initialize.call(this),i.Util.setOptions(this,r),this._map=null,this._paths=this._initPaths(n),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(n,r){return t(n)?[r?n.concat([n[0]]):n]:n instanceof i.Polyline?this._initPaths(n.getLatLngs(),n instanceof i.Polygon):Array.isArray(n)?n.reduce((o,a)=>o.concat(this._initPaths(a,r)),[]):[]},_initPatterns:function(n){return n.map(this._parsePatternDef)},setPatterns:function(n){this.options.patterns=n,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(n){this._paths=this._initPaths(n),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(n,r){return{symbolFactory:n.symbol,offset:Pp(n.offset),endOffset:Pp(n.endOffset),repeat:Pp(n.repeat)}},onAdd:function(n){this._map=n,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(n){this._map.off("moveend",this.redraw,this),this._map=null,i.FeatureGroup.prototype.onRemove.call(this,n)},_initBounds:function(){let n=this._paths.reduce((r,o)=>r.concat(o),[]);return i.latLngBounds(n)},getBounds:function(){return this._bounds},_buildSymbols:function(n,r,o){return o.map((a,s)=>r.buildSymbol(a,n,this._map,s,o.length))},_getDirectionPoints:function(n,r){if(n.lengththis._map.project(a));return vS(o,r).map(a=>({latLng:this._map.unproject(i.point(a.pt)),heading:a.heading}))},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(n){let r=this._map.getBounds().pad(.1);return this._paths.map(o=>{let a=this._getDirectionPoints(o,n).filter(s=>r.contains(s.latLng));return i.featureGroup(this._buildSymbols(o,n.symbolFactory,a))})},_draw:function(){this._patterns.map(n=>this._getPatternLayers(n)).forEach(n=>{this.addLayer(i.featureGroup(n))})}}),i.polylineDecorator=function(n,r){return new i.PolylineDecorator(n,r)}}var xS=i=>{let e;typeof module=="object"&&e?e=module.exports:typeof window137.8347||f<.8293>55.8271}function r(f,v){let _=f*v,y=Math.sqrt(Math.abs(f)),w=f*Math.PI,x=v*Math.PI,M=20*Math.sin(6*w)+20*Math.sin(2*w),S=M,T=M;return S+=20*Math.sin(x)+40*Math.sin(x/3),T+=20*Math.sin(w)+40*Math.sin(w/3),S+=160*Math.sin(x/12)+320*Math.sin(x/30),T+=150*Math.sin(w/12)+300*Math.sin(w/30),S*=.6666666666666666,T*=.6666666666666666,S+=-100+2*f+3*v+.2*v*v+.1*_+.2*y,T+=300+f+2*v+.1*f*f+.1*_+.1*y,{lat:S,lng:T}}function o(f,v){let _=.006693421622965943,y=r(v-105,f-35),w=f/180*Math.PI,x=Math.sin(w);x=1-_*x*x;let M=Math.sqrt(x);return y.lat=y.lat*180/(t*(1-_)/(x*M)*Math.PI),y.lng=y.lng*180/(t/M*Math.cos(w)*Math.PI),y}function a(f,v){if(n(f,v))return{lat:f,lng:v};let _=o(f,v);return{lat:f+_.lat,lng:v+_.lng}}e.wgs2gcj=a;function s(f,v){if(n(f,v))return{lat:f,lng:v};let _=o(f,v);return{lat:f-_.lat,lng:v-_.lng}}e.gcj2wgs=s;function l(f,v){let w=.01,x=.01,M=f-w,S=v-x,T=f+w,I=v+x,N,A;for(let V=0;V0?T=N:M=N,x>0?I=A:S=A}return{lat:N,lng:A}}e.gcj2wgs_exact=l;function c(f,v,_,y){let w=Math.PI/180,x=f*w,M=_*w,S=Math.cos(x)*Math.cos(M)*Math.cos((v-y)*w),T=Math.sin(x)*Math.sin(M),I=S+T;return I>1&&(I=1),I>this.MAXZOOM-v,f.y=f.y>>this.MAXZOOM-v,f},untransform:function(f,v){return f.x=f.x{class i{static{this.SELECTED_MAP_KEY="selected_map_cookie"}static{this.IS_KIOSK=!1}set layers(t){this._layers=t,this.renderData()}get layers(){return this._layers}set zoomOption(t){this._zoomOption=t,this.renderData()}get zoomOption(){return this._zoomOption}set center(t){this.mapReady$.toPromise().then(()=>this.map?.panTo(t))}constructor(){this.globalState=_e(xt),this.translate=_e(bc),this.config=_e("config"),this.webmatePlatform=_e(Dp),this.selectedMap="Mapbox India",this.sub=new pr,this.mapReady$=new Cs(1),this.tileLayers={},this._layers=[],this.use3Dcenter=!1,this.hideLayers=!1,this.useNavigator=!0,this._zoomOption={user:!1},this.showDefaultFallback=!0,this.mapSettings={zoomAnimation:!1,zoomSnap:.25,zoomDelta:.25,scrollWheelZoom:!0,touchZoom:!0},this.disableMapTiles=!1,this.mapReady=new ze,this.centerChange=new ze,this.mapProviderChange=new ze,this.mapProvidersChange=new ze,this.onMapProviderSelect=n=>{this.selectedMap=n.name;let r=this.providers?.find(o=>this.translate.instant(o.title)===this.selectedMap)?.value;r?localStorage.setItem(i.SELECTED_MAP_KEY,r):console.warn(`Map title ${this.selectedMap} did not match any map values`),this.mapProviderChange.emit(this.selectedMap)};let t=this.webmatePlatform;Ep(Je),t.isMobile()||gS(Je),wS(Je),xS(Je),Je.Symbol.ArrowHead.Opposite=Je.Symbol.ArrowHead.extend({_buildArrowPath:function(n,r){return n.heading+=180,Je.Symbol.ArrowHead.prototype._buildArrowPath.call(this,n,r)}}),Je.Symbol.arrowHead.opposite=function(n){return new Je.Symbol.ArrowHead.Opposite(n)}}ngOnInit(){return ge(this,null,function*(){this.useNavigator=this.config?.service!==1&&this.config?.service!==2,this.providers=this.prepareCustomerMapProviders();let t=localStorage.getItem(i.SELECTED_MAP_KEY),n=this.providers.find(r=>r.value===t)?.title;if(n){let r=this.translate.instant(n);this.tileLayers[r]&&(this.selectedMap=r)}this.mapProvidersChange.emit(this.providers),this.mapProviderChange.emit(this.selectedMap),yield this.translate.get("load").toPromise(),this.prepareMapElement(),yield this.renderData(),this.mapReady$.next(!0),this.mapReady.emit(this.map)})}ngOnDestroy(){this.map?.remove(),this.sub.unsubscribe();for(let t of this.layers)t.donefitBounds=!1,t.destroy();i.IS_KIOSK=!1}prepareMapElement(){let t=this.element?.nativeElement;if(!t){console.error("Map element not found!");return}let n=i.IS_KIOSK?"bottomright":"topleft",r=i.IS_KIOSK?"kiosk-zoom-control":"zoom-control";Je.Icon.Default.imagePath="assets/images/",this.globalState.log("[TmMap] Leaflet version: ",Je.version),this.map=Je.map(t,sa(Mi({},this.mapSettings),{worldCopyJump:!0,minZoom:2})),this.map.createPane("images"),this.map.createPane("track"),this.map.zoomControl.remove();let o=this.translate.instant("Zoom in"),a=this.translate.instant("Zoom out"),l=Je.control.zoom({zoomInTitle:o,zoomOutTitle:a,position:n}).addTo(this.map).getContainer();if(l&&l.classList.add(r),this.webmatePlatform.isMobile()||Je.control.fullscreen({position:"topleft",title:this.translate.instant("Full Screen"),titleCancel:this.translate.instant("Exit Full Screen"),forceSeparateButton:!0,content:' ',forcePseudoFullscreen:!0}).addTo(this.map),!this.disableMapTiles){let c=this.tileLayers[this.selectedMap];c||(this.selectedMap=Object.keys(this.tileLayers)[0],c=this.tileLayers[this.selectedMap]),c&&c.addTo(this.map)}this.startCenter?.lat!==void 0&&setTimeout(()=>{this.map?.setView([this.startCenter.lat,this.startCenter.lng],this.startCenter.zoom)},0),this.map.on("baselayerchange",this.onMapProviderSelect),this.map.on("moveend",()=>{if(!this.map)return;let c={lat:this.map.getCenter().lat,lng:this.map.getCenter().lng,zoom:this.map.getZoom()};this.centerChange.emit(c)})}createTileLayer(t){let n;switch(t){case ry:n=Lc[t](this.config.mapboxKey);break;default:n=(Lc[t]||Lc.osm)()}return n||console.warn(`Failed to initialized map ${t}, are you missing a key?`),n}prepareCustomerMapProviders(){let t=this.globalState.settings["map-options"],n=Gt.deepCopy(t.uiSettings.dashboard?.mapProviders);i.IS_KIOSK&&t.uiSettings.dashboard?.mapProvidersKiosk&&(n=Gt.deepCopy(t.uiSettings.dashboard?.mapProvidersKiosk)),n?this.config.googleKey||delete n.google:n={mi:!0,osm:!0};let r=Gt.createMapProviders(n);for(let o of r){let a=this.createTileLayer(o.value);a&&(this.tileLayers[this.translate.instant(o.title)]=a)}return r}toggleLayer(t){if(!this.map)return;let n=this.layers.find(r=>r.name===t);n&&(this.map.hasLayer(n.layer)?n.remove():n.add())}renderData(){return ge(this,null,function*(){if(!this.map)return;yield this.translate.get("load").toPromise(),this.map.eachLayer(o=>{o instanceof Je.FeatureGroup&&this.map?.removeLayer(o)});let t=!1,n={};for(let o of this.layers)o.toggleable&&(n[this.translate.instant(o.name)]=o.layer),o.setMap(this.map),o.show&&o.add(),this.startCenter&&(o.startCenterSet=!0),o.name===this.zoomOption.mapZoomType?(t=o.focus(this.zoomOption.mapZoomTarget),t&&this.globalState.log("[TmMapComponent] zoomed on",this.zoomOption)):o.blur();this.layerControl&&this.map.removeControl(this.layerControl),i.IS_KIOSK||(this.layerControl=Je.control.layers(this.tileLayers,n).addTo(this.map)),t||(this.globalState.log("[TmMapComponent] zoomOption.mapZoomType full on default"),yield this.showDefaultEmptyMap(!0,this.showDefaultFallback));let r=this.layers.find(o=>o.name===pR);r&&r.update()})}showDefaultEmptyMap(t,n){if(!n||!t)return Promise.resolve();let r=this.config.mapFallbackTarget||[55.7,13.2],o=this.config.mapFallbackZoom||12;return navigator.geolocation&&this.useNavigator?(this.globalState.log("[TmMapComponent] Showing user location",navigator.geolocation),new Promise(a=>{let s=setTimeout(()=>{try{this.map?.getCenter()}catch{this.map?.setView(r,o)}a()},2e3);navigator.geolocation.getCurrentPosition(l=>{clearTimeout(s);try{this.map?.getCenter()}catch{let c=l.coords.latitude,d=l.coords.longitude;this.map?.setView([c,d],o),a()}})})):(this.globalState.log("[TmMapComponent] ShowDefaultEmptyMap, worst case hit, no user location, no building id"),this.map?.setView(r,o),Promise.resolve())}static isSamePosition(t,n){return t===n?!0:t==null||n==null?!1:t[0]===n[0]&&t[1]===n[1]}static getMarkerPoint(t){let n=t.latitude||t.lat,r=t.longitude||t.lng;return!n||!r?null:[parseFloat(n),parseFloat(r)]}toggleZoom(t=!0){t?(this.map?.scrollWheelZoom.enable(),this.map?.touchZoom.enable()):(this.map?.scrollWheelZoom.disable(),this.map?.touchZoom.disable())}addPanBackControl(){let t=Je.Control.extend({onAdd:()=>{let n=Je.DomUtil.create("div"),r="./assets/icons/location-map.png";return n.innerHTML=`
`,n.style.cursor="pointer",n.className="leaflet-bar leaflet-control",Je.DomEvent.on(n,"click",()=>{for(let o of this.layers)o.name===this.zoomOption.mapZoomType&&o.focus(this.zoomOption.mapZoomTarget)}),n}});this.map?.addControl(new t({position:"topleft"}))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-map"]],viewQuery:function(n,r){if(n&1&&ii(dR,7),n&2){let o;ni(o=ri())&&(r.element=o.first)}},inputs:{hideLayers:"hideLayers",layers:"layers",useNavigator:"useNavigator",zoomOption:"zoomOption",showDefaultFallback:"showDefaultFallback",mapSettings:"mapSettings",startCenter:"startCenter",center:"center",disableMapTiles:"disableMapTiles"},outputs:{mapReady:"mapReady",centerChange:"centerChange",mapProviderChange:"mapProviderChange",mapProvidersChange:"mapProvidersChange"},standalone:!1,decls:5,vars:0,consts:[["map",""],[1,"container",2,"max-width","100%","padding","0px"],[1,"row"],[1,"col-md-12"],["id","tm-map",1,"leaflet-maps"]],template:function(n,r){n&1&&(P(0,"div",1)(1,"div",2)(2,"div",3),ie(3,"div",4,0),E()()())},styles:[`.leaflet-maps[_ngcontent-%COMP%]{height:calc(100vh - var(--mapShrink, 200px))}[_nghost-%COMP%] leaflet-control-layers-overlays label:nth-child(4){border-top:1px solid lightgrey;padding-top:6px}[_nghost-%COMP%] .kiosk-zoom-control{border:none!important;box-shadow:0 4px 4px #00000029!important;margin-right:1rem!important;margin-bottom:1rem!important}[_nghost-%COMP%] .leaflet-top, [_nghost-%COMP%] .leaflet-bottom{z-index:998!important}[_nghost-%COMP%] .leaflet-top .kiosk-zoom-control .leaflet-control-zoom-in, [_nghost-%COMP%] .leaflet-top .kiosk-zoom-control .leaflet-control-zoom-out, [_nghost-%COMP%] .leaflet-bottom .kiosk-zoom-control .leaflet-control-zoom-in, [_nghost-%COMP%] .leaflet-bottom .kiosk-zoom-control .leaflet-control-zoom-out{color:#000;width:40px;height:40px}[_nghost-%COMP%] .leaflet-top .kiosk-zoom-control .leaflet-control-zoom-in, [_nghost-%COMP%] .leaflet-bottom .kiosk-zoom-control .leaflet-control-zoom-in{border-top-left-radius:8px!important;border-top-right-radius:8px!important;border-bottom:2px solid #000}[_nghost-%COMP%] .leaflet-top .kiosk-zoom-control .leaflet-control-zoom-out, [_nghost-%COMP%] .leaflet-bottom .kiosk-zoom-control .leaflet-control-zoom-out{border-bottom-left-radius:8px!important;border-bottom-right-radius:8px!important}[_nghost-%COMP%] .leaflet-top .separator, [_nghost-%COMP%] .leaflet-bottom .separator{position:absolute;top:50%;height:2px;background-color:#4a4141;width:100%;transform:translateY(-50%);z-index:999}[_nghost-%COMP%] .pan-image{width:inherit;padding:5px}[_nghost-%COMP%] #tm-map .leaflet-control, [_nghost-%COMP%] #tm-map .leaflet-custom-control, [_nghost-%COMP%] #tm-map .leaflet-popup-content, [_nghost-%COMP%] #tm-map .leaflet-tooltip{font-family:var(--font-family-primary)}
`]})}}return i})();var CS=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=fr({type:i});static \u0275inj=hr({})}return i})();var hR=new Ms("MATERIAL_ANIMATIONS");var MS=null;function fR(){return _e(hR,{optional:!0})?.animationsDisabled||_e(v_,{optional:!0})==="NoopAnimations"?"di-disabled":(MS??=_e(gh).matchMedia("(prefers-reduced-motion)").matches,MS?"reduced-motion":"enabled")}function NZ(){return fR()!=="enabled"}var RZ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Te({type:i,selectors:[["structural-styles"]],decls:0,vars:0,template:function(n,r){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}
`],encapsulation:2,changeDetection:0})}return i})();var kS=(()=>{class i{constructor(){_e(U_)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(n){return new(n||i)};static \u0275mod=fr({type:i});static \u0275inj=hr({imports:[vh,vh]})}return i})();var aK=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=fr({type:i});static \u0275inj=hr({imports:[kS,CS,H_]})}return i})();var Gr=ve(Ae()),Tt=class i{constructor(e){this.name=e,this.show=!0,this.added=!1,this.toggleable=!0,this.layer=new Gr.FeatureGroup,this.translated="default layer",this.setCenter=!1,this.focused=!1,this.donefitBounds=!1,this.layer.on("add",()=>this.added=!0),this.layer.on("remove",()=>this.added=!1)}setMap(e){this.map=e}destroy(){this.layer.clearLayers(),this.layer.remove(),this.added=!1,delete this.map}focus(e){if(this.focused=!0,this.layer.getLayers().length){let t=this.layer.getBounds();return t.isValid()?(this.map?.fitBounds(t,{padding:[42,42],maxZoom:19}),!0):!1}return!1}blur(){this.focused=!1,this.setCenter=!1}add(){this.show=!0,this.map?.addLayer(this.layer)}remove(){this.show=!1,this.layer.remove()}static getBounds(e){let t=Gr.featureGroup();for(let n of e)n instanceof Gr.Marker?n.addTo(t):n.latitude&&n.longitude&&Gr.marker([n.latitude,n.longitude]).addTo(t);return t.getBounds()}fitBounds(e){if(!this.map)return;this.startCenterSet&&!this.donefitBounds&&(this.donefitBounds=!0);let t=i.getBounds(e);Object.keys(t).length!==0&&this.map.fitBounds(t,{padding:[42,42],maxZoom:19})}};var Bn=ve(Ae()),VK=ve(Nv());var mR=i=>({color:i});function gR(i,e){if(i&1){let t=ye();P(0,"nb-user",4),Y(1,"amTimeAgo"),Y(2,"imageAuth"),re("click",function(){W(t);let r=R();return j(r.goToDeviceOverview(r.marker.id))}),E()}if(i&2){let t=R();Hn(gc("",t.marker.statusClass," simple-marker-user")),Ri("clickbleIcons",t.marker.id&&t.marker.typeId),le("title",oi(t.marker.receivedTime?Z(1,9,t.marker.receivedTime):""))("picture",Qr(2,11,t.globalState.formatImageUrl(t.marker.pictureUrl||t.marker.iconUrl||""),!1))("name",t.marker.name)}}function vR(i,e){if(i&1&&ie(0,"i",5),i&2){let t=R();Hn(t.marker.iconClass+" fa-10x icon alert-icon-class"),le("ngStyle",mr(3,mR,t.marker.iconColor))}}function _R(i,e){if(i&1){let t=ye();P(0,"nb-user",6),Y(1,"amTimeAgo"),re("click",function(){W(t);let r=R();return j(r.goToDeviceOverview(r.marker.id))}),E()}if(i&2){let t=R();Ri("clickbleIcons",t.marker.id&&t.marker.typeId),le("title",oi(t.marker.receivedTime?Z(1,5,t.marker.receivedTime):""))("name",t.marker.name)}}function yR(i,e){if(i&1){let t=ye();P(0,"span",7),re("click",function(){W(t);let r=R();return j(r.infoCb())}),ie(1,"i",8),E()}}var jl=(()=>{class i{set marker(t){this._marker=t,!this.marker.name&&this.marker.id&&this.deviceService.GetDevice(this.marker.id).then(n=>{Object.assign(this.marker,n),Gt.reformatDataObject(this.marker,!0,"device")})}get marker(){return this._marker}constructor(){this.globalState=_e(xt),this.config=_e("config"),this.router=_e(gr),this.deviceService=_e(ny),this.updateAlertStyles=Gt.updateAlertStyles,this._marker={},this.alertData={icon:"",label:"",lineColor:"",iconColor:""},this.infoCb=()=>{this.marker&&(this.marker.showMoreDetails=!this.marker.showMoreDetails)}}goToDeviceOverview(t){this.marker.id&&this.marker.typeId&&this.router.navigateByUrl(`/pages/devices/overview/${t}`)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-marker-popup-simple"]],inputs:{marker:"marker",infoCb:"infoCb"},standalone:!1,decls:5,vars:5,consts:[[1,"contact","flex",3,"nbSpinner"],["size","large",3,"class","clickbleIcons","picture","name","title"],[3,"class","ngStyle"],["size","large",1,"no-avatar",3,"clickbleIcons","name","title"],["size","large",3,"click","picture","name","title"],[3,"ngStyle"],["size","large",1,"no-avatar",3,"click","name","title"],[3,"click"],[1,"fas","fa-info-circle","more-info"]],template:function(n,r){n&1&&(P(0,"div",0),$(1,gR,3,14,"nb-user",1),$(2,vR,1,5,"i",2),$(3,_R,2,7,"nb-user",3),$(4,yR,2,0,"span"),E()),n&2&&(le("nbSpinner",!r.marker.name),k(),X(r.marker.iconClass?-1:1),k(),X(r.marker.iconClass?2:-1),k(),X(r.marker.iconClass?3:-1),k(),X(r.config.service!=2?4:-1))},styles:["[_nghost-%COMP%] .ng2-smart-filters th.positiontime{display:none}[_nghost-%COMP%] nb-user.offline .user-picture{border-color:#cdcdcd}[_nghost-%COMP%] nb-user.online .user-picture{border-color:#3cab3c}[_nghost-%COMP%] nb-user.alarm .user-picture{border-color:#d70206}[_nghost-%COMP%] nb-user.simple-marker-user{width:calc(100% - 2rem);display:inline-block}[_nghost-%COMP%] nb-user.simple-marker-user .user-container{max-width:100%!important}[_nghost-%COMP%] nb-user.simple-marker-user div.info-container{white-space:break-spaces;max-width:calc(100% - 3.25rem)}[_nghost-%COMP%] nb-user.simple-marker-user div.info-container .user-name{max-width:100%;overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%] .alert-icon-class{font-size:40px!important}[_nghost-%COMP%] .no-avatar .user-picture{display:none!important}.more-info[_ngcontent-%COMP%]{padding-right:1rem}.clickbleIcons[_ngcontent-%COMP%]{cursor:pointer}.card-title[_ngcontent-%COMP%]{width:90%}.fas[_ngcontent-%COMP%]{cursor:pointer}nb-user[_ngcontent-%COMP%]{margin-right:8px}.contact[_ngcontent-%COMP%]{justify-content:space-between;display:flex;padding:2px 0;font-size:1.2rem;align-items:center}"]})}}return i})();var Ip=ve(_h());var SS=(()=>{class i{getBatteryClass(){return this.batteryLevel>90?"fa-battery-full icon-color-success":this.batteryLevel>63?"fa-battery-three-quarters icon-color-success":this.batteryLevel>36?"fa-battery-half icon-color-success":this.batteryLevel>10?"fa-battery-quarter icon-color-warning":"fa-battery-empty icon-color-danger"}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-device-battery-icon"]],inputs:{batteryLevel:"batteryLevel"},standalone:!1,decls:3,vars:5,consts:[[3,"title"],[1,"fas","info-icon","mr-2"]],template:function(n,r){n&1&&(P(0,"span",0),ie(1,"i",1),U(2),E()),n&2&&(le("title",oi("Battery status "+r.batteryLevel+"%")),k(),Hn(r.getBatteryClass()),k(),me("",r.batteryLevel+"%",`
`))},styles:[".icon-color-success[_ngcontent-%COMP%]{color:#90b900}.icon-color-warning[_ngcontent-%COMP%]{color:#f08100}.icon-color-danger[_ngcontent-%COMP%]{color:#d70206}.fas[_ngcontent-%COMP%]{font-size:35px!important;vertical-align:middle}"]})}}return i})();var wR=i=>({"background-image":i});function xR(i,e){if(i&1&&(P(0,"span",6),ie(1,"tm-device-battery-icon",9),E()),i&2){let t=R(3);k(),le("batteryLevel",t.marker.batteryLevel)}}function CR(i,e){if(i&1&&(P(0,"div",6),$(1,xR,2,1,"span",6),E()),i&2){let t=R(2);k(),X(t.marker.batteryLevel||t.marker.batteryLevel===0?1:-1)}}function MR(i,e){if(i&1){let t=ye();P(0,"div",10),ie(1,"i",11),E(),P(2,"div",12),Y(3,"amDateFormat"),re("mouseenter",function(){W(t);let r=R(3);return j(r.absoluteTime.positionTime=!0)})("mouseleave",function(){W(t);let r=R(3);return j(r.absoluteTime.positionTime=!1)}),U(4),Y(5,"amTimeAgo"),E()}if(i&2){let t=R(3);k(2),le("title",t.absoluteTime.positionTime?Qr(3,2,t.marker.positionTime,"L LTS"):null),k(2),me(" ",Z(5,5,t.marker.positionTime)," ")}}function kR(i,e){if(i&1){let t=ye();P(0,"div",10),ie(1,"i",13),E(),P(2,"div",12),Y(3,"amDateFormat"),re("mouseenter",function(){W(t);let r=R(3);return j(r.absoluteTime.receivedTime=!0)})("mouseleave",function(){W(t);let r=R(3);return j(r.absoluteTime.receivedTime=!1)}),U(4),Y(5,"amTimeAgo"),E()}if(i&2){let t=R(3);k(2),le("title",t.absoluteTime.receivedTime?Qr(3,2,t.marker.receivedTime,"L LTS"):null),k(2),me(" ",Z(5,5,t.marker.receivedTime)," ")}}function SR(i,e){if(i&1&&($(0,MR,6,7),$(1,kR,6,7)),i&2){let t=R(2);X(t.marker.positionTime?0:-1),k(),X(t.marker.receivedTime?1:-1)}}function LR(i,e){if(i&1&&(P(0,"span"),U(1),E()),i&2){let t=R(4);k(),me(", ",t.marker.json.trackerData.indoor.floorLabel)}}function TR(i,e){if(i&1&&(P(0,"span"),U(1),E()),i&2){let t=R(4);k(),me(", ",t.marker.json.trackerData.indoor.room)}}function ER(i,e){if(i&1&&(P(0,"span"),U(1),E(),$(2,LR,2,1,"span"),$(3,TR,2,1,"span")),i&2){let t=R(3);k(),ae(t.marker.json.trackerData.indoor.building),k(),X(t.marker.json.trackerData.indoor.floorLabel?2:-1),k(),X(t.marker.json.trackerData.indoor.room?3:-1)}}function PR(i,e){if(i&1&&(P(0,"span"),U(1),E()),i&2){let t=R(3);k(),ae(t.marker.location)}}function DR(i,e){if(i&1&&(P(0,"div",7),$(1,ER,4,3)(2,PR,2,1,"span"),E()),i&2){let t=R(2);k(),X(t.marker.viewingTrack?2:1)}}function IR(i,e){if(i&1&&(P(0,"div",14),U(1),E()),i&2){let t=R(3);k(),ae(t.marker.location)}}function OR(i,e){if(i&1&&(P(0,"div",14),U(1),E()),i&2){let t=R(4);k(),ae(t.town)}}function AR(i,e){if(i&1&&$(0,OR,2,1,"div",14),i&2){let t=R(3);X(t.town?0:-1)}}function NR(i,e){if(i&1&&$(0,IR,2,1,"div",14)(1,AR,1,1),i&2){let t=R(2);X(t.marker.location&&t.marker.location!==""?0:1)}}function BR(i,e){i&1&&ie(0,"hr")}function RR(i,e){if(i&1){let t=ye();P(0,"div",3)(1,"div",10)(2,"div",15),re("click",function(){W(t);let r=R(2);return j(r.goToTrack(r.marker.id))}),ie(3,"i",16),E(),P(4,"div"),U(5),Y(6,"translate"),E()(),P(7,"div",6)(8,"div",17),re("click",function(){W(t);let r=R(2);return j(r.goToRecord(r.marker.id))}),ie(9,"i",18),E(),P(10,"div"),U(11),Y(12,"translate"),E()(),P(13,"div",19)(14,"div",20),re("click",function(){W(t);let r=R(2);return j(r.goToDeviceOverview(r.marker.id))}),ie(15,"i",21),E(),P(16,"div"),U(17),Y(18,"translate"),E()()()}i&2&&(k(5),ae(Z(6,3,"Track")),k(6),ae(Z(12,5,"Data")),k(6),ae(Z(18,7,"Details")))}function FR(i,e){if(i&1){let t=ye();P(0,"div",0)(1,"i",1),re("click",function(){W(t);let r=R();return j(r.marker.showMoreDetails=!1)}),E(),P(2,"div",2)(3,"div",3)(4,"div",4),Y(5,"translate"),re("click",function(){W(t);let r=R();return j(r.goToDeviceOverview(r.marker.id))}),ie(6,"div",5),E(),$(7,CR,2,1,"div",6),E(),P(8,"div",7)(9,"b"),U(10),E()(),P(11,"div",8),$(12,SR,2,2),E(),$(13,DR,3,1,"div",7)(14,NR,2,1),$(15,BR,1,0,"hr"),$(16,RR,19,9,"div",3),E()()}if(i&2){let t=R();k(4),Hn(gc("leaflet-grid-column-1-wrapper ",t.marker.statusClass)),Ri("clickbleIcons",t.marker.id&&t.marker.typeId),le("title",oi(t.marker.id&&t.marker.typeId&&Z(5,14,"Device overview"))),k(2),le("ngStyle",mr(16,wR,"url("+(t.imageAuthUrl||t.marker.pictureUrl)+")")),k(),X(t.dataType!=="user"?7:-1),k(3),ae(t.marker==null?null:t.marker.name),k(2),X(t.GlobalStateService.isEmpty(t.marker)?-1:12),k(),X(t.GlobalStateService.isEmpty(t.marker.json==null||t.marker.json.trackerData==null?null:t.marker.json.trackerData.indoor)?14:13),k(2),X(t.marker.id&&t.marker.typeId?15:-1),k(),X(t.marker.id&&t.marker.typeId?16:-1)}}var Fv=(()=>{class i{constructor(){this.router=_e(gr),this.imagePipe=_e(Tc),this.GlobalStateService=xt,this.alarms=[],this.resetPopup=()=>{},this.town="",this.lastSeen="",this.positionTime="",this.location="",this.dataType="",this.absoluteTime={positionTime:!1,receivedTime:!1}}ngOnInit(){return ge(this,null,function*(){this.readData(),this.resetPopup(),this.marker.pictureUrl&&(this.imageAuthUrl=yield this.imagePipe.getImage(this.marker.pictureUrl))})}ngOnChanges(){this.readData(),this.resetPopup()}readData(){if(!this.marker)return;let t=this.marker;if(t.json||(t.json={}),t.json.trackerData?.geoname?.town){let n=t.json.trackerData.geoname.town;this.town=n.split(",")[0]}if(t.devices){t.alarms=[];for(let n of t.devices)n.alarms&&t.alarms.push(...n.alarms)}if(this.alarms=[],t.alarms?.length)for(let n of t.alarms){let r=(0,Ip.default)(n.date);this.alarms.push({message:n.message,date:r.format("L LTS")})}if(t.receivedTime&&Ip.default.isMoment(t.receivedTime)&&(this.lastSeen=t.receivedTime.fromNow()),t.positionTime&&Ip.default.isMoment(t.positionTime)&&(this.positionTime=t.positionTime.fromNow()),t.json.trackerData?.address){let n=t.json.trackerData.address;n.firstAddress&&(this.location+=n.firstAddress),n.cityTown&&(this.location+=", "+n.zip+" "+n.cityTown)}this.dataType=t.dataType}goToTrack(t){this.router.navigateByUrl(`/pages/devices/overview/${t}/map`)}goToRecord(t){this.router.navigateByUrl(`/pages/devices/overview/${t}/traffic`)}goToDeviceOverview(t){this.marker.id&&this.marker.typeId&&this.router.navigateByUrl(`/pages/devices/overview/${t}`)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-marker-popup-detailed"]],inputs:{marker:"marker"},standalone:!1,features:[yn],decls:1,vars:1,consts:[[1,"popup-detailed"],[1,"fas","fa-times","close-popup-detailed",3,"click"],[1,"leaflet-grid-wrapper"],[1,"leaflet-grid-two-columns-wrapper"],[3,"click","title"],[1,"popupHtml-img",3,"ngStyle"],[1,"leaflet-grid-data-column-2-wrapper"],[1,"leaflet-grid-row-wrapper"],[1,"leaflet-grid-data-table-wrapper"],[3,"batteryLevel"],[1,"leaflet-grid-column-1-wrapper"],[1,"fas","fa-map-marker-alt"],[1,"leaflet-grid-data-column-2-wrapper","sub-text",3,"mouseenter","mouseleave","title"],[1,"fas","fa-heartbeat"],[1,"leaflet-grid-row-wrapper","pb-3"],["title","Movement",1,"mb-1",3,"click"],[1,"fas","fa-route","clickbleIcons","info-icon"],["title","Data traffic",1,"mb-1",3,"click"],[1,"fas","fa-chart-line","clickbleIcons","info-icon"],[1,"leaflet-grid-data-column-3-wrapper"],["title","Details",1,"mb-1",3,"click"],[1,"fas","fa-info-circle","clickbleIcons","info-icon"]],template:function(n,r){n&1&&$(0,FR,17,18,"div",0),n&2&&X(r.marker&&r.marker.showMoreDetails&&r.marker.name?0:-1)},dependencies:[yc,SS,dy,py,Fi],styles:[".clickbleIcons[_ngcontent-%COMP%]{cursor:pointer}.leaflet-grid-icon-wrapper[_ngcontent-%COMP%] .fas[_ngcontent-%COMP%], .leaflet-grid-icon-wrapper[_ngcontent-%COMP%] .far[_ngcontent-%COMP%]{font-size:14px!important;margin-right:5px}.info-icon[_ngcontent-%COMP%]{font-size:35px!important;vertical-align:middle}.no-side-padding[_ngcontent-%COMP%]{padding-right:5px;padding-left:5px}.leaflet-grid-wrapper[_ngcontent-%COMP%]{display:grid;grid-row-gap:10px;grid-template-rows:auto min-content;justify-items:center;overflow:hidden}.leaflet-grid-row-wrapper[_ngcontent-%COMP%]{min-width:40px;text-align:center}.leaflet-grid-data-table-wrapper[_ngcontent-%COMP%]{display:grid;grid-column-gap:5px;justify-content:center;grid-row-gap:2px}.leaflet-grid-two-columns-wrapper[_ngcontent-%COMP%]{display:grid;grid-column-gap:25px;justify-content:center}.leaflet-grid-column-1-wrapper[_ngcontent-%COMP%]{grid-column:1;text-align:center}.leaflet-grid-data-column-2-wrapper[_ngcontent-%COMP%]{grid-column:2;align-self:center;width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.leaflet-grid-data-column-3-wrapper[_ngcontent-%COMP%]{grid-column:3;align-self:center}hr[_ngcontent-%COMP%]{width:100%}.sub-text[_ngcontent-%COMP%]{color:gray}.icon-status[_ngcontent-%COMP%]{margin-right:4px}.icon-color-success[_ngcontent-%COMP%]{color:#00d68f}.icon-color-warning[_ngcontent-%COMP%]{color:#fa0}.icon-color-danger[_ngcontent-%COMP%]{color:#ff3d71}.offline[_ngcontent-%COMP%]{border:2px solid #cdcdcd;border-radius:50%}.online[_ngcontent-%COMP%]{border:2px solid #3cab3c;border-radius:50%}.alarm[_ngcontent-%COMP%]{border:2px solid #d70206;border-radius:50%}.popupHtml-img[_ngcontent-%COMP%]{border-radius:50%;width:3vw;min-width:30px;max-width:100%;background:border-box center/contain no-repeat;box-sizing:initial;padding-bottom:100%}"]})}}return i})();var TS=`
`,VR=`
`,Zl=(()=>{class i extends Tt{static{this.autoOpenDetail=!1}constructor(t,n,r){super(t),this.globalState=n,this.popupService=r,this.markers=new Map,this.popupComponent=jl,this.detailComponent=Fv,this.target=0,this.filter={buildingId:0,floor:""},this.autoIndexation=!1,this.subscriptions=new pr,this.markerCluster=Bn.markerClusterGroup({chunkedLoading:!0,spiderfyOnMaxZoom:!0}),this.subscriptions.add(this.globalState.subscribe(LS,o=>{this.autoIndexation=o.value}))}setTarget(t){this.target=t,this.clearFilter()}focus(t){return typeof tge(this,null,function*(){for(let a of t)a=yield this.addOneMarker(a);for(let a of this.markers.values())a.touched||(a.marker?.remove(),delete a.marker,this.markers.delete(a.id||a.buildingId||a.place_id)),a.touched=!1;this.indoorFilter(this.filter.buildingId,this.filter.floor),(this.setCenter&&this.focused||n!=null&&n)&&this.markers.size&&(this.setCenter=!1,this.fitBounds());let o=[];this.markers.forEach(a=>a.marker&&o.push(a.marker)),o.length>50||r!=null&&r?(this.markerCluster.addLayers(o),this.markerCluster.addTo(this.layer)):o.forEach(a=>this.layer.addLayer(a))}))}addOneMarker(t){return ge(this,null,function*(){i.createMarkerObject(t);let n=this.markers.get(t.id||t.buildingId||t.place_id);n&&(t.marker=n.marker,Object.assign(n,t),t!==n&&(t.showPopup=!1,t.setCenter=!1),t=n);let r=Rv.getMarkerPoint(t);if(!r)return this.globalState.log("[TmMarkerLayer] showMarker has no position to show",t),t;if(t.marker instanceof Bn.Marker){let o=t.marker,a=yield this.getMarkerIcon(t);t.touched=!0,o.setLatLng(r),o.setIcon(a)}else t=this.addMarker(t,r);return t.showPopup&&setTimeout(()=>{this.markerCluster.removeLayer(t.marker),this.layer.addLayer(t.marker),t.marker.openPopup()}),t.setCenter&&this.focused&&(this.setCenter=!0,t.setCenter=!1),t.mapIconColor==="#ff0000"&&t.marker.setZIndexOffset(999),t})}getMarkerIcon(t){return ge(this,null,function*(){if(t.icon&&typeof t.icon=="object")return t.icon;let n=t.pictureUrl?yield Gt.getImage(t.pictureUrl):"";if(t.drawBubble){let r="";return t.iconClass?r=VR.replace(/FILL_COLOR/g,t.iconColor||"transparent").replace(/ICON_CLASS/g,t.iconClass||""):r=TS.replace(/FILL_COLOR/g,t.iconColor).replace("IMAGE_URL",n||t.pictureUrl||t.iconUrl||""),new Bn.DivIcon({html:r,iconSize:[32,37],iconAnchor:[16,37],popupAnchor:[1,-34],className:"marker-div-icon"})}return new Bn.Icon({iconUrl:n||t.iconUrl||t.icon||"",iconSize:[32,37],iconAnchor:[16,37],popupAnchor:[1,-34],rotation:180})})}addMarker(t,n,r){return ge(this,null,function*(){t=Mi({},t);let o=yield this.getMarkerIcon(t),a=Bn.marker(n,Object.assign({icon:o},r));return t.marker=a,t.touched=!0,this.markers.set(t.id||t.buildingId||t.place_id,t),t.popupText!=null?a.bindPopup(t.popupText,{minWidth:200,maxWidth:560}):this.setupMarkerPopup(t,a),t})}setupMarkerPopup(t,n){let r={marker:t};t.infoCb&&(r.infoCb=t.infoCb);let o;n.bindPopup("",{minWidth:200,maxWidth:560}).on("popupclose",()=>{t.showPopup=!1,o.location.nativeElement.parentElement===this.map?.getContainer().parentElement&&this.map?.getContainer().parentElement?.removeChild(o.location.nativeElement),o.destroy(),t.showMoreDetails=!1}).on("popupopen",()=>{r.marker.autoIndexation=this.autoIndexation,this.popupService.createPopup(this.popupComponent,n,r)().then(a=>{a.instance?.detailOpened?.subscribe(s=>{s&&(i.autoOpenDetail=!0)})}),o=this.popupService.createComponent(this.detailComponent,r),o.instance?.closeClicked?.subscribe(a=>{a&&(i.autoOpenDetail=!1)}),this.map?.getContainer().parentElement?.appendChild(o.location.nativeElement),t.showPopup=!0,i.autoOpenDetail&&(t.showMoreDetails=!0)})}static createMarkerObject(t,n=yh){n=Object.assign({},yh,n);let r,o=t.json?.trackerData||{};if(o){t.signals&&(o.indoor=t.signals.Indoor,o.location=t.signals.Location);let a=o.indoor;a&&(t.buildingId=a.buildingId,t.floorIndex=a.floorIndex),r=o.location||{lat:o.latitude,lng:o.longitude}}return r||(r=t.position||{}),t.longitude=r.lng||t.lng,t.latitude=r.lat||t.lat,t.pictureUrl=t.pictureurl||t.pictureUrl,t.iconUrl=t.mapiconurl||t.iconUrl,t.iconColor=t.iconColor||t.mapIconColor,t.drawBubble=t.mapIconDrawBubble,Object.assign(t,n),t}fitBounds(){if(!this.map)return;if(!this.target)return super.fitBounds(this.markers.values());let t=this.markers.get(this.target);if(!t)return super.fitBounds(this.markers.values());super.fitBounds([t])}}return i})();var $o=ve(Ae());var Xo=class extends Tt{constructor(e,t){super(e),this.name=e,this.imagePipe=t,this.show=!1}setImage(e){return ge(this,null,function*(){if(this.layer.clearLayers(),!e?.filepath_error)return;let t=yield this.imagePipe.getImage(e.filepath_error);!e||!e.meta||$o.imageOverlay(t,[[+e.meta[3],+e.meta[4]],[+e.meta[5],+e.meta[6]]],{zIndex:1,pane:"images"}).addTo(this.layer)})}static createStaticMapImage(e,t,n){if($o.ImageOverlay.Rotated||Ep($o),n.pane="images",e.latTopLeft&&e.lonTopLeft)return new $o.ImageOverlay.Rotated(t,[e.latTopLeft,e.lonTopLeft],[e.latNE,e.lonNE],[e.latSW,e.lonSW],n);let r=[[e.latSW||0,e.lonSW||0],[e.latNE||0,e.lonNE||0]];return new $o.ImageOverlay(t||"",r,n)}};var Qo=ve(Ae());function zR(i,e){if(i&1){let t=ye();P(0,"button",3),re("click",function(){W(t);let r=R();return j(r.editPlace())}),U(1),Y(2,"translate"),E()}if(i&2){let t=R();k(),ae(Z(2,1,t.marker.buildingId?"add place":"Create new location"))}}var Vv=(()=>{class i extends jl{constructor(){super(...arguments),this.UserPolicy=ga}editPlace(){window.getSelection()?.toString()||(this.marker.id&&this.globalState.isUserAllowed(ga.ContainerUpdate)?this.router.navigateByUrl(`/pages/places/edit/${this.marker.id}`):this.globalState.isUserAllowed(ga.ContainerCreate)&&((!this.marker.marker||!this.marker.marker.lat)&&(this.marker.marker=this.marker.marker?.getLatLng()),oy.storeNewPlace(this.marker),this.router.navigateByUrl("/pages/places/add")))}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=uh(i)))(r||i)}})()}static{this.\u0275cmp=Te({type:i,selectors:[["tm-place-popup-simple"]],standalone:!1,features:[ph],decls:5,vars:9,consts:[[1,"contact","flex"],["size","large",3,"click","ngClass","picture","name","title"],["nbButton","","status","primary","size","small"],["nbButton","","status","primary","size","small",3,"click"]],template:function(n,r){n&1&&(P(0,"div",0)(1,"nb-user",1),Y(2,"imageAuth"),re("click",function(){return r.editPlace()}),E(),P(3,"span"),$(4,zR,3,3,"button",2),E()()),n&2&&(k(),le("title",oi(r.marker.location?r.marker.location:""))("ngClass",r.marker.statusClass)("picture",Qr(2,6,r.globalState.formatImageUrl(r.marker.photo||r.marker.pictureurl||r.marker.pictureUrl||""),!1))("name",r.marker.name),k(3),X(!r.marker.id&&r.globalState.isUserAllowed(r.UserPolicy.ContainerCreate)?4:-1))},styles:[".card-title[_ngcontent-%COMP%]{width:90%}.pointer[_ngcontent-%COMP%]{cursor:pointer}nb-user[_ngcontent-%COMP%]{max-width:250px;margin-right:8px}.contact[_ngcontent-%COMP%]{justify-content:space-between;display:flex;padding:2px 0;font-size:1.2rem;align-items:center;min-width:290px;max-width:560px}"]})}}return i})();var zv=Qo.icon({iconUrl:"/assets/icons/PlaceType-location-marker.png",iconSize:[25,36],iconAnchor:[12.5,36],popupAnchor:[0,-30],shadowSize:[25,36]}),Uv=Qo.icon({iconUrl:"/assets/icons/PlaceType-building-marker-w-shape.png",iconSize:[25,36],iconAnchor:[12.5,36],popupAnchor:[0,-30],shadowSize:[25,36]}),PS=Qo.icon({iconUrl:"/assets/icons/PlaceType-building-marker-wo-shape.png",iconSize:[25,36],iconAnchor:[12.5,36],popupAnchor:[0,-30],shadowSize:[25,36]}),DS=Qo.icon({iconUrl:"/assets/icons/PlaceType-area-marker-w-shape.png",iconSize:[25,36],iconAnchor:[12.5,36],popupAnchor:[0,-30],shadowSize:[25,36]}),ES=class i extends Zl{constructor(e,t,n,r,o,a){super(e,t,n),this.buildingLayer=r,this.floorLayer=o,this.imagePipe=a,this.placesShapesShown=!1,this.popupComponent=Vv,this.markers=new Map,this.maxZoom=19}destroy(){for(let e of this.markers.values())delete e.building?.layer;this.markers.clear(),this.placesShapesShown=!1,super.destroy()}setMarkers(e){let t=!!this.target&&this.target!==0;for(let n of e){n.building?.layer&&(this.floorLayer.layer.removeLayer(n.building.layer),n.building.layer=void 0);let r=!1;if(n.nodes?.length)r=!0;else if(n.type===_r.Building||n.type===_r.Area){let a=n.building?.floors?.find?.(c=>c.floorIndex===(typeof n.defaultFloorIndex=="number"?n.defaultFloorIndex:this.getToShowFloorIndex(n.building?.floors))),s=[];a?.floorShape&&(s=a.floorShape,r=!0),this.showShapeBorders(s),n.shownFloor=a?.floorIndex??0,(!t||n.id!==void 0&&n.id===this.target)&&this.showFloorMap(n)}switch(n.type){case _r.Building:n.icon=r?Uv:PS;break;case _r.Location:n.icon=zv;break;case _r.Area:n.icon=DS;break;default:n.icon=zv;break}n.name=n.value||n.name;let o=n.markerPosition;n.json||(n.json={}),n.json.trackerData={location:o},n.location=n.address||n.location,this.placesShapesShown&&n.building}this.placesShapesShown=!0,this.setCenter=this.focused,super.setMarkers(e)}getToShowFloorIndex(e){let t=0;return e.forEach(n=>{n.imageURL&&n.floorIndex>t&&(t=n.floorIndex)}),t}fitBounds(){if(!this.map)return;if(!this.target)return super.fitBounds();let e=this.markers.get(this.target);if(!e)return super.fitBounds();let t=e.building?.shapes?.[e.building.min_level]?.[0];if(!t?.nodes)return super.fitBounds();let r=Rn.floorShapeToLatlng([t])[0].map(o=>[o.lat,o.lng]);r.push([e.latitude,e.longitude]),this.map.fitBounds(r,{padding:[42,42],maxZoom:this.maxZoom})}showShapeBorders(e){if(!(!e||e.length===0))for(let t of e){if(!t.nodes)continue;let n=Rn.floorShapeToLatlng([t]);if(!n)continue;let r=new Qo.Polygon(n[0],{fill:!1,weight:2});this.buildingLayer.layer.addLayer(r)}}showFloorMap(e){return ge(this,null,function*(){let t=e.building;if(!t)return;t.layer&&this.floorLayer.layer.removeLayer(t.layer);let n=typeof e.shownFloor=="number"?e.shownFloor:e.defaultFloorIndex,r=e.building?.floors?.find?.(a=>a.floorIndex===Number(n));if(!r||!r.imageURL){this.globalState.log("[TmPlaceLayer] Shape File is missing!!",r);return}if(!r.latNE||!r.lonNE||!r.latSW||!r.lonSW||!r.latTopLeft||!r.lonTopLeft){this.globalState.log("[TmPlaceLayer] Shape File missing coordinates!!",r);return}let o=yield this.imagePipe.getImage(r.imageURL);if(t.layer&&this.floorLayer.layer.removeLayer(t.layer),t.layer=Xo.createStaticMapImage(r,o,{opacity:r.opacity}),this.floorLayer.layer.addLayer(t.layer),r.cropToShape){let a=[],l=e.building?.floors.find(u=>u.floorIndex===0)?.floorShape;l?.length&&(a=Rn.floorShapeToLatlng(l));let c={};e.building.floors?.forEach?.(u=>{c[u.floorIndex]=u,c[u.floorIndex].floorLabel=u.floorLabel}),i.setFloorShape(r,c,a);let d=e.originalShape||{};r.floorShape&&(d=Rn.floorShapeToLatlng(r.floorShape),t.layer.setClip?.(d))}t.visible=!0,t.floorIndex=r.floorIndex})}static setFloorShape(e,t,n){let r=e.floorShape?.[0];if(r?.nodes?.length&&r.type!=="inherited")return e;let o=t[0]||{};t[0]=o,(!o.floorShape?.[0]||o.floorShape[0].type==="inherited")&&n&&(o.floorShape=Rn.latlngToFloorShape(n,0));let a=s=>{let l=t[s]?.floorShape?.[0];return l?.nodes?.length&&l.type!=="inherited"?(e.floorShape=[{type:"inherited",nodes:l.nodes}],!0):!1};if(e.floorIndex>=0){for(let s=e.floorIndex-1;s>=0;s--)if(a(s))return e}else for(let s=e.floorIndex+1;s{class i{constructor(){this.ref=_e(kc),this.device={},this.header="Record details"}dismiss(){this.ref.close()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-device-data-dialog"]],inputs:{device:"device",header:"header"},standalone:!1,decls:11,vars:9,consts:[["status","primary",2,"max-height","100%"],[2,"max-width","700px"],[3,"innerHTML"],["nbButton","","status","warning",3,"click"]],template:function(n,r){n&1&&(P(0,"nb-card",0)(1,"nb-card-header"),U(2),Y(3,"translate"),E(),P(4,"nb-card-body",1),ie(5,"code",2),Y(6,"json"),E(),P(7,"nb-card-footer")(8,"button",3),re("click",function(){return r.dismiss()}),U(9),Y(10,"translate"),E()()()),n&2&&(k(2),ae(Z(3,3,r.header)),k(3),le("innerHTML",Z(6,5,r.device),fc),k(4),ae(Z(10,7,"Dismiss")))},dependencies:[vr,ma,ha,fa,pa,b_,Fi],styles:["code[_ngcontent-%COMP%]{white-space:pre-wrap}"]})}}return i})();var OS=(()=>{class i{constructor(t,n){this.api=t,this.ref=n,this.settings={actions:{delete:!1,edit:!1,add:!1,position:"right"},mode:"external",noDataMessage:"No request found.",columns:{type:{title:"Type",type:"string"},logId:{title:"LogId",type:"number"}}},this.source=new fy}ngOnInit(){return ge(this,null,function*(){let t=(yield this.api.getPath("trackmap/scans/"+this.wifiScanId+"/logids").toPromise())||[];this.source.load(t)})}viewRequest(t){window.open("/#/pages/locate/log_id/"+t.data.logId,"_blank")}static{this.\u0275fac=function(n){return new(n||i)(dh(Sc),dh(kc))}}static{this.\u0275cmp=Te({type:i,selectors:[["km-sdk-request-selector"]],inputs:{wifiScanId:"wifiScanId"},decls:8,vars:2,consts:[["status","primary",2,"max-height","100%"],[3,"userRowSelect","settings","source"],["nbButton","","status","warning",3,"click"]],template:function(n,r){n&1&&(P(0,"nb-card",0)(1,"nb-card-header"),U(2,"SDK Requests"),E(),P(3,"nb-card-body")(4,"ng2-smart-table",1),re("userRowSelect",function(a){return r.viewRequest(a)}),E()(),P(5,"nb-card-footer")(6,"button",2),re("click",function(){return r.ref.close()}),U(7,"Dismiss"),E()()()),n&2&&(k(4),le("settings",r.settings)("source",r.source))},dependencies:[Cc,ma,ha,fa,pa,Mc,vr,gy,my],encapsulation:2})}}return i})();var UR=(i,e)=>({startStyle:i,endStyle:e});function HR(i,e){if(i&1&&U(0),i&2){let t=R(2);me(" ",t.marker.trackerType," ")}}function GR(i,e){if(i&1&&(P(0,"div",2),ie(1,"i",6),U(2),Y(3,"translate"),E(),P(4,"div",4),U(5),E()),i&2){let t=R(2);k(2),me("\xA0",Z(3,2,"Datetime:")),k(3),ae(t.marker.displayTime)}}function WR(i,e){if(i&1&&(P(0,"div",2),ie(1,"i",7),U(2),Y(3,"translate"),E(),P(4,"div",4),U(5),E()),i&2){let t=R(2);k(2),me("\xA0",Z(3,2,"Source:")),k(3),ae(t.marker.src)}}function jR(i,e){if(i&1&&(P(0,"div",2),ie(1,"i",8),U(2),Y(3,"translate"),E(),P(4,"div",4),U(5),E()),i&2){let t=R(2);k(2),me("\xA0",Z(3,2,"Accuracy:")),k(3),me("",t.marker.acc,"\xA0m")}}function qR(i,e){if(i&1&&(P(0,"div",2),ie(1,"i",9),U(2),Y(3,"translate"),E(),P(4,"div",4),U(5),E()),i&2){let t=R(2);k(2),me("\xA0",Z(3,2,"Speed:")),k(3),me("",t.marker.spd,"\xA0km/h")}}function YR(i,e){if(i&1&&(P(0,"div",2),ie(1,"i",10),U(2),Y(3,"translate"),E(),P(4,"div",4),U(5),E()),i&2){let t=R(2);k(2),me("\xA0",Z(3,2,"Heading:")),k(3),me("",t.marker.hdg,"\xB0")}}function ZR(i,e){if(i&1&&(P(0,"div",2),ie(1,"i",11),U(2),Y(3,"translate"),E(),P(4,"div",4),U(5),E()),i&2){let t=R(2);k(2),me("\xA0",Z(3,2,"Batterylevel:")," "),k(3),me("",t.marker.bat,"\xA0%")}}function KR(i,e){if(i&1&&(P(0,"div",2),ie(1,"i",12),U(2),Y(3,"translate"),E(),P(4,"div",4),U(5),E()),i&2){let t=R(2);k(2),me("\xA0",Z(3,2,"WifiScanId:")," "),k(3),ae(t.marker.id)}}function $R(i,e){if(i&1){let t=ye();P(0,"button",13),re("click",function(){W(t);let r=R(2);return j(r.openDialog())}),U(1),Y(2,"translate"),E()}i&2&&(k(),me(" ",Z(2,1,"Raw data")," "))}function XR(i,e){if(i&1){let t=ye();P(0,"button",14),re("click",function(){W(t);let r=R(3);return j(r.viewRerunRequest(r.marker.rerunLogId))}),U(1),Y(2,"translate"),E()}i&2&&(k(),ae(Z(2,1,"Rerun Request")))}function QR(i,e){if(i&1){let t=ye();P(0,"button",14),re("click",function(){W(t);let r=R(2);return j(r.viewSDKRequest(r.marker.id))}),U(1),Y(2,"translate"),E(),P(3,"button",14),re("click",function(){W(t);let r=R(2);return j(r.viewSDKLookupRequests(r.marker.id))}),U(4),Y(5,"translate"),E(),$(6,XR,3,3,"button",15)}if(i&2){let t=R(2);k(),ae(Z(2,3,"SDK Request")),k(3),ae(Z(5,5,"Lookup Requests")),k(2),X(t.marker.rerunLogId?6:-1)}}function JR(i,e){if(i&1&&(P(0,"div")(1,"div",0)(2,"div",1),$(3,HR,1,1),E(),P(4,"div",2),ie(5,"i",3),U(6),Y(7,"translate"),E(),P(8,"div",4),U(9),E(),$(10,GR,6,4),$(11,WR,6,4),$(12,jR,6,4),$(13,qR,6,4),$(14,YR,6,4),$(15,ZR,6,4),$(16,KR,6,4),$(17,$R,3,3,"button",5),E(),$(18,QR,7,7),E()),i&2){let t=R();k(2),le("ngClass",Ss(15,UR,t.marker.trackerType==="Track Start",t.marker.trackerType==="Track End")),k(),X(t.config.service!=2?3:-1),k(3),me("\xA0",Z(7,13,"Location:")),k(3),ae(t.marker.lcn),k(),X(t.marker.displayTime?10:-1),k(),X(t.marker.src?11:-1),k(),X(t.marker.acc?12:-1),k(),X(t.marker.spd?13:-1),k(),X(t.marker.hdg?14:-1),k(),X(t.marker.bat?15:-1),k(),X(t.marker.trackerType=="SDK"&&t.marker.id>0?16:-1),k(),X(t.globalState.isUserAllowed(t.UserPolicy.RecordUiSee)?17:-1),k(),X(t.marker.trackerType=="SDK"&&t.marker.id>0?18:-1)}}var $l=(()=>{class i{constructor(){this.config=_e("config"),this.dialogService=_e(J_),this.api=_e(Sc),this.globalState=_e(xt),this.tmIndoorServiceV3=_e(va),this.date="",this.time="",this.UserPolicy=ga}ngOnInit(){this.renderData(),this.resetPopup&&this.resetPopup()}renderData(){}openDialog(){return ge(this,null,function*(){if(!this.marker?.id)return;let t;this.slamSessionId||this.marker?.slamSessionId?t=yield this.tmIndoorServiceV3.getwifiscans(this.slamSessionId||this.marker.slamSessionId):t=yield this.api.getPath("record/"+this.marker?.id).toPromise(),this.dialogService.open(IS,{context:{device:t}})})}viewSDKLookupRequests(t){this.dialogService.open(OS,{context:{wifiScanId:t}})}viewSDKRequest(t){this.api.getPath("trackmap/scans/"+t+"/rawdata").subscribe(n=>{this.dialogService.open(hy,{context:{name:"WifiScanId "+t,data:n}})})}viewRerunRequest(t){window.open("/#/pages/locate/log_id/"+t,"_blank")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-track-popup"]],standalone:!1,decls:1,vars:1,consts:[[1,"grid-data-table-wrapper"],[1,"grid-title-wrapper",3,"ngClass"],[1,"grid-data-wrapper"],[1,"fas","fa-map-marker"],[1,"grid-data-content-wrapper"],["nbButton","","status","primary","size","small",1,"grid-title-wrapper"],[1,"fas","fa-clock"],[1,"fas","fa-satellite-dish"],[1,"fas","fa-ruler-combined"],[1,"fas","fa-tachometer-alt"],[1,"far","fa-compass"],[1,"fas","fa-battery-three-quarters"],[1,"fas","fa-fingerprint"],["nbButton","","status","primary","size","small",1,"grid-title-wrapper",3,"click"],["nbButton","","status","primary",1,"fullwidthbutton",3,"click"],["nbButton","","status","primary",1,"fullwidthbutton"]],template:function(n,r){n&1&&$(0,JR,19,18,"div"),n&2&&X(r.marker?0:-1)},dependencies:[_c,vr,Fi],styles:[".fas[_ngcontent-%COMP%], .far[_ngcontent-%COMP%]{font-size:10px!important;margin-right:1px}.grid-data-table-wrapper[_ngcontent-%COMP%]{display:grid;grid-gap:5px;vertical-align:middle;align-items:center;grid-auto-columns:minmax(75px,auto)}.grid-title-wrapper[_ngcontent-%COMP%]{grid-column:1/3;font-weight:700;white-space:nowrap;text-align:center}.grid-data-wrapper[_ngcontent-%COMP%]{grid-column:1;font-weight:700;vertical-align:middle}.grid-data-content-wrapper[_ngcontent-%COMP%]{grid-column:2;vertical-align:middle}.startStyle[_ngcontent-%COMP%]{color:green}.endStyle[_ngcontent-%COMP%], .mapIconEnd[_ngcontent-%COMP%]{color:red}.fullwidthbutton[_ngcontent-%COMP%]{margin-top:5px;width:100%}"]})}}return i})();var Op=class extends Tt{constructor(e,t,n="#438BBB",r,o){super(e),this.popupService=t,this.trackColor=n,this.tracks=[],this.currentBuild=[],this.markerLayer=new Et.FeatureGroup,this.settings={autoPan:!1,speed:0,loop:!1,tail:20},this.extraSettings={},this.playedTo=0,this.playTimeout=0,this.duration=0,this.selectedMarker$=new ca,this.clickOnTrackMarker=a=>{this.selectTrackMarker(a.sourceTarget.track)},o?this.trackSelectedMarker=o:this.trackSelectedMarker=new Et.FeatureGroup,this.trackSelectedMarker.addTo(this.layer),this.EndMarker=Et.divIcon({html:` `,iconSize:[20,20],iconAnchor:[10,10],popupAnchor:[0,-21],className:"myDivIcon"}),this.StartMarker=Et.divIcon({html:` `,iconSize:[20,20],iconAnchor:[10,10],popupAnchor:[0,-21],className:"myDivIcon"}),r?this.trackRenderer=r:this.trackRenderer=new Et.Canvas({tolerance:10,pane:"track"})}focus(){return this.focused=!0,!this.tracks.length||!this.polyline?!1:(this.map?.fitBounds(this.polyline?.getBounds()),!0)}play(){if(!this.tracks.length)return;if(this.playTimeout){clearTimeout(this.playTimeout),this.playTimeout=0;return}this.playedTo===this.tracks.length&&(this.playedTo=0);let e=()=>{if(!this.tracks||this.playedTo===this.tracks.length)if(this.settings.loop)this.playedTo=0;else{this.playTimeout=0,this.duration=0;return}if(!this.tracks)return;let t=1e3;this.settings.speed?t=1e3/this.settings.speed:t=Math.min(2e3,6e4/this.tracks.length),this.playTo(this.playedTo+1,t-10),this.playTimeout=window.setTimeout(e,t),this.duration=t/1e3};e()}playTo(e=this.playedTo,t=0){if(this.playedTo=e,!this.tracks)return;let n=[],r=this.tracks.length-e,o=e&&r>0?this.settings.tail:1/0;for(let a=r;ar+o);a++)n.push(this.tracks[a]);if(e&&r>0?this.selectTrackMarker(this.tracks[r],!1):(this.trackSelectedMarker.clearLayers(),this.shownMarker?.remove(),delete this.shownMarker),n.length&&(t===0?this.buildLine(n):setTimeout(()=>this.buildLine(n),t)),this.settings.autoPan){let a=this.tracks[r],s=a?new Et.LatLng(a.lat,a.lon):this.trackStartMarker?.getLatLng();s&&this.map?.panTo(s,{animate:!0,duration:this.duration,easeLinearity:1})}}resetPolyline(){this.layer.clearLayers(),this.polyline?.remove(),delete this.polyline}buildLine(e,t=this.trackColor){this.currentBuild=e;let n=e.map(o=>[o.lat,o.lon]);this.polyline||(this.polyline=new Et.Polyline([],Object.assign({noClip:!1,stroke:!0,color:t,weight:6,smoothFactor:1,pane:"track",renderer:this.trackRenderer},this.extraSettings)).addTo(this.layer).addEventListener("click",o=>this.findClosest(o)));let r=n.filter(o=>o instanceof Array&&typeof o[0]=="number"&&typeof o[1]=="number");r.length&&this.polyline.setLatLngs(r)}findClosest(e){let t=e.latlng,n,r=Number.MAX_SAFE_INTEGER;for(let o of this.tracks){let a=Math.abs(o.lat-t.lat)+Math.abs(o.lon-t.lng);a>r||(r=a,n=o)}n&&this.selectTrackMarker(n,!0,!1)}showTracks(e){if(!Array.isArray(e)||(e.sort((r,o)=>o.ts-r.ts),this.tracks=e,this.markerLayer.clearLayers(),this.markerLayer.addTo(this.layer),this.playedTo=e.length,this.playTimeout&&clearInterval(this.playTimeout),this.playTimeout=0,this.duration=0,this.buildLine(e),!this.tracks.length))return;let t=this.tracks[this.tracks.length-1];t.trackerType="Track Start";let n=this.tracks[0];setTimeout(()=>{this.selectedMarker$.next(n),this.map?.setZoom(this.map?.getZoom())},100),n.trackerType="Track End",this.trackStartMarker=Et.marker([t.lat,t.lon],{icon:this.StartMarker}).addTo(this.markerLayer),this.trackStartMarker.track=t,this.trackStartMarker.on("click",this.clickOnTrackMarker),this.popupService&&this.trackStartMarker.bindPopup("",{minWidth:200,maxWidth:560}).on("popupopen",this.popupService.createPopup($l,this.trackStartMarker,{marker:t})),this.trackEndMarker=Et.marker([n.lat,n.lon],{icon:this.EndMarker}).addTo(this.markerLayer),this.trackEndMarker.track=n,this.trackEndMarker.on("click",this.clickOnTrackMarker),this.popupService&&this.trackEndMarker.bindPopup("",{minWidth:200,maxWidth:560}).on("popupopen",this.popupService.createPopup($l,this.trackEndMarker,{marker:n})),this.selectedTrack&&this.selectTrackMarker(this.selectedTrack,!1,!1)}selectTrackMarker(e,t=!0,n=!0){if(!this.layer||(this.trackSelectedMarker.clearLayers(),this.shownMarker?this.shownMarker.setLatLng([e.lat,e.lon]):this.shownMarker=Et.marker([e.lat,e.lon],{icon:Et.divIcon({html:` `,iconSize:[40,40],iconAnchor:[14,40],popupAnchor:[0,-41],className:"myDivIcon animated"})}),this.popupService?this.shownMarker.addTo(this.layer).removeEventListener("popupopen").bindPopup("",{minWidth:200,maxWidth:560}).on("popupopen",this.popupService.createPopup($l,this.shownMarker,{marker:e})):this.shownMarker.addTo(this.layer),this.selectedMarker$.next(e),!t))return;this.shownMarker.openPopup();let r=Et.circle([e.lat,e.lon],{radius:e.acc,className:"noMouse"}).addTo(this.trackSelectedMarker);if(!n)return;let o=r.getBounds();this.map?.fitBounds(o,{padding:[42,42],maxZoom:18})}};var rn=ve(Ae());(function(i,e,t){function n(r,o){for(;(r=r.parentElement)&&!r.classList.contains(o););return r}L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"Error: shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(r,o){this._map=r,this._container=r._container,this._overlayPane=r._panes.overlayPane,this._popupPane=r._panes.popupPane,o&&o.shapeOptions&&(o.shapeOptions=L.Util.extend({},this.options.shapeOptions,o.shapeOptions)),L.setOptions(this,o);var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var r=this._map;r&&(L.DomUtil.disableTextSelection(),r.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(r){L.setOptions(this,r)},_fireCreatedEvent:function(r){this._map.fire(L.Draw.Event.CREATED,{layer:r,layerType:this.type})},_cancelDrawing:function(r){r.keyCode===27&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(r,o){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,o&&o.drawError&&(o.drawError=L.Util.extend({},this.options.drawError,o.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,r,o)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(r))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(r)),this._poly.addLatLng(r),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(r,!0)},completeShape:function(){this._markers.length1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(a.latlng),this._finishShape()):l0){var a;if(this.type===L.Draw.Polyline.TYPE)a=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;a=this._markers[0]}var s=this._map.latLngToContainerPoint(a.getLatLng()),l=new L.Marker(r,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),c=this._map.latLngToContainerPoint(l.getLatLng());o=s.distanceTo(c)}else o=1/0;return o},_updateFinishHandler:function(){var r=this._markers.length;r>1&&this._markers[r-1].on("click",this._finishShape,this),r>2&&this._markers[r-2].off("click",this._finishShape,this)},_createMarker:function(r){var o=new L.Marker(r,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(o),o},_updateGuide:function(r){var o=this._markers?this._markers.length:0;o>0&&(r=r||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[o-1].getLatLng()),r))},_updateTooltip:function(r){var o=this._getTooltipText();r&&this._tooltip.updatePosition(r),this._errorShown||this._tooltip.updateContent(o)},_drawGuide:function(r,o){var a,s,l,c=Math.floor(Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2))),d=this.options.guidelineDistance,u=this.options.maxGuideLineLength,p=c>u?c-u:d;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));p1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var r=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,r)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(r,o){L.Draw.Polyline.prototype.initialize.call(this,r,o),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var r=this._markers.length;r===1&&this._markers[0].on("click",this._finishShape,this),r>2&&(this._markers[r-1].on("dblclick",this._finishShape,this),r>3&&this._markers[r-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var r,o;return this._markers.length===0?r=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length"+L.GeometryUtil.readableArea(r,this.options.metric,this.options.precision)),o):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(r,o){var a;!this.options.allowIntersection&&this.options.showArea&&(a=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(a)),L.Draw.Polyline.prototype._vertexChanged.call(this,r,o)},_cleanUpShape:function(){var r=this._markers.length;r>0&&(this._markers[0].off("click",this._finishShape,this),r>2&&this._markers[r-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(r,o){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,r,o)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(r){this._isDrawing=!0,this._startLatLng=r.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(r.originalEvent)},_onMouseMove:function(r){var o=r.latlng;this._tooltip.updatePosition(o),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(o))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(r,o){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,r,o)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(r){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!n(r.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(r){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,r)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,r),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var r=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,r)},_getTooltipText:function(){var r,o,a,s=L.Draw.SimpleShape.prototype._getTooltipText.call(this),l=this._shape,c=this.options.showArea;return l&&(r=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),o=L.GeometryUtil.geodesicArea(r),a=c?L.GeometryUtil.readableArea(o,this.options.metric):""),{text:s.text,subtext:a}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(r,o){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,r,o)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(r){var o=r.latlng;this._tooltip.updatePosition(o),this._mouseMarker.setLatLng(o),this._marker?(o=this._mouseMarker.getLatLng(),this._marker.setLatLng(o)):(this._marker=this._createMarker(o),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(r){return new L.Marker(r,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(r){this._onMouseMove(r),this._onClick()},_fireCreatedEvent:function(){var r=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,r)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(r,o){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,r,o)},_fireCreatedEvent:function(){var r=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,r)},_createMarker:function(r){return new L.CircleMarker(r,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(r,o){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,r,o)},_drawShape:function(r){if(L.GeometryUtil.isVersion07x())var o=this._startLatLng.distanceTo(r);else var o=this._map.distance(this._startLatLng,r);this._shape?this._shape.setRadius(o):(this._shape=new L.Circle(this._startLatLng,o,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var r=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,r)},_onMouseMove:function(r){var o,a=r.latlng,s=this.options.showRadius,l=this.options.metric;if(this._tooltip.updatePosition(a),this._isDrawing){this._drawShape(a),o=this._shape.getRadius().toFixed(1);var c="";s&&(c=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(o,l,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:c})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(r,o){this._marker=r,L.setOptions(this,o)},addHooks:function(){var r=this._marker;r.dragging.enable(),r.on("dragend",this._onDragEnd,r),this._toggleMarkerHighlight()},removeHooks:function(){var r=this._marker;r.dragging.disable(),r.off("dragend",this._onDragEnd,r),this._toggleMarkerHighlight()},_onDragEnd:function(r){var o=r.target;o.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:o})},_toggleMarkerHighlight:function(){var r=this._marker._icon;r&&(r.style.display="none",L.DomUtil.hasClass(r,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(r,"leaflet-edit-marker-selected"),this._offsetMarker(r,-4)):(L.DomUtil.addClass(r,"leaflet-edit-marker-selected"),this._offsetMarker(r,4)),r.style.display="")},_offsetMarker:function(r,o){var a=parseInt(r.style.marginTop,10)-o,s=parseInt(r.style.marginLeft,10)-o;r.style.marginTop=a+"px",r.style.marginLeft=s+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(r){this.latlngs=[r._latlngs],r._holes&&(this.latlngs=this.latlngs.concat(r._holes)),this._poly=r,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(r){for(var o=0;or&&(a._index+=o)})},_createMiddleMarker:function(r,o){var a,s,l,c=this._getMiddleLatLng(r,o),d=this._createMarker(c);d.setOpacity(.6),r._middleRight=o._middleLeft=d,s=function(){d.off("touchmove",s,this);var u=o._index;d._index=u,d.off("click",a,this).on("click",this._onMarkerClick,this),c.lat=d.getLatLng().lat,c.lng=d.getLatLng().lng,this._spliceLatLngs(u,0,c),this._markers.splice(u,0,d),d.setOpacity(1),this._updateIndexes(u,1),o._index++,this._updatePrevNext(r,d),this._updatePrevNext(d,o),this._poly.fire("editstart")},l=function(){d.off("dragstart",s,this),d.off("dragend",l,this),d.off("touchmove",s,this),this._createMiddleMarker(r,d),this._createMiddleMarker(d,o)},a=function(){s.call(this),l.call(this),this._fireEdit()},d.on("click",a,this).on("dragstart",s,this).on("dragend",l,this).on("touchmove",s,this),this._markerGroup.addLayer(d)},_updatePrevNext:function(r,o){r&&(r._next=o),o&&(o._prev=r)},_getMiddleLatLng:function(r,o){var a=this._poly._map,s=a.project(r.getLatLng()),l=a.project(o.getLatLng());return a.unproject(s._add(l)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(r,o){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=r,L.Util.setOptions(this,o)},addHooks:function(){var r=this._shape;this._shape._map&&(this._map=this._shape._map,r.setStyle(r.options.editing),r._map&&(this._map=r._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var r=this._shape;if(r.setStyle(r.options.original),r._map){this._unbindMarker(this._moveMarker);for(var o=0,a=this._resizeMarkers.length;o "+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(r){this._map=r,this._container=r._container,this._pane=r._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(r,o){var a={};if(r.touches!==void 0){if(!r.touches.length)return;a=r.touches[0]}else if(r.pointerType!=="touch"||(a=r,!this._filterClick(r)))return;var s=this._map.mouseEventToContainerPoint(a),l=this._map.mouseEventToLayerPoint(a),c=this._map.layerPointToLatLng(l);this._map.fire(o,{latlng:c,layerPoint:l,containerPoint:s,pageX:a.pageX,pageY:a.pageY,originalEvent:r})},_filterClick:function(r){var o=r.timeStamp||r.originalEvent.timeStamp,a=L.DomEvent._lastClick&&o-L.DomEvent._lastClick;return a&&a>100&&a0)return parseInt(r.substring(o+5,r.indexOf(".",o)),10);if(r.indexOf("Trident/")>0){var a=r.indexOf("rv:");return parseInt(r.substring(a+3,r.indexOf(".",a)),10)}var s=r.indexOf("Edge/");return s>0&&parseInt(r.substring(s+5,r.indexOf(".",s)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var r=this._icon,o=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?o.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):o.concat(["touchcancel"]),L.DomUtil.addClass(r,"leaflet-clickable"),L.DomEvent.on(r,"click",this._onMouseClick,this),L.DomEvent.on(r,"keypress",this._onKeyPress,this);for(var a=0;a0)return parseInt(r.substring(o+5,r.indexOf(".",o)),10);if(r.indexOf("Trident/")>0){var a=r.indexOf("rv:");return parseInt(r.substring(a+3,r.indexOf(".",a)),10)}var s=r.indexOf("Edge/");return s>0&&parseInt(r.substring(s+5,r.indexOf(".",s)),10)}}),L.LatLngUtil={cloneLatLngs:function(r){for(var o=[],a=0,s=r.length;a2){for(var u=0;u1&&(s=s+u+p[1])}return s},readableArea:function(o,a,d){var l,c,d=L.Util.extend({},r,d);return a?(c=["ha","m"],type=typeof a,type==="string"?c=[a]:type!=="boolean"&&(c=a),l=o>=1e6&&c.indexOf("km")!==-1?L.GeometryUtil.formattedNumber(1e-6*o,d.km)+" km\xB2":o>=1e4&&c.indexOf("ha")!==-1?L.GeometryUtil.formattedNumber(1e-4*o,d.ha)+" ha":L.GeometryUtil.formattedNumber(o,d.m)+" m\xB2"):(o/=.836127,l=o>=3097600?L.GeometryUtil.formattedNumber(o/3097600,d.mi)+" mi\xB2":o>=4840?L.GeometryUtil.formattedNumber(o/4840,d.ac)+" acres":L.GeometryUtil.formattedNumber(o,d.yd)+" yd\xB2"),l},readableDistance:function(o,a,s,l,u){var d,u=L.Util.extend({},r,u);switch(a?typeof a=="string"?a:"metric":s?"feet":l?"nauticalMile":"yards"){case"metric":d=o>1e3?L.GeometryUtil.formattedNumber(o/1e3,u.km)+" km":L.GeometryUtil.formattedNumber(o,u.m)+" m";break;case"feet":o*=3.28083,d=L.GeometryUtil.formattedNumber(o,u.ft)+" ft";break;case"nauticalMile":o*=.53996,d=L.GeometryUtil.formattedNumber(o/1e3,u.nm)+" nm";break;case"yards":default:o*=1.09361,d=o>1760?L.GeometryUtil.formattedNumber(o/1760,u.mi)+" miles":L.GeometryUtil.formattedNumber(o,u.yd)+" yd"}return d},isVersion07x:function(){var o=L.version.split(".");return parseInt(o[0],10)===0&&parseInt(o[1],10)===7}})})(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(r,o,a,s){return this._checkCounterclockwise(r,a,s)!==this._checkCounterclockwise(o,a,s)&&this._checkCounterclockwise(r,o,a)!==this._checkCounterclockwise(r,o,s)},_checkCounterclockwise:function(r,o,a){return(a.y-r.y)*(o.x-r.x)>(o.y-r.y)*(a.x-r.x)}}),L.Polyline.include({intersects:function(){var r,o,a,s=this._getProjectedPoints(),l=s?s.length:0;if(this._tooFewPointsForIntersection())return!1;for(r=l-1;r>=3;r--)if(o=s[r-1],a=s[r],this._lineSegmentsIntersectsRange(o,a,r-2))return!0;return!1},newLatLngIntersects:function(r,o){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(r),o)},newPointIntersects:function(r,o){var a=this._getProjectedPoints(),s=a?a.length:0,l=a?a[s-1]:null,c=s-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(l,r,c,o?1:0)},_tooFewPointsForIntersection:function(r){var o=this._getProjectedPoints(),a=o?o.length:0;return a+=r||0,!o||as;u--)if(l=d[u-1],c=d[u],L.LineUtil.segmentsIntersect(r,o,l,c))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var r=[],o=this._defaultShape(),a=0;a=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return this._activeMode!==null},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(r){var o,a=L.DomUtil.create("div","leaflet-draw-section"),s=0,l=this._toolbarClass||"",c=this.getModeHandlers(r);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=r,o=0;o0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(r.subtext.length>0?''+r.subtext+" ":"")+""+r.text+" ",r.text||r.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(r){var o=this._map.latLngToLayerPoint(r),a=this._container;return this._container&&(this._visible&&(a.style.visibility="inherit"),L.DomUtil.setPosition(a,o)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(r){for(var o in this.options)this.options.hasOwnProperty(o)&&r[o]&&(r[o]=L.extend({},this.options[o],r[o]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,r)},getModeHandlers:function(r){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(r,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(r,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(r,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(r,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(r,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(r,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(r){return[{enabled:r.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:r.completeShape,context:r},{enabled:r.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:r.deleteLastVertex,context:r},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(r){L.setOptions(this,r);for(var o in this._modes)this._modes.hasOwnProperty(o)&&r.hasOwnProperty(o)&&this._modes[o].handler.setOptions(r[o])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(r){r.edit&&(r.edit.selectedPathOptions===void 0&&(r.edit.selectedPathOptions=this.options.edit.selectedPathOptions),r.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,r.edit.selectedPathOptions)),r.remove&&(r.remove=L.extend({},this.options.remove,r.remove)),r.poly&&(r.poly=L.extend({},this.options.poly,r.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,r),this._selectedFeatureCount=0},getModeHandlers:function(r){var o=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(r,{featureGroup:o,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(r,{featureGroup:o}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(r){var o=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return r.removeAllLayers&&o.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),o},addToolbar:function(r){var o=L.Toolbar.prototype.addToolbar.call(this,r);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),o},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var r,o=this.options.featureGroup,a=o.getLayers().length!==0;this.options.edit&&(r=this._modes[L.EditToolbar.Edit.TYPE].button,a?L.DomUtil.removeClass(r,"leaflet-disabled"):L.DomUtil.addClass(r,"leaflet-disabled"),r.setAttribute("title",a?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(r=this._modes[L.EditToolbar.Delete.TYPE].button,a?L.DomUtil.removeClass(r,"leaflet-disabled"):L.DomUtil.addClass(r,"leaflet-disabled"),r.setAttribute("title",a?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(r,o){if(L.Handler.prototype.initialize.call(this,r),L.setOptions(this,o),this._featureGroup=o.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var r=this._map;r&&(r.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),r._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(r){this._revertLayer(r)},this)},save:function(){var r=new L.LayerGroup;this._featureGroup.eachLayer(function(o){o.edited&&(r.addLayer(o),o.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:r})},_backupLayer:function(r){var o=L.Util.stamp(r);this._uneditedLayerProps[o]||(r instanceof L.Polyline||r instanceof L.Polygon||r instanceof L.Rectangle?this._uneditedLayerProps[o]={latlngs:L.LatLngUtil.cloneLatLngs(r.getLatLngs())}:r instanceof L.Circle?this._uneditedLayerProps[o]={latlng:L.LatLngUtil.cloneLatLng(r.getLatLng()),radius:r.getRadius()}:(r instanceof L.Marker||r instanceof L.CircleMarker)&&(this._uneditedLayerProps[o]={latlng:L.LatLngUtil.cloneLatLng(r.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(r){var o=L.Util.stamp(r);r.edited=!1,this._uneditedLayerProps.hasOwnProperty(o)&&(r instanceof L.Polyline||r instanceof L.Polygon||r instanceof L.Rectangle?r.setLatLngs(this._uneditedLayerProps[o].latlngs):r instanceof L.Circle?(r.setLatLng(this._uneditedLayerProps[o].latlng),r.setRadius(this._uneditedLayerProps[o].radius)):(r instanceof L.Marker||r instanceof L.CircleMarker)&&r.setLatLng(this._uneditedLayerProps[o].latlng),r.fire("revert-edited",{layer:r}))},_enableLayerEdit:function(r){var o,a,s=r.layer||r.target||r;this._backupLayer(s),this.options.poly&&(a=L.Util.extend({},this.options.poly),s.options.poly=a),this.options.selectedPathOptions&&(o=L.Util.extend({},this.options.selectedPathOptions),o.maintainColor&&(o.color=s.options.color,o.fillColor=s.options.fillColor),s.options.original=L.extend({},s.options),s.options.editing=o),s instanceof L.Marker?(s.editing&&s.editing.enable(),s.dragging.enable(),s.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):s.editing.enable()},_disableLayerEdit:function(r){var o=r.layer||r.target||r;o.edited=!1,o.editing&&o.editing.disable(),delete o.options.editing,delete o.options.original,this._selectedPathOptions&&(o instanceof L.Marker?this._toggleMarkerHighlight(o):(o.setStyle(o.options.previousOptions),delete o.options.previousOptions)),o instanceof L.Marker?(o.dragging.disable(),o.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):o.editing.disable()},_onMouseMove:function(r){this._tooltip.updatePosition(r.latlng)},_onMarkerDragEnd:function(r){var o=r.target;o.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:o})},_onTouchMove:function(r){var o=r.originalEvent.changedTouches[0],a=this._map.mouseEventToLayerPoint(o),s=this._map.layerPointToLatLng(a);r.target.setLatLng(s)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(r,o){if(L.Handler.prototype.initialize.call(this,r),L.Util.setOptions(this,o),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var r=this._map;r&&(r.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(r){this._deletableLayers.addLayer(r),r.fire("revert-deleted",{layer:r})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(r){this._removeLayer({layer:r})},this),this.save()},_enableLayerDelete:function(r){(r.layer||r.target||r).on("click",this._removeLayer,this)},_disableLayerDelete:function(r){var o=r.layer||r.target||r;o.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(o)},_removeLayer:function(r){var o=r.layer||r.target||r;this._deletableLayers.removeLayer(o),this._deletedLayers.addLayer(o),o.fire("deleted")},_onMouseMove:function(r){this._tooltip.updatePosition(r.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document);var Rn=class extends Tt{set latLngs(e){let t=e.filter(n=>n&&n.length>0);this._latLngs=t,this.drawPolygon(e),this.setDrawingSet(),this.changed=!1}get latLngs(){return this._latLngs}constructor(e,t){super(e),this.translate=t,this.editableLayers=rn.default.featureGroup(),this.DEFAULT_DRAW_OPTIONS=new rn.default.Control.Draw({position:"topleft",draw:{polygon:{allowIntersection:!0,showLength:!0,metric:!0},polyline:!1,circle:!1,rectangle:!1,marker:!1,circlemarker:!1},edit:{featureGroup:this.editableLayers,remove:void 0}}),this.DELETE_DRAW_OPTIONS=new rn.default.Control.Draw({position:"topleft",draw:{polygon:{allowIntersection:!0,showArea:!0,metric:!0,repeatMode:!1},polyline:!1,circle:!1,rectangle:!1,marker:!1,circlemarker:!1},edit:{featureGroup:this.editableLayers}}),this.drawnItems=this.editableLayers,this.editable=!1,this._latLngs=[],this.changed=!1,this.mode="web",this.multi=!1,this.handlers=[],this.layer.on("add",()=>{this.setDrawingSet(),this.renderDrawableData()}),this.layer.on("remove",()=>{this.removeDrawControl()}),this.renderDrawableData(),this.translateMap()}edit(e=!0){this.editable=e,this.map?.closePopup(),e?this.setDrawingSet():this.removeDrawControl()}finishEdits(){return ge(this,null,function*(){this.drawStop(),yield new Promise(e=>setTimeout(e,50))})}isChanged(){return this.changed}setPlace(e){this.place=e}focus(){return this.focused=!0,this.map?(this.fitBounds(),!0):!1}add(){super.add(),this.drawnItems.addTo(this.layer)}setMap(e){super.setMap(e);let t=this.drawnItems.getBounds();this.focused&&t.isValid()&&e.fitBounds(t,{padding:[42,42],maxZoom:19})}fitBounds(){if(!this.map||!this.latLngs.length)return;let e=[];this.latLngs.forEach(n=>{e.push(...n.map(r=>[r.lat,r.lng]))});let t=this.place;t&&e.push(t.marker),this.map.fitBounds(e,{padding:[42,42],maxZoom:19})}drawPolygon(e){this.drawnItems.clearLayers();let t=rn.default.polygon(e,{fill:!1});this.drawnItems.addLayer(t)}renderDrawableData(){this.map&&(this.clearEventHandlers(),this.registerEventHandler("draw:created",e=>{let t=e.layer.getLatLngs();setTimeout(()=>{this.drawnItems.removeLayer(e.layer)},0),t.length&&this.latLngs.push(t[0]),this.latLngs=[...this.latLngs],this.setDrawingSet(),this.changed=!0}),this.registerEventHandler("draw:deletestart",this.drawStart.bind(this)),this.registerEventHandler("draw:editstart",this.drawStart.bind(this)),this.registerEventHandler("draw:deletestop",this.drawStop.bind(this)),this.registerEventHandler("draw:editstop",this.drawStop.bind(this)),this.registerEventHandler(rn.default.Draw.Event.CREATED,e=>{let t=e.layer;this.drawnItems.addLayer(t)}))}registerEventHandler(e,t){this.map&&(this.map.addEventListener(e,t),this.handlers.push({type:e,fn:t}))}clearEventHandlers(){for(;this.handlers.length>0;){let e=this.handlers.pop();if(e===void 0)break;this.map?.removeEventListener(e.type,e.fn)}}drawStart(){this.drawnItems.clearLayers(),this.latLngs.forEach(e=>{if(e!==null){let t=rn.default.polygon(e);this.drawnItems.addLayer(t)}})}drawStop(){return ge(this,null,function*(){yield new Promise(t=>setTimeout(t));let e=[];this.drawnItems.eachLayer(t=>{if(!(t instanceof rn.default.Polygon))return;let n=t.getLatLngs();n.length&&e.push(...n)}),this.latLngs=e,this.setDrawingSet(),this.changed=!0})}clearChanged(){this.changed=!1}setDrawingSet(){if(this.editable&&this.map)try{this.latLngs.length>=1&&!this.multi&&this.mode==="web"?(this.map.removeControl(this.DEFAULT_DRAW_OPTIONS),this.map.addControl(this.DELETE_DRAW_OPTIONS)):this.mode==="web"&&(this.map.removeControl(this.DELETE_DRAW_OPTIONS),this.map.addControl(this.DEFAULT_DRAW_OPTIONS))}catch(e){console.warn("Failed to set drawing set",e)}}removeDrawControl(){this.mode==="web"&&(this.map?.removeControl(this.DEFAULT_DRAW_OPTIONS),this.map?.removeControl(this.DELETE_DRAW_OPTIONS))}static latlngToFloorShape(e,t){let n=[];if(!e.length)return null;for(let r of e){let a={type:"floorShape",floorIndex:t,nodes:[]};for(let s of r)a.nodes.push([s.lat,s.lng,0]);n.push(a)}return n}static floorShapeToLatlng(e){let t=[];for(let n of e)if(n.nodes){let r=n.nodes.map(o=>({lat:o[0]??o.lat,lng:o[1]??o.lng}));t.push(r)}return t}static setFloorShape(e,t){let n=e.floorShape?.[0];if(!t.building||!t.buildingId||n?.nodes?.length&&n.type!=="inherited")return e;let r=new Map,o=t.building.floors,a=t.building.min_level??0,s=t.building.max_level??0;if(!o)return e;for(let l of o)r.set(l.floorIndex,l);if(e.floorIndex>=0)for(let l=e.floorIndex-1;l>=a;l--){let c=r.get(l)?.floorShape?.[0];if(c?.nodes?.length&&c.type!=="inherited")return e.floorShape=[{type:"inherited",nodes:c.nodes}],e}else if(e.floorIndex=0))throw new Error("length must be a positive number");return Gv(Wv(i,e),t)}function Ap(i){return!isNaN(i)&&i!==null&&!Array.isArray(i)}function jv(i){if(!i)throw new Error("bbox is required");if(!Array.isArray(i))throw new Error("bbox must be an Array");if(i.length!==4&&i.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");i.forEach(e=>{if(!Ap(e))throw new Error("bbox must only contain numbers")})}function zt(i){if(!i)throw new Error("coord is required");if(!Array.isArray(i)){if(i.type==="Feature"&&i.geometry!==null&&i.geometry.type==="Point")return[...i.geometry.coordinates];if(i.type==="Point")return[...i.coordinates]}if(Array.isArray(i)&&i.length>=2&&!Array.isArray(i[0])&&!Array.isArray(i[1]))return[...i];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function BS(i){if(Array.isArray(i))return i;if(i.type==="Feature"){if(i.geometry!==null)return i.geometry.coordinates}else if(i.coordinates)return i.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function qv(i,e,t){if(!i)throw new Error("No feature passed");if(!t)throw new Error(".featureOf() requires a name");if(!i||i.type!=="Feature"||!i.geometry)throw new Error("Invalid input to "+t+", Feature with geometry required");if(!i.geometry||i.geometry.type!==e)throw new Error("Invalid input to "+t+": must be a "+e+", given "+i.geometry.type)}function RS(i){return i.type==="Feature"?i.geometry:i}function FS(i,e,t={}){if(t.final===!0)return e3(i,e);let n=zt(i),r=zt(e),o=Vt(n[0]),a=Vt(r[0]),s=Vt(n[1]),l=Vt(r[1]),c=Math.sin(a-o)*Math.cos(l),d=Math.cos(s)*Math.sin(l)-Math.sin(s)*Math.cos(l)*Math.cos(a-o);return Wr(Math.atan2(c,d))}function e3(i,e){let t=FS(e,i);return t=(t+180)%360,t}function t3(i,e,t,n={}){let r=zt(i),o=Vt(r[0]),a=Vt(r[1]),s=Vt(t),l=Wv(e,n.units),c=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s)),d=o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(c)),u=Wr(d),p=Wr(c);return r[2]!==void 0?Ai([u,p,r[2]],n.properties):Ai([u,p],n.properties)}function Bp(i,e,t={}){var n=zt(i),r=zt(e),o=Vt(r[1]-n[1]),a=Vt(r[0]-n[0]),s=Vt(n[1]),l=Vt(r[1]),c=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return Gv(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),t.units)}function Rp(i,e,t){if(i!==null)for(var n,r,o,a,s,l,c,d=0,u=0,p,h=i.type,f=h==="FeatureCollection",v=h==="Feature",_=f?i.features.length:1,y=0;y<_ w="0;w<s;w++){var" x="0,M=0;if(a=p?c.geometries[w]:c,a!==null){l=a.coordinates;var" s='a.type;switch(d=t&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case' null:break new error geometry type n3 t yv null:case e l c="0;c<t.coordinates.length;c++){var" d="t.coordinates[c],u={type:l,coordinates:d};if(e(ar(u,r),n,c)===!1)return!1}})}function" vs o="0;if(t.geometry){var" a='t.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var'>l||f>c||v>d){s=u,l=n,c=f,d=v,o=0;return}var _=fs([s,u],t.properties);if(e(_,n,r,v,o)===!1)return!1;o++,s=u})===!1)return!1}}})}function r3(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;let t=[1/0,1/0,-1/0,-1/0];return Rp(i,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]c==d>-c?(o=c,c=e[++u]):(o=d,d=n[++p]);let h=0;if(uc==d>-c?(a=c+o,s=o-(a-c),c=e[++u]):(a=d+o,s=o-(a-d),d=n[++p]),o=a,s!==0&&(r[h++]=s);uc==d>-c?(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=e[++u]):(a=o+d,l=a-o,s=o-(a-l)+(d-l),d=n[++p]),o=a,s!==0&&(r[h++]=s);for(;u=H||-B>=H||(u=i-A,s=i-(A+u)+(u-r),u=t-V,c=t-(V+u)+(u-r),u=e-F,l=e-(F+u)+(u-o),u=n-z,d=n-(z+u)+(u-o),s===0&&l===0&&c===0&&d===0)||(H=l3*a+Xl*Math.abs(B),B+=A*d+z*s-(F*c+V*l),B>=H||-B>=H))return B;M=s*z,p=wt*s,h=p-(p-s),f=s-h,p=wt*z,v=p-(p-z),_=z-v,S=f*_-(M-h*v-f*v-h*_),T=l*V,p=wt*l,h=p-(p-l),f=l-h,p=wt*V,v=p-(p-V),_=V-v,I=f*_-(T-h*v-f*v-h*_),y=S-I,u=S-y,pi[0]=S-(y+u)+(u-I),w=M+y,u=w-M,x=M-(w-u)+(y-u),y=x-T,u=x-y,pi[1]=x-(y+u)+(u-T),N=w+y,u=N-w,pi[2]=w-(N-u)+(y-u),pi[3]=N;let se=Jo(4,ms,4,pi,zS);M=A*d,p=wt*A,h=p-(p-A),f=A-h,p=wt*d,v=p-(p-d),_=d-v,S=f*_-(M-h*v-f*v-h*_),T=F*c,p=wt*F,h=p-(p-F),f=F-h,p=wt*c,v=p-(p-c),_=c-v,I=f*_-(T-h*v-f*v-h*_),y=S-I,u=S-y,pi[0]=S-(y+u)+(u-I),w=M+y,u=w-M,x=M-(w-u)+(y-u),y=x-T,u=x-y,pi[1]=x-(y+u)+(u-T),N=w+y,u=N-w,pi[2]=w-(N-u)+(y-u),pi[3]=N;let oe=Jo(se,zS,4,pi,US);M=s*d,p=wt*s,h=p-(p-s),f=s-h,p=wt*d,v=p-(p-d),_=d-v,S=f*_-(M-h*v-f*v-h*_),T=l*c,p=wt*l,h=p-(p-l),f=l-h,p=wt*c,v=p-(p-c),_=c-v,I=f*_-(T-h*v-f*v-h*_),y=S-I,u=S-y,pi[0]=S-(y+u)+(u-I),w=M+y,u=w-M,x=M-(w-u)+(y-u),y=x-T,u=x-y,pi[1]=x-(y+u)+(u-T),N=w+y,u=N-w,pi[2]=w-(N-u)+(y-u),pi[3]=N;let Se=Jo(oe,US,4,pi,HS);return HS[Se-1]}function Zv(i,e,t,n,r,o){let a=(e-o)*(t-r),s=(i-r)*(n-o),l=a-s,c=Math.abs(a+s);return Math.abs(l)>=a3*c?l:-c3(i,e,t,n,r,o,c)}var cX=(7+56*Ve)*Ve,uX=(3+28*Ve)*Ve,dX=(26+288*Ve)*Ve*Ve,pX=G(4),hX=G(4),fX=G(4),mX=G(4),gX=G(4),vX=G(4),_X=G(4),yX=G(4),bX=G(4),wX=G(8),xX=G(8),CX=G(8),MX=G(4),kX=G(8),SX=G(8),LX=G(8),TX=G(12),EX=G(192),PX=G(192);var OX=(10+96*Ve)*Ve,AX=(4+48*Ve)*Ve,NX=(44+576*Ve)*Ve*Ve,BX=G(4),RX=G(4),FX=G(4),VX=G(4),zX=G(4),UX=G(4),HX=G(4),GX=G(4),WX=G(8),jX=G(8),qX=G(8),YX=G(8),ZX=G(8),KX=G(8),$X=G(8),XX=G(8),QX=G(8),JX=G(4),eQ=G(4),tQ=G(4),iQ=G(8),nQ=G(16),rQ=G(16),oQ=G(16),aQ=G(32),sQ=G(32),lQ=G(48),cQ=G(64),uQ=G(1152),dQ=G(1152);var mQ=(16+224*Ve)*Ve,gQ=(5+72*Ve)*Ve,vQ=(71+1408*Ve)*Ve*Ve,_Q=G(4),yQ=G(4),bQ=G(4),wQ=G(4),xQ=G(4),CQ=G(4),MQ=G(4),kQ=G(4),SQ=G(4),LQ=G(4),TQ=G(24),EQ=G(24),PQ=G(24),DQ=G(24),IQ=G(24),OQ=G(24),AQ=G(24),NQ=G(24),BQ=G(24),RQ=G(24),FQ=G(1152),VQ=G(1152),zQ=G(1152),UQ=G(1152),HQ=G(1152),GQ=G(2304),WQ=G(2304),jQ=G(3456),qQ=G(5760),YQ=G(8),ZQ=G(8),KQ=G(8),$Q=G(16),XQ=G(24),QQ=G(48),JQ=G(48),eJ=G(96),tJ=G(192),iJ=G(384),nJ=G(384),rJ=G(384),oJ=G(768);var aJ=G(96),sJ=G(96),lJ=G(96),cJ=G(1152);function WS(i,e){var t,n,r=0,o,a,s,l,c,d,u,p=i[0],h=i[1],f=e.length;for(t=0;t=0||a=0)return 0}else if(c>=0&&s=0){if(o=Zv(a,l,s,c,0,0),o===0)return 0;(o>0&&c>0&&s0)&&r++}d=u,s=c,a=l}}return r%2!==0}function d3(i,e,t={}){if(!i)throw new Error("point is required");if(!e)throw new Error("polygon is required");let n=zt(i),r=RS(e),o=r.type,a=e.bbox,s=r.coordinates;if(a&&p3(n,a)===!1)return!1;o==="Polygon"&&(s=[s]);let l=!1;for(var c=0;c=i[0]&&e[3]>=i[1]}var h3=Object.defineProperty,f3=Object.defineProperties,m3=Object.getOwnPropertyDescriptors,jS=Object.getOwnPropertySymbols,g3=Object.prototype.hasOwnProperty,v3=Object.prototype.propertyIsEnumerable,qS=(i,e,t)=>e in i?h3(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,_3=(i,e)=>{for(var t in e||(e={}))g3.call(e,t)&&qS(i,t,e[t]);if(jS)for(var t of jS(e))v3.call(e,t)&&qS(i,t,e[t]);return i},y3=(i,e)=>f3(i,m3(e));function ZS(i,e,t={}){if(!i||!e)throw new Error("lines and inputPoint are required arguments");let n=zt(e),r=Ai([1/0,1/0],{lineStringIndex:-1,segmentIndex:-1,totalDistance:-1,lineDistance:-1,segmentDistance:-1,pointDistance:1/0,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0}),o=0,a=0,s=-1;return Yv(i,function(l,c,d){s!==d&&(s=d,a=0);let u=BS(l);for(let p=0;p0?[[...e],!0]:[[...t],!1];let s=Jl(a,o);if(s[0]===0&&s[1]===0&&s[2]===0)return[[...e],!0];let l=Jl(s,a),c=YS(l),d=[-c[0],-c[1],-c[2]],u=ea(o,c)>ea(o,d)?c:d,p=YS(a),h=ea(Jl(n,u),p),f=ea(Jl(u,r),p);return h>=0&&f>=0?[w3(u),!1]:ea(n,o)>ea(r,o)?[[...i],!1]:[[...e],!0]}function Fp(i,e,t={}){let n=zt(i),r=zt(e);r[0]+=r[0]-n[0]>180?-360:n[0]-r[0]>180?360:0;let o=C3(n,r);return Np(o,"meters",t.units)}function C3(i,e,t){t=t===void 0?di:Number(t);let n=t,r=i[1]*Math.PI/180,o=e[1]*Math.PI/180,a=o-r,s=Math.abs(e[0]-i[0])*Math.PI/180;s>Math.PI&&(s-=2*Math.PI);let l=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(r/2+Math.PI/4)),c=Math.abs(l)>1e-11?a/l:Math.cos(r);return Math.sqrt(a*a+c*c*s*s)*n}function M3(i,e,t={}){var n,r;let o=(n=t.method)!=null?n:"geodesic",a=(r=t.units)!=null?r:"kilometers";if(!i)throw new Error("pt is required");if(Array.isArray(i)?i=Ai(i):i.type==="Point"?i=ar(i):qv(i,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=fs(e):e.type==="LineString"?e=ar(e):qv(e,"LineString","line");let s=1/0,l=i.geometry.coordinates;return VS(e,c=>{if(c){let d=c.geometry.coordinates[0],u=c.geometry.coordinates[1],p=k3(l,d,u,{method:o});p{class i{constructor(){this.detailOpened=new ze,this.marker={},this.infoCb=()=>{this.marker&&(this.marker.showMoreDetails=!this.marker.showMoreDetails),this.marker.showMoreDetails&&this.detailOpened.emit(!0)},this.GlobalStateService=xt,this.resetPopup=()=>{}}ngOnInit(){this.resetPopup()}ngOnChanges(){this.resetPopup()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-beacon-popup-simple"]],inputs:{marker:"marker",infoCb:"infoCb"},outputs:{detailOpened:"detailOpened"},standalone:!1,features:[yn],decls:4,vars:5,consts:[[1,"contact","flex"],["size","large",3,"ngClass","picture","name","title"],[3,"click"],[1,"fas","fa-info-circle"]],template:function(n,r){n&1&&(P(0,"div",0),ie(1,"nb-user",1),P(2,"span",2),re("click",function(){return r.infoCb()}),ie(3,"i",3),E()()),n&2&&(k(),le("title",oi(r.marker.beacon.macAddress||r.marker.beacon.uuid||r.marker.beacon.cellId))("ngClass",r.marker.statusClass)("picture","/assets/images/"+r.marker.icon)("name",r.marker.beacon.name||r.marker.beacon.ssid||r.marker.beacon.cellId||""))},dependencies:[_c,Y_],styles:["[_nghost-%COMP%] .ng2-smart-filters th.positiontime{display:none}[_nghost-%COMP%] nb-user.offline .user-picture{border-color:#cdcdcd}[_nghost-%COMP%] nb-user.online .user-picture{border-color:#3cab3c}[_nghost-%COMP%] nb-user.alarm .user-picture{border-color:#d70206}.card-title[_ngcontent-%COMP%]{width:90%}.fas[_ngcontent-%COMP%]{cursor:pointer}nb-user[_ngcontent-%COMP%]{white-space:nowrap;margin-right:8px}.contact[_ngcontent-%COMP%]{justify-content:space-between;display:flex;padding:2px 0;font-size:1.2rem;align-items:center}"]})}}return i})();var ec=ve(_h());function A3(i,e){if(i&1){let t=ye();P(0,"input",20),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.name,r)||(o.marker.beacon.name=r),j(r)}),E()}if(i&2){let t=R(2);Ue("ngModel",t.marker.beacon.name)}}function N3(i,e){if(i&1){let t=ye();P(0,"input",20),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.ssid,r)||(o.marker.beacon.ssid=r),j(r)}),E()}if(i&2){let t=R(2);Ue("ngModel",t.marker.beacon.ssid)}}function B3(i,e){if(i&1){let t=ye();P(0,"div",14)(1,"span",15)(2,"b"),U(3),Y(4,"translate"),E()(),P(5,"input",20),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.macAddress,r)||(o.marker.beacon.macAddress=r),j(r)}),E()()}if(i&2){let t=R(2);k(3),ae(Z(4,2,"MAC Address:")),k(2),Ue("ngModel",t.marker.beacon.macAddress)}}function R3(i,e){if(i&1){let t=ye();P(0,"div",14)(1,"span",15)(2,"b"),U(3),Y(4,"translate"),E()(),P(5,"input",20),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.cellId,r)||(o.marker.beacon.cellId=r),j(r)}),E()(),P(6,"div",14)(7,"span",15)(8,"b"),U(9),Y(10,"translate"),E()(),P(11,"input",20),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.mobileCountryCode,r)||(o.marker.beacon.mobileCountryCode=r),j(r)}),E()(),P(12,"div",14)(13,"span",15)(14,"b"),U(15),Y(16,"translate"),E()(),P(17,"input",20),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.locationAreaCode,r)||(o.marker.beacon.locationAreaCode=r),j(r)}),E()(),P(18,"div",14)(19,"span",15)(20,"b"),U(21),Y(22,"translate"),E()(),P(23,"input",20),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.mobileNetworkCode,r)||(o.marker.beacon.mobileNetworkCode=r),j(r)}),E()(),P(24,"div",14)(25,"span",15)(26,"b"),U(27),Y(28,"translate"),E()(),P(29,"input",20),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.radioType,r)||(o.marker.beacon.radioType=r),j(r)}),E()()}if(i&2){let t=R(2);k(3),ae(Z(4,10,"Cell ID:")),k(2),Ue("ngModel",t.marker.beacon.cellId),k(4),ae(Z(10,12,"Mobile Country Code:")),k(2),Ue("ngModel",t.marker.beacon.mobileCountryCode),k(4),ae(Z(16,14,"Location Area Code:")),k(2),Ue("ngModel",t.marker.beacon.locationAreaCode),k(4),ae(Z(22,16,"Mobile Network Code:")),k(2),Ue("ngModel",t.marker.beacon.mobileNetworkCode),k(4),ae(Z(28,18,"Radio Type:")),k(2),Ue("ngModel",t.marker.beacon.radioType)}}function F3(i,e){if(i&1&&(P(0,"option",18),U(1),Y(2,"translate"),E()),i&2){let t=e.$implicit;le("value",t.value),k(),me(" ",Z(2,2,t.name)," ")}}function V3(i,e){if(i&1&&(P(0,"option",18),U(1),E()),i&2){let t=e.$implicit;le("value",t.value.floorIndex),k(),me(" ",t.value.floorLabel," ")}}function z3(i,e){if(i&1&&(P(0,"span",22),U(1),Y(2,"translate"),E()),i&2){let t=R(2);k(),da(" ",Z(2,2,"Building Model Wifi Id:"),"",t.marker.beacon.buildingModelWifiId," ")}}function U3(i,e){if(i&1&&(P(0,"span",22),U(1),Y(2,"translate"),E()),i&2){let t=R(2);k(),da(" ",Z(2,2,"Building Model Bluetooth Id:"),"",t.marker.beacon.buildingModelBluetoothId," ")}}function H3(i,e){if(i&1&&(P(0,"option",25),U(1),Y(2,"translate"),E()),i&2){let t=e.$implicit;le("ngValue",t.value),k(),me(" ",Z(2,2,t.name)," ")}}function G3(i,e){if(i&1){let t=ye();P(0,"div",14)(1,"span",23)(2,"b"),U(3),Y(4,"translate"),E()(),P(5,"input",32),Ge("ngModelChange",function(r){W(t);let o=R(4);return He(o.marker.beacon.uuid,r)||(o.marker.beacon.uuid=r),j(r)}),E()()}if(i&2){let t=R(4);k(3),ae(Z(4,2,"UUID:")),k(2),Ue("ngModel",t.marker.beacon.uuid)}}function W3(i,e){if(i&1){let t=ye();P(0,"div",14)(1,"span",23)(2,"b"),U(3),Y(4,"translate"),E()(),P(5,"input",29),Ge("ngModelChange",function(r){W(t);let o=R(4);return He(o.marker.beacon.major,r)||(o.marker.beacon.major=r),j(r)}),E()()}if(i&2){let t=R(4);k(3),ae(Z(4,2,"Major:")),k(2),Ue("ngModel",t.marker.beacon.major)}}function j3(i,e){if(i&1){let t=ye();P(0,"div",14)(1,"span",23)(2,"b"),U(3),Y(4,"translate"),E()(),P(5,"input",29),Ge("ngModelChange",function(r){W(t);let o=R(4);return He(o.marker.beacon.minor,r)||(o.marker.beacon.minor=r),j(r)}),E()()}if(i&2){let t=R(4);k(3),ae(Z(4,2,"Minor:")),k(2),Ue("ngModel",t.marker.beacon.minor)}}function q3(i,e){if(i&1){let t=ye();P(0,"div",14)(1,"span",23)(2,"b"),U(3),Y(4,"translate"),E()(),P(5,"input",26),Ge("ngModelChange",function(r){W(t);let o=R(3);return He(o.marker.beacon.tx_power,r)||(o.marker.beacon.tx_power=r),j(r)}),E(),P(6,"span",27),U(7),Y(8,"translate"),E()(),P(9,"div",14)(10,"span",23)(11,"b"),U(12),Y(13,"translate"),E()(),P(14,"input",28),Ge("ngModelChange",function(r){W(t);let o=R(3);return He(o.marker.beacon.nn,r)||(o.marker.beacon.nn=r),j(r)}),E()(),P(15,"div",14)(16,"span",23)(17,"b"),U(18),Y(19,"translate"),E()(),P(20,"input",29),Ge("ngModelChange",function(r){W(t);let o=R(3);return He(o.marker.beacon.radius,r)||(o.marker.beacon.radius=r),j(r)}),E(),P(21,"span",27),U(22),Y(23,"translate"),E()(),P(24,"div",14)(25,"span",23)(26,"b"),U(27),Y(28,"translate"),E()(),P(29,"input",29),Ge("ngModelChange",function(r){W(t);let o=R(3);return He(o.marker.beacon.accuracy,r)||(o.marker.beacon.accuracy=r),j(r)}),E(),P(30,"span",27),U(31),Y(32,"translate"),E()(),$(33,G3,6,4,"div",14),$(34,W3,6,4,"div",14),$(35,j3,6,4,"div",14),P(36,"div",14)(37,"span",30)(38,"nb-checkbox",31),Ge("ngModelChange",function(r){W(t);let o=R(3);return He(o.showAllAttributes,r)||(o.showAllAttributes=r),j(r)}),U(39),Y(40,"translate"),E()()()}if(i&2){let t=R(3);k(3),ae(Z(4,16,"Tx Power:")),k(2),Ue("ngModel",t.marker.beacon.tx_power),k(2),me("\xA0",Z(8,18,"dBm")),k(5),ae(Z(13,20,"Path Loss Exponent:")),k(2),Ue("ngModel",t.marker.beacon.nn),k(4),ae(Z(19,22,"Radius:")),k(2),Ue("ngModel",t.marker.beacon.radius),k(2),me("\xA0",Z(23,24,"meter")),k(5),ae(Z(28,26,"Accuracy:")),k(2),Ue("ngModel",t.marker.beacon.accuracy),k(2),me("\xA0",Z(32,28,"meter")),k(2),X(t.marker.beacon.uuid||t.showAllAttributes?33:-1),k(),X(t.marker.beacon.major||t.showAllAttributes?34:-1),k(),X(t.marker.beacon.minor||t.showAllAttributes?35:-1),k(3),Ue("ngModel",t.showAllAttributes),k(),ae(Z(40,30,t.showAllAttributes?"Hide unused":"Show all attributes"))}}function Y3(i,e){if(i&1){let t=ye();P(0,"nb-tab",12),Y(1,"translate"),P(2,"div",13)(3,"div",14)(4,"span",23)(5,"b"),U(6),Y(7,"translate"),E()(),P(8,"select",24),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.sendBeacons,r)||(o.marker.beacon.sendBeacons=r),j(r)}),an(9,H3,3,4,"option",25,on),E()(),$(11,q3,41,32),E()()}if(i&2){let t=R(2);le("tabTitle",oi(Z(1,5,"Beacon"))),k(6),ae(Z(7,7,"Send Beacons:")),k(2),Ue("ngModel",t.marker.beacon.sendBeacons),k(),sn(t.sendBeaconOption),k(2),X(t.marker.beacon.sendBeacons===!1?11:-1)}}function Z3(i,e){if(i&1){let t=ye();P(0,"nb-tab",12),Y(1,"translate"),P(2,"div",13)(3,"div",14)(4,"span",33)(5,"b"),U(6),Y(7,"translate"),E()(),P(8,"div",34)(9,"input",35),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.azimuthAngle,r)||(o.marker.beacon.azimuthAngle=r),j(r)}),re("focus",function(){W(t);let r=R(2);return j(r.drawLine())})("blur",function(){W(t);let r=R(2);return j(r.removeLine())})("input",function(r){return W(t),R(2).updateAzimuthAngle(),j(r.stopPropagation())}),E()(),P(10,"input",36),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.azimuthAngle,r)||(o.marker.beacon.azimuthAngle=r),j(r)}),re("focus",function(){W(t);let r=R(2);return j(r.drawLine())})("blur",function(){W(t);let r=R(2);return j(r.removeLine())})("input",function(r){return W(t),R(2).updateAzimuthAngle(),j(r.stopPropagation())}),E(),P(11,"span",27),U(12),Y(13,"translate"),E()(),P(14,"div",14)(15,"span",33)(16,"b"),U(17),Y(18,"translate"),E()(),P(19,"div",34)(20,"input",37),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.angleMax,r)||(o.marker.beacon.angleMax=r),j(r)}),E()(),P(21,"input",38),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.angleMax,r)||(o.marker.beacon.angleMax=r),j(r)}),E(),P(22,"span",27),U(23),Y(24,"translate"),E()(),P(25,"div",14)(26,"span",33)(27,"b"),U(28),Y(29,"translate"),E()(),P(30,"div",34)(31,"input",39),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.angleMin,r)||(o.marker.beacon.angleMin=r),j(r)}),E()(),P(32,"input",40),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.angleMin,r)||(o.marker.beacon.angleMin=r),j(r)}),E(),P(33,"span",27),U(34),Y(35,"translate"),E()(),P(36,"div",14)(37,"span",33)(38,"b"),U(39),Y(40,"translate"),E()(),P(41,"div",34)(42,"input",41),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.tiltAngle,r)||(o.marker.beacon.tiltAngle=r),j(r)}),E()(),P(43,"input",42),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.tiltAngle,r)||(o.marker.beacon.tiltAngle=r),j(r)}),E(),P(44,"span",27),U(45),Y(46,"translate"),E()(),P(47,"div",14)(48,"span",33)(49,"b"),U(50),Y(51,"translate"),E()(),P(52,"input",43,0),re("input",function(){W(t);let r=ks(53);return j(r.value=(+r.value).toFixed(2))}),Ge("ngModelChange",function(r){W(t);let o=R(2);return He(o.marker.beacon.heightOverFloor,r)||(o.marker.beacon.heightOverFloor=r),j(r)}),E(),P(54,"span",27),U(55),Y(56,"translate"),E()()()()}if(i&2){let t=R(2);le("tabTitle",oi(Z(1,21,"AoA"))),k(6),ae(Z(7,23,"Azimuth:")),k(3),Ue("ngModel",t.marker.beacon.azimuthAngle),k(),Ue("ngModel",t.marker.beacon.azimuthAngle),k(2),me("\xA0",Z(13,25,"degrees")),k(5),ae(Z(18,27,"Angle max:")),k(3),Ue("ngModel",t.marker.beacon.angleMax),k(),Ue("ngModel",t.marker.beacon.angleMax),k(2),me("\xA0",Z(24,29,"degrees")),k(5),ae(Z(29,31,"Angle min:")),k(3),Ue("ngModel",t.marker.beacon.angleMin),k(),Ue("ngModel",t.marker.beacon.angleMin),k(2),me("\xA0",Z(35,33,"degrees")),k(5),ae(Z(40,35,"Tilt:")),k(3),Ue("ngModel",t.marker.beacon.tiltAngle),k(),Ue("ngModel",t.marker.beacon.tiltAngle),k(2),me("\xA0",Z(46,37,"degrees")),k(5),ae(Z(51,39,"Height over floor:")),k(2),Ue("ngModel",t.marker.beacon.heightOverFloor),k(3),me("\xA0",Z(56,41,"meter"))}}function K3(i,e){if(i&1){let t=ye();P(0,"fieldset",2),re("input",function(){W(t);let r=R();return j(r.handleForChange())}),P(1,"nb-actions",3)(2,"nb-action",4),ie(3,"i",5),P(4,"div",6)(5,"button",7),Y(6,"translate"),re("click",function(){W(t);let r=R();return j(r.deleteBeacon())}),U(7),Y(8,"translate"),E(),P(9,"button",7),Y(10,"translate"),re("click",function(){W(t);let r=R();return j(r.duplicateBeacon())}),U(11),Y(12,"translate"),E()()()(),P(13,"i",8),re("click",function(){W(t);let r=R();return j(r.handleClose())}),E(),ie(14,"div",9),P(15,"h6"),U(16),E(),P(17,"span",10),U(18),E(),ie(19,"hr"),P(20,"nb-tabset",11)(21,"nb-tab",12),Y(22,"translate"),P(23,"div",13)(24,"div",14)(25,"span",15)(26,"b"),U(27),Y(28,"translate"),E()(),$(29,A3,1,1,"input",16),$(30,N3,1,1,"input",16),E(),$(31,B3,6,4,"div",14)(32,R3,30,20),P(33,"div",14)(34,"span",15)(35,"b"),U(36),Y(37,"translate"),E()(),P(38,"select",17),Ge("ngModelChange",function(r){W(t);let o=R();return He(o.marker.beacon.type,r)||(o.marker.beacon.type=r),j(r)}),re("ngModelChange",function(){W(t);let r=R();return j(r.applyBeaconType())}),an(39,F3,3,4,"option",18,on),E()(),P(41,"div",14)(42,"span",15)(43,"b"),U(44),Y(45,"translate"),E()(),P(46,"input",19),Ge("ngModelChange",function(r){W(t);let o=R();return He(o.marker.beacon.latitude,r)||(o.marker.beacon.latitude=r),j(r)}),E()(),P(47,"div",14)(48,"span",15)(49,"b"),U(50),Y(51,"translate"),E()(),P(52,"input",19),Ge("ngModelChange",function(r){W(t);let o=R();return He(o.marker.beacon.longitude,r)||(o.marker.beacon.longitude=r),j(r)}),E()(),P(53,"div",14)(54,"span",15)(55,"b"),U(56),Y(57,"translate"),E()(),P(58,"select",17),Ge("ngModelChange",function(r){W(t);let o=R();return He(o.marker.beacon.floorIndex,r)||(o.marker.beacon.floorIndex=r),j(r)}),an(59,V3,2,2,"option",18,on),Y(61,"keyvalue"),E()(),P(62,"div",14)(63,"span",15)(64,"b"),U(65),Y(66,"translate"),E()(),P(67,"input",20),Ge("ngModelChange",function(r){W(t);let o=R();return He(o.marker.beacon.room,r)||(o.marker.beacon.room=r),j(r)}),E()(),P(68,"div",14)(69,"span",15)(70,"b"),U(71),Y(72,"translate"),E()(),P(73,"input",21),Ge("ngModelChange",function(r){W(t);let o=R();return He(o.marker.beacon.placementIndex,r)||(o.marker.beacon.placementIndex=r),j(r)}),E()(),P(74,"div",14),$(75,z3,3,4,"span",22),$(76,U3,3,4,"span",22),E()()(),$(77,Y3,12,9,"nb-tab",12),$(78,Z3,57,43,"nb-tab",12),E()()}if(i&2){let t=R();le("disabled",t.marker.locked),k(5),le("disabled",t.marker.canDelete===!1)("title",t.marker.canDelete===!1?Z(6,34,"Delete is not allowed for this model type"):""),k(2),ae(Z(8,36,"Delete")),k(2),le("disabled",t.marker.canDuplicate===!1)("title",t.marker.canDuplicate===!1?Z(10,38,"Duplicate is not allowed for this model type"):""),k(2),ae(Z(12,40,"Duplicate")),k(3),hh("background-image","url( /assets/images/"+t.marker.icon+")"),k(2),ae(t.marker.beacon.ssid||t.marker.beacon.name||t.marker.beacon.macAddress||t.marker.beacon.cellId||""),k(2),ae(t.marker.address),k(3),le("tabTitle",oi(Z(22,42,"General"))),k(6),ae(Z(28,44,"Name:")),k(2),X(t.marker.beacon.buildingModelBluetoothId||t.marker.beacon.buildingModelCellId?29:-1),k(),X(t.marker.beacon.buildingModelWifiId?30:-1),k(),X(t.checkIfMacAddress(t.marker.beacon.macAddress)?31:32),k(5),ae(Z(37,46,"Type:")),k(2),Ue("ngModel",t.marker.beacon.type),k(),sn(t.beaconTypeOption),k(5),ae(Z(45,48,"Latitude:")),k(2),Ue("ngModel",t.marker.beacon.latitude),k(4),ae(Z(51,50,"Longitude:")),k(2),Ue("ngModel",t.marker.beacon.longitude),k(4),ae(Z(57,52,"Floor:")),k(2),Ue("ngModel",t.marker.beacon.floorIndex),k(),sn(Z(61,54,t.marker.modelValue.floorShapes)),k(6),ae(Z(66,56,"Room:")),k(2),Ue("ngModel",t.marker.beacon.room),k(4),ae(Z(72,58,"Index:")),k(2),le("disabled",t.marker.autoIndexation||!1),Ue("ngModel",t.marker.beacon.placementIndex),k(2),X(t.marker.beacon.buildingModelWifiId?75:-1),k(),X(t.marker.beacon.buildingModelBluetoothId?76:-1),k(),X(t.checkIfMacAddress(t.marker.beacon.macAddress)?77:-1),k(),X(t.marker.beacon.type==="anchoraoa"?78:-1)}}var i2=(()=>{class i{constructor(){this.globalState=_e(xt),this.surveyService=_e(bh),this.router=_e(gr),this.showAllAttributes=!1,this.sendBeaconOption=[{name:"Yes",value:!1},{name:"No",value:!0}],this.beaconTypeOption=[{name:"Placed",value:yr.Indoor},{name:"Calculated",value:yr.Bundled},{name:"Anchor Point",value:yr.Anchor},{name:"Anchor Point(AoA)",value:yr.Anchoraoa}],this.subscriptions=new pr,this.saveBeaconSubject=new ca,this.savePending=!1,this.closeClicked=new ze,this.GlobalStateService=xt,this.resetPopup=()=>{}}ngOnInit(){this.subscriptions.add(this.saveBeaconSubject.pipe(f_(()=>{this.savePending=!0}),p_(1500)).subscribe(()=>{this.saveBeacon(),this.savePending=!1})),this.marker?.beacon.lastSeen&&(this.marker.timeAgo=(0,ec.default)(this.marker?.beacon.lastSeen)),this.readData(),this.resetPopup()}ngOnChanges(){this.readData(),this.resetPopup()}readData(){if(!this.marker)return;let t=this.marker.beacon;t.tx_power=t.tx_power?t.tx_power:t.buildingModelBluetoothId?-57:-37,t.azimuthAngle=Math.round(Number(t.azimuthAngle)||0),t.angleMin=Math.round(Number(t.angleMin)||-45),t.angleMax=Math.round(Number(t.angleMax)||45),t.tiltAngle=Math.round(Number(t.tiltAngle)||0),t.heightOverFloor=(Math.round((+t.heightOverFloor||1)*100)/100).toFixed(2)}saveBeacon(){this.marker?.save&&this.marker.save(!1)}removeLine(){this.marker?.removeLine&&this.marker.removeLine()}drawLine(){this.marker?.drawLine&&this.marker.drawLine()}handleForChange(){this.saveBeaconSubject.next(void 0)}updateAzimuthAngle(){this.saveBeacon(),this.drawLine()}applyBeaconType(){!this.marker||!this.marker.marker||(this.marker.marker.options.rotationOrigin="center")}duplicateBeacon(){return ge(this,null,function*(){if(!this.marker||!this.marker.modelValue.buildingModelId||this.marker.canDuplicate===!1)return;let t=Mi({},this.marker.beacon),n="";t.buildingModelBluetoothId&&(delete t.buildingModelBluetoothId,t.macAddress=(0,ec.default)().unix().toString(16),n="bluetooths"),t.buildingModelWifiId&&(delete t.buildingModelWifiId,t.macAddress=(0,ec.default)().unix().toString(16),n="wifis"),t.buildingModelCellId&&(delete t.buildingModelCellId,t.cellId=(0,ec.default)().unix(),n="cells"),t.latitude=+t.latitude-1e-5,t.longitude=+t.longitude+1e-5,t.buildingModelId=this.marker?.modelValue.buildingModelId,(yield this.surveyService.createBeacon(t,n,this.marker?.modelValue.buildingModelId)).status&&this.globalState.notifyDataChanged(gs,this.marker?.modelValue.buildingModelId)})}deleteBeacon(){return ge(this,null,function*(){if(!this.marker||!this.marker.modelValue.buildingModelId||this.marker.canDelete===!1)return;let t="";this.marker.beacon.buildingModelBluetoothId&&(t="bluetooth"),this.marker.beacon.buildingModelWifiId&&(t="wifi"),this.marker.beacon.buildingModelCellId&&(t="cell"),(yield this.surveyService.deleteBeacon(this.marker.beacon,t,this.marker?.modelValue.buildingModelId)).status&&this.globalState.notifyDataChanged(gs,this.marker?.modelValue.buildingModelId)})}handleClose(){this.marker&&(this.closeClicked.emit(!0),this.marker.showMoreDetails=!1)}checkIfMacAddress(t){return typeof t=="string"}ngOnDestroy(){this.savePending&&this.saveBeacon(),this.subscriptions.unsubscribe()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-beacon-popup-detailed"]],inputs:{marker:"marker"},outputs:{closeClicked:"closeClicked"},standalone:!1,features:[yn],decls:1,vars:1,consts:[["height",""],[1,"popup-detailed",3,"disabled"],[1,"popup-detailed",3,"input","disabled"],["size","medium",1,"option-menu"],["ngbDropdown","","container","body"],["ngbDropdownToggle","",1,"fas","fa-ellipsis-h"],["ngbDropdownMenu",""],["ngbDropdownItem","",3,"click","disabled","title"],[1,"fas","fa-times","close-popup-detailed",3,"click"],[1,"beacon-img"],[1,"px-2"],["fullWidth",""],[3,"tabTitle"],[1,"container"],[1,"row"],[1,"col-5"],["type","text",1,"col-7",3,"ngModel"],[1,"col-7",3,"ngModelChange","ngModel"],[3,"value"],["type","number","step","0.0000001",1,"col-7",3,"ngModelChange","ngModel"],["type","text",1,"col-7",3,"ngModelChange","ngModel"],["type","text",1,"col-7",3,"ngModelChange","disabled","ngModel"],[1,"col-11"],[1,"col-6"],[1,"col-4",3,"ngModelChange","ngModel"],[3,"ngValue"],["type","number","max","0",1,"col-4",3,"ngModelChange","ngModel"],[1,"col-2","sub-text"],["type","number","step","0.1",1,"col-4",3,"ngModelChange","ngModel"],["type","number","min","0",1,"col-4",3,"ngModelChange","ngModel"],[1,"col-12","centered-text"],[3,"ngModelChange","ngModel"],["type","text",1,"col-4",3,"ngModelChange","ngModel"],[1,"col-4"],[1,"col-4","pr-1"],["type","range","min","0","max","360",3,"ngModelChange","focus","blur","input","ngModel"],["type","number","min","0","max","360",1,"col-2",3,"ngModelChange","focus","blur","input","ngModel"],["type","range","min","0","max","90",3,"ngModelChange","ngModel"],["type","number","min","0","max","90",1,"col-2",3,"ngModelChange","ngModel"],["type","range","min","-90","max","0",3,"ngModelChange","ngModel"],["type","number","min","-90","max","0",1,"col-2",3,"ngModelChange","ngModel"],["type","range","min","-90","max","90",3,"ngModelChange","ngModel"],["type","number","min","-90","max","90",1,"col-2",3,"ngModelChange","ngModel"],["type","number","step","0.01","min","0",1,"col-6",3,"input","ngModelChange","ngModel"]],template:function(n,r){n&1&&$(0,K3,79,60,"fieldset",1),n&2&&X(r.marker&&r.marker.showMoreDetails?0:-1)},dependencies:[A_,N_,wc,E_,P_,O_,xc,R_,B_,L_,Z_,K_,Ic,uy,Dc,Ec,Pc,$_,q_,j_,w_,Fi],styles:["[_nghost-%COMP%]{text-align:center;min-width:19vw}.row[_ngcontent-%COMP%]{margin:0 0 4px;text-align:left}.row[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{padding:1px 2px}.row[_ngcontent-%COMP%] input[type=range][_ngcontent-%COMP%]{width:calc(100% - 8px)}.sub-text[_ngcontent-%COMP%]{color:gray}.beacon-img[_ngcontent-%COMP%]{margin:auto auto 8px;width:3vw;height:3vw;min-width:30px;min-height:30px;max-width:100%;background:border-box center/contain no-repeat}.dropdown-toggle[_ngcontent-%COMP%]:after{display:none!important}.option-menu[_ngcontent-%COMP%]{position:absolute;right:15px;top:0}.centered-text[_ngcontent-%COMP%]{text-align:center}"]})}}return i})();var gs="tm-building-models.selectBuildingModelId",o2="tm-building-models.becon-delete.selectedBeaconId",lr=(function(i){return i.Bluetooth="bluetooth",i.Wifi="wifi",i.Cell="cell",i})(lr||{}),$3={Bluetooth:' ',"Wi-Fi":' ',"Cell Tower":' '},ta={buttonActiveBackground:"rgb(117, 192, 68)",buttonInactiveBackground:"rgb(255, 255, 255)",buttonActiveColor:"rgb(255, 255, 255)",buttonInactiveColor:"rgb(67, 139, 187)"},X3={Bluetooth:"bluetooth","Wi-Fi":"wifis","Cell Tower":"cells"},Q3={Bluetooth:"bluetooth","Wi-Fi":"wifi","Cell Tower":"cell"},sr=(function(i){return i.DISABLE="DISABLE",i.SELECT="SELECT",i.DESELECT="DESELECT",i})(sr||{});function n2(i,e){return i?{canMove:!1,canDuplicate:!1,canDelete:!1}:e===Jr.Crowd?{canMove:!1,canDuplicate:!1,canDelete:!1}:e===Jr.AI?{canMove:!1,canDuplicate:!1,canDelete:!0}:e===Jr.Manual?{canMove:!0,canDuplicate:!0,canDelete:!0}:{canMove:!0,canDuplicate:!0,canDelete:!0}}var r2=class extends Zl{constructor(e,t,n,r,o,a){super(e,t,n),this.globalState=t,this.popupService=n,this.surveyService=r,this.translate=o,this.buildingModelService=a,this.popupComponent=t2,this.detailComponent=i2,this.show=!0,this.azimuthAnglePolyline=new Pt.Polyline([],{dashArray:"10,5",color:"#75c044",weight:2,smoothFactor:1,pane:"track"}),this.leafletControl=new Pt.Control({position:"topleft"}),this.inAddMode=!1,this.editMode=!1,this.button=this.buildButton(),this._selectedBuildings=[],this.markerLayerGroup=Pt.layerGroup(),this.beaconSaved=new ze,this.beaconLoading=new u_(!1),this.addBeacon=s=>ge(this,null,function*(){let l=this._selectedBuildings[0];if(l?.type===Jr.AI){zp.default.fire(this.translate.instant("Could not create beacon"),this.translate.instant("Adding beacons is not allowed for AI model type"),"warning");return}let c=X3[this.name],d=yield this.buildingModelService.createNewBeacon(c,yr.Indoor,s.latlng);if(d){let u=Q3[this.name],p=n2(l?.locked||!1,l?.type),h={icon:u+"-"+yr.Indoor+".png",lat:+d.latitude,lng:+d.longitude,beacon:d,locked:l?.locked||!1,canMove:p.canMove,canDuplicate:p.canDuplicate,canDelete:p.canDelete,modelValue:{buildingModelId:d.buildingModelId,latitude:+d.latitude,longitude:+d.longitude,floorShapes:{},buildingModelType:l?.type}};this.globalState.notifyDataChanged(gs,d.buildingModelId),this.addMarkerToMap(h,!0)}else zp.default.fire(this.translate.instant("Could not create beacon"),this.translate.instant("Make sure you have selected a model that is unlocked"),"warning")})}setMap(e){super.setMap(e),e.on("addBeaconMode",t=>{t.layer!==this.name&&this.inAddMode&&(this.inAddMode=!1,this.map?.off("click",this.addBeacon),this.button.style.backgroundColor=ta.buttonInactiveBackground,this.button.style.color=ta.buttonInactiveColor)}),this.layer.addLayer(this.markerLayerGroup)}edit(e){this.editMode=e,this.editMode?this.map?.addControl(this.leafletControl):(this.map?.removeControl(this.leafletControl),this._stopAddBeacon())}buildButton(){let e=Pt.DomUtil.create("button","leaflet-control-button");return e.innerHTML=$3[this.name]||this.name,e.title=this.name,Pt.DomEvent.addListener(e,"click",t=>{if(Pt.DomEvent.stop(t),!this.map)return;let n=this._selectedBuildings[0],r=this._selectedBuildings.length===1&&n?.type!==Jr.AI&&!n?.locked;this.inAddMode=r?!this.inAddMode:!1,this.map.off("click",this.addBeacon),this.inAddMode?(setTimeout(()=>{this.map&&(this.map.on("click",this.addBeacon),this.map.fireEvent("addBeaconMode",{layer:this.name}))},0),this.buttonUiStateChange(e,sr.SELECT)):!this._selectedBuildings.length||this._selectedBuildings.length>1?this.buttonUiStateChange(e,sr.DISABLE):this.buttonUiStateChange(e,sr.DESELECT)}),this.leafletControl.onAdd=()=>e,e}setMarkers(e,t,n=!0){this.editMode=t||!1,this.clearMarkerLayer(),this.azimuthAnglePolyline.addTo(this.markerLayerGroup),e&&e.forEach(r=>{let o=n2(r.locked||!1,r.modelValue?.buildingModelType);r.canMove=o.canMove,r.canDuplicate=o.canDuplicate,r.canDelete=o.canDelete,this.addMarkerToMap(r,t,n)})}addMarkerToMap(e,t,n=!0){return ge(this,null,function*(){let r=e.beacon.buildingModelCellId||e.beacon.buildingModelWifiId||e.beacon.buildingModelBluetoothId,o=e.beacon.buildingModelBluetoothId?lr.Bluetooth:e.beacon.buildingModelCellId?lr.Cell:lr.Wifi,s={draggable:t&&e.canMove!==!1,beaconId:r,beaconType:o};e=yield this.addMarker(e,[+e.lat,+e.lng],s),e.marker?.setIcon(this.aoaGetMarkerIcon(e,n)),e.drawLine=()=>{if(!this.map)return;let l=this.map.project([+e.beacon.latitude,+e.beacon.longitude],22);l.x+=Math.sin(Math.PI/180*+e.beacon.azimuthAngle)*1e4,l.y-=Math.cos(Math.PI/180*+e.beacon.azimuthAngle)*1e4;let c=this.map.unproject(l,22),d=[Pt.latLng([+e.beacon.latitude,+e.beacon.longitude]),c];this.azimuthAnglePolyline.setLatLngs(d),e.marker&&e.marker.setRotationAngle(+e.beacon.azimuthAngle)},e.removeLine=()=>{this.azimuthAnglePolyline.setLatLngs([])},e.save=(l=!0)=>ge(this,null,function*(){let c=lr.Bluetooth;e.beacon.buildingModelWifiId&&(c=lr.Wifi),e.beacon.buildingModelCellId&&(c=lr.Cell),e.marker&&(e.icon=c+"-"+e.beacon.type+".png",e.marker?.setIcon(this.aoaGetMarkerIcon(e)),e.marker?.setLatLng([+e.beacon.latitude,+e.beacon.longitude])),e.beacon.type!=="anchoraoa"&&(e.beacon.azimuthAngle=0),e.beacon.cellId&&(typeof e.beacon.cellId=="string"&&(e.beacon.cellId=parseInt(e.beacon.cellId)),e.beacon.mobileCountryCode&&typeof e.beacon.mobileCountryCode!="number"&&(e.beacon.mobileCountryCode=parseInt(e.beacon.mobileCountryCode)),e.beacon.mobileNetworkCode&&typeof e.beacon.mobileNetworkCode!="number"&&(e.beacon.mobileNetworkCode=parseInt(e.beacon.mobileNetworkCode)),e.beacon.locationAreaCode&&typeof e.beacon.locationAreaCode!="number"&&(e.beacon.locationAreaCode=parseInt(e.beacon.locationAreaCode)));let d=yield this.surveyService.updateBeacon(e.beacon,c,e.modelValue.buildingModelId);this.beaconLoading.next(!1);let u=Gt.extractErrors(d.error).map(p=>this.translate.instant(p));d.status?l&&this.beaconSaved.emit(e):zp.default.fire(this.translate.instant("Something went wrong"),u[0],"warning")}),e.marker&&(this.editMode&&this._selectedBuildings.length?(e.marker.unbindContextMenu(),e.marker.bindContextMenu(this.getContextMenuItems(e)),this.map?.on("mousedown",()=>{this.hideContextMenu()})):this.map?.off("mousedown",this.hideContextMenu),e.marker.setRotationAngle(+e.beacon.azimuthAngle),e.marker.on("dragend",l=>{if(e.canMove===!1){e.marker?.setLatLng([+e.beacon.latitude,+e.beacon.longitude]);return}this.beaconLoading.next(!0),Object.assign(e,l.target.getLatLng()),e.beacon.latitude=Number(this.roundLatLng(l.target.getLatLng().lat)),e.beacon.longitude=Number(this.roundLatLng(l.target.getLatLng().lng)),e.save&&e.save(!0)}),e&&this.markerLayerGroup.addLayer(e.marker))})}getContextMenuItems(e){let t=[];return e.canDuplicate!==!1&&t.push({text:"Duplicate",callback:()=>this.duplicateBeacon(e)}),e.canDelete!==!1&&t.push({text:"Delete",callback:()=>this.removeMarker(e)}),{contextmenu:!0,contextmenuItems:t}}duplicateBeacon(e){return ge(this,null,function*(){if(!e||e.canDuplicate===!1)return;this.beaconLoading.next(!0);let t=Mi({},e.beacon),n="";t.buildingModelBluetoothId&&(delete t.buildingModelBluetoothId,t.macAddress=(0,Up.default)().unix().toString(16)+Math.floor(Math.random()*1e3).toString(),n="bluetooths"),t.buildingModelWifiId&&(delete t.buildingModelWifiId,t.macAddress=(0,Up.default)().unix().toString(16)+Math.floor(Math.random()*1e3),n="wifis"),t.buildingModelCellId&&(delete t.buildingModelCellId,t.cellId=+((0,Up.default)().unix()+Math.floor(Math.random()*1e3).toString()),n="cells"),t.latitude=+t.latitude-1e-5,t.longitude=+t.longitude+1e-5,e.modelValue.buildingModelId&&(t.buildingModelId=e.modelValue.buildingModelId),(yield this.surveyService.createBeacon(t,n,e.modelValue.buildingModelId)).status&&this.globalState.notifyDataChanged(gs,e.modelValue.buildingModelId),this.beaconLoading.next(!1)})}removeMarker(e){return ge(this,null,function*(){if(!e||!e.modelValue.buildingModelId||e.canDelete===!1)return;this.beaconLoading.next(!0);let t="";e.beacon.buildingModelBluetoothId&&(t="bluetooth"),e.beacon.buildingModelWifiId&&(t="wifi"),e.beacon.buildingModelCellId&&(t="cell"),(yield this.surveyService.deleteBeacon(e.beacon,t,e.modelValue.buildingModelId)).status&&(this.globalState.notifyDataChanged(gs,e.modelValue.buildingModelId),this.globalState.notifyDataChanged(o2,e.beacon.buildingModelBluetoothId||e.beacon.buildingModelCellId||e.beacon.buildingModelWifiId)),this.beaconLoading.next(!1)})}roundLatLng(e){return(Math.round(e*1e7)/1e7).toFixed(7)}draggableMarkers(e,t){t?e.forEach(n=>{n.marker?.dragging?.disable()}):e.forEach(n=>{n.marker?.dragging?.enable()})}aoaGetMarkerIcon(e,t=!0){let n="/assets/images/"+e.icon,r=[14,14],o=[21,21],a=[10,10],s=[0,-20],l=e.beacon&&e.beacon.placementIndex?e.beacon.placementIndex:"";return e.marker&&l&&e.marker.options.beaconType===lr.Bluetooth&&t?Pt.divIcon(this._getBeaconIcon(o,a,s,r,l,n)):((e.beacon?.type==="anchor"||e.beacon?.type==="anchoraoa")&&(o=[40,40],a=[20,20],s=[0,-40]),new Pt.Icon({iconUrl:n,iconSize:o,iconAnchor:a,popupAnchor:s}))}hideContextMenu(){let e=this.map?.contextmenu;e&&e._map&&e.hide()}_stopAddBeacon(){this.map&&(this.map.off("click",this.addBeacon),this.map.fireEvent("addBeaconMode",{layer:null}))}buttonUiStateChange(e,t){switch(t){case sr.SELECT:e.style.backgroundColor=ta.buttonActiveBackground,e.style.color=ta.buttonActiveColor;break;case sr.DESELECT:e.style.backgroundColor=ta.buttonInactiveBackground,e.style.color=ta.buttonInactiveColor;break;case sr.DISABLE:e.style.backgroundColor="",e.style.color=ta.buttonInactiveColor;break}}selectedBuildingModelsUpdate(e,t=!0,n=!0){if(this._selectedBuildings=e.filter(a=>a.selected),this.inAddMode=!1,this.hideContextMenu(),t&&this.clearMarkerLayer(),!n)return;let o=this._selectedBuildings[0]?.type===Jr.AI;!this._selectedBuildings.length||this._selectedBuildings.length&&this._selectedBuildings.length>1||o?this.buttonUiStateChange(this.button,sr.DISABLE):(this.buttonUiStateChange(this.button,sr.DESELECT),this._stopAddBeacon())}openBeaconPopup(e){this.markerLayerGroup.eachLayer(t=>{t instanceof Pt.Marker&&t.options.beaconId===e&&(t.getPopup()?(t.openPopup(),setTimeout(()=>{this.map?.setView(t.getLatLng(),this.map.getZoom())},50)):console.error("No popup bound to this marker"))})}_getBeaconIcon(e,t,n,r,o,a){return{className:"custom-div-icon",html:`
`,iconSize:e,iconAnchor:t,popupAnchor:n}}clearMarkerLayer(){this.hideContextMenu(),this.unbindMarkerContextMenu(),this.markerLayerGroup.clearLayers()}unbindMarkerContextMenu(){this.markerLayerGroup.eachLayer(e=>e.unbindContextMenu())}};var J3=ve(Ae());var a2=ve(Ae());var s2=ve(Ae());var jr=ve(Ae());var zn=ve(Ae());var qr=ve(Ae());var Jv=class extends qr.default.Control{onAdd(e){return qr.default.DomUtil.create("div")}constructor(e){super(e)}},e0=class extends qr.default.Control{onAdd(e){return qr.default.DomUtil.create("div")}constructor(e){super(e)}},t0=class extends qr.default.Control{onAdd(e){return qr.default.DomUtil.create("div")}constructor(e){super(e)}addToCustomPosition(e,t,n){let r=this.onAdd(e),o=e.getContainer(),a=qr.default.DomUtil.create("div","leaflet-custom-control-group",o);return a.style.position="absolute",a.style.top=t,a.style.transform=`translateY(-${t})`,a.style.zIndex="700",a.style.right=n,a.appendChild(r),this}};var eF=ve(Ae());var tF=ve(Ae());var iF=ve(Ae());var Yr=ve(Ae());var Hp=ve(Ae());function nF(i,e){if(i&1){let t=ye();P(0,"button",2),re("click",function(){let r=W(t).$implicit,o=R(2);return j(o.handleFloorChange(r.floorIndex,r.floorLabel.toString(),o.place))}),U(1),E()}if(i&2){let t=e.$implicit;k(),me(" ",t.floorLabel)}}function rF(i,e){if(i&1){let t=ye();P(0,"div",5,0),re("mouseenter",function(r){W(t);let o=ks(1);return r.stopPropagation(),j(o.open())})("mouseleave",function(r){W(t);let o=ks(1);return r.stopPropagation(),j(o.close())}),P(2,"button",6),ie(3,"img",7),U(4),Y(5,"translate"),ie(6,"i",8),E(),P(7,"div",9),an(8,nF,2,1,"button",10,on),E()()}if(i&2){let t=R();k(4),me(" ",Z(5,1,"Floor")," "),k(4),sn(t.place.building.floors)}}var i0=(()=>{class i{constructor(){this.latlng=void 0,this.forAnywhere=!1}show(t,n,r,o=!1){this.map=t,this.place=n,this.forAnywhere=o,this.forAnywhere&&(this.latlng=r);let a=Hp.popup({closeButton:!1,className:"element-layer-menu",offset:Hp.point(0,20)}).setContent(this.location.nativeElement).setLatLng(r);t?.openPopup(a)}navigate(){this.place&&this.ctx.navigateHere(this.place,this.latlng)}hide(t){t&&t.closePopup()}handleFloorChange(t,n,r,o){this.ctx&&this.ctx.setBuildingAndFloor&&r&&(this.ctx.setBuildingAndFloor(r,t,n,!0,!0),this.map?.closePopup(),o?.close())}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-kiosk-building-context"]],standalone:!1,decls:5,vars:1,consts:[["floorDrop","ngbDropdown"],["id","element-context-menu",1,"dropdown-menu"],["ngbDropdownItem","","translate","",3,"click"],["src","assets/icons/assistant_navigation.png","alt","Navigate",1,"icon"],["ngbDropdown","","placement","right-bottom"],["ngbDropdown","","placement","right-bottom",3,"mouseenter","mouseleave"],["ngbDropdownItem","","ngbDropdownAnchor",""],["src","assets/icons/elevator.png","alt","Floor",1,"icon"],[1,"fas","fa-caret-right","float-right"],["ngbDropdownMenu",""],["ngbDropdownItem","","translate",""]],template:function(n,r){n&1&&(P(0,"div",1)(1,"button",2),re("click",function(){return r.map==null?null:r.map.closePopup()})("click",function(){return r.navigate(),r.map==null?null:r.map.closePopup()}),ie(2,"img",3),U(3," Navigate Here"),E(),$(4,rF,10,3,"div",4),E()),n&2&&(k(4),X(r.place&&!r.forAnywhere?4:-1))},dependencies:[Ic,cy,Dc,Ec,Pc,C_,Fi],styles:[".element-layer-menu .leaflet-popup-tip-container{display:none} .element-layer-menu .leaflet-popup-content-wrapper{background:none!important;box-shadow:none!important}.dropdown-toggle[_ngcontent-%COMP%]:after{display:none!important}#element-context-menu[_ngcontent-%COMP%]{display:block!important}#element-context-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;column-gap:16px;align-items:center}.dropdown-menu[_ngcontent-%COMP%]{border-radius:10px}.dropdown-item[_ngcontent-%COMP%]{font-size:18px;padding:16px 18px}"]})}}return i})();var oF=["buildingSelector"],aF=(()=>{class i{constructor(){this.popupService=_e(sy),this.buildingSelected=new ze,this.navigateAny=new ze,this.selectedBuildingName="",this.items=[],this.maskInit=!1,this.isPopupVisible=!1,this.contextMenu=this.popupService.createComponent(i0,{ctx:this}).instance}ngOnInit(){this.place&&(this.place.buildings=this.subBuildings,this.subBuildings&&(this.items=this.subBuildings),this.zoomToPlace(this.place))}zoomToPlace(t){if(t&&t.building?.floors?.[0]?.floorShape?.[0]?.nodes){let n=t.building.floors[0].floorShape[0].nodes;if(n&&n.length>0){let r=n.map(a=>{if(Array.isArray(a))return[a[0],a[1]];if("lat"in a&&"lng"in a)return[a.lat,a.lng]}).filter(a=>a!==void 0),o=Yr.default.latLngBounds(r);setTimeout(()=>{this.map&&(this.map.fitBounds(o,{padding:[20,20]}),this.maskInit||this.createMask(r))},0)}}}createMask(t){if(this.map){let n=[[-90,-180],[-90,180],[90,180],[90,-180]],r=Yr.default.polygon(t,{color:"#A8A8A8",weight:10,fillOpacity:0}).addTo(this.map);r.on("click",a=>{if(this.isPopupVisible){this.isPopupVisible=!1;return}this.showContextMenu(a.latlng),this.isPopupVisible=!0}),r.on("mousedown",a=>this.onTouchStart(a)),r.on("mouseup",()=>this.onTouchEnd()),r.on("mouseout",()=>this.onTouchEnd()),Yr.default.polygon([n,t],{color:"#CBCBCB",fillColor:"#F2F0EF",fillOpacity:.8,stroke:!0,weight:3}).addTo(this.map).on("click",()=>{this.isPopupVisible&&(this.isPopupVisible=!1)}),this.maskInit=!0}}onTouchStart(t){this.longPressTimeout=window.setTimeout(()=>{this.showContextMenu(t.latlng)},800)}onTouchEnd(){clearTimeout(this.longPressTimeout)}showContextMenu(t){this.map&&this.place&&this.contextMenu.show(this.map,this.place,t,!0)}zoomBackToPlace(){this.place&&this.zoomToPlace(this.place)}deselectBuilding(){this.selectedBuildingName="",this.buildingSelected.emit(""),this.zoomBackToPlace()}handleBuildingClick(t,n=!0){let r=this.items.find(s=>s.name===t);if(this.selectedBuildingName===t&&n){this.deselectBuilding();return}if(this.selectedBuildingName=t,this.buildingSelected.emit(r),!r)return;let a=r.building?.floors?.find?.(s=>s.floorShape&&s.floorShape[0].nodes&&s.floorShape[0].nodes.length>0)?.floorShape?.[0]?.nodes;if(a&&a.length>0){let s=a.map(c=>{if(Array.isArray(c))return[c[0],c[1]];if("lat"in c&&"lng"in c)return[c.lat,c.lng]}).filter(c=>c!==void 0),l=Yr.default.latLngBounds(s);setTimeout(()=>{this.map&&this.map.fitBounds(l,{padding:[60,60]})},0)}else console.error("No valid floorShape nodes found.")}navigateHere(t,n){let r={place:t,latlng:n};this.navigateAny.emit(r)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-building-selector"]],viewQuery:function(n,r){if(n&1&&ii(oF,7),n&2){let o;ni(o=ri())&&(r.buildingSelector=o.first)}},inputs:{place:"place",subBuildings:"subBuildings",map:"map"},outputs:{buildingSelected:"buildingSelected",navigateAny:"navigateAny"},standalone:!1,decls:1,vars:8,consts:[[1,"building-selector",3,"itemSelected","items","displayLimit","minItemsForArrows","propertyKey","arrowDirection","arrow2Direction","selectedItemName","imagePropertyKey"]],template:function(n,r){n&1&&(P(0,"tm-generic-list",0),re("itemSelected",function(a){return r.handleBuildingClick(a)}),E()),n&2&&le("items",r.items)("displayLimit",5)("minItemsForArrows",6)("propertyKey","name")("arrowDirection","up")("arrow2Direction","down")("selectedItemName",r.selectedBuildingName)("imagePropertyKey","")},encapsulation:2})}}return i})(),n0=class extends Yr.default.Control{onAdd(e){return Yr.default.DomUtil.create("div")}addToCustomPosition(e,t,n){let r=this.onAdd(e),o=e.getContainer(),a=Yr.default.DomUtil.create("div","leaflet-custom-control",o);return a.style.position="absolute",a.style.top=t,a.style.transform=`translateY(-${t})`,a.style.zIndex="1000",a.style.left=n,a.appendChild(r),this}};var tc=ve(Ae());function sF(i,e){if(i&1){let t=ye();P(0,"div",10),re("click",function(){W(t);let r=R();return j(r.close())}),E()}}function lF(i,e){i&1&&(P(0,"p",12),U(1),Y(2,"translate"),E()),i&2&&(k(),me(" ",Z(2,1,"Password is required.")," "))}function cF(i,e){if(i&1&&$(0,lF,3,3,"p",12),i&2){let t,n=R(2);X(!((t=n.logoutForm.get("password"))==null||t.errors==null)&&t.errors.required?0:-1)}}function uF(i,e){i&1&&(P(0,"p",12),U(1),Y(2,"translate"),E()),i&2&&(k(),me(" ",Z(2,1,"Incorrect password. Please try again.")," "))}function dF(i,e){if(i&1&&(P(0,"nb-form-field")(1,"label"),U(2,"Password"),E(),ie(3,"input",11),E(),$(4,cF,1,1),$(5,uF,3,3,"p",12)),i&2){let t=R();k(3),le("status",t.isInvalid("password")?"danger":"basic"),k(),X(t.isInvalid("password")?4:-1),k(),X(t.passwordIncorrect?5:-1)}}var Vte=(()=>{class i{constructor(){this.logoutSuccess=new ze,this.fb=_e(F_),this.globalState=_e(xt),this.router=_e(gr),this.isOpen=!1,this.submitted=!1,this.passwordIncorrect=!1,this.logoutForm=this.fb.group({}),this.passwordConfig=this.globalState.settings["map-options"]?.uiSettings?.dashboard?.logoutPassword??{password:"",enabled:!1}}ngOnInit(){this.passwordConfig.enabled&&this.logoutForm.addControl("password",this.fb.control("",[k_.required]))}open(){this.isOpen=!0,this.submitted=!1,this.passwordIncorrect=!1,this.logoutForm.reset()}close(){this.isOpen=!1}confirmLogout(){if(this.submitted=!0,this.passwordIncorrect=!1,this.passwordConfig.enabled){if(this.logoutForm.invalid){Object.values(this.logoutForm.controls).forEach(t=>{t.markAsTouched()});return}if(this.logoutForm.get("password")?.value!==this.passwordConfig.password){this.passwordIncorrect=!0;return}}this.logoutSuccess.emit(),this.router.navigateByUrl("/auth/logout"),this.globalState.clearLocalStorage(),this.close()}isInvalid(t){let n=this.logoutForm.get(t);return!!(n&&n.invalid&&(n.touched||this.submitted))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-logout-sliding-pane"]],outputs:{logoutSuccess:"logoutSuccess"},decls:23,vars:15,consts:[[1,"pane-background"],[1,"sliding-pane"],[1,"pane-content-card"],[1,"header-content"],["nbButton","","ghost","",3,"click"],["icon","close-outline","pack","eva"],[3,"ngSubmit","formGroup"],[1,"footer-buttons"],["nbButton","","status","basic",3,"click"],["nbButton","","status","primary",3,"click","disabled"],[1,"pane-background",3,"click"],["nbInput","","fullWidth","","type","password","id","password-input","type","password","placeholder","Enter password","formControlName","password",3,"status"],[1,"text-danger","small","mt-1"]],template:function(n,r){n&1&&($(0,sF,1,0,"div",0),P(1,"div",1)(2,"nb-card",2)(3,"nb-card-header")(4,"div",3)(5,"span"),U(6),Y(7,"translate"),E(),P(8,"button",4),re("click",function(){return r.close()}),ie(9,"nb-icon",5),E()()(),P(10,"nb-card-body")(11,"p"),U(12),Y(13,"translate"),E(),P(14,"form",6),re("ngSubmit",function(){return r.confirmLogout()}),$(15,dF,6,3),E()(),P(16,"nb-card-footer")(17,"div",7)(18,"button",8),re("click",function(){return r.close()}),U(19,"Cancel"),E(),P(20,"button",9),re("click",function(){return r.confirmLogout()}),U(21),Y(22,"translate"),E()()()()()),n&2&&(X(r.isOpen?0:-1),k(),Ri("open",r.isOpen),k(5),ae(Z(7,9,"Confirm Logout")),k(6),ae(Z(13,11,"Are you sure you want to logout?")),k(2),le("formGroup",r.logoutForm),k(),X(r.passwordConfig.enabled?15:-1),k(5),le("disabled",r.submitted&&r.logoutForm.invalid),k(),me(" ",Z(22,13,"Logout")," "))},dependencies:[x_,V_,T_,wc,xc,S_,z_,D_,I_,M_,Cc,ma,ha,fa,pa,Mc,vr,W_,G_,ty,ey,Q_,X_,Fi],styles:[".pane-background[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#0006;z-index:1001;cursor:pointer}.sliding-pane[_ngcontent-%COMP%]{position:fixed;top:0;right:-450px;width:100%;max-width:400px;height:100vh;transition:right .3s ease-in-out;z-index:1002;display:flex;flex-direction:column;justify-content:center}.sliding-pane.open[_ngcontent-%COMP%]{right:0}.pane-content-card[_ngcontent-%COMP%]{border:none;display:flex;flex-direction:column}.pane-content-card[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%]{flex-grow:1;overflow-y:auto}.footer-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem}.header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}"]})}}return i})();var pF=["kioskButtons"],hF=["logoutPane"],fF=i=>({"hidden-button":i}),mF=(()=>{class i{constructor(){this.kioskButtonsService=_e(ay),this.showButton=!1,this.homeBtnClicked=new ze,this.HOLD_DURATION_MS=7e3}ngOnInit(){this.kioskButtonsService.buildingSelected$.subscribe(t=>{this.showButton=t})}ngAfterViewInit(){tc.DomEvent.disableClickPropagation(this.kioskButtons.nativeElement),tc.DomEvent.disableScrollPropagation(this.kioskButtons.nativeElement)}onButtonClick(){this.kioskButtonsService.notifyButtonClick(),this.showButton=!1,this.homeBtnClicked.emit()}onHoldStart(){this.holdTimer=setTimeout(()=>{this.logoutPane.open()},this.HOLD_DURATION_MS)}onHoldEnd(){clearTimeout(this.holdTimer)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-kiosk-buttons"]],viewQuery:function(n,r){if(n&1&&(ii(pF,7),ii(hF,5)),n&2){let o;ni(o=ri())&&(r.kioskButtons=o.first),ni(o=ri())&&(r.logoutPane=o.first)}},inputs:{map:"map"},outputs:{homeBtnClicked:"homeBtnClicked"},standalone:!1,decls:6,vars:3,consts:[["kioskButtons",""],["logoutPane",""],[3,"click","mousedown","mouseup","mouseleave","touchstart","touchend","ngClass"],["src","assets/icons/kiosk/kiosk-home.svg","alt",""]],template:function(n,r){if(n&1){let o=ye();P(0,"div",null,0)(2,"div",2),re("click",function(){return W(o),j(r.onButtonClick())})("mousedown",function(){return W(o),j(r.onHoldStart())})("mouseup",function(){return W(o),j(r.onHoldEnd())})("mouseleave",function(){return W(o),j(r.onHoldEnd())})("touchstart",function(){return W(o),j(r.onHoldStart())})("touchend",function(){return W(o),j(r.onHoldEnd())}),ie(3,"img",3),E()(),ie(4,"tm-logout-sliding-pane",null,1)}n&2&&(k(2),le("ngClass",mr(1,fF,!r.showButton)))},styles:[".home-btn{background-color:#0a2971;color:#fff;width:5em;height:5em;border-radius:50%;border:none;box-shadow:0 3px 5px 2px #82818154;-webkit-box-shadow:0 3px 5px 2px rgba(130,129,129,.33);-moz-box-shadow:0 3px 5px 2px rgba(130,129,129,.33)} .home-btn i{font-size:2em}.hidden-button[_ngcontent-%COMP%]{visibility:hidden}"]})}}return i})();var gF=["optionGroup"],vF=(()=>{class i{get objectKeys(){let t=Object.entries(this.groupItems).sort(([,n],[,r])=>r.nodes.length-n.nodes.length);return this.groupItems=t.reduce((n,[r,o])=>(n[r]=o,n),{}),Object.keys(this.groupItems)}constructor(){this.translate=_e(bc),this.group=new ze,this.groupItems={},this.selectedGroupName="",this.currentCategory="",this.items=[]}ngOnInit(){this.fetchGroupItems()}fetchGroupItems(){this.items=Object.keys(this.groupItems).filter(t=>this.groupItems[t].icon!==void 0).map(t=>({name:this.groupItems[t].name,icon:this.groupItems[t].icon,key:t}))}groupChange(t){let n=this.groupItems[t].name;this.selectedGroupName===n?(this.selectedGroupName="",this.group.emit("")):(this.selectedGroupName=n,this.group.emit(n))}deselectGroup(){this.selectedGroupName="",this.group.emit("")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-routing-group-new"]],viewQuery:function(n,r){if(n&1&&ii(gF,5),n&2){let o;ni(o=ri())&&(r.optionGroup=o.first)}},inputs:{groupItems:"groupItems"},outputs:{group:"group"},standalone:!1,decls:1,vars:8,consts:[[1,"routing-group",3,"itemSelected","items","propertyKey","imagePropertyKey","displayLimit","minItemsForArrows","arrowDirection","arrow2Direction","selectedItemName"]],template:function(n,r){n&1&&(P(0,"tm-generic-list",0),re("itemSelected",function(a){return r.groupChange(a)}),E()),n&2&&le("items",r.items)("propertyKey","name")("imagePropertyKey","icon")("displayLimit",4)("minItemsForArrows",5)("arrowDirection","up")("arrow2Direction","down")("selectedItemName",r.selectedGroupName)},encapsulation:2})}}return i})();var Gp=ve(Ae());var r0=class extends Gp.default.Control{onAdd(e){let t=Gp.default.DomUtil.create("div","custom-signature-control");return t.innerHTML=" ",t}addToCustomPosition(e,t={}){let n=this.onAdd(e),r=e.getContainer(),o=Gp.default.DomUtil.create("div","leaflet-custom-control-group",r);return o.style.position="absolute",t.top&&(o.style.top=t.top),t.right&&(o.style.right=t.right),t.bottom&&(o.style.bottom=t.bottom),t.left&&(o.style.left=t.left),o.style.zIndex=t.zIndex||"700",o.appendChild(n),this}};var Wp=ve(Ae());var o0=class extends Wp.default.Control{onAdd(e){let t=Wp.default.DomUtil.create("div","custom-icon-control");return t.innerHTML=" ",t}addToCustomPosition(e,t={}){let n=this.onAdd(e),r=e.getContainer(),o=Wp.default.DomUtil.create("div","leaflet-custom-control-group",r);return o.style.position="absolute",t.top&&(o.style.top=t.top),t.right&&(o.style.right=t.right),t.bottom&&(o.style.bottom=t.bottom),t.left&&(o.style.left=t.left),o.style.zIndex=t.zIndex||"700",o.appendChild(n),this}};var jp=ve(Ae());function yF(i,e){if(i&1){let t=ye();P(0,"div",3),re("click",function(){W(t);let r=R();return j(r.close())}),E()}}var l2=(()=>{class i{constructor(){this.closePane=new ze,this.isOpen=!1}open(){this.isOpen=!0}close(){this.isOpen=!1,this.closePane.emit()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-kiosk-terms-sliding-pane"]],outputs:{closePane:"closePane"},standalone:!1,decls:4,vars:3,consts:[[1,"pane-background"],[1,"qr-sliding-pane"],[1,"qr-pane-content"],[1,"pane-background",3,"click"]],template:function(n,r){n&1&&($(0,yF,1,0,"div",0),P(1,"div",1)(2,"div",2),ie(3,"tm-iframe-dialog"),E()()),n&2&&(X(r.isOpen?0:-1),k(),Ri("open",r.isOpen))},styles:[".pane-background[_ngcontent-%COMP%]{width:100vw;height:100vh;position:fixed;left:0;top:0;background:#00000038}.qr-sliding-pane[_ngcontent-%COMP%]{position:fixed;left:100vw;background:#fff;transition:right .3s ease-in-out;box-shadow:-2px 0 5px #0000001a;z-index:1002;border-radius:24px;top:5vh}.qr-sliding-pane[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-family:JioType;font-weight:700;font-size:22px;line-height:24px;letter-spacing:-.5%}.qr-sliding-pane.open[_ngcontent-%COMP%]{left:10vw}.qr-pane-content[_ngcontent-%COMP%]{padding:24px;background:#fff;height:100%;border-radius:24px}.close-button[_ngcontent-%COMP%]{outline:none;border:navajowhite;background:transparent;padding:0;font-size:1.5rem}"]})}}return i})();var a0=class extends jp.default.Control{onAdd(e){let t=jp.default.DomUtil.create("div","custom-icon-control");return t.innerHTML=" ",t}addToCustomPosition(e,t={}){let n=this.onAdd(e),r=e.getContainer(),o=jp.default.DomUtil.create("div","leaflet-custom-control-group",r);return o.style.position="absolute",t.top&&(o.style.top=t.top),t.right&&(o.style.right=t.right),t.bottom&&(o.style.bottom=t.bottom),t.left&&(o.style.left=t.left),o.style.zIndex=t.zIndex||"700",o.appendChild(n),this}};var qp=ve(Ae());var s0=class extends qp.default.Control{onAdd(e){return qp.default.DomUtil.create("div")}constructor(e){super(e)}addToCustomPosition(e,t={}){let n=this.onAdd(e),r=e.getContainer(),o=qp.default.DomUtil.create("div","leaflet-custom-control-group",r);return o.style.position="absolute",t.top&&(o.style.top=t.top),t.right&&(o.style.right=t.right),t.bottom&&(o.style.bottom=t.bottom),t.left&&(o.style.left=t.left),o.style.zIndex=t.zIndex||"700",o.appendChild(n),this}};var Yp=ve(Ae());var l0=class extends Yp.default.Control{onAdd(e){let t=Yp.default.DomUtil.create("div","custom-icon-Value");return t.innerHTML=" ",t}addToCustomPosition(e,t={}){let n=this.onAdd(e),r=e.getContainer(),o=Yp.default.DomUtil.create("div","leaflet-custom-control-group",r);return o.style.position="absolute",t.top&&(o.style.top=t.top),t.right&&(o.style.right=t.right),t.bottom&&(o.style.bottom=t.bottom),t.left&&(o.style.left=t.left),o.style.zIndex=t.zIndex||"700",o.appendChild(n),this}};var vs=ve(Ae());var CF=["nodeDetails"];function MF(i,e){if(i&1&&ie(0,"img",7),i&2){let t=R(2);le("src",(t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.poiIcon)||(t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.groupIcon),ua)}}function kF(i,e){i&1&&ie(0,"img",8)}function SF(i,e){if(i&1){let t=ye();P(0,"button",18),re("click",function(){W(t);let r=R(2);return j(r.toggleView())}),U(1),ie(2,"i"),E()}if(i&2){let t=R(2);k(),me(" ",t.isExpanded?"View less":"View more"," "),k(),Hn(t.isExpanded?"nb-arrow-up":"nb-arrow-down")}}function LF(i,e){if(i&1&&(P(0,"div",19),ie(1,"img",26),E()),i&2){let t=R(3);k(),le("src",t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.url1,ua)}}function TF(i,e){if(i&1&&(P(0,"span")(1,"span",28),U(2,"Open"),E(),U(3),E()),i&2){let t=R(4);k(3),me(" until ",t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.closingHours," ")}}function EF(i,e){if(i&1&&(P(0,"span")(1,"span",29),U(2,"Closed"),E(),U(3),E()),i&2){let t=R(4);k(3),me(", opens at ",t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.openingHours," ")}}function PF(i,e){if(i&1&&(P(0,"p",11),ie(1,"i",27),$(2,TF,4,1,"span"),$(3,EF,4,1,"span"),E()),i&2){let t=R(3);k(2),X(t.isOpenNow?2:-1),k(),X(t.isOpenNow?-1:3)}}function DF(i,e){if(i&1&&(P(0,"p",11),ie(1,"i",30),U(2),E()),i&2){let t=R(3);k(2),me("",t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.phone," ")}}function IF(i,e){i&1&&(P(0,"div",24)(1,"p",31),U(2,"Photos"),E()())}function OF(i,e){if(i&1&&(P(0,"div",17),$(1,LF,2,1,"div",19),P(2,"div",20)(3,"h3",21),U(4),E(),P(5,"p",11),ie(6,"i",22),U(7),E(),P(8,"div",23),$(9,PF,4,2,"p",11),E(),$(10,DF,3,1,"p",11),E(),$(11,IF,3,0,"div",24),ie(12,"tm-generic-list",25),E()),i&2){let t=R(2);k(),X(t.correctNodeWithAllProps!=null&&t.correctNodeWithAllProps.url1?1:-1),k(3),ae(t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.name),k(3),y_(" Floor - ",t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.level,", ",t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.buildingName,", ",t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.buildingAddress," "),k(2),X(t.correctNodeWithAllProps!=null&&t.correctNodeWithAllProps.openingHours&&(t.correctNodeWithAllProps!=null&&t.correctNodeWithAllProps.closingHours)?9:-1),k(),X(t.correctNodeWithAllProps!=null&&t.correctNodeWithAllProps.phone?10:-1),k(),X(t.items.length>0?11:-1),k(),le("items",t.items)("displayLimit",3)("minItemsForArrows",4)("imagePropertyKey","imageUrl")("arrowDirection","left")("arrow2Direction","right")}}function AF(i,e){if(i&1){let t=ye();P(0,"div",1,0)(2,"div",2)(3,"div",3)(4,"div",4),re("click",function(){W(t);let r=R();return j(r.goBack())}),ie(5,"img",5),E(),P(6,"div",6),$(7,MF,1,1,"img",7),$(8,kF,1,0,"img",8),E(),P(9,"div",9)(10,"p",10),U(11),E(),P(12,"p",11),U(13),E()(),P(14,"button",12),re("click",function(){W(t);let r=R();return j(r.destroyComponent())}),ie(15,"img",13),E()(),P(16,"div",14)(17,"div",4),re("click",function(){W(t);let r=R();return j(r.getDirections())}),ie(18,"img",15),E(),$(19,SF,3,3,"button",16),E()(),$(20,OF,13,14,"div",17),E()}if(i&2){let t=R();k(7),X(t.correctNodeWithAllProps!=null&&t.correctNodeWithAllProps.poiIcon||t.correctNodeWithAllProps!=null&&t.correctNodeWithAllProps.groupIcon?7:-1),k(),X(t.correctNodeWithAllProps!=null&&t.correctNodeWithAllProps.groupIcon?-1:8),k(3),ae(t.correctNodeWithAllProps==null?null:t.correctNodeWithAllProps.name),k(2),me(" ",t.detailsStr," "),k(6),X(t.canViewMore?19:-1),k(),X(t.isExpanded?20:-1)}}var NF=(()=>{class i{constructor(){this.getDirectionsClicked=new ze,this.DestroyComponentClicked=new ze,this.goBackClicked=new ze,this.items=[],this.isExpanded=!1,this.isVisible=!1,this.buildingAddress="",this.detailsStr=""}ngAfterViewInit(){this.nodeDetails&&(vs.default.DomEvent.disableClickPropagation(this.nodeDetails?.nativeElement),vs.default.DomEvent.disableScrollPropagation(this.nodeDetails?.nativeElement))}destroyComponent(){this.DestroyComponentClicked.emit()}goBack(){this.goBackClicked.emit()}fetchItemsFromNode(){if(!this.correctNodeWithAllProps){this.items=[];return}let t=[this.correctNodeWithAllProps.url2,this.correctNodeWithAllProps.url3,this.correctNodeWithAllProps.url4];this.items=t.filter(n=>n!=null).map(n=>({imageUrl:n}))}handleNodeInfo(t){t?(this.correctNodeWithAllProps=t,this.fetchItemsFromNode(),this.setDetails(),this.isVisible=!0):(this.isVisible=!1,this.items=[])}toggleView(){this.isExpanded=!this.isExpanded}hideComponent(){this.isVisible=!1}getDirections(){let t=this.nodeInfo;t?this.getDirectionsClicked.emit(t):this.getDirectionsClicked.emit(void 0)}get isOpenNow(){if(!this.correctNodeWithAllProps?.openingHours||!this.correctNodeWithAllProps?.closingHours)return!1;let t=new Date,n=t.getHours()+t.getMinutes()/60,r=0,o=0;if(typeof this.correctNodeWithAllProps.openingHours=="string"){let[a,s]=this.correctNodeWithAllProps.openingHours.split(":").map(Number);r=a+s/60}else typeof this.correctNodeWithAllProps.openingHours=="number"&&(r=this.correctNodeWithAllProps.openingHours);if(typeof this.correctNodeWithAllProps.closingHours=="string"){let[a,s]=this.correctNodeWithAllProps.closingHours.split(":").map(Number);o=a+s/60}else typeof this.correctNodeWithAllProps.closingHours=="number"&&(o=this.correctNodeWithAllProps.closingHours);return n>=r&&n({"white-background":i,"transparent-background":e}),VF=(i,e)=>({"box-shadow":i,display:e}),zF=()=>({width:"436px"}),UF=()=>({width:"344px"});function HF(i,e){if(i&1){let t=ye();P(0,"button",14),re("click",function(){W(t);let r=R(2);return j(r.clearText())}),ie(1,"i",15),E()}}function GF(i,e){if(i&1){let t=ye();P(0,"div",2)(1,"div",10),ie(2,"i",11),E(),P(3,"input",12),re("input",function(r){W(t);let o=R();return j(o.onSearchInput(r))})("click",function(){W(t);let r=R();return j(r.toggleMenu())}),E(),$(4,HF,2,0,"button",13),E()}if(i&2){let t=R();le("ngStyle",t.isMenuVisible?fh(3,zF):fh(4,UF)),k(3),le("value",t.searchTerm),k(),X(t.searchTerm.length?4:-1)}}function WF(i,e){if(i&1){let t=ye();P(0,"div",6)(1,"p"),U(2,"Filtering by: "),P(3,"span",16),U(4),E()(),P(5,"img",17),re("click",function(){W(t);let r=R();return j(r.resetBuildingFilter())}),E()()}if(i&2){let t=R();k(4),me(" ",t.buildingNameToFilter)}}function jF(i,e){if(i&1){let t=ye();P(0,"div",6)(1,"p"),U(2,"Filtering by: "),P(3,"span",16),U(4),E()(),P(5,"img",17),re("click",function(){W(t);let r=R();return j(r.resetGroupFilter())}),E()()}if(i&2){let t=R();k(4),me(" ",t.groupNameToFilter)}}function qF(i,e){i&1&&(P(0,"p",8),U(1),Y(2,"translate"),E()),i&2&&(k(),ae(Z(2,1,"No results")))}function YF(i,e){if(i&1&&ie(0,"img",20),i&2){let t=R().$implicit;le("src",t.poiIcon||t.groupIcon,ua)}}function ZF(i,e){i&1&&ie(0,"img",21)}function KF(i,e){if(i&1){let t=ye();P(0,"li",19),re("click",function(){let r=W(t).$implicit,o=R(2);return j(o.selectToOption(r))}),$(1,YF,1,1,"img",20),$(2,ZF,1,0,"img",21),P(3,"div",22)(4,"span",16),U(5),E(),P(6,"span",23),U(7),E()(),ie(8,"img",24),E()}if(i&2){let t=e.$implicit;k(),X(t.groupIcon||t.poiIcon?1:-1),k(),X(t.groupIcon?-1:2),k(3),ae(t.name),k(2),da("",t.description," ",t.buildingAddress)}}function $F(i,e){if(i&1&&ie(0,"img",20),i&2){let t=R().$implicit;le("src",t.poiIcon||t.groupIcon,ua)}}function XF(i,e){i&1&&ie(0,"img",21)}function QF(i,e){if(i&1){let t=ye();P(0,"li",27),re("click",function(){let r=W(t).$implicit,o=R(3);return j(o.selectToOption(r))}),$(1,$F,1,1,"img",20),$(2,XF,1,0,"img",21),P(3,"div",22)(4,"span",16),U(5),E(),P(6,"span",23),U(7),E()(),ie(8,"img",24),E()}if(i&2){let t=e.$implicit;k(),X(t.groupIcon||t.poiIcon?1:-1),k(),X(t.groupIcon?-1:2),k(3),ae(t.name),k(2),da("",t.description," ",t.buildingAddress)}}function JF(i,e){if(i&1&&(P(0,"div",25)(1,"h4"),U(2),Y(3,"translate"),E()(),an(4,QF,9,5,"li",26,on)),i&2){let t=R(2);k(2),ae(Z(3,1,"Other Results")),k(2),sn(t.allOtherResults)}}function e5(i,e){if(i&1&&(P(0,"div"),an(1,KF,9,5,"li",18,on),$(3,JF,6,3),E()),i&2){let t=R();k(),sn(t.filteredTo),k(2),X((t.buildingNameToFilter||t.groupNameToFilter)&&t.allOtherResults.length?3:-1)}}function t5(i,e){if(i&1){let t=ye();P(0,"tm-new-routing-details",28),re("closeBtnClicked",function(){W(t);let r=R();return j(r.closeMenu())}),E()}if(i&2){let t=R();le("segments",t.segments)("selectedToNode",t.correctNodeWithAllProps)}}var i5=(()=>{class i{constructor(){this.from=[],this.to=[],this.segments=[],this.groupNameToFilter="",this.buildingNameToFilter="",this.fromChange=new ze,this.toChange=new ze,this.inputClicked=new ze,this.filterBuildingClicked=new ze,this.filterGroupClicked=new ze,this.closeMenuClicked=new ze,this.isMenuVisible=!1,this.isInputVisible=!0,this.searchTerm="",this.filteredFrom=[],this.filteredTo=[],this.allOtherResults=[],this.isSearchComponentVisible=!0}updateBuildingFilter(t){this.buildingNameToFilter=t,this.filterOptions()}updateGroupFilter(t){this.groupNameToFilter=t,this.filterOptions()}resetBuildingFilter(){this.buildingNameToFilter="",this.resetSelectorOptions(),this.filterBuildingClicked.emit()}resetGroupFilter(){this.groupNameToFilter="",this.resetSelectorOptions(),this.filterGroupClicked.emit()}clearText(){this.isMenuVisible=!1,this.searchTerm="",this.filterOptions()}ngOnInit(){this.filteredFrom=[...this.from],this.filteredTo=[...this.to],this.allOtherResults=[...this.to]}ngAfterViewInit(){this.stopPropagation()}stopPropagation(){this.searchMenu&&(_s.default.DomEvent.disableClickPropagation(this.searchMenu.nativeElement),_s.default.DomEvent.disableScrollPropagation(this.searchMenu.nativeElement))}setSelectedToNode(t){t&&(this.correctNodeWithAllProps=t)}toggleMenu(){this.isMenuVisible=!this.isMenuVisible,this.inputClicked.emit()}showSearchComponent(){this.isSearchComponentVisible=!0}hideSearchComponent(){this.isSearchComponentVisible=!1}closeMenu(){this.closeMenuClicked.emit()}selectToOption(t){this.segments=[],this.toChange.emit(t)}onSearchInput(t){this.isMenuVisible||(this.isMenuVisible=!this.isMenuVisible,this.inputClicked.emit()),this.searchTerm=t.target.value,this.filterOptions()}resetSelectorOptions(){let t=this.searchTerm.toLowerCase(),n=this.to.filter(r=>r.name.toLowerCase().includes(t));this.buildingNameToFilter&&(n=n.filter(r=>r.buildingName===this.buildingNameToFilter)),this.groupNameToFilter&&(n=n.filter(r=>String(r.group).toLowerCase()===this.groupNameToFilter.toLowerCase())),this.filteredTo=n}filterOptions(){let t=this.searchTerm.toLowerCase(),n=this.to.filter(o=>o.name.toLowerCase().includes(t));this.buildingNameToFilter&&(n=n.filter(o=>o.buildingName===this.buildingNameToFilter)),this.groupNameToFilter&&(n=n.filter(o=>String(o.group).toLowerCase()===this.groupNameToFilter.toLowerCase())),this.filteredTo=n;let r=new Set(this.filteredTo.map(o=>o.id));this.allOtherResults=this.to.filter(o=>o.name.toLowerCase().includes(t)&&!r.has(o.id))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-routing-search-new"]],viewQuery:function(n,r){if(n&1&&(ii(BF,5),ii(RF,5)),n&2){let o;ni(o=ri())&&(r.searchMenu=o.first),ni(o=ri())&&(r.searchComponent=o.first)}},inputs:{from:"from",to:"to",segments:"segments",map:"map",groupNameToFilter:"groupNameToFilter",buildingNameToFilter:"buildingNameToFilter",correctNodeWithAllProps:"correctNodeWithAllProps"},outputs:{fromChange:"fromChange",toChange:"toChange",inputClicked:"inputClicked",filterBuildingClicked:"filterBuildingClicked",filterGroupClicked:"filterGroupClicked",closeMenuClicked:"closeMenuClicked"},standalone:!1,features:[vc([ly])],decls:12,vars:16,consts:[["searchMenu",""],[1,"cb-routing-search-new",3,"ngClass","ngStyle"],[1,"input-container",3,"ngStyle"],[1,"destination-selector-container"],[1,"search-menu"],[1,"filter-container"],[1,"filter-container__content"],[1,"filtered-to-list"],[1,"no-results"],[3,"segments","selectedToNode"],[1,"search-icon"],[1,"fa-solid","fa-magnifying-glass"],["type","text","name","searchTerm","placeholder","Search for Point of Interest",1,"search-text",3,"input","click","value"],[1,"x-btn"],[1,"x-btn",3,"click"],[1,"fa-solid","fa-xmark"],[1,"name"],["src","assets/icons/kiosk/kiosk-close.svg","alt","Close",3,"click"],[1,"filtered-list-item"],[1,"filtered-list-item",3,"click"],["alt","Group Icon",1,"list-item-icon",3,"src"],["src","assets/icons/kiosk/kiosk-no-image.svg","alt","Group Icon",1,"list-item-icon"],[1,"list-item-details"],[1,"details"],["src","assets/icons/kiosk/kiosk-arrow-right.svg","alt","Right arrow",1,"arrow-right"],[1,"section-header"],[1,"filtered-list-item","other-result-item"],[1,"filtered-list-item","other-result-item",3,"click"],[3,"closeBtnClicked","segments","selectedToNode"]],template:function(n,r){n&1&&(P(0,"div",1),$(1,GF,5,5,"div",2),P(2,"div",3)(3,"div",4,0)(5,"div",5),$(6,WF,6,1,"div",6),$(7,jF,6,1,"div",6),E(),P(8,"div",7),$(9,qF,3,3,"p",8),$(10,e5,4,1,"div"),E()()(),$(11,t5,1,2,"tm-new-routing-details",9),E()),n&2&&(le("ngClass",Ss(10,FF,r.isMenuVisible,!r.isMenuVisible))("ngStyle",Ss(13,VF,r.isMenuVisible?"0px 4px 12px 0px #00000029":"none",r.isSearchComponentVisible?"flex":"none")),k(),X(r.isInputVisible?1:-1),k(2),Ri("visible",r.isMenuVisible),k(3),X(r.buildingNameToFilter?6:-1),k(),X(r.groupNameToFilter?7:-1),k(2),X(r.filteredTo.length===0&&r.allOtherResults.length===0?9:-1),k(),X(r.filteredTo.length>0||r.allOtherResults.length>0?10:-1),k(),X(r.segments.length>0?11:-1))},styles:[".x-btn[_ngcontent-%COMP%]{border-radius:50%;color:#a9a9a9;background-color:transparent;border:.02em solid transparent;cursor:pointer;font-size:1.6em;transition:all .3s ease}.x-btn[_ngcontent-%COMP%]:hover{color:#0a2971;border:transparent}.search-text[_ngcontent-%COMP%]{font-weight:700;font-size:20px;line-height:20px;border:none;outline:none;width:100%}.search-text[_ngcontent-%COMP%]:focus::placeholder{font-weight:500}.search-text[_ngcontent-%COMP%]::placeholder{color:#000} .search-text i{font-size:2em;position:absolute;left:1em}.search-menu[_ngcontent-%COMP%]{display:none}.search-menu.visible[_ngcontent-%COMP%]{display:block}.filter-container[_ngcontent-%COMP%]{position:relative;padding:1rem 0}.filter-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:20px;line-height:24px}.filter-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:700}.close-btn[_ngcontent-%COMP%]{border-radius:50%;background-color:transparent;color:#0a2971;border:.02em solid #0a2971;height:1.7em;cursor:pointer;position:absolute;top:-.2em;right:.3em;transition:all .3s ease}.close-btn[_ngcontent-%COMP%]:hover{background-color:#0a2971;color:#fff}.name[_ngcontent-%COMP%]{color:#000;font-weight:700}.filtered-to-list[_ngcontent-%COMP%]{box-shadow:0 4px 12px #0000001f;border-radius:12px;max-height:50vh;overflow:auto}.filtered-to-list[_ngcontent-%COMP%] .filtered-list-item[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:52px calc(100% - 108px) 32px;gap:12px;align-items:center}.filtered-to-list[_ngcontent-%COMP%] .filtered-list-item[_ngcontent-%COMP%] .list-item-icon[_ngcontent-%COMP%]{width:52px;height:auto;border-radius:50%}.filtered-to-list[_ngcontent-%COMP%] .filtered-list-item[_ngcontent-%COMP%] .list-item-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.filtered-to-list[_ngcontent-%COMP%] .filtered-list-item[_ngcontent-%COMP%] .list-item-details[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:700;font-size:20px;line-height:20px}.filtered-to-list[_ngcontent-%COMP%] .filtered-list-item[_ngcontent-%COMP%] .list-item-details[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{font-weight:500;font-size:20px;line-height:26px;word-break:break-word}.filtered-to-list[_ngcontent-%COMP%] .filtered-list-item[_ngcontent-%COMP%]:not(:last-child){border:1px solid #e6e6e6}.no-results[_ngcontent-%COMP%]{color:red;padding:1em}.list-item-placeholder[_ngcontent-%COMP%]{background-color:transparent} .text{color:#000;font-size:bold}.cb-routing-search-new[_ngcontent-%COMP%]{padding:16px;border-radius:.5em;width:468px;box-shadow:0 3px 5px 2px #82818154;-webkit-box-shadow:0px 3px 5px 2px rgba(130,129,129,.33);-moz-box-shadow:0px 3px 5px 2px rgba(130,129,129,.33);display:flex;align-items:flex-end;flex-direction:column;transition:width .1s ease-in}.white-background[_ngcontent-%COMP%]{background-color:#fff}.transperant-background[_ngcontent-%COMP%]{background-color:transparent}.input-container[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:60px;border-radius:78px;background:#fff;grid-gap:8px;gap:8px;padding:3px 24px;border:1px solid #b5b5b5;transition:width 50ms ease-in-out}.search-icon[_ngcontent-%COMP%]{font-size:1.5em;color:#919191}.filter-container[_ngcontent-%COMP%]{width:100%}.filter-container[_ngcontent-%COMP%] .filter-container__content[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;align-items:center}.filter-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.filter-container[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.destination-selector-container[_ngcontent-%COMP%]{width:100%}.section-header[_ngcontent-%COMP%]{padding:8px 16px}.section-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:#666;text-transform:uppercase;letter-spacing:.5px}"]})}}return i})(),u0=class extends _s.default.Control{onAdd(e){return _s.default.DomUtil.create("div")}constructor(e){super(e)}addToCustomPosition(e,t={}){let n=this.onAdd(e),r=e.getContainer(),o=_s.default.DomUtil.create("div","leaflet-custom-control-group",r);return o.style.position="absolute",t.top&&(o.style.top=t.top),t.right&&(o.style.right=t.right),t.bottom&&(o.style.bottom=t.bottom),t.left&&(o.style.left=t.left),o.style.zIndex=t.zIndex||"700",o.appendChild(n),this}};var Zp=ve(Ae());var d0=class extends Zp.default.Control{onAdd(e){return Zp.default.DomUtil.create("div")}addToCustomPosition(e,t,n){let r=this.onAdd(e),o=e.getContainer(),a=Zp.default.DomUtil.create("div","leaflet-custom-control",o);return a.style.position="absolute",a.style.top=t,a.style.left="50%",a.style.transform="translateX(-50%)",a.style.zIndex="1000",a.appendChild(r),this}};var wne=zn.icon({iconUrl:"/assets/icons/youarehere.png",iconSize:[143,40],iconAnchor:[35,35],className:"custom-marker-icon"});var ys=(function(i){return i.MEDIAN="MEDIAN",i.QOSCOUNT="QOSCOUNT",i})(ys||{}),c2={[Ls.rssi]:[">-115 dBm","-116 dBm","-117 dBm","-118 dBm","-119 dBm","<-120 dBm"],[ys.MEDIAN]:["0m","5m","10m","15m","≥20m"],[Ls.snr]:[">-7 dB","-9 dB","-11 dB","≤-13 dB"],[Ls.latency]:["<5 sec","6 sec","7 sec","8 sec","9 sec","≥10 sec"],[Ls.rf]:["2","1","0"],[ys.QOSCOUNT]:[">20","15","10","<5"]};var n5=i=>({"background-image":i});function r5(i,e){if(i&1&&(P(0,"span",3),ie(1,"div",4),E()),i&2){let t=e.$implicit;le("innerHTML",t,fc)}}function o5(i,e){if(i&1&&an(0,r5,2,1,"span",3,on),i&2){let t=R();sn(t.levels)}}var u2=(()=>{class i{constructor(){this.tmIndoorServiceV3=_e(va),this.colorBarPurpose=ys.MEDIAN}ngOnInit(){return ge(this,null,function*(){if(this.levels=c2[this.colorBarPurpose],this.colorBarPurpose===ys.MEDIAN){let t=yield this.tmIndoorServiceV3.getColorBar();t&&t.url&&(this.colorbarImg=t.url)}})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Te({type:i,selectors:[["tm-median-error-colorbar"]],standalone:!1,decls:4,vars:4,consts:[[1,"colorbar-area"],[1,"color-scale"],[1,"colodiv",3,"ngStyle"],[3,"innerHTML"],[1,"bar-till"]],template:function(n,r){n&1&&(P(0,"div",0)(1,"div",1),$(2,o5,2,0),E(),ie(3,"div",2),E()),n&2&&(k(2),X(r.levels?2:-1),k(),le("ngStyle",mr(2,n5,'url("'+r.colorbarImg+'")')))},dependencies:[yc],styles:["[_nghost-%COMP%]{position:absolute;bottom:0;width:calc(100% - 30px);background-color:#fff;z-index:1000}.colorbar-area[_ngcontent-%COMP%]{margin:5px 0 0;position:relative}.color-scale[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.color-scale[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center}.color-scale[_ngcontent-%COMP%] span[_ngcontent-%COMP%] .bar-till[_ngcontent-%COMP%]{width:1px;height:10px;background:#000}.colodiv[_ngcontent-%COMP%]{width:100%;height:30px;flex-shrink:0;border:1px solid #000;background-size:contain}"]})}}return i})();var d2=class extends Xo{constructor(e,t,n){super(e,t),this.name=e,this.imgPipe=t,this.popupService=n,this.layer.on("add",()=>{this.controls=this.popupService.createComponent(u2,{marker:this}),this.map?.getContainer().parentElement?.appendChild(this.controls?.location.nativeElement)}),this.layer.on("remove",()=>{this.controls&&(this.controls.destroy(),this.map?.getContainer().parentElement?.removeChild(this.controls.location.nativeElement)),delete this.controls})}};var a5=ve(Ae());var Zr=ve(Ae());var Gne=Zr.icon({iconUrl:"/assets/images/route-test-start.png",iconSize:[32,32]}),Wne=Zr.icon({iconUrl:"/assets/images/route-test-end.png",iconSize:[32,32]});var d5=ve(Ae());var p5=ve(Qv());var l5=[{key:"shop",values:["convenience","supermarket","clothes","electronics"],type:"input"},{key:"access",values:["yes","no","private","customers"],type:"select"},{key:"wheelchair",values:["yes","no","limited"],type:"select"},{key:"opening_hours",values:["24/7","Mo-Fr 09:00-17:00"],type:"input"},{key:"phone",values:[],type:"input"},{key:"website",values:[],type:"input"},{key:"description",values:[],type:"input"},{key:"level",values:[],type:"chips"}],c5=[{key:"node_icon",values:[],type:"icon"},{key:"node_visibility",values:["AlwaysVisible","FloorVisible","None"],type:"select"},{key:"fromNode",values:["true","false"],type:"toggle"},{key:"amenity",values:["true","false"],type:"toggle"},{key:"searchable",values:["yes","no"],type:"toggle"},{key:"connect_to",values:[],type:"chips"},{key:"kioskLocation",values:["true","false"],type:"toggle"},{key:"kioskBearing",values:["0","90","180","270"],type:"input"},{key:"group",values:["Restroom","Restaurant","Shop","Parking"],type:"input"},{key:"group_icon",values:[],type:"icon"},{key:"group_order",values:["1","2","3","4","5"],type:"select"},{key:"group_visibility",values:["AlwaysVisible","FloorVisible","None"],type:"select"},{key:"node_label",values:["yes","no"],type:"toggle"}],ere=[...l5,...c5];var u5=ve(Ae());var Kp=ve(Ae());var p0=ve(Ae());var LS="AUTO_INDEXATION_CHANGE";export{lt as a,Be as b,Wt as c,Es as d,Me as e,Xe as f,q as g,We as h,Oe as i,jt as j,D as k,J as l,ot as m,QT as n,Pe as o,Ye as p,bn as q,Q as r,ue as s,te as t,Re as u,ne as v,Vc as w,eo as x,eE as y,to as z,iE as A,Ee as B,Wn as C,Yt as D,ce as E,oE as F,Nt as G,Bt as H,he as I,Ih as J,gE as K,Si as L,ai as M,w4 as N,x4 as O,Rt as P,Hi as Q,_b as R,S4 as S,ln as T,ro as U,Yn as V,$c as W,Vh as X,Zn as Y,nt as Z,Ce as _,si as $,Kh as aa,gt as ba,iu as ca,fi as da,$b as ea,Lr as fa,ff as ga,fP as ha,mw as ia,Mn as ja,vu as ka,ji as la,qi as ma,Zs as na,at as oa,OP as pa,Ft as qa,bw as ra,Cu as sa,AP as ta,Mw as ua,kw as va,Zt as wa,Pf as xa,Lu as ya,bo as za,Qe as Aa,If as Ba,kn as Ca,iz as Da,Ra as Ea,nz as Fa,ZP as Ga,hD as Ha,fn as Ia,Le as Ja,Qi as Ka,Kt as La,Ei as Ma,It as Na,Jn as Oa,sm as Pa,xU as Qa,sl as Ra,ll as Sa,fm as Ta,CU as Ua,MU as Va,fl as Wa,gl as Xa,vl as Ya,Io as Za,Zu as _a,_C as $a,yl as ab,ed as bb,Cm as cb,bC as db,IH as eb,PI as fb,DI as gb,OI as hb,Dm as ib,MC as jb,BI as kb,FI as lb,Am as mb,UI as nb,HI as ob,Nm as pb,GI as qb,WI as rb,jI as sb,Bm as tb,nd as ub,d6 as vb,p6 as wb,rd as xb,NC as yb,h6 as zb,OC as Ab,vt as Bb,D6 as Cb,kt as Db,Fo as Eb,JC as Fb,bd as Gb,xd as Hb,i1 as Ib,Q6 as Jb,J6 as Kb,rG as Lb,sG as Mb,Td as Nb,uO as Ob,$a as Pb,Xa as Qb,Ed as Rb,rt as Sb,_i as Tb,MG as Ub,is as Vb,vW as Wb,Gd as Xb,o8 as Yb,a8 as Zb,s8 as _b,Nn as $b,nr as ac,Pl as bc,vn as cc,Dl as dc,B8 as ec,R8 as fc,u7 as gc,Nl as hc,Lg as ic,Kd as jc,y7 as kc,b7 as lc,Tg as mc,x7 as nc,OM as oc,Jd as pc,Pg as qc,Ig as rc,Vr as sc,mp as tc,gp as uc,Gl as vc,Mk as wc,Hj as xc,Gj as yc,fv as zc,gv as Ac,Zo as Bc,yp as Cc,pq as Dc,hq as Ec,Wk as Fc,LB as Gc,qk as Hc,Yk as Ic,Hq as Jc,jk as Kc,Zk as Lc,EB as Mc,Gq as Nc,Wq as Oc,jq as Pc,PB as Qc,Kk as Rc,av as Sc,Pv as Tc,Ko as Uc,Lp as Vc,hS as Wc,rR as Xc,qY as Yc,YY as Zc,Dp as _c,Nv as $c,MZ as ad,kZ as bd,SZ as cd,Rv as dd,Tt as ed,jl as fd,fR as gd,NZ as hd,RZ as id,kS as jd,aK as kd,LS as ld,Zl as md,Xo as nd,Vv as od,ES as pd,$l as qd,Op as rd,Rn as sd,Ai as td,Hv as ud,fs as vd,FS as wd,t3 as xd,r3 as yd,o3 as zd,d3 as Ad,M3 as Bd,GJ as Cd,Qv as Dd,gs as Ed,r2 as Fd,aF as Gd,Vte as Hd,mF as Id,vF as Jd,l2 as Kd,NF as Ld,i5 as Md,d2 as Nd};